From 10771c88a8aeaaac013ed8dadd8e8194884e84d4 Mon Sep 17 00:00:00 2001 From: "clandestine.eth" <96172957+0xClandestine@users.noreply.github.com> Date: Mon, 1 Dec 2025 10:56:04 -0500 Subject: [PATCH 1/8] chore: bump foundry ci --- .github/workflows/foundry.yml | 8 ++++---- .github/workflows/validate-deployment-scripts.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/foundry.yml b/.github/workflows/foundry.yml index abbebc87be..d37d891b6a 100644 --- a/.github/workflows/foundry.yml +++ b/.github/workflows/foundry.yml @@ -58,7 +58,7 @@ jobs: - name: Install Foundry uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de with: - version: v1.3.5 + version: v1.5.0 # Run Forge's formatting checker to ensure consistent code style. - name: "Forge Fmt" @@ -123,7 +123,7 @@ jobs: - name: "Install Foundry" uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de with: - version: v1.3.5 + version: v1.5.0 # Run storage diff check to detect storage layout incompatibilities. - name: "Mainnet Storage Diff" @@ -170,7 +170,7 @@ jobs: - name: "Install Foundry" uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de with: - version: v1.3.5 + version: v1.5.0 # Install LCOV for coverage report generation. - name: Install LCOV (Prebuilt) @@ -256,7 +256,7 @@ jobs: - name: "Install Foundry" uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de with: - version: v1.3.5 + version: v1.5.0 - name: Build contracts on PR branch run: | diff --git a/.github/workflows/validate-deployment-scripts.yml b/.github/workflows/validate-deployment-scripts.yml index d3db0903c5..06a4a4be78 100644 --- a/.github/workflows/validate-deployment-scripts.yml +++ b/.github/workflows/validate-deployment-scripts.yml @@ -48,7 +48,7 @@ jobs: - name: Install Foundry uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de with: - version: v1.3.5 + version: v1.5.0 # Run Forge's formatting checker to ensure consistent code style. - name: "Forge Fmt" From 78cb57c6defedce7f60ccd86269f15d065f68acc Mon Sep 17 00:00:00 2001 From: "clandestine.eth" <96172957+0xClandestine@users.noreply.github.com> Date: Mon, 1 Dec 2025 10:53:05 -0500 Subject: [PATCH 2/8] feat: update foundry.toml --- foundry.toml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/foundry.toml b/foundry.toml index 1b8983eddc..bf8f7cd18f 100644 --- a/foundry.toml +++ b/foundry.toml @@ -92,6 +92,8 @@ line_length = 120 # Default: 120 # Number of spaces per indentation level tab_width = 4 # Default: 4 + # Style of indent + style = "space" # Options: "space", "tab" # Whether to print spaces between brackets bracket_spacing = false # Style of uint/int256 types @@ -100,8 +102,22 @@ quote_style = "double" # Options: "double", "single", "preserve" # Style of underscores in number literals number_underscore = "thousands" # Options: "preserve", "thousands", "remove" + # Style of underscores in hex literals + hex_underscore = "preserve" # Options: "preserve", "remove", "bytes" + # Print space in state variable, function and modifier `override` attribute + override_spacing = false # Whether or not to wrap comments at line_length wrap_comments = false + # Style of doc comments + docs_style = "line" # Options: "preserve", "line", "block" + # Add new line at start and end of contract declarations + contract_new_lines = false + # Whether to suppress spaces around the power operator (**) + pow_no_space = true + # Style that determines if a broken list should keep its elements together before breaking individually + prefer_compact = "none" # Options: "none", "calls", "events", "errors", "events_errors", "all" + # Keep single imports on a single line even if they exceed line length + single_line_imports = false # List of files to ignore during formatting (can use glob patterns) ignore = [ "./src/test/**/*" From edcbe73a5ee59adbcec132f45a7e89c063103e42 Mon Sep 17 00:00:00 2001 From: "clandestine.eth" <96172957+0xClandestine@users.noreply.github.com> Date: Mon, 1 Dec 2025 14:46:37 -0500 Subject: [PATCH 3/8] chore: make fmt --- .../deploy/devnet/deploy_from_scratch.s.sol | 19 +- .../local/deploy_from_scratch.slashing.s.sol | 19 +- .../multichain/create_generator_config.s.sol | 27 +- .../multichain/deploy_generator.s.sol.sol | 47 +- .../update-generator/1-updateGenerator.s.sol | 10 +- script/releases/CoreContractsDeployer.sol | 44 +- script/releases/CoreUpgradeQueueBuilder.sol | 151 +-- script/releases/CrosschainDeployLib.sol | 18 +- script/releases/Env.sol | 83 +- script/releases/TestUtils.sol | 393 ++---- .../1-deployProtocolRegistryProxy.s.sol | 9 +- .../2-deployProtocolRegistryImpl.s.sol | 4 +- .../3-upgradeProtocolRegistry.s.sol | 4 +- .../4-deployCoreContracts.s.sol | 28 +- .../5-queueUpgrade.s.sol | 33 +- .../1-deployProtocolRegistryProxy.s.sol | 9 +- .../2-deployProtocolRegistryImpl.s.sol | 4 +- .../3-upgradeProtocolRegistry.s.sol | 10 +- .../4-deployCoreContracts.s.sol | 80 +- .../v1.9.0-slashing-ux/5-queueUpgrade.s.sol | 55 +- script/tasks/deposit_into_strategy.s.sol | 7 +- script/tasks/register_as_operator.s.sol | 6 +- .../register_operator_to_operatorSet.s.sol | 6 +- script/tasks/withdraw_from_strategy.s.sol | 7 +- script/utils/ExistingDeploymentParser.sol | 20 +- src/contracts/avs/task/TaskMailbox.sol | 203 ++- src/contracts/avs/task/TaskMailboxStorage.sol | 32 +- src/contracts/core/AVSDirectory.sol | 44 +- src/contracts/core/AllocationManager.sol | 237 ++-- src/contracts/core/AllocationManagerView.sol | 103 +- src/contracts/core/DelegationManager.sol | 234 ++-- src/contracts/core/ProtocolRegistry.sol | 48 +- src/contracts/core/ReleaseManager.sol | 34 +- src/contracts/core/RewardsCoordinator.sol | 180 +-- src/contracts/core/StrategyManager.sol | 126 +- .../core/storage/AVSDirectoryStorage.sol | 8 +- .../core/storage/AllocationManagerStorage.sol | 11 +- .../core/storage/DelegationManagerStorage.sol | 34 +- .../core/storage/ProtocolRegistryStorage.sol | 25 +- .../core/storage/ReleaseManagerStorage.sol | 8 +- .../storage/RewardsCoordinatorStorage.sol | 24 +- .../core/storage/StrategyManagerStorage.sol | 27 +- src/contracts/interfaces/IAVSDirectory.sol | 125 +- src/contracts/interfaces/IAVSRegistrar.sol | 40 +- src/contracts/interfaces/IAVSTaskHook.sol | 70 +- .../interfaces/IAllocationManager.sol | 897 +++++++------- .../interfaces/IBN254CertificateVerifier.sol | 313 +++-- src/contracts/interfaces/IBackingEigen.sol | 70 +- .../interfaces/IBaseCertificateVerifier.sol | 93 +- .../interfaces/ICrossChainRegistry.sol | 338 +++-- .../interfaces/IDelegationManager.sol | 511 ++++---- .../interfaces/IECDSACertificateVerifier.sol | 257 ++-- src/contracts/interfaces/IEigen.sol | 58 +- src/contracts/interfaces/IEigenPod.sol | 212 ++-- src/contracts/interfaces/IEigenPodManager.sol | 96 +- src/contracts/interfaces/IKeyRegistrar.sol | 389 +++--- .../interfaces/IOperatorTableCalculator.sol | 139 +-- .../interfaces/IOperatorTableUpdater.sol | 289 ++--- src/contracts/interfaces/IPausable.sol | 54 +- src/contracts/interfaces/IPauserRegistry.sol | 8 +- .../interfaces/IPermissionController.sol | 222 ++-- .../interfaces/IProtocolRegistry.sol | 144 +-- src/contracts/interfaces/IProxyAdmin.sol | 84 +- src/contracts/interfaces/IReleaseManager.sol | 32 +- .../interfaces/IRewardsCoordinator.sol | 637 +++++----- src/contracts/interfaces/IShareManager.sol | 44 +- .../interfaces/ISignatureUtilsMixin.sol | 8 +- src/contracts/interfaces/IStrategy.sol | 151 +-- src/contracts/interfaces/IStrategyFactory.sol | 30 +- src/contracts/interfaces/IStrategyManager.sol | 241 ++-- src/contracts/interfaces/ITaskMailbox.sol | 413 +++---- src/contracts/libraries/BN254.sol | 96 +- .../libraries/BN254SignatureVerifier.sol | 42 +- src/contracts/libraries/BeaconChainProofs.sol | 42 +- src/contracts/libraries/Endian.sol | 12 +- src/contracts/libraries/Merkle.sol | 188 ++- src/contracts/libraries/OperatorSetLib.sol | 8 +- src/contracts/libraries/SlashingLib.sol | 64 +- src/contracts/libraries/Snapshots.sol | 134 +- .../mixins/Deprecated_OwnableUpgradeable.sol | 32 +- src/contracts/mixins/LeafCalculatorMixin.sol | 76 +- .../mixins/PermissionControllerMixin.sol | 46 +- src/contracts/mixins/SplitContractMixin.sol | 34 +- .../multichain/BN254CertificateVerifier.sol | 131 +- .../BN254CertificateVerifierStorage.sol | 8 +- .../multichain/CrossChainRegistry.sol | 113 +- .../multichain/CrossChainRegistryStorage.sol | 23 +- .../multichain/ECDSACertificateVerifier.sol | 91 +- .../ECDSACertificateVerifierStorage.sol | 11 +- .../multichain/OperatorTableUpdater.sol | 144 +-- .../OperatorTableUpdaterStorage.sol | 8 +- src/contracts/permissions/KeyRegistrar.sol | 170 +-- .../permissions/KeyRegistrarStorage.sol | 8 +- src/contracts/permissions/Pausable.sol | 39 +- src/contracts/permissions/PauserRegistry.sol | 23 +- .../permissions/PermissionController.sol | 75 +- .../PermissionControllerStorage.sol | 8 +- src/contracts/pods/EigenPod.sol | 135 +- src/contracts/pods/EigenPodManager.sol | 71 +- src/contracts/pods/EigenPodManagerStorage.sol | 73 +- .../pods/EigenPodPausingConstants.sol | 8 +- src/contracts/pods/EigenPodStorage.sol | 8 +- src/contracts/strategies/EigenStrategy.sol | 104 +- src/contracts/strategies/StrategyBase.sol | 160 ++- .../strategies/StrategyBaseTVLLimits.sol | 69 +- src/contracts/strategies/StrategyFactory.sol | 46 +- .../strategies/StrategyFactoryStorage.sol | 16 +- src/contracts/token/BackingEigen.sol | 96 +- src/contracts/token/Eigen.sol | 100 +- src/test/harnesses/EigenHarness.sol | 10 +- src/test/integration/IntegrationBase.t.sol | 166 +-- src/test/integration/IntegrationChecks.t.sol | 94 +- .../integration/IntegrationDeployer.t.sol | 36 +- .../MultichainIntegrationBase.t.sol | 81 +- .../MultichainIntegrationChecks.t.sol | 101 +- .../mainnet/BeaconChainProofs.sol | 88 +- .../mainnet/IAllocationManager.sol | 66 +- .../mainnet/IBeaconChainOracle.sol | 52 +- .../mainnet/IDelayedWithdrawalRouter.sol | 26 +- .../mainnet/IDelegationManager.sol | 398 +++--- .../mainnet/IEigenPod.sol | 268 ++-- .../mainnet/IEigenPodManager.sol | 166 +-- .../mainnet/IStrategyManager.sol | 386 +++--- .../integration/mocks/BeaconChainMock.t.sol | 50 +- .../integration/mocks/EIP_7002_Mock.t.sol | 16 +- .../integration/mocks/EIP_7251_Mock.t.sol | 16 +- src/test/integration/mocks/LibProofGen.t.sol | 52 +- .../Deposit_Delegate_Queue_Complete.t.sol | 25 +- .../Deposit_Delegate_UpdateBalance.t.sol | 126 +- .../tests/HighDSF_Multiple_Deposits.t.sol | 12 +- .../tests/Multichain_Full_Flow.t.sol | 38 +- ...chain_Generation_Reservation_Removal.t.sol | 14 +- .../tests/Multichain_Timing_Tests.t.sol | 84 +- src/test/integration/tests/Timing.t.sol | 46 +- .../Register_Allocate_Slash_VerifyWC_.t.sol | 84 +- .../tests/eigenpod/SlashBC_OneBCSF.t.sol | 32 +- .../tests/eigenpod/Slashed_Eigenpod_BC.t.sol | 6 +- .../VerifyWC_StartCP_CompleteCP.t.sol | 68 +- src/test/integration/users/User.t.sol | 34 +- .../mocks/AVSTaskHookReentrantAttacker.sol | 6 +- src/test/mocks/AllocationManagerMock.sol | 6 +- .../mocks/BN254CertificateVerifierMock.sol | 19 +- src/test/mocks/DelegationManagerMock.sol | 8 +- src/test/mocks/ERC20Mock.sol | 306 +++-- src/test/mocks/ERC20_OneWeiFeeOnTransfer.sol | 602 ++++----- src/test/mocks/ETHDepositMock.sol | 3 +- src/test/mocks/EigenPodManagerMock.sol | 17 +- src/test/mocks/EigenPodMock.sol | 10 +- src/test/mocks/MockAVSRegistrar.sol | 8 +- src/test/mocks/MockAVSTaskHook.sol | 41 +- .../mocks/MockBN254CertificateVerifier.sol | 94 +- .../MockBN254CertificateVerifierFailure.sol | 102 +- .../mocks/MockECDSACertificateVerifier.sol | 94 +- .../MockECDSACertificateVerifierFailure.sol | 94 +- src/test/mocks/MockERC20.sol | 4 +- src/test/mocks/MockSimpleERC20.sol | 8 +- src/test/mocks/StrategyManagerMock.sol | 40 +- src/test/unit/AVSDirectoryUnit.t.sol | 4 +- src/test/unit/AllocationManagerUnit.t.sol | 479 ++++--- .../unit/BN254CertificateVerifierUnit.t.sol | 98 +- src/test/unit/CrossChainRegistryUnit.t.sol | 84 +- src/test/unit/DelegationUnit.t.sol | 1096 +++++++---------- .../unit/ECDSACertificateVerifierUnit.t.sol | 108 +- src/test/unit/EigenPodManagerUnit.t.sol | 57 +- src/test/unit/EigenPodUnit.t.sol | 106 +- src/test/unit/KeyRegistrarUnit.t.sol | 73 +- src/test/unit/OperatorTableUpdaterUnit.t.sol | 4 +- src/test/unit/PausableUnit.t.sol | 2 +- src/test/unit/RewardsCoordinatorUnit.t.sol | 249 ++-- src/test/unit/StrategyBaseUnit.t.sol | 16 +- src/test/unit/StrategyFactoryUnit.t.sol | 12 +- src/test/unit/StrategyManagerUnit.t.sol | 99 +- src/test/unit/TaskMailboxUnit.t.sol | 37 +- src/test/utils/BN256G2.sol | 52 +- src/test/utils/BytesLib.sol | 2 +- src/test/utils/EigenPodUser.t.sol | 30 +- src/test/utils/Random.sol | 1 - 177 files changed, 8046 insertions(+), 9614 deletions(-) diff --git a/script/deploy/devnet/deploy_from_scratch.s.sol b/script/deploy/devnet/deploy_from_scratch.s.sol index 2769180f87..6c646de7e2 100644 --- a/script/deploy/devnet/deploy_from_scratch.s.sol +++ b/script/deploy/devnet/deploy_from_scratch.s.sol @@ -187,10 +187,8 @@ contract DeployFromScratch is Script, Test { eigenLayerPauserReg = new PauserRegistry(pausers, executorMultisig); } - /** - * First, deploy upgradeable proxy contracts that **will point** to the implementations. Since the implementation contracts are - * not yet deployed, we give these proxies an empty contract as the initial implementation, to act as if they have no code. - */ + /// First, deploy upgradeable proxy contracts that **will point** to the implementations. Since the implementation contracts are + /// not yet deployed, we give these proxies an empty contract as the initial implementation, to act as if they have no code. emptyContract = new EmptyContract(); delegation = DelegationManager( address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) @@ -240,8 +238,9 @@ contract DeployFromScratch is Script, Test { SEMVER ); - strategyManagerImplementation = - new StrategyManager(IAllocationManager(address(allocationManager)), delegation, eigenLayerPauserReg, SEMVER); + strategyManagerImplementation = new StrategyManager( + IAllocationManager(address(allocationManager)), delegation, eigenLayerPauserReg, SEMVER + ); avsDirectoryImplementation = new AVSDirectory(delegation, eigenLayerPauserReg, SEMVER); eigenPodManagerImplementation = new EigenPodManager(ethPOSDeposit, eigenPodBeacon, delegation, eigenLayerPauserReg); @@ -513,15 +512,15 @@ contract DeployFromScratch is Script, Test { ); require( eigenLayerProxyAdmin.getProxyImplementation( - ITransparentUpgradeableProxy(payable(address(rewardsCoordinator))) - ) == address(rewardsCoordinatorImplementation), + ITransparentUpgradeableProxy(payable(address(rewardsCoordinator))) + ) == address(rewardsCoordinatorImplementation), "rewardsCoordinator: implementation set incorrectly" ); require( eigenLayerProxyAdmin.getProxyImplementation( - ITransparentUpgradeableProxy(payable(address(allocationManager))) - ) == address(allocationManagerImplementation), + ITransparentUpgradeableProxy(payable(address(allocationManager))) + ) == address(allocationManagerImplementation), "allocationManager: implementation set incorrectly" ); diff --git a/script/deploy/local/deploy_from_scratch.slashing.s.sol b/script/deploy/local/deploy_from_scratch.slashing.s.sol index 53797d2754..2bae06bc72 100644 --- a/script/deploy/local/deploy_from_scratch.slashing.s.sol +++ b/script/deploy/local/deploy_from_scratch.slashing.s.sol @@ -198,10 +198,8 @@ contract DeployFromScratch is Script, Test { eigenLayerPauserReg = new PauserRegistry(pausers, executorMultisig); } - /** - * First, deploy upgradeable proxy contracts that **will point** to the implementations. Since the implementation contracts are - * not yet deployed, we give these proxies an empty contract as the initial implementation, to act as if they have no code. - */ + /// First, deploy upgradeable proxy contracts that **will point** to the implementations. Since the implementation contracts are + /// not yet deployed, we give these proxies an empty contract as the initial implementation, to act as if they have no code. emptyContract = new EmptyContract(); delegation = DelegationManager( address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) @@ -249,8 +247,9 @@ contract DeployFromScratch is Script, Test { MIN_WITHDRAWAL_DELAY, SEMVER ); - strategyManagerImplementation = - new StrategyManager(IAllocationManager(address(allocationManager)), delegation, eigenLayerPauserReg, SEMVER); + strategyManagerImplementation = new StrategyManager( + IAllocationManager(address(allocationManager)), delegation, eigenLayerPauserReg, SEMVER + ); avsDirectoryImplementation = new AVSDirectory(delegation, eigenLayerPauserReg, SEMVER); eigenPodManagerImplementation = new EigenPodManager(ethPOSDeposit, eigenPodBeacon, delegation, eigenLayerPauserReg); @@ -519,15 +518,15 @@ contract DeployFromScratch is Script, Test { ); require( eigenLayerProxyAdmin.getProxyImplementation( - ITransparentUpgradeableProxy(payable(address(rewardsCoordinator))) - ) == address(rewardsCoordinatorImplementation), + ITransparentUpgradeableProxy(payable(address(rewardsCoordinator))) + ) == address(rewardsCoordinatorImplementation), "rewardsCoordinator: implementation set incorrectly" ); require( eigenLayerProxyAdmin.getProxyImplementation( - ITransparentUpgradeableProxy(payable(address(allocationManager))) - ) == address(allocationManagerImplementation), + ITransparentUpgradeableProxy(payable(address(allocationManager))) + ) == address(allocationManagerImplementation), "allocationManager: implementation set incorrectly" ); diff --git a/script/deploy/multichain/create_generator_config.s.sol b/script/deploy/multichain/create_generator_config.s.sol index bd6b0336f3..38cc183c96 100644 --- a/script/deploy/multichain/create_generator_config.s.sol +++ b/script/deploy/multichain/create_generator_config.s.sol @@ -16,7 +16,11 @@ contract CreateGeneratorConfig is Script, Test { using Merkle for bytes32[]; using BN254 for BN254.G1Point; - function run(string memory network, uint256 xCoord, uint256 yCoord) public { + function run( + string memory network, + uint256 xCoord, + uint256 yCoord + ) public { // Network must be preprod, testnet-sepolia, or mainnet require( _strEq(network, "preprod-hoodi") || _strEq(network, "testnet-sepolia") || _strEq(network, "mainnet"), @@ -26,11 +30,9 @@ contract CreateGeneratorConfig is Script, Test { // Create G1Point from provided coordinates BN254.G1Point memory publicKeyG1 = BN254.G1Point({X: xCoord, Y: yCoord}); - /** - * - * Create the `BN254OperatorSetInfo` struct - * - */ + /// + /// Create the `BN254OperatorSetInfo` struct + /// // 1. Generate the `BN254OperatorSetInfo` struct IOperatorTableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo; @@ -51,11 +53,9 @@ contract CreateGeneratorConfig is Script, Test { ); operatorSetInfo.operatorInfoTreeRoot = operatorInfoLeaves.merkleizeKeccak(); - /** - * - * OUTPUT - OPERATOR SET INFO (TOML FORMAT) - * - */ + /// + /// OUTPUT - OPERATOR SET INFO (TOML FORMAT) + /// // Write operator set info to TOML file _writeOperatorSetToml(network, operatorSetInfo); @@ -113,7 +113,10 @@ contract CreateGeneratorConfig is Script, Test { vm.writeToml(finalJson, outputPath); } - function _strEq(string memory a, string memory b) internal pure returns (bool) { + function _strEq( + string memory a, + string memory b + ) internal pure returns (bool) { return keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b)); } diff --git a/script/deploy/multichain/deploy_generator.s.sol.sol b/script/deploy/multichain/deploy_generator.s.sol.sol index 5f9176ef9f..211911f3b6 100644 --- a/script/deploy/multichain/deploy_generator.s.sol.sol +++ b/script/deploy/multichain/deploy_generator.s.sol.sol @@ -19,12 +19,13 @@ contract DeployGenerator is Script, Test { using Merkle for bytes32[]; using BN254 for BN254.G1Point; - function run(string memory network, string memory salt) public { - /** - * - * WALLET CREATION - * - */ + function run( + string memory network, + string memory salt + ) public { + /// + /// WALLET CREATION + /// require( _strEq(network, "preprod-hoodi") || _strEq(network, "testnet-sepolia") || _strEq(network, "mainnet"), "Invalid network" @@ -33,11 +34,9 @@ contract DeployGenerator is Script, Test { // 1. Create a BN254 Wallet using random salt Operator memory operator = OperatorWalletLib.createOperator(salt); - /** - * - * Create the `BN254OperatorInfo` struct - * - */ + /// + /// Create the `BN254OperatorInfo` struct + /// // 1. Generate the `BN254OperatorInfo` struct IOperatorTableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo; @@ -65,26 +64,25 @@ contract DeployGenerator is Script, Test { ); operatorSetInfo.operatorInfoTreeRoot = operatorInfoLeaves.merkleizeKeccak(); - /** - * - * OUTPUT - OPERATOR SET INFO (TOML FORMAT) - * - */ + /// + /// OUTPUT - OPERATOR SET INFO (TOML FORMAT) + /// // Write operator set info to TOML file _writeOperatorSetToml(network, operatorSetInfo); - /** - * - * OUTPUT - BLS WALLET - * - */ + /// + /// OUTPUT - BLS WALLET + /// // Write operator data to a separate function to avoid stack too deep _writeOperatorData(operator, network); } - function _writeOperatorData(Operator memory operator, string memory network) internal { + function _writeOperatorData( + Operator memory operator, + string memory network + ) internal { string memory operator_object = "operator"; // Serialize regular wallet info @@ -162,7 +160,10 @@ contract DeployGenerator is Script, Test { vm.writeToml(finalJson, outputPath); } - function _strEq(string memory a, string memory b) internal pure returns (bool) { + function _strEq( + string memory a, + string memory b + ) internal pure returns (bool) { return keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b)); } diff --git a/script/operations/update-generator/1-updateGenerator.s.sol b/script/operations/update-generator/1-updateGenerator.s.sol index a7ff7a1e8e..7a427f2e7a 100644 --- a/script/operations/update-generator/1-updateGenerator.s.sol +++ b/script/operations/update-generator/1-updateGenerator.s.sol @@ -14,9 +14,7 @@ import "src/contracts/interfaces/IBaseCertificateVerifier.sol"; // For TOML parsing import {stdToml} from "forge-std/StdToml.sol"; -/** - * Purpose: Update the generator on a PREPROD/TESTNET environment - */ +/// Purpose: Update the generator on a PREPROD/TESTNET environment contract QueueTransferProxyAdmin is MultisigBuilder { using TestUtils for *; using Env for *; @@ -86,8 +84,10 @@ contract QueueTransferProxyAdmin is MultisigBuilder { "certificateVerifier.operatorSetOwner invalid" ); // Get the operatorSetInfo - IOperatorTableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo = certificateVerifier - .getOperatorSetInfo(generatorParams.generator, operatorTableUpdater.GENERATOR_REFERENCE_TIMESTAMP()); + IOperatorTableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo = + certificateVerifier.getOperatorSetInfo( + generatorParams.generator, operatorTableUpdater.GENERATOR_REFERENCE_TIMESTAMP() + ); assertEq( operatorSetInfo.numOperators, generatorParams.generatorInfo.numOperators, diff --git a/script/releases/CoreContractsDeployer.sol b/script/releases/CoreContractsDeployer.sol index 6562ae8008..3c99e93b16 100644 --- a/script/releases/CoreContractsDeployer.sol +++ b/script/releases/CoreContractsDeployer.sol @@ -4,23 +4,19 @@ pragma solidity ^0.8.12; import {EOADeployer} from "zeus-templates/templates/EOADeployer.sol"; import "./Env.sol"; -/** - * @title CoreContractsDeployer - * @notice Provides reusable helpers for deploying individual core contract implementations. - * Usage: - * ```solidity - * vm.startBroadcast(); - * deployPermissionController(); - * deployKeyRegistrar(); - * vm.stopBroadcast(); - * ``` - */ +/// @title CoreContractsDeployer +/// @notice Provides reusable helpers for deploying individual core contract implementations. +/// Usage: +/// ```solidity +/// vm.startBroadcast(); +/// deployPermissionController(); +/// deployKeyRegistrar(); +/// vm.stopBroadcast(); +/// ``` abstract contract CoreContractsDeployer is EOADeployer { using Env for *; - /** - * permissions/ - */ + /// permissions/ function deployPermissionController() internal onlyEOA returns (PermissionController deployed) { deployed = new PermissionController(); deployImpl({name: type(PermissionController).name, deployedTo: address(deployed)}); @@ -35,9 +31,7 @@ abstract contract CoreContractsDeployer is EOADeployer { deployImpl({name: type(KeyRegistrar).name, deployedTo: address(deployed)}); } - /** - * core/ - */ + /// core/ function deployAllocationManagerView() internal onlyEOA returns (AllocationManagerView deployed) { deployed = new AllocationManagerView({ _delegation: Env.proxy.delegationManager(), @@ -121,9 +115,7 @@ abstract contract CoreContractsDeployer is EOADeployer { deployImpl({name: type(StrategyManager).name, deployedTo: address(deployed)}); } - /** - * pods/ - */ + /// pods/ function deployEigenPodManager() internal onlyEOA returns (EigenPodManager deployed) { deployed = new EigenPodManager({ _ethPOS: Env.ethPOS(), @@ -139,9 +131,7 @@ abstract contract CoreContractsDeployer is EOADeployer { deployImpl({name: type(EigenPod).name, deployedTo: address(deployed)}); } - /** - * strategies/ - */ + /// strategies/ function deployEigenStrategy() internal onlyEOA returns (EigenStrategy deployed) { deployed = new EigenStrategy({ _strategyManager: Env.proxy.strategyManager(), @@ -174,9 +164,7 @@ abstract contract CoreContractsDeployer is EOADeployer { deployImpl({name: type(StrategyFactory).name, deployedTo: address(deployed)}); } - /** - * multichain/ - */ + /// multichain/ function deployBN254CertificateVerifier() internal onlyEOA returns (BN254CertificateVerifier deployed) { deployed = new BN254CertificateVerifier({_operatorTableUpdater: Env.proxy.operatorTableUpdater()}); deployImpl({name: type(BN254CertificateVerifier).name, deployedTo: address(deployed)}); @@ -209,9 +197,7 @@ abstract contract CoreContractsDeployer is EOADeployer { deployImpl({name: type(OperatorTableUpdater).name, deployedTo: address(deployed)}); } - /** - * avs/ - */ + /// avs/ function deployTaskMailbox() internal onlyEOA returns (TaskMailbox deployed) { deployed = new TaskMailbox({ _bn254CertificateVerifier: address(Env.proxy.bn254CertificateVerifier()), diff --git a/script/releases/CoreUpgradeQueueBuilder.sol b/script/releases/CoreUpgradeQueueBuilder.sol index 56d755a489..d1b93b7f47 100644 --- a/script/releases/CoreUpgradeQueueBuilder.sol +++ b/script/releases/CoreUpgradeQueueBuilder.sol @@ -5,32 +5,29 @@ import "./Env.sol"; import {Encode, MultisigCall} from "zeus-templates/utils/Encode.sol"; import {IPausable} from "src/contracts/interfaces/IPausable.sol"; -/** - * @title CoreUpgradeQueueBuilder - * @notice Provides reusable helpers for constructing multisig upgrade calls. - * Usage: - * ```solidity - * MultisigCall[] storage executorCalls = Encode.newMultisigCalls(); - * executorCalls.upgradeAVSDirectory(); - * ``` - */ +/// @title CoreUpgradeQueueBuilder +/// @notice Provides reusable helpers for constructing multisig upgrade calls. +/// Usage: +/// ```solidity +/// MultisigCall[] storage executorCalls = Encode.newMultisigCalls(); +/// executorCalls.upgradeAVSDirectory(); +/// ``` library CoreUpgradeQueueBuilder { using Env for *; using Encode for *; using CoreUpgradeQueueBuilder for MultisigCall[]; - /** - * permissions/ - */ + /// permissions/ function upgradePermissionController( MultisigCall[] storage calls ) internal returns (MultisigCall[] storage) { return calls.append({ to: Env.proxyAdmin(), - data: Encode.proxyAdmin.upgrade({ - proxy: address(Env.proxy.permissionController()), - impl: address(Env.impl.permissionController()) - }) + data: Encode.proxyAdmin + .upgrade({ + proxy: address(Env.proxy.permissionController()), + impl: address(Env.impl.permissionController()) + }) }); } @@ -39,25 +36,19 @@ library CoreUpgradeQueueBuilder { ) internal returns (MultisigCall[] storage) { return calls.append({ to: Env.proxyAdmin(), - data: Encode.proxyAdmin.upgrade({ - proxy: address(Env.proxy.keyRegistrar()), - impl: address(Env.impl.keyRegistrar()) - }) + data: Encode.proxyAdmin + .upgrade({proxy: address(Env.proxy.keyRegistrar()), impl: address(Env.impl.keyRegistrar())}) }); } - /** - * core/ - */ + /// core/ function upgradeAllocationManager( MultisigCall[] storage calls ) internal returns (MultisigCall[] storage) { return calls.append({ to: Env.proxyAdmin(), - data: Encode.proxyAdmin.upgrade({ - proxy: address(Env.proxy.allocationManager()), - impl: address(Env.impl.allocationManager()) - }) + data: Encode.proxyAdmin + .upgrade({proxy: address(Env.proxy.allocationManager()), impl: address(Env.impl.allocationManager())}) }); } @@ -66,10 +57,8 @@ library CoreUpgradeQueueBuilder { ) internal returns (MultisigCall[] storage) { return calls.append({ to: Env.proxyAdmin(), - data: Encode.proxyAdmin.upgrade({ - proxy: address(Env.proxy.avsDirectory()), - impl: address(Env.impl.avsDirectory()) - }) + data: Encode.proxyAdmin + .upgrade({proxy: address(Env.proxy.avsDirectory()), impl: address(Env.impl.avsDirectory())}) }); } @@ -78,10 +67,8 @@ library CoreUpgradeQueueBuilder { ) internal returns (MultisigCall[] storage) { return calls.append({ to: Env.proxyAdmin(), - data: Encode.proxyAdmin.upgrade({ - proxy: address(Env.proxy.delegationManager()), - impl: address(Env.impl.delegationManager()) - }) + data: Encode.proxyAdmin + .upgrade({proxy: address(Env.proxy.delegationManager()), impl: address(Env.impl.delegationManager())}) }); } @@ -90,10 +77,8 @@ library CoreUpgradeQueueBuilder { ) internal returns (MultisigCall[] storage) { return calls.append({ to: Env.proxyAdmin(), - data: Encode.proxyAdmin.upgrade({ - proxy: address(Env.proxy.protocolRegistry()), - impl: address(Env.impl.protocolRegistry()) - }) + data: Encode.proxyAdmin + .upgrade({proxy: address(Env.proxy.protocolRegistry()), impl: address(Env.impl.protocolRegistry())}) }); } @@ -102,10 +87,8 @@ library CoreUpgradeQueueBuilder { ) internal returns (MultisigCall[] storage) { return calls.append({ to: Env.proxyAdmin(), - data: Encode.proxyAdmin.upgrade({ - proxy: address(Env.proxy.releaseManager()), - impl: address(Env.impl.releaseManager()) - }) + data: Encode.proxyAdmin + .upgrade({proxy: address(Env.proxy.releaseManager()), impl: address(Env.impl.releaseManager())}) }); } @@ -114,10 +97,8 @@ library CoreUpgradeQueueBuilder { ) internal returns (MultisigCall[] storage) { return calls.append({ to: Env.proxyAdmin(), - data: Encode.proxyAdmin.upgrade({ - proxy: address(Env.proxy.rewardsCoordinator()), - impl: address(Env.impl.rewardsCoordinator()) - }) + data: Encode.proxyAdmin + .upgrade({proxy: address(Env.proxy.rewardsCoordinator()), impl: address(Env.impl.rewardsCoordinator())}) }); } @@ -126,25 +107,19 @@ library CoreUpgradeQueueBuilder { ) internal returns (MultisigCall[] storage) { return calls.append({ to: Env.proxyAdmin(), - data: Encode.proxyAdmin.upgrade({ - proxy: address(Env.proxy.strategyManager()), - impl: address(Env.impl.strategyManager()) - }) + data: Encode.proxyAdmin + .upgrade({proxy: address(Env.proxy.strategyManager()), impl: address(Env.impl.strategyManager())}) }); } - /** - * pods/ - */ + /// pods/ function upgradeEigenPodManager( MultisigCall[] storage calls ) internal returns (MultisigCall[] storage) { return calls.append({ to: Env.proxyAdmin(), - data: Encode.proxyAdmin.upgrade({ - proxy: address(Env.proxy.eigenPodManager()), - impl: address(Env.impl.eigenPodManager()) - }) + data: Encode.proxyAdmin + .upgrade({proxy: address(Env.proxy.eigenPodManager()), impl: address(Env.impl.eigenPodManager())}) }); } @@ -157,18 +132,14 @@ library CoreUpgradeQueueBuilder { }); } - /** - * strategies/ - */ + /// strategies/ function upgradeEigenStrategy( MultisigCall[] storage calls ) internal returns (MultisigCall[] storage) { return calls.append({ to: Env.proxyAdmin(), - data: Encode.proxyAdmin.upgrade({ - proxy: address(Env.proxy.eigenStrategy()), - impl: address(Env.impl.eigenStrategy()) - }) + data: Encode.proxyAdmin + .upgrade({proxy: address(Env.proxy.eigenStrategy()), impl: address(Env.impl.eigenStrategy())}) }); } @@ -200,25 +171,22 @@ library CoreUpgradeQueueBuilder { ) internal returns (MultisigCall[] storage) { return calls.append({ to: Env.proxyAdmin(), - data: Encode.proxyAdmin.upgrade({ - proxy: address(Env.proxy.strategyFactory()), - impl: address(Env.impl.strategyFactory()) - }) + data: Encode.proxyAdmin + .upgrade({proxy: address(Env.proxy.strategyFactory()), impl: address(Env.impl.strategyFactory())}) }); } - /** - * multichain/ - */ + /// multichain/ function upgradeBN254CertificateVerifier( MultisigCall[] storage calls ) internal returns (MultisigCall[] storage) { return calls.append({ to: Env.proxyAdmin(), - data: Encode.proxyAdmin.upgrade({ - proxy: address(Env.proxy.bn254CertificateVerifier()), - impl: address(Env.impl.bn254CertificateVerifier()) - }) + data: Encode.proxyAdmin + .upgrade({ + proxy: address(Env.proxy.bn254CertificateVerifier()), + impl: address(Env.impl.bn254CertificateVerifier()) + }) }); } @@ -227,10 +195,8 @@ library CoreUpgradeQueueBuilder { ) internal returns (MultisigCall[] storage) { return calls.append({ to: Env.proxyAdmin(), - data: Encode.proxyAdmin.upgrade({ - proxy: address(Env.proxy.crossChainRegistry()), - impl: address(Env.impl.crossChainRegistry()) - }) + data: Encode.proxyAdmin + .upgrade({proxy: address(Env.proxy.crossChainRegistry()), impl: address(Env.impl.crossChainRegistry())}) }); } @@ -239,10 +205,11 @@ library CoreUpgradeQueueBuilder { ) internal returns (MultisigCall[] storage) { return calls.append({ to: Env.proxyAdmin(), - data: Encode.proxyAdmin.upgrade({ - proxy: address(Env.proxy.ecdsaCertificateVerifier()), - impl: address(Env.impl.ecdsaCertificateVerifier()) - }) + data: Encode.proxyAdmin + .upgrade({ + proxy: address(Env.proxy.ecdsaCertificateVerifier()), + impl: address(Env.impl.ecdsaCertificateVerifier()) + }) }); } @@ -251,22 +218,22 @@ library CoreUpgradeQueueBuilder { ) internal returns (MultisigCall[] storage) { return calls.append({ to: Env.proxyAdmin(), - data: Encode.proxyAdmin.upgrade({ - proxy: address(Env.proxy.operatorTableUpdater()), - impl: address(Env.impl.operatorTableUpdater()) - }) + data: Encode.proxyAdmin + .upgrade({ + proxy: address(Env.proxy.operatorTableUpdater()), + impl: address(Env.impl.operatorTableUpdater()) + }) }); } - /** - * avs/ - */ + /// avs/ function upgradeTaskMailbox( MultisigCall[] storage calls ) internal returns (MultisigCall[] storage) { return calls.append({ to: Env.proxyAdmin(), - data: Encode.proxyAdmin.upgrade({proxy: address(Env.proxy.taskMailbox()), impl: address(Env.impl.taskMailbox())}) + data: Encode.proxyAdmin + .upgrade({proxy: address(Env.proxy.taskMailbox()), impl: address(Env.impl.taskMailbox())}) }); } } diff --git a/script/releases/CrosschainDeployLib.sol b/script/releases/CrosschainDeployLib.sol index b0f2233b99..49833bfd83 100644 --- a/script/releases/CrosschainDeployLib.sol +++ b/script/releases/CrosschainDeployLib.sol @@ -11,7 +11,10 @@ import "script/releases/TestUtils.sol"; ICreateX constant createx = ICreateX(0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed); interface ICreateX { - function deployCreate2(bytes32 salt, bytes memory initCode) external payable returns (address newContract); + function deployCreate2( + bytes32 salt, + bytes memory initCode + ) external payable returns (address newContract); function computeCreate2Address( bytes32 salt, bytes32 initCodeHash @@ -81,7 +84,7 @@ library CrosschainDeployLib { * ```solidity * bytes11 salt = bytes11(uint88(0xffffffffffffffffffffff)); * address emptyContract = crosschainDeployLib.deployEmptyContract(deployer); - * address proxy = crosschainDeployLib.deployCrosschainProxy(deployer, emptyContract, salt); + * address proxy = crosschainDeployLib.deployCrosschainProxy(deployer, emptyContract, salt); * ITransparentUpgradeableProxy(address(proxy)).upgradeTo(address(implementation)); * ITransparentUpgradeableProxy(address(proxy)).changeAdmin(address(admin)); * ``` @@ -104,7 +107,11 @@ library CrosschainDeployLib { * type(EmptyContract).creationCode.deployCrosschain(deployer, EMPTY_CONTRACT_SALT) * ``` */ - function _deployCrosschain(address deployer, bytes memory initCode, string memory name) private returns (address) { + function _deployCrosschain( + address deployer, + bytes memory initCode, + string memory name + ) private returns (address) { return createx.deployCreate2(computeProtectedSalt(deployer, name), initCode); } @@ -118,7 +125,10 @@ library CrosschainDeployLib { * @dev The salt is structured as: Deployer EOA (20 bytes) | Cross-chain flag (1 byte) | Entropy (11 bytes) * @dev Example: 0xbebebebebebebebebebebebebebebebebebebebe|ff|1212121212121212121212 */ - function computeProtectedSalt(address deployer, string memory name) internal pure returns (bytes32) { + function computeProtectedSalt( + address deployer, + string memory name + ) internal pure returns (bytes32) { return bytes32( bytes.concat( bytes20(deployer), diff --git a/script/releases/Env.sol b/script/releases/Env.sol index f36b7ae8e5..4bfeb2db33 100644 --- a/script/releases/Env.sol +++ b/script/releases/Env.sol @@ -9,9 +9,7 @@ import "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; -/** - * core/ - */ +/// core/ import "src/contracts/core/AllocationManagerView.sol"; import "src/contracts/core/AllocationManager.sol"; import "src/contracts/core/AllocationManagerView.sol"; @@ -23,46 +21,34 @@ import "src/contracts/core/StrategyManager.sol"; import "src/contracts/core/ReleaseManager.sol"; import "src/contracts/core/ProtocolRegistry.sol"; -/** - * pemissions/ - */ +/// pemissions/ import "src/contracts/permissions/PauserRegistry.sol"; import "src/contracts/permissions/PermissionController.sol"; import "src/contracts/permissions/KeyRegistrar.sol"; -/** - * pods/ - */ +/// pods/ import "src/contracts/pods/EigenPod.sol"; import "src/contracts/pods/EigenPodManager.sol"; -/** - * strategies/ - */ +/// strategies/ import "src/contracts/strategies/EigenStrategy.sol"; import "src/contracts/strategies/StrategyBase.sol"; import "src/contracts/strategies/StrategyBaseTVLLimits.sol"; import "src/contracts/strategies/StrategyFactory.sol"; -/** - * token/ - */ +/// token/ import "src/contracts/interfaces/IEigen.sol"; import "src/contracts/interfaces/IBackingEigen.sol"; import "src/contracts/token/Eigen.sol"; import "src/contracts/token/BackingEigen.sol"; -/** - * multichain/ - */ +/// multichain/ import "src/contracts/multichain/CrossChainRegistry.sol"; import "src/contracts/multichain/OperatorTableUpdater.sol"; import "src/contracts/multichain/ECDSACertificateVerifier.sol"; import "src/contracts/multichain/BN254CertificateVerifier.sol"; -/** - * avs/ - */ +/// avs/ import "src/contracts/avs/task/TaskMailbox.sol"; // For destination chains @@ -90,9 +76,7 @@ library Env { DeployedImpl internal constant impl = DeployedImpl.A; DeployedInstance internal constant instance = DeployedInstance.A; - /** - * env - */ + /// env function env() internal view returns (string memory) { return _string("ZEUS_ENV"); } @@ -218,9 +202,7 @@ library Env { return _envBool("DESTINATION_CHAIN"); } - /** - * core/ - */ + /// core/ function allocationManager( DeployedProxy ) internal view returns (AllocationManager) { @@ -311,9 +293,7 @@ library Env { return ProtocolRegistry(_deployedImpl(type(ProtocolRegistry).name)); } - /** - * permissions/ - */ + /// permissions/ function pauserRegistry( DeployedImpl ) internal view returns (PauserRegistry) { @@ -344,9 +324,7 @@ library Env { return KeyRegistrar(_deployedImpl(type(KeyRegistrar).name)); } - /** - * pods/ - */ + /// pods/ function eigenPod( DeployedBeacon ) internal view returns (UpgradeableBeacon) { @@ -371,9 +349,7 @@ library Env { return EigenPodManager(_deployedImpl(type(EigenPodManager).name)); } - /** - * strategies/ - */ + /// strategies/ function eigenStrategy( DeployedProxy ) internal view returns (EigenStrategy) { @@ -408,7 +384,10 @@ library Env { } // Returns the proxy instance at index `i` - function strategyBaseTVLLimits(DeployedInstance, uint256 i) internal view returns (StrategyBaseTVLLimits) { + function strategyBaseTVLLimits( + DeployedInstance, + uint256 i + ) internal view returns (StrategyBaseTVLLimits) { return StrategyBaseTVLLimits(_deployedInstance(type(StrategyBaseTVLLimits).name, i)); } @@ -430,9 +409,7 @@ library Env { return StrategyFactory(_deployedImpl(type(StrategyFactory).name)); } - /** - * token/ - */ + /// token/ function eigen( DeployedProxy ) internal view returns (Eigen) { @@ -457,9 +434,7 @@ library Env { return IBackingEigen(_deployedImpl(type(BackingEigen).name)); } - /** - * multichain/ - */ + /// multichain/ function emptyContract( DeployedImpl ) internal view returns (EmptyContract) { @@ -526,10 +501,11 @@ library Env { return TaskMailbox(_deployedImpl(type(TaskMailbox).name)); } - /** - * Helpers - */ - function _deployedInstance(string memory name, uint256 idx) private view returns (address) { + /// Helpers + function _deployedInstance( + string memory name, + uint256 idx + ) private view returns (address) { return ZEnvHelpers.state().deployedInstance(name, idx); } @@ -602,7 +578,10 @@ library Env { return vm.envString(key); } - function _strEq(string memory a, string memory b) internal pure returns (bool) { + function _strEq( + string memory a, + string memory b + ) internal pure returns (bool) { return keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b)); } @@ -617,11 +596,9 @@ library Env { return admin; } - /** - * - * Environment Type Helpers - * - */ + /// + /// Environment Type Helpers + /// /// Types that help facilitate network type differentation /// @dev Mimics the deployment matrix in: https://github.com/Layr-Labs/eigenlayer-contracts?tab=readme-ov-file#deployments diff --git a/script/releases/TestUtils.sol b/script/releases/TestUtils.sol index 73047431be..b8335406e9 100644 --- a/script/releases/TestUtils.sol +++ b/script/releases/TestUtils.sol @@ -22,26 +22,20 @@ library TestUtils { address internal constant VM_ADDRESS = address(uint160(uint256(keccak256("hevm cheat code")))); Vm internal constant vm = Vm(VM_ADDRESS); - /** - * - * PROXY ADMIN VALIDATION - * - */ + /// + /// PROXY ADMIN VALIDATION + /// /// @dev This function is run on *all* deployed contracts to ensure that the proxyAdmin is correctly set. function validateProxyAdmins() internal view { address pa = Env.proxyAdmin(); - /** - * pemissions/ - */ + /// pemissions/ assertTrue( _getProxyAdmin(address(Env.proxy.permissionController())) == pa, "permissionController proxyAdmin incorrect" ); assertTrue(_getProxyAdmin(address(Env.proxy.keyRegistrar())) == pa, "keyRegistrar proxyAdmin incorrect"); - /** - * core/ - */ + /// core/ assertTrue( _getProxyAdmin(address(Env.proxy.allocationManager())) == pa, "allocationManager proxyAdmin incorrect" ); @@ -56,15 +50,11 @@ library TestUtils { ); assertTrue(_getProxyAdmin(address(Env.proxy.strategyManager())) == pa, "strategyManager proxyAdmin incorrect"); - /** - * pods/ - */ + /// pods/ assertTrue(Env.beacon.eigenPod().owner() == Env.executorMultisig(), "eigenPod beacon owner incorrect"); assertTrue(_getProxyAdmin(address(Env.proxy.eigenPodManager())) == pa, "eigenPodManager proxyAdmin incorrect"); - /** - * strategies/ - */ + /// strategies/ assertTrue(_getProxyAdmin(address(Env.proxy.eigenStrategy())) == pa, "eigenStrategy proxyAdmin incorrect"); assertTrue(Env.beacon.strategyBase().owner() == Env.executorMultisig(), "strategyBase beacon owner incorrect"); @@ -78,9 +68,7 @@ library TestUtils { assertTrue(_getProxyAdmin(address(Env.proxy.strategyFactory())) == pa, "strategyFactory proxyAdmin incorrect"); - /** - * multichain/ - */ + /// multichain/ assertTrue( _getProxyAdmin(address(Env.proxy.crossChainRegistry())) == pa, "crossChainRegistry proxyAdmin incorrect" ); @@ -90,14 +78,10 @@ library TestUtils { function validateDestinationProxyAdmins() internal view { address pa = Env.proxyAdmin(); - /** - * core/ - */ + /// core/ assertTrue(_getProxyAdmin(address(Env.proxy.protocolRegistry())) == pa, "protocolRegistry proxyAdmin incorrect"); - /** - * multichain/ - */ + /// multichain/ assertTrue( _getProxyAdmin(address(Env.proxy.bn254CertificateVerifier())) == pa, "bn254CertificateVerifier proxyAdmin incorrect" @@ -110,29 +94,21 @@ library TestUtils { _getProxyAdmin(address(Env.proxy.operatorTableUpdater())) == pa, "operatorTableUpdater proxyAdmin incorrect" ); - /** - * avs/ - */ + /// avs/ assertTrue(_getProxyAdmin(address(Env.proxy.taskMailbox())) == pa, "taskMailbox proxyAdmin incorrect"); } - /** - * - * PROXY VALIDATION - * - */ + /// + /// PROXY VALIDATION + /// /// @dev Validate that the proxy constructors are correctly set function validateProxyConstructors() internal view { - /** - * pemissions/ - */ + /// pemissions/ // PermissionController has no constructor validateKeyRegistrarImmutables(Env.proxy.keyRegistrar()); - /** - * core/ - */ + /// core/ validateAllocationManagerImmutables(Env.proxy.allocationManager()); validateAVSDirectoryImmutables(Env.proxy.avsDirectory()); validateDelegationManagerImmutables(Env.proxy.delegationManager()); @@ -141,15 +117,11 @@ library TestUtils { validateRewardsCoordinatorImmutables(Env.proxy.rewardsCoordinator()); validateStrategyManagerImmutables(Env.proxy.strategyManager()); - /** - * pods/ - */ + /// pods/ // EigenPod beacon doesn't have immutable, only implementation does validateEigenPodManagerImmutables(Env.proxy.eigenPodManager()); - /** - * strategies/ - */ + /// strategies/ validateEigenStrategyImmutables(Env.proxy.eigenStrategy()); // StrategyBase beacon doesn't have immutables, only implementation does uint256 count = Env.instance.strategyBaseTVLLimits_Count(); @@ -158,38 +130,28 @@ library TestUtils { } validateStrategyFactoryImmutables(Env.proxy.strategyFactory()); - /** - * multichain/ - */ + /// multichain/ validateCrossChainRegistryImmutables(Env.proxy.crossChainRegistry()); validateDestinationProxyConstructors(); } function validateDestinationProxyConstructors() internal view { - /** - * multichain/ - */ + /// multichain/ validateBN254CertificateVerifierImmutables(Env.proxy.bn254CertificateVerifier()); validateECDSACertificateVerifierImmutables(Env.proxy.ecdsaCertificateVerifier()); validateOperatorTableUpdaterImmutables(Env.proxy.operatorTableUpdater()); - /** - * avs/ - */ + /// avs/ validateTaskMailboxImmutables(Env.proxy.taskMailbox()); } /// @dev Validate that the proxies are already initialized. function validateProxiesAlreadyInitialized() internal { - /** - * pemissions/ - */ + /// pemissions/ // KeyRegistrar and PermissionController are initializable, but do not expose the `initialize` function. - /** - * core/ - */ + /// core/ validateAllocationManagerInitialized(Env.proxy.allocationManager()); validateAVSDirectoryInitialized(Env.proxy.avsDirectory()); validateDelegationManagerInitialized(Env.proxy.delegationManager()); @@ -198,15 +160,11 @@ library TestUtils { validateRewardsCoordinatorInitialized(Env.proxy.rewardsCoordinator()); validateStrategyManagerInitialized(Env.proxy.strategyManager()); - /** - * pods/ - */ + /// pods/ // EigenPod proxies are initialized by individual users validateEigenPodManagerInitialized(Env.proxy.eigenPodManager()); - /** - * strategies/ - */ + /// strategies/ validateEigenStrategyInitialized(Env.proxy.eigenStrategy()); // StrategyBase proxies are initialized when deployed by factory uint256 count = Env.instance.strategyBaseTVLLimits_Count(); @@ -215,46 +173,34 @@ library TestUtils { } validateStrategyFactoryInitialized(Env.proxy.strategyFactory()); - /** - * multichain/ - */ + /// multichain/ validateCrossChainRegistryInitialized(Env.proxy.crossChainRegistry()); validateDestinationProxiesAlreadyInitialized(); } function validateDestinationProxiesAlreadyInitialized() internal { - /** - * core/ - */ + /// core/ validateProtocolRegistryInitialized(Env.proxy.protocolRegistry()); - /** - * multichain/ - */ + /// multichain/ validateOperatorTableUpdaterInitialized(Env.proxy.operatorTableUpdater()); // BN254 and ECDSA certificate verifiers are initializable, but do not expose the `initialize` function. - /** - * avs/ - */ + /// avs/ validateTaskMailboxInitialized(Env.proxy.taskMailbox()); } function validateProxyStorage() internal view { { - /** - * permissions/ - */ + /// permissions/ - // PauserRegistry is also deployed on destination chain and tested in the `validateDestinationProxyStorage` function - // PermissionController and KeyRegistrar have no initial storage + // PauserRegistry is also deployed on destination chain and tested in the `validateDestinationProxyStorage` function + // PermissionController and KeyRegistrar have no initial storage } { - /** - * core/ - */ + /// core/ AllocationManager allocationManager = Env.proxy.allocationManager(); assertTrue(allocationManager.paused() == 0, "alm.paused invalid"); @@ -285,9 +231,7 @@ library TestUtils { } { - /** - * pods/ - */ + /// pods/ // EigenPod proxies are initialized by individual users EigenPodManager eigenPodManager = Env.proxy.eigenPodManager(); @@ -298,9 +242,7 @@ library TestUtils { } { - /** - * strategies/ - */ + /// strategies/ EigenStrategy eigenStrategy = Env.proxy.eigenStrategy(); assertTrue(eigenStrategy.paused() == 0, "eigenStrat.paused invalid"); assertTrue(address(eigenStrategy.EIGEN()) == address(Env.proxy.eigen()), "eigenStrat.EIGEN invalid"); @@ -324,9 +266,7 @@ library TestUtils { assertTrue(strategyFactory.strategyBeacon() == Env.beacon.strategyBase(), "sFact.beacon invalid"); } { - /** - * multichain/ - */ + /// multichain/ // Operator table updater and certificate verifies do not have initial storage CrossChainRegistry crossChainRegistry = Env.proxy.crossChainRegistry(); assertTrue(crossChainRegistry.owner() == Env.opsMultisig(), "crossChainRegistry owner invalid"); @@ -347,9 +287,7 @@ library TestUtils { function validateDestinationProxyStorage() internal view { { - /** - * permissions/ - */ + /// permissions/ // PauserRegistry is also deployed on destination chain PauserRegistry registry = Env.impl.pauserRegistry(); assertTrue(registry.isPauser(Env.pauserMultisig()), "pauser multisig should be pauser"); @@ -364,9 +302,7 @@ library TestUtils { } { - /** - * core/ - */ + /// core/ ProtocolRegistry protocolRegistry = Env.proxy.protocolRegistry(); assertTrue( protocolRegistry.hasRole(protocolRegistry.PAUSER_ROLE(), Env.pauserMultisig()), @@ -379,9 +315,7 @@ library TestUtils { } { - /** - * multichain/ - */ + /// multichain/ OperatorTableUpdater operatorTableUpdater = Env.proxy.operatorTableUpdater(); assertTrue(operatorTableUpdater.owner() == Env.opsMultisig(), "operatorTableUpdater owner invalid"); assertTrue( @@ -392,9 +326,7 @@ library TestUtils { } { - /** - * avs/ - */ + /// avs/ TaskMailbox taskMailbox = Env.proxy.taskMailbox(); assertTrue(taskMailbox.owner() == Env.opsMultisig(), "taskMailbox owner invalid"); assertTrue(taskMailbox.feeSplit() == 0, "taskMailbox feeSplit invalid"); @@ -402,23 +334,17 @@ library TestUtils { } } - /** - * - * IMPLEMENTATION VALIDATION - * - */ + /// + /// IMPLEMENTATION VALIDATION + /// /// @dev Validate that the implementation constructors are correctly set function validateImplConstructors() internal view { - /** - * pemissions/ - */ + /// pemissions/ // PermissionController has no constructor validateKeyRegistrarImmutables(Env.impl.keyRegistrar()); - /** - * core/ - */ + /// core/ validateAllocationManagerViewImmutables(Env.impl.allocationManagerView()); validateAllocationManagerImmutables(Env.impl.allocationManager()); validateAVSDirectoryImmutables(Env.impl.avsDirectory()); @@ -428,53 +354,39 @@ library TestUtils { validateRewardsCoordinatorImmutables(Env.impl.rewardsCoordinator()); validateStrategyManagerImmutables(Env.impl.strategyManager()); - /** - * pods/ - */ + /// pods/ validateEigenPodImmutables(Env.impl.eigenPod()); validateEigenPodManagerImmutables(Env.impl.eigenPodManager()); - /** - * strategies/ - */ + /// strategies/ validateEigenStrategyImmutables(Env.impl.eigenStrategy()); validateStrategyBaseImmutables(Env.impl.strategyBase()); validateStrategyBaseTVLLimitsImmutables(Env.impl.strategyBaseTVLLimits()); validateStrategyFactoryImmutables(Env.impl.strategyFactory()); - /** - * multichain/ - */ + /// multichain/ validateCrossChainRegistryImmutables(Env.impl.crossChainRegistry()); validateDestinationImplConstructors(); } function validateDestinationImplConstructors() internal view { - /** - * multichain/ - */ + /// multichain/ validateBN254CertificateVerifierImmutables(Env.impl.bn254CertificateVerifier()); validateECDSACertificateVerifierImmutables(Env.impl.ecdsaCertificateVerifier()); validateOperatorTableUpdaterImmutables(Env.impl.operatorTableUpdater()); - /** - * avs/ - */ + /// avs/ validateTaskMailboxImmutables(Env.impl.taskMailbox()); } /// @dev Validate that the implementation contracts are not initializable. /// @dev Each function checks that initializing the contract will revert. function validateImplsNotInitializable() internal { - /** - * pemissions/ - */ + /// pemissions/ // KeyRegistrar and PermissionController are initializable, but do not expose the `initialize` function. - /** - * core/ - */ + /// core/ // AllocationManagerView is initializable, but does not expose the `initialize` function. validateAllocationManagerInitialized(Env.impl.allocationManager()); validateAVSDirectoryInitialized(Env.impl.avsDirectory()); @@ -484,53 +396,37 @@ library TestUtils { validateRewardsCoordinatorInitialized(Env.impl.rewardsCoordinator()); validateStrategyManagerInitialized(Env.impl.strategyManager()); - /** - * pods/ - */ + /// pods/ // EigenPod implementations are initialized by individual users validateEigenPodManagerInitialized(Env.impl.eigenPodManager()); - /** - * strategies/ - */ + /// strategies/ validateEigenStrategyInitialized(Env.impl.eigenStrategy()); // StrategyBase implementations are initialized when deployed by factory validateStrategyBaseTVLLimitsInitialized(Env.impl.strategyBaseTVLLimits()); validateStrategyFactoryInitialized(Env.impl.strategyFactory()); - /** - * multichain/ - */ + /// multichain/ validateCrossChainRegistryInitialized(Env.impl.crossChainRegistry()); validateDestinationImplsNotInitializable(); } function validateDestinationImplsNotInitializable() internal { - /** - * core/ - */ + /// core/ validateProtocolRegistryInitialized(Env.impl.protocolRegistry()); - /** - * multichain/ - */ + /// multichain/ validateOperatorTableUpdaterInitialized(Env.impl.operatorTableUpdater()); // BN254 and ECDSA certificate verifiers are initializable, but do not expose the `initialize` function. - /** - * avs/ - */ + /// avs/ validateTaskMailboxInitialized(Env.impl.taskMailbox()); } - /** - * @notice After the upgrade is complete, call to _validateNewImplAddresses to ensure the impl addresses match the proxy admin's reported implementation address. - */ + /// @notice After the upgrade is complete, call to _validateNewImplAddresses to ensure the impl addresses match the proxy admin's reported implementation address. function validateImplAddressesMatchProxy() internal view { - /** - * pemissions/ - */ + /// pemissions/ assertTrue( _getProxyImpl(address(Env.proxy.permissionController())) == address(Env.impl.permissionController()), "permissionController impl address mismatch" @@ -540,9 +436,7 @@ library TestUtils { "keyRegistrar impl address mismatch" ); - /** - * core/ - */ + /// core/ assertTrue( _getProxyImpl(address(Env.proxy.allocationManager())) == address(Env.impl.allocationManager()), "allocationManager impl address mismatch" @@ -569,9 +463,7 @@ library TestUtils { "strategyManager impl address mismatch" ); - /** - * pods/ - */ + /// pods/ assertTrue( Env.beacon.eigenPod().implementation() == address(Env.impl.eigenPod()), "eigenPod impl address mismatch" ); @@ -580,9 +472,7 @@ library TestUtils { "eigenPodManager impl address mismatch" ); - /** - * strategies/ - */ + /// strategies/ assertTrue( _getProxyImpl(address(Env.proxy.eigenStrategy())) == address(Env.impl.eigenStrategy()), "eigenStrategy impl address mismatch" @@ -604,9 +494,7 @@ library TestUtils { "strategyFactory impl address mismatch" ); - /** - * multichain/ - */ + /// multichain/ assertTrue( _getProxyImpl(address(Env.proxy.crossChainRegistry())) == address(Env.impl.crossChainRegistry()), "operatorTableUpdater impl address mismatch" @@ -616,9 +504,7 @@ library TestUtils { } function validateDestinationImplAddressesMatchProxy() internal view { - /** - * core/ - */ + /// core/ /// @dev Skip the protocol registry validation as it will be deployed while the upgrade is in progress. /// TODO: Uncomment this after v1.9.0 is live // assertTrue( @@ -626,15 +512,15 @@ library TestUtils { // "protocolRegistry impl address mismatch" // ); - /** - * multichain/ - */ + /// multichain/ assertTrue( - _getProxyImpl(address(Env.proxy.bn254CertificateVerifier())) == address(Env.impl.bn254CertificateVerifier()), + _getProxyImpl(address(Env.proxy.bn254CertificateVerifier())) + == address(Env.impl.bn254CertificateVerifier()), "bn254CertificateVerifier impl address mismatch" ); assertTrue( - _getProxyImpl(address(Env.proxy.ecdsaCertificateVerifier())) == address(Env.impl.ecdsaCertificateVerifier()), + _getProxyImpl(address(Env.proxy.ecdsaCertificateVerifier())) + == address(Env.impl.ecdsaCertificateVerifier()), "ecdsaCertificateVerifier impl address mismatch" ); assertTrue( @@ -642,20 +528,16 @@ library TestUtils { "crossChainRegistry impl address mismatch" ); - /** - * avs/ - */ + /// avs/ assertTrue( _getProxyImpl(address(Env.proxy.taskMailbox())) == address(Env.impl.taskMailbox()), "taskMailbox impl address mismatch" ); } - /** - * - * VERSION VALIDATION FUNCTIONS - * - */ + /// + /// VERSION VALIDATION FUNCTIONS + /// /// Validate versions of specific contracts /// @dev We need to validate versions of specific contracts because some contracts can have mismatched versions. function validateKeyRegistrarVersion() internal view { @@ -683,16 +565,12 @@ library TestUtils { ); } - /** - * - * VALIDATE IMMUTABLES - * - */ + /// + /// VALIDATE IMMUTABLES + /// /// @dev These functions are used to validate the immutables of either proxy or implementation contracts. - /** - * pemissions/ - */ + /// pemissions/ function validateKeyRegistrarImmutables( KeyRegistrar keyRegistrar ) internal view { @@ -708,9 +586,7 @@ library TestUtils { // PermissionController has no immutables - /** - * core/ - */ + /// core/ function validateAllocationManagerViewImmutables( AllocationManagerView allocationManagerView ) internal view { @@ -865,9 +741,7 @@ library TestUtils { ); } - /** - * pods/ - */ + /// pods/ function validateEigenPodImmutables( EigenPod eigenPod ) internal view { @@ -891,9 +765,7 @@ library TestUtils { ); } - /** - * strategies/ - */ + /// strategies/ function validateEigenStrategyImmutables( EigenStrategy eigenStrategy ) internal view { @@ -939,9 +811,7 @@ library TestUtils { ); } - /** - * multichain/ - */ + /// multichain/ function validateBN254CertificateVerifierImmutables( BN254CertificateVerifier bn254CertificateVerifier ) internal view { @@ -997,9 +867,7 @@ library TestUtils { ); } - /** - * avs/ - */ + /// avs/ function validateTaskMailboxImmutables( TaskMailbox taskMailbox ) internal view { @@ -1014,22 +882,16 @@ library TestUtils { assertTrue(taskMailbox.MAX_TASK_SLA() == Env.MAX_TASK_SLA(), "taskMailbox MAX_TASK_SLA incorrect"); } - /** - * - * VALIDATE INITIALIZED - * - */ + /// + /// VALIDATE INITIALIZED + /// /// @dev These functions are used to validate the initialized state of either proxy or implementation contracts. - /** - * pemissions/ - */ + /// pemissions/ // KeyRegistrar and PermissionController are initializable, but do not expose the `initialize` function. - /** - * core/ - */ + /// core/ function validateAllocationManagerInitialized( AllocationManager allocationManager ) internal { @@ -1074,9 +936,7 @@ library TestUtils { strategyManager.initialize(address(0), address(0), 0); } - /** - * pods/ - */ + /// pods/ // EigenPod proxies are initialized by individual users function validateEigenPodManagerInitialized( @@ -1086,9 +946,7 @@ library TestUtils { eigenPodManager.initialize(address(0), 0); } - /** - * strategies/ - */ + /// strategies/ function validateEigenStrategyInitialized( EigenStrategy eigenStrategy ) internal { @@ -1112,9 +970,7 @@ library TestUtils { strategyFactory.initialize(address(0), 0, UpgradeableBeacon(address(0))); } - /** - * multichain/ - */ + /// multichain/ function validateCrossChainRegistryInitialized( CrossChainRegistry crossChainRegistry ) internal { @@ -1133,9 +989,7 @@ library TestUtils { // BN254 and ECDSA certificate verifiers are initializable, but do not expose the `initialize` function. - /** - * avs/ - */ + /// avs/ function validateTaskMailboxInitialized( TaskMailbox taskMailbox ) internal { @@ -1143,11 +997,9 @@ library TestUtils { taskMailbox.initialize(address(0), 0, address(0)); } - /** - * - * VALIDATE PROTOCOL REGISTRY - * - */ + /// + /// VALIDATE PROTOCOL REGISTRY + /// /// @notice Validate the protocol registry by checking the version and all contracts /// @dev This should be called *after* an upgrade has been completed @@ -1158,9 +1010,7 @@ library TestUtils { address addr; IProtocolRegistryTypes.DeploymentConfig memory config; { - /** - * permissions/ - */ + /// permissions/ (addr, config) = Env.proxy.protocolRegistry().getDeployment(type(KeyRegistrar).name); assertTrue(addr == address(Env.proxy.keyRegistrar()), "keyRegistrar address incorrect"); assertFalse(config.pausable, "keyRegistrar should not be pausable"); @@ -1173,9 +1023,7 @@ library TestUtils { } { - /** - * core/ - */ + /// core/ (addr, config) = Env.proxy.protocolRegistry().getDeployment(type(AllocationManager).name); assertTrue(addr == address(Env.proxy.allocationManager()), "allocationManager address incorrect"); assertTrue(config.pausable, "allocationManager should be pausable"); @@ -1210,9 +1058,7 @@ library TestUtils { } { - /** - * pods/ - */ + /// pods/ (addr, config) = Env.proxy.protocolRegistry().getDeployment(type(EigenPodManager).name); assertTrue(addr == address(Env.proxy.eigenPodManager()), "eigenPodManager address incorrect"); assertTrue(config.pausable, "eigenPodManager should be pausable"); @@ -1225,9 +1071,7 @@ library TestUtils { } { - /** - * strategies/ - */ + /// strategies/ (addr, config) = Env.proxy.protocolRegistry().getDeployment(type(EigenStrategy).name); assertTrue(addr == address(Env.proxy.eigenStrategy()), "eigenStrategy address incorrect"); assertTrue(config.pausable, "eigenStrategy should be pausable"); @@ -1257,9 +1101,7 @@ library TestUtils { } { - /** - * token/ - */ + /// token/ (addr, config) = Env.proxy.protocolRegistry().getDeployment(type(BackingEigen).name); assertTrue(addr == address(Env.proxy.beigen()), "bEIGEN address incorrect"); assertFalse(config.pausable, "bEIGEN should not be pausable"); @@ -1272,9 +1114,7 @@ library TestUtils { } { - /** - * multichain/ - */ + /// multichain/ (addr, config) = Env.proxy.protocolRegistry().getDeployment(type(CrossChainRegistry).name); assertTrue(addr == address(Env.proxy.crossChainRegistry()), "crossChainRegistry address incorrect"); assertTrue(config.pausable, "crossChainRegistry should be pausable"); @@ -1295,9 +1135,7 @@ library TestUtils { IProtocolRegistryTypes.DeploymentConfig memory config; { - /** - * permissions/ - */ + /// permissions/ (addr, config) = Env.proxy.protocolRegistry().getDeployment(type(PauserRegistry).name); assertTrue(addr == address(Env.impl.pauserRegistry()), "pauserRegistry address incorrect"); assertFalse(config.pausable, "pauserRegistry should not be pausable"); @@ -1305,9 +1143,7 @@ library TestUtils { } { - /** - * core/ - */ + /// core/ (addr, config) = Env.proxy.protocolRegistry().getDeployment(type(ProtocolRegistry).name); assertTrue(addr == address(Env.proxy.protocolRegistry()), "protocolRegistry address incorrect"); assertFalse(config.pausable, "protocolRegistry should not be pausable"); @@ -1315,9 +1151,7 @@ library TestUtils { } { - /** - * multichain/ - */ + /// multichain/ (addr, config) = Env.proxy.protocolRegistry().getDeployment(type(BN254CertificateVerifier).name); assertTrue( addr == address(Env.proxy.bn254CertificateVerifier()), "bn254CertificateVerifier address incorrect" @@ -1339,9 +1173,7 @@ library TestUtils { } { - /** - * avs/ - */ + /// avs/ (addr, config) = Env.proxy.protocolRegistry().getDeployment(type(TaskMailbox).name); assertTrue(addr == address(Env.proxy.taskMailbox()), "taskMailbox address incorrect"); assertFalse(config.pausable, "taskMailbox should not be pausable"); @@ -1367,15 +1199,24 @@ library TestUtils { return ProxyAdmin(Env.proxyAdmin()).getProxyAdmin(ITransparentUpgradeableProxy(proxy)); } - function _strEq(string memory a, string memory b) internal pure returns (bool) { + function _strEq( + string memory a, + string memory b + ) internal pure returns (bool) { return keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b)); } - function assertTrue(bool b, string memory err) private pure { + function assertTrue( + bool b, + string memory err + ) private pure { vm.assertTrue(b, err); } - function assertFalse(bool b, string memory err) private pure { + function assertFalse( + bool b, + string memory err + ) private pure { vm.assertFalse(b, err); } } diff --git a/script/releases/v1.9.0-slashing-ux-destination/1-deployProtocolRegistryProxy.s.sol b/script/releases/v1.9.0-slashing-ux-destination/1-deployProtocolRegistryProxy.s.sol index 4fb0ffb6e8..2d84c3f404 100644 --- a/script/releases/v1.9.0-slashing-ux-destination/1-deployProtocolRegistryProxy.s.sol +++ b/script/releases/v1.9.0-slashing-ux-destination/1-deployProtocolRegistryProxy.s.sol @@ -6,9 +6,7 @@ import {MultisigBuilder} from "zeus-templates/templates/MultisigBuilder.sol"; import "../Env.sol"; import {CrosschainDeployLib} from "script/releases/CrosschainDeployLib.sol"; -/** - * Purpose: Deploy the Protocol Registry contract - */ +/// Purpose: Deploy the Protocol Registry contract contract DeployProtocolRegistryProxy is MultisigBuilder { using Env for *; using CrosschainDeployLib for *; @@ -78,7 +76,10 @@ contract DeployProtocolRegistryProxy is MultisigBuilder { } /// @dev Compute the expected proxy address for a given name and empty contract - function _computeExpectedProxyAddress(string memory name, address emptyContract) internal view returns (address) { + function _computeExpectedProxyAddress( + string memory name, + address emptyContract + ) internal view returns (address) { return CrosschainDeployLib.computeCrosschainUpgradeableProxyAddress({ adminAndDeployer: Env.multichainDeployerMultisig(), implementation: emptyContract, diff --git a/script/releases/v1.9.0-slashing-ux-destination/2-deployProtocolRegistryImpl.s.sol b/script/releases/v1.9.0-slashing-ux-destination/2-deployProtocolRegistryImpl.s.sol index 1aa43c1d54..74a318010c 100644 --- a/script/releases/v1.9.0-slashing-ux-destination/2-deployProtocolRegistryImpl.s.sol +++ b/script/releases/v1.9.0-slashing-ux-destination/2-deployProtocolRegistryImpl.s.sol @@ -7,9 +7,7 @@ import {CoreContractsDeployer} from "../CoreContractsDeployer.sol"; import "../Env.sol"; import "../TestUtils.sol"; -/** - * Purpose: Deploy Protocol Registry implementation - */ +/// Purpose: Deploy Protocol Registry implementation contract DeployProtocolRegistryImpl is DeployProtocolRegistryProxy, CoreContractsDeployer { using Env for *; diff --git a/script/releases/v1.9.0-slashing-ux-destination/3-upgradeProtocolRegistry.s.sol b/script/releases/v1.9.0-slashing-ux-destination/3-upgradeProtocolRegistry.s.sol index fe82c3ddab..6ecf91e922 100644 --- a/script/releases/v1.9.0-slashing-ux-destination/3-upgradeProtocolRegistry.s.sol +++ b/script/releases/v1.9.0-slashing-ux-destination/3-upgradeProtocolRegistry.s.sol @@ -9,9 +9,7 @@ import {CoreContractsDeployer} from "../CoreContractsDeployer.sol"; import "../Env.sol"; import "../TestUtils.sol"; -/** - * Purpose: Upgrade Protocol Registry Proxy to point to the implementation. Also transfer control to the ProxyAdmin. - */ +/// Purpose: Upgrade Protocol Registry Proxy to point to the implementation. Also transfer control to the ProxyAdmin. contract UpgradeProtocolRegistry is DeployProtocolRegistryImpl { using Env for *; diff --git a/script/releases/v1.9.0-slashing-ux-destination/4-deployCoreContracts.s.sol b/script/releases/v1.9.0-slashing-ux-destination/4-deployCoreContracts.s.sol index 826ef3e331..79da3d4af2 100644 --- a/script/releases/v1.9.0-slashing-ux-destination/4-deployCoreContracts.s.sol +++ b/script/releases/v1.9.0-slashing-ux-destination/4-deployCoreContracts.s.sol @@ -13,34 +13,28 @@ import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transpa import {ProxyAdmin} from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -/** - * Purpose: use an EOA to deploy all of the new contracts for this upgrade. - * Contracts deployed: - * /// Multichain - * - BN254CertificateVerifier - * - CrossChainRegistry - * - ECDSACertificateVerifier - * - OperatorTableUpdater - * /// AVS - * - TaskMailbox - */ +/// Purpose: use an EOA to deploy all of the new contracts for this upgrade. +/// Contracts deployed: +/// /// Multichain +/// - BN254CertificateVerifier +/// - CrossChainRegistry +/// - ECDSACertificateVerifier +/// - OperatorTableUpdater +/// /// AVS +/// - TaskMailbox contract DeployCoreContracts is UpgradeProtocolRegistry { using Env for *; function _runAsEOA() internal override { vm.startBroadcast(); - /** - * multichain/ - */ + /// multichain/ deployBN254CertificateVerifier(); // CrossChainRegistry only deployed on destination chain deployECDSACertificateVerifier(); deployOperatorTableUpdater(); - /** - * avs/ - */ + /// avs/ deployTaskMailbox(); vm.stopBroadcast(); diff --git a/script/releases/v1.9.0-slashing-ux-destination/5-queueUpgrade.s.sol b/script/releases/v1.9.0-slashing-ux-destination/5-queueUpgrade.s.sol index 5ec1831200..739ae36d93 100644 --- a/script/releases/v1.9.0-slashing-ux-destination/5-queueUpgrade.s.sol +++ b/script/releases/v1.9.0-slashing-ux-destination/5-queueUpgrade.s.sol @@ -48,12 +48,13 @@ contract QueueUpgrade is DeployCoreContracts { // Add the protocol registry upgrade to the executor calls _appendProtocolRegistryUpgrade(executorCalls); - return Encode.gnosisSafe.execTransaction({ - from: address(Env.timelockController()), - to: Env.multiSendCallOnly(), - op: Encode.Operation.DelegateCall, - data: Encode.multiSend(executorCalls) - }); + return Encode.gnosisSafe + .execTransaction({ + from: address(Env.timelockController()), + to: Env.multiSendCallOnly(), + op: Encode.Operation.DelegateCall, + data: Encode.multiSend(executorCalls) + }); } function _appendProtocolRegistryUpgrade( @@ -69,23 +70,17 @@ contract QueueUpgrade is DeployCoreContracts { IProtocolRegistryTypes.DeploymentConfig memory unpausableConfig = IProtocolRegistryTypes.DeploymentConfig({pausable: false, deprecated: false}); - /** - * permissions/ - */ + /// permissions/ addresses[0] = address(Env.impl.pauserRegistry()); configs[0] = unpausableConfig; names[0] = type(PauserRegistry).name; - /** - * core/ - */ + /// core/ addresses[1] = address(Env.proxy.protocolRegistry()); configs[1] = unpausableConfig; names[1] = type(ProtocolRegistry).name; - /** - * multichain/ - */ + /// multichain/ addresses[2] = address(Env.proxy.bn254CertificateVerifier()); configs[2] = unpausableConfig; names[2] = type(BN254CertificateVerifier).name; @@ -98,9 +93,7 @@ contract QueueUpgrade is DeployCoreContracts { configs[4] = pausableConfig; names[4] = type(OperatorTableUpdater).name; - /** - * avs/ - */ + /// avs/ addresses[5] = address(Env.proxy.taskMailbox()); configs[5] = unpausableConfig; names[5] = type(TaskMailbox).name; @@ -108,7 +101,9 @@ contract QueueUpgrade is DeployCoreContracts { // Lastly, append to the multisig calls calls.append({ to: address(Env.proxy.protocolRegistry()), - data: abi.encodeWithSelector(IProtocolRegistry.ship.selector, addresses, configs, names, Env.deployVersion()) + data: abi.encodeWithSelector( + IProtocolRegistry.ship.selector, addresses, configs, names, Env.deployVersion() + ) }); } diff --git a/script/releases/v1.9.0-slashing-ux/1-deployProtocolRegistryProxy.s.sol b/script/releases/v1.9.0-slashing-ux/1-deployProtocolRegistryProxy.s.sol index 8599c13291..432bfc577e 100644 --- a/script/releases/v1.9.0-slashing-ux/1-deployProtocolRegistryProxy.s.sol +++ b/script/releases/v1.9.0-slashing-ux/1-deployProtocolRegistryProxy.s.sol @@ -6,9 +6,7 @@ import {MultisigBuilder} from "zeus-templates/templates/MultisigBuilder.sol"; import "../Env.sol"; import {CrosschainDeployLib} from "script/releases/CrosschainDeployLib.sol"; -/** - * Purpose: Deploy the Protocol Registry contract - */ +/// Purpose: Deploy the Protocol Registry contract contract DeployProtocolRegistryProxy is MultisigBuilder { using Env for *; using CrosschainDeployLib for *; @@ -77,7 +75,10 @@ contract DeployProtocolRegistryProxy is MultisigBuilder { } /// @dev Compute the expected proxy address for a given name and empty contract - function _computeExpectedProxyAddress(string memory name, address emptyContract) internal view returns (address) { + function _computeExpectedProxyAddress( + string memory name, + address emptyContract + ) internal view returns (address) { return CrosschainDeployLib.computeCrosschainUpgradeableProxyAddress({ adminAndDeployer: Env.multichainDeployerMultisig(), implementation: emptyContract, diff --git a/script/releases/v1.9.0-slashing-ux/2-deployProtocolRegistryImpl.s.sol b/script/releases/v1.9.0-slashing-ux/2-deployProtocolRegistryImpl.s.sol index 2c0480ade6..5339037914 100644 --- a/script/releases/v1.9.0-slashing-ux/2-deployProtocolRegistryImpl.s.sol +++ b/script/releases/v1.9.0-slashing-ux/2-deployProtocolRegistryImpl.s.sol @@ -7,9 +7,7 @@ import {CoreContractsDeployer} from "../CoreContractsDeployer.sol"; import "../Env.sol"; import "../TestUtils.sol"; -/** - * Purpose: Deploy Protocol Registry implementation - */ +/// Purpose: Deploy Protocol Registry implementation contract DeployProtocolRegistryImpl is DeployProtocolRegistryProxy, CoreContractsDeployer { using Env for *; diff --git a/script/releases/v1.9.0-slashing-ux/3-upgradeProtocolRegistry.s.sol b/script/releases/v1.9.0-slashing-ux/3-upgradeProtocolRegistry.s.sol index d1cbe0bb1d..0e771c7e43 100644 --- a/script/releases/v1.9.0-slashing-ux/3-upgradeProtocolRegistry.s.sol +++ b/script/releases/v1.9.0-slashing-ux/3-upgradeProtocolRegistry.s.sol @@ -9,9 +9,7 @@ import {CoreContractsDeployer} from "../CoreContractsDeployer.sol"; import "../Env.sol"; import "../TestUtils.sol"; -/** - * Purpose: Upgrade Protocol Registry Proxy to point to the implementation. Also transfer control to the ProxyAdmin. - */ +/// Purpose: Upgrade Protocol Registry Proxy to point to the implementation. Also transfer control to the ProxyAdmin. contract UpgradeProtocolRegistry is DeployProtocolRegistryImpl { using Env for *; @@ -29,10 +27,8 @@ contract UpgradeProtocolRegistry is DeployProtocolRegistryImpl { function testScript() public virtual override { if ( !Env.isCoreProtocolDeployed() - || ( - _areProxiesDeployed() - && Env.getProxyAdminBySlot(address(Env.proxy.protocolRegistry())) == Env.proxyAdmin() - ) + || (_areProxiesDeployed() + && Env.getProxyAdminBySlot(address(Env.proxy.protocolRegistry())) == Env.proxyAdmin()) ) { return; } diff --git a/script/releases/v1.9.0-slashing-ux/4-deployCoreContracts.s.sol b/script/releases/v1.9.0-slashing-ux/4-deployCoreContracts.s.sol index a95c388d21..e8bbc6949b 100644 --- a/script/releases/v1.9.0-slashing-ux/4-deployCoreContracts.s.sol +++ b/script/releases/v1.9.0-slashing-ux/4-deployCoreContracts.s.sol @@ -13,50 +13,44 @@ import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transpa import {ProxyAdmin} from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -/** - * Purpose: use an EOA to deploy all of the new contracts for this upgrade. - * Contracts deployed: - * /// Permissions - * - PermissionController - * - KeyRegistrar - * /// Core - * - AllocationManager - * - AVSDirectory - * - DelegationManager - * - ReleaseManager - * - RewardsCoordinator - * - StrategyManager - * /// Pods - * - EigenPod - * - EigenPodManager - * /// Strategies - * - EigenStrategy - * - StrategyBase - * - StrategyBaseTVLLimits - * - StrategyFactory - * /// Multichain - * - BN254CertificateVerifier - * - CrossChainRegistry - * - ECDSACertificateVerifier - * - OperatorTableUpdater - * /// AVS - * - TaskMailbox - */ +/// Purpose: use an EOA to deploy all of the new contracts for this upgrade. +/// Contracts deployed: +/// /// Permissions +/// - PermissionController +/// - KeyRegistrar +/// /// Core +/// - AllocationManager +/// - AVSDirectory +/// - DelegationManager +/// - ReleaseManager +/// - RewardsCoordinator +/// - StrategyManager +/// /// Pods +/// - EigenPod +/// - EigenPodManager +/// /// Strategies +/// - EigenStrategy +/// - StrategyBase +/// - StrategyBaseTVLLimits +/// - StrategyFactory +/// /// Multichain +/// - BN254CertificateVerifier +/// - CrossChainRegistry +/// - ECDSACertificateVerifier +/// - OperatorTableUpdater +/// /// AVS +/// - TaskMailbox contract DeployCoreContracts is UpgradeProtocolRegistry { using Env for *; function _runAsEOA() internal override { vm.startBroadcast(); - /** - * pemissions/ - */ + /// pemissions/ deployPermissionController(); deployKeyRegistrar(); - /** - * core/ - */ + /// core/ deployAllocationManagerView(); deployAllocationManager(); deployAVSDirectory(); @@ -66,31 +60,23 @@ contract DeployCoreContracts is UpgradeProtocolRegistry { deployRewardsCoordinator(); deployStrategyManager(); - /** - * pods/ - */ + /// pods/ deployEigenPodManager(); deployEigenPod(); - /** - * strategies/ - */ + /// strategies/ deployEigenStrategy(); deployStrategyBase(); deployStrategyBaseTVLLimits(); deployStrategyFactory(); - /** - * multichain/ - */ + /// multichain/ deployBN254CertificateVerifier(); deployCrossChainRegistry(); deployECDSACertificateVerifier(); deployOperatorTableUpdater(); - /** - * avs/ - */ + /// avs/ deployTaskMailbox(); vm.stopBroadcast(); diff --git a/script/releases/v1.9.0-slashing-ux/5-queueUpgrade.s.sol b/script/releases/v1.9.0-slashing-ux/5-queueUpgrade.s.sol index 9b105db45f..34431e5e52 100644 --- a/script/releases/v1.9.0-slashing-ux/5-queueUpgrade.s.sol +++ b/script/releases/v1.9.0-slashing-ux/5-queueUpgrade.s.sol @@ -72,15 +72,18 @@ contract QueueUpgrade is DeployCoreContracts { // Lastly, add the protocol registry as a pauser to the pauser registry executorCalls.append({ to: address(Env.impl.pauserRegistry()), - data: abi.encodeWithSelector(PauserRegistry.setIsPauser.selector, address(Env.proxy.protocolRegistry()), true) + data: abi.encodeWithSelector( + PauserRegistry.setIsPauser.selector, address(Env.proxy.protocolRegistry()), true + ) }); - return Encode.gnosisSafe.execTransaction({ - from: address(Env.timelockController()), - to: Env.multiSendCallOnly(), - op: Encode.Operation.DelegateCall, - data: Encode.multiSend(executorCalls) - }); + return Encode.gnosisSafe + .execTransaction({ + from: address(Env.timelockController()), + to: Env.multiSendCallOnly(), + op: Encode.Operation.DelegateCall, + data: Encode.multiSend(executorCalls) + }); } function _appendProtocolRegistryUpgrade( @@ -96,9 +99,7 @@ contract QueueUpgrade is DeployCoreContracts { IProtocolRegistryTypes.DeploymentConfig memory unpausableConfig = IProtocolRegistryTypes.DeploymentConfig({pausable: false, deprecated: false}); - /** - * permissions/ - */ + /// permissions/ addresses[0] = address(Env.impl.pauserRegistry()); configs[0] = unpausableConfig; names[0] = type(PauserRegistry).name; @@ -111,9 +112,7 @@ contract QueueUpgrade is DeployCoreContracts { configs[2] = unpausableConfig; names[2] = type(KeyRegistrar).name; - /** - * core/ - */ + /// core/ addresses[3] = address(Env.proxy.allocationManager()); configs[3] = pausableConfig; names[3] = type(AllocationManager).name; @@ -142,9 +141,7 @@ contract QueueUpgrade is DeployCoreContracts { configs[9] = pausableConfig; names[9] = type(StrategyManager).name; - /** - * pods/ - */ + /// pods/ addresses[10] = address(Env.proxy.eigenPodManager()); configs[10] = pausableConfig; names[10] = type(EigenPodManager).name; @@ -153,9 +150,7 @@ contract QueueUpgrade is DeployCoreContracts { configs[11] = unpausableConfig; names[11] = type(EigenPod).name; - /** - * strategies/ - */ + /// strategies/ addresses[12] = address(Env.proxy.eigenStrategy()); configs[12] = pausableConfig; names[12] = type(EigenStrategy).name; @@ -168,9 +163,7 @@ contract QueueUpgrade is DeployCoreContracts { configs[14] = pausableConfig; names[14] = type(StrategyFactory).name; - /** - * multichain/ - */ + /// multichain/ addresses[15] = address(Env.proxy.bn254CertificateVerifier()); configs[15] = unpausableConfig; names[15] = type(BN254CertificateVerifier).name; @@ -187,16 +180,12 @@ contract QueueUpgrade is DeployCoreContracts { configs[18] = pausableConfig; names[18] = type(OperatorTableUpdater).name; - /** - * avs/ - */ + /// avs/ addresses[19] = address(Env.proxy.taskMailbox()); configs[19] = unpausableConfig; names[19] = type(TaskMailbox).name; - /** - * token - */ + /// token addresses[20] = address(Env.proxy.beigen()); configs[20] = unpausableConfig; names[20] = type(BackingEigen).name; @@ -208,7 +197,9 @@ contract QueueUpgrade is DeployCoreContracts { // Append to the multisig calls calls.append({ to: address(Env.proxy.protocolRegistry()), - data: abi.encodeWithSelector(IProtocolRegistry.ship.selector, addresses, configs, names, Env.deployVersion()) + data: abi.encodeWithSelector( + IProtocolRegistry.ship.selector, addresses, configs, names, Env.deployVersion() + ) }); // Now, if we have any strategy base TVLLimits, we need to add them to the protocol registry @@ -227,7 +218,11 @@ contract QueueUpgrade is DeployCoreContracts { calls.append({ to: address(Env.proxy.protocolRegistry()), data: abi.encodeWithSelector( - IProtocolRegistry.ship.selector, strategyAddresses, strategyConfigs, strategyNames, Env.deployVersion() + IProtocolRegistry.ship.selector, + strategyAddresses, + strategyConfigs, + strategyNames, + Env.deployVersion() ) }); } diff --git a/script/tasks/deposit_into_strategy.s.sol b/script/tasks/deposit_into_strategy.s.sol index c8256ffeeb..737d756383 100644 --- a/script/tasks/deposit_into_strategy.s.sol +++ b/script/tasks/deposit_into_strategy.s.sol @@ -25,7 +25,12 @@ import "forge-std/Test.sol"; contract DepositIntoStrategy is Script, Test { Vm cheats = Vm(VM_ADDRESS); - function run(string memory configFile, address strategy, address token, uint256 amount) public { + function run( + string memory configFile, + address strategy, + address token, + uint256 amount + ) public { // Load config string memory deployConfigPath = string(bytes(string.concat("script/output/", configFile))); string memory config_data = vm.readFile(deployConfigPath); diff --git a/script/tasks/register_as_operator.s.sol b/script/tasks/register_as_operator.s.sol index a27c390f0d..3a30732b85 100644 --- a/script/tasks/register_as_operator.s.sol +++ b/script/tasks/register_as_operator.s.sol @@ -19,7 +19,11 @@ import "forge-std/Test.sol"; contract RegisterAsOperator is Script, Test { Vm cheats = Vm(VM_ADDRESS); - function run(string memory configFile, address operator, string memory metadataURI) public { + function run( + string memory configFile, + address operator, + string memory metadataURI + ) public { // Load config string memory deployConfigPath = string(bytes(string.concat("script/output/", configFile))); string memory config_data = vm.readFile(deployConfigPath); diff --git a/script/tasks/register_operator_to_operatorSet.s.sol b/script/tasks/register_operator_to_operatorSet.s.sol index 01e12d2895..429b2500cf 100644 --- a/script/tasks/register_operator_to_operatorSet.s.sol +++ b/script/tasks/register_operator_to_operatorSet.s.sol @@ -17,7 +17,11 @@ contract AVSRegistrar is IAVSRegistrar { uint32[] calldata operatorSetIds, bytes calldata data ) external {} - function deregisterOperator(address operator, address avsIdentifier, uint32[] calldata operatorSetIds) external {} + function deregisterOperator( + address operator, + address avsIdentifier, + uint32[] calldata operatorSetIds + ) external {} function supportsAVS( address /*avs*/ diff --git a/script/tasks/withdraw_from_strategy.s.sol b/script/tasks/withdraw_from_strategy.s.sol index 09b3dc1a14..0978bc5a92 100644 --- a/script/tasks/withdraw_from_strategy.s.sol +++ b/script/tasks/withdraw_from_strategy.s.sol @@ -14,7 +14,12 @@ import "forge-std/Test.sol"; contract WithdrawFromStrategy is Script, Test { Vm cheats = Vm(VM_ADDRESS); - function run(string memory configFile, address strategy, address token, uint256 amount) public { + function run( + string memory configFile, + address strategy, + address token, + uint256 amount + ) public { // Load config string memory deployConfigPath = string(bytes(string.concat("script/output/", configFile))); string memory config_data = vm.readFile(deployConfigPath); diff --git a/script/utils/ExistingDeploymentParser.sol b/script/utils/ExistingDeploymentParser.sol index 488ff9d9e0..8485bcedd0 100644 --- a/script/utils/ExistingDeploymentParser.sol +++ b/script/utils/ExistingDeploymentParser.sol @@ -475,12 +475,16 @@ contract ExistingDeploymentParser is Script, Logger { "delegationManager: implementation set incorrectly" ); assertEq( - eigenLayerProxyAdmin.getProxyImplementation(ITransparentUpgradeableProxy(payable(address(strategyManager)))), + eigenLayerProxyAdmin.getProxyImplementation( + ITransparentUpgradeableProxy(payable(address(strategyManager))) + ), address(strategyManagerImplementation), "strategyManager: implementation set incorrectly" ); assertEq( - eigenLayerProxyAdmin.getProxyImplementation(ITransparentUpgradeableProxy(payable(address(eigenPodManager)))), + eigenLayerProxyAdmin.getProxyImplementation( + ITransparentUpgradeableProxy(payable(address(eigenPodManager))) + ), address(eigenPodManagerImplementation), "eigenPodManager: implementation set incorrectly" ); @@ -502,11 +506,9 @@ contract ExistingDeploymentParser is Script, Logger { ); } - /** - * @notice Verify initialization of Transparent Upgradeable Proxies. Also check - * initialization params if this is the first deployment. - * @dev isInitialDeployment True if this is the first deployment of contracts from scratch - */ + /// @notice Verify initialization of Transparent Upgradeable Proxies. Also check + /// initialization params if this is the first deployment. + /// @dev isInitialDeployment True if this is the first deployment of contracts from scratch function _verifyContractsInitialized( bool /* isInitialDeployment */ ) internal virtual { @@ -703,9 +705,7 @@ contract ExistingDeploymentParser is Script, Logger { } } - /** - * @notice Log contract addresses and write to output json file - */ + /// @notice Log contract addresses and write to output json file function logAndOutputContractAddresses( string memory outputPath ) public { diff --git a/src/contracts/avs/task/TaskMailbox.sol b/src/contracts/avs/task/TaskMailbox.sol index 7dcc126900..06b1c1fb5a 100644 --- a/src/contracts/avs/task/TaskMailbox.sol +++ b/src/contracts/avs/task/TaskMailbox.sol @@ -10,10 +10,12 @@ import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol"; import {IAVSTaskHook} from "../../interfaces/IAVSTaskHook.sol"; import { - IBN254CertificateVerifier, IBN254CertificateVerifierTypes + IBN254CertificateVerifier, + IBN254CertificateVerifierTypes } from "../../interfaces/IBN254CertificateVerifier.sol"; import { - IECDSACertificateVerifier, IECDSACertificateVerifierTypes + IECDSACertificateVerifier, + IECDSACertificateVerifierTypes } from "../../interfaces/IECDSACertificateVerifier.sol"; import {IBaseCertificateVerifier} from "../../interfaces/IBaseCertificateVerifier.sol"; import {IKeyRegistrarTypes} from "../../interfaces/IKeyRegistrar.sol"; @@ -21,21 +23,17 @@ import {ITaskMailbox} from "../../interfaces/ITaskMailbox.sol"; import {OperatorSet} from "../../libraries/OperatorSetLib.sol"; import {TaskMailboxStorage} from "./TaskMailboxStorage.sol"; -/** - * @title TaskMailbox - * @author Layr Labs, Inc. - * @notice Contract for managing the lifecycle of tasks that are executed by operator sets of task-based AVSs. - */ +/// @title TaskMailbox +/// @author Layr Labs, Inc. +/// @notice Contract for managing the lifecycle of tasks that are executed by operator sets of task-based AVSs. contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, TaskMailboxStorage { using SafeERC20 for IERC20; using SafeCast for *; - /** - * @notice Constructor for TaskMailbox - * @param _bn254CertificateVerifier Address of the BN254 certificate verifier - * @param _ecdsaCertificateVerifier Address of the ECDSA certificate verifier - * @param _maxTaskSLA Maximum task SLA in seconds - */ + /// @notice Constructor for TaskMailbox + /// @param _bn254CertificateVerifier Address of the BN254 certificate verifier + /// @param _ecdsaCertificateVerifier Address of the ECDSA certificate verifier + /// @param _maxTaskSLA Maximum task SLA in seconds constructor( address _bn254CertificateVerifier, address _ecdsaCertificateVerifier, @@ -44,13 +42,15 @@ contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgrad _disableInitializers(); } - /** - * @notice Initializer for TaskMailbox - * @param _owner The owner of the contract - * @param _feeSplit The initial fee split in basis points - * @param _feeSplitCollector The initial fee split collector address - */ - function initialize(address _owner, uint16 _feeSplit, address _feeSplitCollector) external initializer { + /// @notice Initializer for TaskMailbox + /// @param _owner The owner of the contract + /// @param _feeSplit The initial fee split in basis points + /// @param _feeSplitCollector The initial fee split collector address + function initialize( + address _owner, + uint16 _feeSplit, + address _feeSplitCollector + ) external initializer { __Ownable_init(); __ReentrancyGuard_init(); _transferOwnership(_owner); @@ -58,11 +58,9 @@ contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgrad _setFeeSplitCollector(_feeSplitCollector); } - /** - * - * EXTERNAL FUNCTIONS - * - */ + /// + /// EXTERNAL FUNCTIONS + /// /// @inheritdoc ITaskMailbox function setExecutorOperatorSetTaskConfig( @@ -90,7 +88,10 @@ contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgrad } /// @inheritdoc ITaskMailbox - function registerExecutorOperatorSet(OperatorSet memory operatorSet, bool isRegistered) external { + function registerExecutorOperatorSet( + OperatorSet memory operatorSet, + bool isRegistered + ) external { ExecutorOperatorSetTaskConfig memory taskConfig = _executorOperatorSetTaskConfigs[operatorSet.key()]; // Validate that task config has been set before registration can be toggled. @@ -181,16 +182,19 @@ contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgrad } /// @inheritdoc ITaskMailbox - function submitResult(bytes32 taskHash, bytes memory executorCert, bytes memory result) external nonReentrant { + function submitResult( + bytes32 taskHash, + bytes memory executorCert, + bytes memory result + ) external nonReentrant { Task storage task = _tasks[taskHash]; TaskStatus status = _getTaskStatus(task); require(status == TaskStatus.CREATED, InvalidTaskStatus(TaskStatus.CREATED, status)); require(block.timestamp > task.creationTime, TimestampAtCreation()); // Pre-task result submission checks: AVS can validate the caller, task result, params and certificate. - task.executorOperatorSetTaskConfig.taskHook.validatePreTaskResultSubmission( - msg.sender, taskHash, executorCert, result - ); + task.executorOperatorSetTaskConfig.taskHook + .validatePreTaskResultSubmission(msg.sender, taskHash, executorCert, result); // Verify certificate based on consensus configuration OperatorSet memory executorOperatorSet = OperatorSet(task.avs, task.executorOperatorSetId); @@ -220,9 +224,8 @@ contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgrad // Transfer remaining fee to AVS fee collector uint96 avsAmount = task.avsFee - feeSplitAmount; if (avsAmount > 0) { - task.executorOperatorSetTaskConfig.feeToken.safeTransfer( - task.executorOperatorSetTaskConfig.feeCollector, avsAmount - ); + task.executorOperatorSetTaskConfig.feeToken + .safeTransfer(task.executorOperatorSetTaskConfig.feeCollector, avsAmount); } } @@ -268,16 +271,12 @@ contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgrad _setFeeSplitCollector(_feeSplitCollector); } - /** - * - * INTERNAL FUNCTIONS - * - */ + /// + /// INTERNAL FUNCTIONS + /// - /** - * @notice Sets the fee split percentage - * @param _feeSplit The fee split in basis points (0-10000) - */ + /// @notice Sets the fee split percentage + /// @param _feeSplit The fee split in basis points (0-10000) function _setFeeSplit( uint16 _feeSplit ) internal { @@ -286,10 +285,8 @@ contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgrad emit FeeSplitSet(_feeSplit); } - /** - * @notice Sets the fee split collector address - * @param _feeSplitCollector The address to receive fee splits - */ + /// @notice Sets the fee split collector address + /// @param _feeSplitCollector The address to receive fee splits function _setFeeSplitCollector( address _feeSplitCollector ) internal { @@ -298,11 +295,9 @@ contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgrad emit FeeSplitCollectorSet(_feeSplitCollector); } - /** - * @notice Gets the current status of a task - * @param task The task to get the status for - * @return The current status of the task, considering expiration - */ + /// @notice Gets the current status of a task + /// @param task The task to get the status for + /// @return The current status of the task, considering expiration function _getTaskStatus( Task memory task ) internal view returns (TaskStatus) { @@ -315,22 +310,21 @@ contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgrad return task.status; } - /** - * @notice Registers an executor operator set with the TaskMailbox - * @param operatorSet The operator set to register - * @param isRegistered Whether the operator set is registered - */ - function _registerExecutorOperatorSet(OperatorSet memory operatorSet, bool isRegistered) internal { + /// @notice Registers an executor operator set with the TaskMailbox + /// @param operatorSet The operator set to register + /// @param isRegistered Whether the operator set is registered + function _registerExecutorOperatorSet( + OperatorSet memory operatorSet, + bool isRegistered + ) internal { isExecutorOperatorSetRegistered[operatorSet.key()] = isRegistered; emit ExecutorOperatorSetRegistered(msg.sender, operatorSet.avs, operatorSet.id, isRegistered); } - /** - * @notice Gets the certificate verifier for a given curve type - * @param curveType The curve type to get the certificate verifier for - * @return The address of the certificate verifier - * @dev This function will revert if the curve type is invalid - */ + /// @notice Gets the certificate verifier for a given curve type + /// @param curveType The curve type to get the certificate verifier for + /// @return The address of the certificate verifier + /// @dev This function will revert if the curve type is invalid function _getCertificateVerifier( IKeyRegistrarTypes.CurveType curveType ) internal view returns (address) { @@ -343,11 +337,9 @@ contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgrad } } - /** - * @notice Checks if a task config is populated - * @param taskConfig The task config to check - * @return True if all elements of the task config are populated, false otherwise - */ + /// @notice Checks if a task config is populated + /// @param taskConfig The task config to check + /// @return True if all elements of the task config are populated, false otherwise function _isConfigPopulated( ExecutorOperatorSetTaskConfig memory taskConfig ) internal pure returns (bool) { @@ -355,12 +347,10 @@ contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgrad && taskConfig.taskHook != IAVSTaskHook(address(0)) && taskConfig.taskSLA > 0; } - /** - * @notice Validates that the caller is the owner of the operator set - * @param operatorSet The operator set to validate ownership for - * @param curveType The curve type used to determine the certificate verifier - * @dev This function will revert if the curve type is invalid or if msg.sender is not the owner of the operator set - */ + /// @notice Validates that the caller is the owner of the operator set + /// @param operatorSet The operator set to validate ownership for + /// @param curveType The curve type used to determine the certificate verifier + /// @dev This function will revert if the curve type is invalid or if msg.sender is not the owner of the operator set function _validateOperatorSetOwner( OperatorSet memory operatorSet, IKeyRegistrarTypes.CurveType curveType @@ -373,10 +363,8 @@ contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgrad ); } - /** - * @notice Validates the consensus configuration - * @param consensus The consensus configuration to validate - */ + /// @notice Validates the consensus configuration + /// @param consensus The consensus configuration to validate function _validateConsensus( Consensus memory consensus ) internal pure { @@ -393,12 +381,10 @@ contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgrad } } - /** - * @notice Validates a BN254 certificate's basic requirements - * @param cert The BN254 certificate to validate - * @param operatorTableReferenceTimestamp The expected reference timestamp - * @param messageHash The expected message hash - */ + /// @notice Validates a BN254 certificate's basic requirements + /// @param cert The BN254 certificate to validate + /// @param operatorTableReferenceTimestamp The expected reference timestamp + /// @param messageHash The expected message hash function _validateBN254Certificate( IBN254CertificateVerifierTypes.BN254Certificate memory cert, uint32 operatorTableReferenceTimestamp, @@ -409,12 +395,10 @@ contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgrad require(!(cert.signature.X == 0 && cert.signature.Y == 0), EmptyCertificateSignature()); } - /** - * @notice Validates an ECDSA certificate's basic requirements - * @param cert The ECDSA certificate to validate - * @param operatorTableReferenceTimestamp The expected reference timestamp - * @param messageHash The expected message hash - */ + /// @notice Validates an ECDSA certificate's basic requirements + /// @param cert The ECDSA certificate to validate + /// @param operatorTableReferenceTimestamp The expected reference timestamp + /// @param messageHash The expected message hash function _validateECDSACertificate( IECDSACertificateVerifierTypes.ECDSACertificate memory cert, uint32 operatorTableReferenceTimestamp, @@ -425,15 +409,13 @@ contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgrad require(cert.sig.length > 0, EmptyCertificateSignature()); } - /** - * @notice Verifies an executor certificate based on the consensus configuration - * @param curveType The curve type used for signature verification - * @param consensus The consensus configuration - * @param executorOperatorSet The executor operator set - * @param operatorTableReferenceTimestamp The reference timestamp of the operator table - * @param messageHash The hash of the message that was signed by the operators - * @param executorCert The executor certificate to verify - */ + /// @notice Verifies an executor certificate based on the consensus configuration + /// @param curveType The curve type used for signature verification + /// @param consensus The consensus configuration + /// @param executorOperatorSet The executor operator set + /// @param operatorTableReferenceTimestamp The reference timestamp of the operator table + /// @param messageHash The hash of the message that was signed by the operators + /// @param executorCert The executor certificate to verify function _verifyExecutorCertificate( IKeyRegistrarTypes.CurveType curveType, Consensus memory consensus, @@ -486,9 +468,8 @@ contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgrad // Validate the certificate _validateBN254Certificate(bn254Cert, operatorTableReferenceTimestamp, messageHash); - isThresholdMet = IBN254CertificateVerifier(BN254_CERTIFICATE_VERIFIER).verifyCertificateProportion( - executorOperatorSet, bn254Cert, totalStakeProportionThresholds - ); + isThresholdMet = IBN254CertificateVerifier(BN254_CERTIFICATE_VERIFIER) + .verifyCertificateProportion(executorOperatorSet, bn254Cert, totalStakeProportionThresholds); } else if (curveType == IKeyRegistrarTypes.CurveType.ECDSA) { // ECDSA Certificate verification IECDSACertificateVerifierTypes.ECDSACertificate memory ecdsaCert = @@ -497,9 +478,8 @@ contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgrad // Validate the certificate _validateECDSACertificate(ecdsaCert, operatorTableReferenceTimestamp, messageHash); - (isThresholdMet,) = IECDSACertificateVerifier(ECDSA_CERTIFICATE_VERIFIER).verifyCertificateProportion( - executorOperatorSet, ecdsaCert, totalStakeProportionThresholds - ); + (isThresholdMet,) = IECDSACertificateVerifier(ECDSA_CERTIFICATE_VERIFIER) + .verifyCertificateProportion(executorOperatorSet, ecdsaCert, totalStakeProportionThresholds); } else { revert InvalidCurveType(); } @@ -510,11 +490,9 @@ contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgrad } } - /** - * - * VIEW FUNCTIONS - * - */ + /// + /// VIEW FUNCTIONS + /// /// @inheritdoc ITaskMailbox function getExecutorOperatorSetTaskConfig( @@ -579,7 +557,10 @@ contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgrad } /// @inheritdoc ITaskMailbox - function getMessageHash(bytes32 taskHash, bytes memory result) public pure returns (bytes32) { + function getMessageHash( + bytes32 taskHash, + bytes memory result + ) public pure returns (bytes32) { return keccak256(abi.encode(taskHash, result)); } } diff --git a/src/contracts/avs/task/TaskMailboxStorage.sol b/src/contracts/avs/task/TaskMailboxStorage.sol index d99e735c87..c8560e1293 100644 --- a/src/contracts/avs/task/TaskMailboxStorage.sol +++ b/src/contracts/avs/task/TaskMailboxStorage.sol @@ -3,11 +3,9 @@ pragma solidity ^0.8.27; import {ITaskMailbox} from "../../interfaces/ITaskMailbox.sol"; -/** - * @title TaskMailboxStorage - * @author Layr Labs, Inc. - * @notice Storage contract for the TaskMailbox contract. - */ +/// @title TaskMailboxStorage +/// @author Layr Labs, Inc. +/// @notice Storage contract for the TaskMailbox contract. abstract contract TaskMailboxStorage is ITaskMailbox { /// @notice Equivalent to 100%, but in basis points. uint16 internal constant ONE_HUNDRED_IN_BIPS = 10_000; @@ -40,22 +38,22 @@ abstract contract TaskMailboxStorage is ITaskMailbox { /// @notice The address that receives the fee split address public feeSplitCollector; - /** - * @notice Constructor for TaskMailboxStorage - * @param _bn254CertificateVerifier Address of the BN254 certificate verifier - * @param _ecdsaCertificateVerifier Address of the ECDSA certificate verifier - * @param _maxTaskSLA Maximum task SLA in seconds - */ - constructor(address _bn254CertificateVerifier, address _ecdsaCertificateVerifier, uint96 _maxTaskSLA) { + /// @notice Constructor for TaskMailboxStorage + /// @param _bn254CertificateVerifier Address of the BN254 certificate verifier + /// @param _ecdsaCertificateVerifier Address of the ECDSA certificate verifier + /// @param _maxTaskSLA Maximum task SLA in seconds + constructor( + address _bn254CertificateVerifier, + address _ecdsaCertificateVerifier, + uint96 _maxTaskSLA + ) { BN254_CERTIFICATE_VERIFIER = _bn254CertificateVerifier; ECDSA_CERTIFICATE_VERIFIER = _ecdsaCertificateVerifier; MAX_TASK_SLA = _maxTaskSLA; } - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[45] private __gap; } diff --git a/src/contracts/core/AVSDirectory.sol b/src/contracts/core/AVSDirectory.sol index 6a30484cbb..d87b6e3abb 100644 --- a/src/contracts/core/AVSDirectory.sol +++ b/src/contracts/core/AVSDirectory.sol @@ -17,16 +17,11 @@ contract AVSDirectory is ReentrancyGuardUpgradeable, SignatureUtilsMixin { - /** - * - * INITIALIZING FUNCTIONS - * - */ - - /** - * @dev Initializes the immutable addresses of the strategy manager, delegationManager, - * and eigenpodManager contracts - */ + /// + /// INITIALIZING FUNCTIONS + /// + /// @dev Initializes the immutable addresses of the strategy manager, delegationManager, + /// and eigenpodManager contracts constructor( IDelegationManager _delegation, IPauserRegistry _pauserRegistry, @@ -36,16 +31,17 @@ contract AVSDirectory is } /// @inheritdoc IAVSDirectory - function initialize(address initialOwner, uint256 initialPausedStatus) external initializer { + function initialize( + address initialOwner, + uint256 initialPausedStatus + ) external initializer { _setPausedStatus(initialPausedStatus); _transferOwnership(initialOwner); } - /** - * - * EXTERNAL FUNCTIONS - * - */ + /// + /// EXTERNAL FUNCTIONS + /// /// @inheritdoc IAVSDirectory function updateAVSMetadataURI( @@ -62,11 +58,9 @@ contract AVSDirectory is operatorSaltIsSpent[msg.sender][salt] = true; } - /** - * - * LEGACY EXTERNAL FUNCTIONS - SUPPORT DEPRECATED IN FUTURE RELEASE AFTER SLASHING RELEASE - * - */ + /// + /// LEGACY EXTERNAL FUNCTIONS - SUPPORT DEPRECATED IN FUTURE RELEASE AFTER SLASHING RELEASE + /// /// @inheritdoc IAVSDirectory function registerOperatorToAVS( @@ -123,11 +117,9 @@ contract AVSDirectory is emit OperatorAVSRegistrationStatusUpdated(operator, msg.sender, OperatorAVSRegistrationStatus.UNREGISTERED); } - /** - * - * VIEW FUNCTIONS - * - */ + /// + /// VIEW FUNCTIONS + /// /// @inheritdoc IAVSDirectory function calculateOperatorAVSRegistrationDigestHash( diff --git a/src/contracts/core/AllocationManager.sol b/src/contracts/core/AllocationManager.sol index 6a34d103f0..89b46e6626 100644 --- a/src/contracts/core/AllocationManager.sol +++ b/src/contracts/core/AllocationManager.sol @@ -28,15 +28,11 @@ contract AllocationManager is using EnumerableSet for *; using SafeCast for *; - /** - * - * INITIALIZING FUNCTIONS - * - */ - - /** - * @dev Initializes the DelegationManager address, the deallocation delay, and the allocation configuration delay. - */ + /// + /// INITIALIZING FUNCTIONS + /// + + /// @dev Initializes the DelegationManager address, the deallocation delay, and the allocation configuration delay. constructor( IAllocationManagerView _allocationManagerView, IDelegationManager _delegation, @@ -240,7 +236,10 @@ contract AllocationManager is } /// @inheritdoc IAllocationManagerActions - function setAllocationDelay(address operator, uint32 delay) external { + function setAllocationDelay( + address operator, + uint32 delay + ) external { /// If the caller is the delegationManager, the operator is newly registered /// This results in *newly-registered* operators in the core protocol to have their allocation delay effective immediately bool newlyRegistered = (msg.sender == address(delegation)); @@ -255,7 +254,10 @@ contract AllocationManager is } /// @inheritdoc IAllocationManagerActions - function setAVSRegistrar(address avs, IAVSRegistrar registrar) external checkCanCall(avs) { + function setAVSRegistrar( + address avs, + IAVSRegistrar registrar + ) external checkCanCall(avs) { // Check that the registrar is correctly configured to prevent an AVSRegistrar contract // from being used with the wrong AVS require(registrar.supportsAVS(avs), InvalidAVSRegistrar()); @@ -264,19 +266,28 @@ contract AllocationManager is } /// @inheritdoc IAllocationManagerActions - function updateAVSMetadataURI(address avs, string calldata metadataURI) external checkCanCall(avs) { + function updateAVSMetadataURI( + address avs, + string calldata metadataURI + ) external checkCanCall(avs) { if (!_avsRegisteredMetadata[avs]) _avsRegisteredMetadata[avs] = true; emit AVSMetadataURIUpdated(avs, metadataURI); } /// @inheritdoc IAllocationManagerActions /// @notice This function will be deprecated in Early Q2 2026 in favor of `createOperatorSets` which takes in `CreateSetParamsV2` - function createOperatorSets(address avs, CreateSetParams[] calldata params) external checkCanCall(avs) { + function createOperatorSets( + address avs, + CreateSetParams[] calldata params + ) external checkCanCall(avs) { createOperatorSets(avs, _convertCreateSetParams(params, avs)); } /// @inheritdoc IAllocationManagerActions - function createOperatorSets(address avs, CreateSetParamsV2[] memory params) public checkCanCall(avs) { + function createOperatorSets( + address avs, + CreateSetParamsV2[] memory params + ) public checkCanCall(avs) { require(_avsRegisteredMetadata[avs], NonexistentAVSMetadata()); for (uint256 i = 0; i < params.length; i++) { _createOperatorSet(avs, params[i], DEFAULT_BURN_ADDRESS); @@ -341,7 +352,10 @@ contract AllocationManager is } /// @inheritdoc IAllocationManagerActions - function updateSlasher(OperatorSet memory operatorSet, address slasher) external checkCanCall(operatorSet.avs) { + function updateSlasher( + OperatorSet memory operatorSet, + address slasher + ) external checkCanCall(operatorSet.avs) { require(_operatorSets[operatorSet.avs].contains(operatorSet.id), InvalidOperatorSet()); // Prevent updating a slasher if one is not already set // A slasher is set either on operatorSet creation or, for operatorSets created prior to v1.9.0, via `migrateSlashers` @@ -382,19 +396,15 @@ contract AllocationManager is } } - /** - * - * INTERNAL FUNCTIONS - * - */ - - /** - * @dev Slashes an operator. - * @param params The slashing parameters. See IAllocationManager.sol#slashOperator for specifics. - * @param operatorSet The operator set from which the operator is being slashed. - * @return slashId The operator set's unique identifier for the slash. - * @return shares The number of shares to be burned or redistributed for each strategy that was slashed. - */ + /// + /// INTERNAL FUNCTIONS + /// + + /// @dev Slashes an operator. + /// @param params The slashing parameters. See IAllocationManager.sol#slashOperator for specifics. + /// @param operatorSet The operator set from which the operator is being slashed. + /// @return slashId The operator set's unique identifier for the slash. + /// @return shares The number of shares to be burned or redistributed for each strategy that was slashed. function _slashOperator( SlashingParams calldata params, OperatorSet memory operatorSet @@ -463,7 +473,11 @@ contract AllocationManager is // Emit an event for the updated allocation emit AllocationUpdated( - params.operator, operatorSet, params.strategies[i], allocation.currentMagnitude, uint32(block.number) + params.operator, + operatorSet, + params.strategies[i], + allocation.currentMagnitude, + uint32(block.number) ); _updateMaxMagnitude(params.operator, params.strategies[i], info.maxMagnitude); @@ -482,12 +496,10 @@ contract AllocationManager is emit OperatorSlashed(params.operator, operatorSet, params.strategies, wadSlashed, params.description); } - /** - * @dev Adds a strategy to an operator set. - * @param operatorSet The operator set to add the strategy to. - * @param strategy The strategy to add to the operator set. - * @param isRedistributing Whether the operator set is redistributing. - */ + /// @dev Adds a strategy to an operator set. + /// @param operatorSet The operator set to add the strategy to. + /// @param strategy The strategy to add to the operator set. + /// @param isRedistributing Whether the operator set is redistributing. function _addStrategyToOperatorSet( OperatorSet memory operatorSet, IStrategy strategy, @@ -502,16 +514,14 @@ contract AllocationManager is emit StrategyAddedToOperatorSet(operatorSet, strategy); } - /** - * @notice Creates a new operator set for an AVS. - * @param avs The AVS address that owns the operator set. - * @param params The parameters for creating the operator set. - * @param redistributionRecipient Address to receive redistributed funds when operators are slashed. - * @dev If `redistributionRecipient` is address(0), the operator set is considered non-redistributing - * and slashed funds are sent to the `DEFAULT_BURN_ADDRESS`. - * @dev Providing `BEACONCHAIN_ETH_STRAT` as a strategy will revert since it's not currently supported. - * @dev The address that can slash the operatorSet is the `avs` address. - */ + /// @notice Creates a new operator set for an AVS. + /// @param avs The AVS address that owns the operator set. + /// @param params The parameters for creating the operator set. + /// @param redistributionRecipient Address to receive redistributed funds when operators are slashed. + /// @dev If `redistributionRecipient` is address(0), the operator set is considered non-redistributing + /// and slashed funds are sent to the `DEFAULT_BURN_ADDRESS`. + /// @dev Providing `BEACONCHAIN_ETH_STRAT` as a strategy will revert since it's not currently supported. + /// @dev The address that can slash the operatorSet is the `avs` address. function _createOperatorSet( address avs, CreateSetParamsV2 memory params, @@ -538,13 +548,15 @@ contract AllocationManager is _updateSlasher({operatorSet: operatorSet, slasher: params.slasher, instantEffectBlock: true}); } - /** - * @dev Clear one or more pending deallocations to a strategy's allocated magnitude - * @param operator the operator whose pending deallocations will be cleared - * @param strategy the strategy to update - * @param numToClear the number of pending deallocations to clear - */ - function _clearDeallocationQueue(address operator, IStrategy strategy, uint16 numToClear) internal { + /// @dev Clear one or more pending deallocations to a strategy's allocated magnitude + /// @param operator the operator whose pending deallocations will be cleared + /// @param strategy the strategy to update + /// @param numToClear the number of pending deallocations to clear + function _clearDeallocationQueue( + address operator, + IStrategy strategy, + uint16 numToClear + ) internal { uint256 numCleared; uint256 length = deallocationQueue[operator][strategy].length(); @@ -570,14 +582,16 @@ contract AllocationManager is } } - /** - * @dev Sets the operator's allocation delay. This is the number of blocks between an operator - * allocating magnitude to an operator set, and the magnitude becoming slashable. - * @param operator The operator to set the delay on behalf of. - * @param delay The allocation delay in blocks. - * @param newlyRegistered Whether the operator is newly registered in the core protocol. - */ - function _setAllocationDelay(address operator, uint32 delay, bool newlyRegistered) internal { + /// @dev Sets the operator's allocation delay. This is the number of blocks between an operator + /// allocating magnitude to an operator set, and the magnitude becoming slashable. + /// @param operator The operator to set the delay on behalf of. + /// @param delay The allocation delay in blocks. + /// @param newlyRegistered Whether the operator is newly registered in the core protocol. + function _setAllocationDelay( + address operator, + uint32 delay, + bool newlyRegistered + ) internal { AllocationDelayInfo memory info = _allocationDelayInfo[operator]; // If there is a pending delay that can be applied now, set it @@ -619,14 +633,12 @@ contract AllocationManager is allocation.currentMagnitude != 0; } - /** - * @dev For an operator set, get the operator's effective allocated magnitude. - * If the operator set has a pending deallocation that can be completed at the - * current block number, this method returns a view of the allocation as if the deallocation - * was completed. - * @return info the effective allocated and pending magnitude for the operator set, and - * the effective encumbered magnitude for all operator sets belonging to this strategy - */ + /// @dev For an operator set, get the operator's effective allocated magnitude. + /// If the operator set has a pending deallocation that can be completed at the + /// current block number, this method returns a view of the allocation as if the deallocation + /// was completed. + /// @return info the effective allocated and pending magnitude for the operator set, and + /// the effective encumbered magnitude for all operator sets belonging to this strategy function _getUpdatedAllocation( address operator, bytes32 operatorSetKey, @@ -695,28 +707,40 @@ contract AllocationManager is } } - function _updateMaxMagnitude(address operator, IStrategy strategy, uint64 newMaxMagnitude) internal { + function _updateMaxMagnitude( + address operator, + IStrategy strategy, + uint64 newMaxMagnitude + ) internal { _maxMagnitudeHistory[operator][strategy].push({key: uint32(block.number), value: newMaxMagnitude}); emit MaxMagnitudeUpdated(operator, strategy, newMaxMagnitude); } - function _calcDelta(uint64 currentMagnitude, uint64 newMagnitude) internal pure returns (int128) { + function _calcDelta( + uint64 currentMagnitude, + uint64 newMagnitude + ) internal pure returns (int128) { return int128(uint128(newMagnitude)) - int128(uint128(currentMagnitude)); } /// @dev Use safe casting when downcasting to uint64 - function _addInt128(uint64 a, int128 b) internal pure returns (uint64) { + function _addInt128( + uint64 a, + int128 b + ) internal pure returns (uint64) { return uint256(int256(int128(uint128(a)) + b)).toUint64(); } - /** - * @dev Helper function to update the slasher for an operator set - * @param operatorSet the operator set to update the slasher for - * @param slasher the new slasher - * @param instantEffectBlock Whether the new slasher will take effect immediately. Instant if on operatorSet creation or migration function. - * The new slasher will take `ALLOCATION_CONFIGURATION_DELAY` blocks to take effect if called by the `updateSlasher` function. - */ - function _updateSlasher(OperatorSet memory operatorSet, address slasher, bool instantEffectBlock) internal { + /// @dev Helper function to update the slasher for an operator set + /// @param operatorSet the operator set to update the slasher for + /// @param slasher the new slasher + /// @param instantEffectBlock Whether the new slasher will take effect immediately. Instant if on operatorSet creation or migration function. + /// The new slasher will take `ALLOCATION_CONFIGURATION_DELAY` blocks to take effect if called by the `updateSlasher` function. + function _updateSlasher( + OperatorSet memory operatorSet, + address slasher, + bool instantEffectBlock + ) internal { // Ensure that the slasher address is not the 0 address, which is used to denote if the slasher is not set require(slasher != address(0), InputAddressZero()); @@ -739,13 +763,11 @@ contract AllocationManager is emit SlasherUpdated(operatorSet, slasher, params.effectBlock); } - /** - * @notice Helper function to convert CreateSetParams to CreateSetParamsV2 - * @param params The parameters to convert - * @param avs The AVS address that owns the operator sets, which will be the slasher - * @return The converted parameters, into CreateSetParamsV2 format - * @dev The slasher will be set to the AVS address - */ + /// @notice Helper function to convert CreateSetParams to CreateSetParamsV2 + /// @param params The parameters to convert + /// @param avs The AVS address that owns the operator sets, which will be the slasher + /// @return The converted parameters, into CreateSetParamsV2 format + /// @dev The slasher will be set to the AVS address function _convertCreateSetParams( CreateSetParams[] calldata params, address avs @@ -757,11 +779,9 @@ contract AllocationManager is return createSetParams; } - /** - * - * VIEW FUNCTIONS - * - */ + /// + /// VIEW FUNCTIONS + /// /// Public View Functions @@ -800,7 +820,10 @@ contract AllocationManager is } /// @inheritdoc IAllocationManagerView - function isOperatorSlashable(address operator, OperatorSet memory operatorSet) public view returns (bool) { + function isOperatorSlashable( + address operator, + OperatorSet memory operatorSet + ) public view returns (bool) { RegistrationStatus memory status = registrationStatus[operator][operatorSet.key()]; // slashableUntil returns the last block the operator is slashable in so we check for @@ -892,31 +915,46 @@ contract AllocationManager is } /// @inheritdoc IAllocationManagerView - function getEncumberedMagnitude(address, IStrategy) external view returns (uint64 encumberedMagnitude) { + function getEncumberedMagnitude( + address, + IStrategy + ) external view returns (uint64 encumberedMagnitude) { _delegateView(viewImplementation); encumberedMagnitude; } /// @inheritdoc IAllocationManagerView - function getAllocatableMagnitude(address, IStrategy) external view returns (uint64 allocatableMagnitude) { + function getAllocatableMagnitude( + address, + IStrategy + ) external view returns (uint64 allocatableMagnitude) { _delegateView(viewImplementation); allocatableMagnitude; } /// @inheritdoc IAllocationManagerView - function getMaxMagnitude(address, IStrategy) external view returns (uint64 maxMagnitude) { + function getMaxMagnitude( + address, + IStrategy + ) external view returns (uint64 maxMagnitude) { _delegateView(viewImplementation); maxMagnitude; } /// @inheritdoc IAllocationManagerView - function getMaxMagnitudes(address, IStrategy[] calldata) external view returns (uint64[] memory maxMagnitudes) { + function getMaxMagnitudes( + address, + IStrategy[] calldata + ) external view returns (uint64[] memory maxMagnitudes) { _delegateView(viewImplementation); maxMagnitudes; } /// @inheritdoc IAllocationManagerView - function getMaxMagnitudes(address[] calldata, IStrategy) external view returns (uint64[] memory maxMagnitudes) { + function getMaxMagnitudes( + address[] calldata, + IStrategy + ) external view returns (uint64[] memory maxMagnitudes) { _delegateView(viewImplementation); maxMagnitudes; } @@ -940,7 +978,10 @@ contract AllocationManager is } /// @inheritdoc IAllocationManagerView - function isMemberOfOperatorSet(address, OperatorSet memory) external view returns (bool result) { + function isMemberOfOperatorSet( + address, + OperatorSet memory + ) external view returns (bool result) { _delegateView(viewImplementation); result; } diff --git a/src/contracts/core/AllocationManagerView.sol b/src/contracts/core/AllocationManagerView.sol index dda51e55b7..b3839a89d0 100644 --- a/src/contracts/core/AllocationManagerView.sol +++ b/src/contracts/core/AllocationManagerView.sol @@ -16,7 +16,7 @@ import "./storage/AllocationManagerStorage.sol"; /// Since `AllocationManagerView` only needs access to the storage variables from /// `AllocationManagerStorage` (without the other mixins), it uses `layout at 151` to /// align its storage layout with the main `AllocationManager` contract. -contract AllocationManagerView is IAllocationManagerView, AllocationManagerStorage layout at 151 { +contract AllocationManagerView layout at 151 is IAllocationManagerView, AllocationManagerStorage { using DoubleEndedQueue for DoubleEndedQueue.Bytes32Deque; using Snapshots for Snapshots.DefaultWadHistory; using OperatorSetLib for OperatorSet; @@ -24,15 +24,11 @@ contract AllocationManagerView is IAllocationManagerView, AllocationManagerStora using EnumerableSet for *; using SafeCast for *; - /** - * - * INITIALIZING FUNCTIONS - * - */ + /// + /// INITIALIZING FUNCTIONS + /// - /** - * @dev Initializes the DelegationManager address, the deallocation delay, and the allocation configuration delay. - */ + /// @dev Initializes the DelegationManager address, the deallocation delay, and the allocation configuration delay. constructor( IDelegationManager _delegation, IStrategy _eigenStrategy, @@ -40,20 +36,16 @@ contract AllocationManagerView is IAllocationManagerView, AllocationManagerStora uint32 _ALLOCATION_CONFIGURATION_DELAY ) AllocationManagerStorage(_delegation, _eigenStrategy, _DEALLOCATION_DELAY, _ALLOCATION_CONFIGURATION_DELAY) {} - /** - * - * INTERNAL FUNCTIONS - * - */ - - /** - * @dev For an operator set, get the operator's effective allocated magnitude. - * If the operator set has a pending deallocation that can be completed at the - * current block number, this method returns a view of the allocation as if the deallocation - * was completed. - * @return info the effective allocated and pending magnitude for the operator set, and - * the effective encumbered magnitude for all operator sets belonging to this strategy - */ + /// + /// INTERNAL FUNCTIONS + /// + + /// @dev For an operator set, get the operator's effective allocated magnitude. + /// If the operator set has a pending deallocation that can be completed at the + /// current block number, this method returns a view of the allocation as if the deallocation + /// was completed. + /// @return info the effective allocated and pending magnitude for the operator set, and + /// the effective encumbered magnitude for all operator sets belonging to this strategy function _getUpdatedAllocation( address operator, bytes32 operatorSetKey, @@ -85,13 +77,11 @@ contract AllocationManagerView is IAllocationManagerView, AllocationManagerStora return (info, allocation); } - /** - * @dev Returns the minimum allocated stake at the future block. - * @param operatorSet The operator set to get the minimum allocated stake for. - * @param operators The operators to get the minimum allocated stake for. - * @param strategies The strategies to get the minimum allocated stake for. - * @param futureBlock The future block to get the minimum allocated stake for. - */ + /// @dev Returns the minimum allocated stake at the future block. + /// @param operatorSet The operator set to get the minimum allocated stake for. + /// @param operators The operators to get the minimum allocated stake for. + /// @param strategies The strategies to get the minimum allocated stake for. + /// @param futureBlock The future block to get the minimum allocated stake for. function _getMinimumAllocatedStake( OperatorSet memory operatorSet, address[] memory operators, @@ -133,16 +123,17 @@ contract AllocationManagerView is IAllocationManagerView, AllocationManagerStora } /// @dev Use safe casting when downcasting to uint64 - function _addInt128(uint64 a, int128 b) internal pure returns (uint64) { + function _addInt128( + uint64 a, + int128 b + ) internal pure returns (uint64) { return uint256(int256(int128(uint128(a)) + b)).toUint64(); } - /** - * @notice Helper function to check if an operator is redistributable from a list of operator sets - * @param operator The operator to check - * @param operatorSets The list of operator sets to check - * @return True if the operator is redistributable from any of the operator sets, false otherwise - */ + /// @notice Helper function to check if an operator is redistributable from a list of operator sets + /// @param operator The operator to check + /// @param operatorSets The list of operator sets to check + /// @return True if the operator is redistributable from any of the operator sets, false otherwise function _isOperatorRedistributable( address operator, OperatorSet[] memory operatorSets @@ -155,11 +146,9 @@ contract AllocationManagerView is IAllocationManagerView, AllocationManagerStora return false; } - /** - * - * VIEW FUNCTIONS - * - */ + /// + /// VIEW FUNCTIONS + /// /// @inheritdoc IAllocationManagerView function getOperatorSetCount( @@ -244,13 +233,19 @@ contract AllocationManagerView is IAllocationManagerView, AllocationManagerStora } /// @inheritdoc IAllocationManagerView - function getEncumberedMagnitude(address operator, IStrategy strategy) external view returns (uint64) { + function getEncumberedMagnitude( + address operator, + IStrategy strategy + ) external view returns (uint64) { (uint64 curEncumberedMagnitude,) = _getFreeAndUsedMagnitude(operator, strategy); return curEncumberedMagnitude; } /// @inheritdoc IAllocationManagerView - function getAllocatableMagnitude(address operator, IStrategy strategy) external view returns (uint64) { + function getAllocatableMagnitude( + address operator, + IStrategy strategy + ) external view returns (uint64) { (, uint64 curAllocatableMagnitude) = _getFreeAndUsedMagnitude(operator, strategy); return curAllocatableMagnitude; } @@ -292,7 +287,10 @@ contract AllocationManagerView is IAllocationManagerView, AllocationManagerStora } /// @inheritdoc IAllocationManagerView - function getMaxMagnitude(address operator, IStrategy strategy) public view returns (uint64) { + function getMaxMagnitude( + address operator, + IStrategy strategy + ) public view returns (uint64) { return _maxMagnitudeHistory[operator][strategy].latest(); } @@ -311,7 +309,10 @@ contract AllocationManagerView is IAllocationManagerView, AllocationManagerStora } /// @inheritdoc IAllocationManagerView - function getMaxMagnitudes(address[] memory operators, IStrategy strategy) external view returns (uint64[] memory) { + function getMaxMagnitudes( + address[] memory operators, + IStrategy strategy + ) external view returns (uint64[] memory) { uint64[] memory maxMagnitudes = new uint64[](operators.length); for (uint256 i = 0; i < operators.length; ++i) { @@ -369,7 +370,10 @@ contract AllocationManagerView is IAllocationManagerView, AllocationManagerStora } /// @inheritdoc IAllocationManagerView - function isMemberOfOperatorSet(address operator, OperatorSet memory operatorSet) public view returns (bool) { + function isMemberOfOperatorSet( + address operator, + OperatorSet memory operatorSet + ) public view returns (bool) { return _operatorSetMembers[operatorSet.key()].contains(operator); } @@ -448,7 +452,10 @@ contract AllocationManagerView is IAllocationManagerView, AllocationManagerStora } /// @inheritdoc IAllocationManagerView - function isOperatorSlashable(address operator, OperatorSet memory operatorSet) public view returns (bool) { + function isOperatorSlashable( + address operator, + OperatorSet memory operatorSet + ) public view returns (bool) { RegistrationStatus memory status = registrationStatus[operator][operatorSet.key()]; // slashableUntil returns the last block the operator is slashable in so we check for diff --git a/src/contracts/core/DelegationManager.sol b/src/contracts/core/DelegationManager.sol index bb1516baf9..e873eb5dd4 100644 --- a/src/contracts/core/DelegationManager.sol +++ b/src/contracts/core/DelegationManager.sol @@ -12,16 +12,14 @@ import "../libraries/SlashingLib.sol"; import "../libraries/Snapshots.sol"; import "./storage/DelegationManagerStorage.sol"; -/** - * @title DelegationManager - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice This is the contract for delegation in EigenLayer. The main functionalities of this contract are - * - enabling anyone to register as an operator in EigenLayer - * - allowing operators to specify parameters related to stakers who delegate to them - * - enabling any staker to delegate its stake to the operator of its choice (a given staker can only delegate to a single operator at a time) - * - enabling a staker to undelegate its assets from the operator it is delegated to (performed as part of the withdrawal process, initiated through the StrategyManager) - */ +/// @title DelegationManager +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice This is the contract for delegation in EigenLayer. The main functionalities of this contract are +/// - enabling anyone to register as an operator in EigenLayer +/// - allowing operators to specify parameters related to stakers who delegate to them +/// - enabling any staker to delegate its stake to the operator of its choice (a given staker can only delegate to a single operator at a time) +/// - enabling a staker to undelegate its assets from the operator it is delegated to (performed as part of the withdrawal process, initiated through the StrategyManager) contract DelegationManager is Initializable, Deprecated_OwnableUpgradeable, @@ -54,15 +52,11 @@ contract DelegationManager is _; } - /** - * - * INITIALIZING FUNCTIONS - * - */ + /// + /// INITIALIZING FUNCTIONS + /// - /** - * @dev Initializes the immutable addresses of the strategy manager, eigenpod manager, and allocation manager. - */ + /// @dev Initializes the immutable addresses of the strategy manager, eigenpod manager, and allocation manager. constructor( IStrategyManager _strategyManager, IEigenPodManager _eigenPodManager, @@ -86,11 +80,9 @@ contract DelegationManager is _setPausedStatus(initialPausedStatus); } - /** - * - * EXTERNAL FUNCTIONS - * - */ + /// + /// EXTERNAL FUNCTIONS + /// /// @inheritdoc IDelegationManager function registerAsOperator( @@ -120,7 +112,10 @@ contract DelegationManager is } /// @inheritdoc IDelegationManager - function updateOperatorMetadataURI(address operator, string calldata metadataURI) external checkCanCall(operator) { + function updateOperatorMetadataURI( + address operator, + string calldata metadataURI + ) external checkCanCall(operator) { require(isOperator(operator), OperatorNotRegistered()); emit OperatorMetadataURIUpdated(operator, metadataURI); } @@ -317,41 +312,40 @@ contract DelegationManager is // Emit event for operator shares being slashed emit OperatorSharesSlashed(operator, strategy, totalDepositSharesToSlash); - _getShareManager(strategy).increaseBurnOrRedistributableShares( - operatorSet, slashId, strategy, totalDepositSharesToSlash - ); + _getShareManager(strategy) + .increaseBurnOrRedistributableShares(operatorSet, slashId, strategy, totalDepositSharesToSlash); return totalDepositSharesToSlash; } - /** - * - * INTERNAL FUNCTIONS - * - */ - - /** - * @notice Sets operator parameters in the `_operatorDetails` mapping. - * @param operator The account registered as an operator updating their operatorDetails - * @param newDelegationApprover The new parameters for the operator - */ - function _setDelegationApprover(address operator, address newDelegationApprover) internal { + /// + /// INTERNAL FUNCTIONS + /// + + /// @notice Sets operator parameters in the `_operatorDetails` mapping. + /// @param operator The account registered as an operator updating their operatorDetails + /// @param newDelegationApprover The new parameters for the operator + function _setDelegationApprover( + address operator, + address newDelegationApprover + ) internal { _operatorDetails[operator].delegationApprover = newDelegationApprover; emit DelegationApproverUpdated(operator, newDelegationApprover); } - /** - * @notice Delegates *from* a `staker` *to* an `operator`. - * @param staker The address to delegate *from* -- this address is delegating control of its own assets. - * @param operator The address to delegate *to* -- this address is being given power to place the `staker`'s assets at risk on services - * @dev Assumes the following is checked before calling this function: - * 1) the `staker` is not already delegated to an operator - * 2) the `operator` has indeed registered as an operator in EigenLayer - * 3) if applicable, the `operator's` `delegationApprover` signed off on delegation - * Ensures that: - * 1) new delegations are not paused (PAUSED_NEW_DELEGATION) - */ - function _delegate(address staker, address operator) internal onlyWhenNotPaused(PAUSED_NEW_DELEGATION) { + /// @notice Delegates *from* a `staker` *to* an `operator`. + /// @param staker The address to delegate *from* -- this address is delegating control of its own assets. + /// @param operator The address to delegate *to* -- this address is being given power to place the `staker`'s assets at risk on services + /// @dev Assumes the following is checked before calling this function: + /// 1) the `staker` is not already delegated to an operator + /// 2) the `operator` has indeed registered as an operator in EigenLayer + /// 3) if applicable, the `operator's` `delegationApprover` signed off on delegation + /// Ensures that: + /// 1) new delegations are not paused (PAUSED_NEW_DELEGATION) + function _delegate( + address staker, + address operator + ) internal onlyWhenNotPaused(PAUSED_NEW_DELEGATION) { // When a staker is not delegated to an operator, their deposit shares are equal to their // withdrawable shares -- except for the beaconChainETH strategy, which is handled below (IStrategy[] memory strategies, uint256[] memory withdrawableShares) = getDepositedShares(staker); @@ -387,15 +381,13 @@ contract DelegationManager is } } - /** - * @dev Undelegates `staker` from their operator, queueing a withdrawal for all - * their deposited shares in the process. - * @dev Assumes the following is checked before calling this function: - * 1) the `staker` is currently delegated to an operator - * 2) the `staker` is not an operator themselves - * Ensures that: - * 1) the withdrawal queue is not paused (PAUSED_ENTER_WITHDRAWAL_QUEUE) - */ + /// @dev Undelegates `staker` from their operator, queueing a withdrawal for all + /// their deposited shares in the process. + /// @dev Assumes the following is checked before calling this function: + /// 1) the `staker` is currently delegated to an operator + /// 2) the `staker` is not an operator themselves + /// Ensures that: + /// 1) the withdrawal queue is not paused (PAUSED_ENTER_WITHDRAWAL_QUEUE) function _undelegate( address staker ) internal onlyWhenNotPaused(PAUSED_ENTER_WITHDRAWAL_QUEUE) returns (bytes32[] memory withdrawalRoots) { @@ -439,28 +431,26 @@ contract DelegationManager is return withdrawalRoots; } - /** - * @notice Removes `sharesToWithdraw` in `strategies` from `staker` who is currently delegated to `operator` and queues a withdrawal to the `withdrawer`. - * @param staker The staker queuing a withdrawal - * @param operator The operator the staker is delegated to - * @param strategies The strategies to queue a withdrawal for - * @param depositSharesToWithdraw The amount of deposit shares the staker wishes to withdraw, must be less than staker's depositShares in storage - * @param slashingFactors The corresponding slashing factor for the staker/operator for each strategy - * - * @dev The amount withdrawable by the staker may not actually be the same as the depositShares that are in storage in the StrategyManager/EigenPodManager. - * This is a result of any slashing that has occurred during the time the staker has been delegated to an operator. So the proportional amount that is withdrawn - * out of the amount withdrawable for the staker has to also be decremented from the staker's deposit shares. - * So the amount of depositShares withdrawn out has to be proportionally scaled down depending on the slashing that has occurred. - * Ex. Suppose as a staker, I have 100 depositShares for a strategy thats sitting in the StrategyManager in the `stakerDepositShares` mapping but I actually have been slashed 50% - * and my real withdrawable amount is 50 shares. - * Now when I go to withdraw 40 depositShares, I'm proportionally withdrawing 40% of my withdrawable shares. We calculate below the actual shares withdrawn via the `toShares()` function to - * get 20 shares to queue withdraw. The end state is that I have 60 depositShares and 30 withdrawable shares now, this still accurately reflects a 50% slashing that has occurred on my existing stake. - * @dev depositSharesToWithdraw are converted to sharesToWithdraw using the `toShares` library function. sharesToWithdraw are then divided by the current maxMagnitude of the operator (at queue time) - * and this value is stored in the Withdrawal struct as `scaledShares. - * Upon completion the `scaledShares` are then multiplied by the maxMagnitude of the operator at completion time. This is how we factor in any slashing events - * that occurred during the withdrawal delay period. Shares in a withdrawal are no longer slashable once the withdrawal is completable. - * @dev If the `operator` is indeed an operator, then the operator's delegated shares in the `strategies` are also decreased appropriately. - */ + /// @notice Removes `sharesToWithdraw` in `strategies` from `staker` who is currently delegated to `operator` and queues a withdrawal to the `withdrawer`. + /// @param staker The staker queuing a withdrawal + /// @param operator The operator the staker is delegated to + /// @param strategies The strategies to queue a withdrawal for + /// @param depositSharesToWithdraw The amount of deposit shares the staker wishes to withdraw, must be less than staker's depositShares in storage + /// @param slashingFactors The corresponding slashing factor for the staker/operator for each strategy + /// + /// @dev The amount withdrawable by the staker may not actually be the same as the depositShares that are in storage in the StrategyManager/EigenPodManager. + /// This is a result of any slashing that has occurred during the time the staker has been delegated to an operator. So the proportional amount that is withdrawn + /// out of the amount withdrawable for the staker has to also be decremented from the staker's deposit shares. + /// So the amount of depositShares withdrawn out has to be proportionally scaled down depending on the slashing that has occurred. + /// Ex. Suppose as a staker, I have 100 depositShares for a strategy thats sitting in the StrategyManager in the `stakerDepositShares` mapping but I actually have been slashed 50% + /// and my real withdrawable amount is 50 shares. + /// Now when I go to withdraw 40 depositShares, I'm proportionally withdrawing 40% of my withdrawable shares. We calculate below the actual shares withdrawn via the `toShares()` function to + /// get 20 shares to queue withdraw. The end state is that I have 60 depositShares and 30 withdrawable shares now, this still accurately reflects a 50% slashing that has occurred on my existing stake. + /// @dev depositSharesToWithdraw are converted to sharesToWithdraw using the `toShares` library function. sharesToWithdraw are then divided by the current maxMagnitude of the operator (at queue time) + /// and this value is stored in the Withdrawal struct as `scaledShares. + /// Upon completion the `scaledShares` are then multiplied by the maxMagnitude of the operator at completion time. This is how we factor in any slashing events + /// that occurred during the withdrawal delay period. Shares in a withdrawal are no longer slashable once the withdrawal is completable. + /// @dev If the `operator` is indeed an operator, then the operator's delegated shares in the `strategies` are also decreased appropriately. function _removeSharesAndQueueWithdrawal( address staker, address operator, @@ -535,15 +525,13 @@ contract DelegationManager is return withdrawalRoot; } - /** - * @dev This function completes a queued withdrawal for a staker. - * This will apply any slashing that has occurred since the the withdrawal was queued by multiplying the withdrawal's - * scaledShares by the operator's maxMagnitude for each strategy. This ensures that any slashing that has occurred - * during the period the withdrawal was queued until its slashableUntil block is applied to the withdrawal amount. - * If receiveAsTokens is true, then these shares will be withdrawn as tokens. - * If receiveAsTokens is false, then they will be redeposited according to the current operator the staker is delegated to, - * and added back to the operator's delegatedShares. - */ + /// @dev This function completes a queued withdrawal for a staker. + /// This will apply any slashing that has occurred since the the withdrawal was queued by multiplying the withdrawal's + /// scaledShares by the operator's maxMagnitude for each strategy. This ensures that any slashing that has occurred + /// during the period the withdrawal was queued until its slashableUntil block is applied to the withdrawal amount. + /// If receiveAsTokens is true, then these shares will be withdrawn as tokens. + /// If receiveAsTokens is false, then they will be redeposited according to the current operator the staker is delegated to, + /// and added back to the operator's delegatedShares. function _completeQueuedWithdrawal( Withdrawal memory withdrawal, IERC20[] calldata tokens, @@ -628,16 +616,14 @@ contract DelegationManager is } } - /** - * @notice Increases `operator`s depositedShares in `strategy` based on staker's addedDepositShares - * and updates the staker's depositScalingFactor for the strategy. - * @param operator The operator to increase the delegated delegatedShares for - * @param staker The staker to increase the depositScalingFactor for - * @param strategy The strategy to increase the delegated delegatedShares and the depositScalingFactor for - * @param prevDepositShares The number of delegated deposit shares the staker had in the strategy prior to the increase - * @param addedShares The shares added to the staker in the StrategyManager/EigenPodManager - * @param slashingFactor The current slashing factor for the staker/operator/strategy - */ + /// @notice Increases `operator`s depositedShares in `strategy` based on staker's addedDepositShares + /// and updates the staker's depositScalingFactor for the strategy. + /// @param operator The operator to increase the delegated delegatedShares for + /// @param staker The staker to increase the depositScalingFactor for + /// @param strategy The strategy to increase the delegated delegatedShares and the depositScalingFactor for + /// @param prevDepositShares The number of delegated deposit shares the staker had in the strategy prior to the increase + /// @param addedShares The shares added to the staker in the StrategyManager/EigenPodManager + /// @param slashingFactor The current slashing factor for the staker/operator/strategy function _increaseDelegation( address operator, address staker, @@ -669,13 +655,11 @@ contract DelegationManager is } } - /** - * @notice Decreases `operator`s shares in `strategy` based on staker's removed shares - * @param operator The operator to decrease the delegated delegated shares for - * @param staker The staker to decrease the delegated delegated shares for - * @param strategy The strategy to decrease the delegated delegated shares for - * @param sharesToDecrease The shares to remove from the operator's delegated shares - */ + /// @notice Decreases `operator`s shares in `strategy` based on staker's removed shares + /// @param operator The operator to decrease the delegated delegated shares for + /// @param staker The staker to decrease the delegated delegated shares for + /// @param strategy The strategy to decrease the delegated delegated shares for + /// @param sharesToDecrease The shares to remove from the operator's delegated shares function _decreaseDelegation( address operator, address staker, @@ -768,12 +752,10 @@ contract DelegationManager is return slashingFactors; } - /** - * @dev Calculate amount of slashable shares that would be slashed from the queued withdrawals from an operator for a strategy - * given the previous maxMagnitude and the new maxMagnitude. - * Note: To get the total amount of slashable shares in the queue withdrawable, set newMaxMagnitude to 0 and prevMaxMagnitude - * is the current maxMagnitude of the operator. - */ + /// @dev Calculate amount of slashable shares that would be slashed from the queued withdrawals from an operator for a strategy + /// given the previous maxMagnitude and the new maxMagnitude. + /// Note: To get the total amount of slashable shares in the queue withdrawable, set newMaxMagnitude to 0 and prevMaxMagnitude + /// is the current maxMagnitude of the operator. function _getSlashableSharesInQueue( address operator, IStrategy strategy, @@ -824,7 +806,11 @@ contract DelegationManager is } /// @dev Add to the cumulative withdrawn scaled shares from an operator for a given strategy - function _addQueuedSlashableShares(address operator, IStrategy strategy, uint256 scaledShares) internal { + function _addQueuedSlashableShares( + address operator, + IStrategy strategy, + uint256 scaledShares + ) internal { uint256 currCumulativeScaledShares = _cumulativeScaledSharesHistory[operator][strategy].latest(); _cumulativeScaledSharesHistory[operator][strategy].push({ key: uint32(block.number), @@ -875,11 +861,9 @@ contract DelegationManager is : IShareManager(address(strategyManager)); } - /** - * - * VIEW FUNCTIONS - * - */ + /// + /// VIEW FUNCTIONS + /// /// @inheritdoc IDelegationManager function isDelegated( @@ -903,7 +887,10 @@ contract DelegationManager is } /// @inheritdoc IDelegationManager - function depositScalingFactor(address staker, IStrategy strategy) external view returns (uint256) { + function depositScalingFactor( + address staker, + IStrategy strategy + ) external view returns (uint256) { return _depositScalingFactor[staker][strategy].scalingFactor(); } @@ -932,7 +919,10 @@ contract DelegationManager is } /// @inheritdoc IDelegationManager - function getSlashableSharesInQueue(address operator, IStrategy strategy) public view returns (uint256) { + function getSlashableSharesInQueue( + address operator, + IStrategy strategy + ) public view returns (uint256) { uint64 maxMagnitude = allocationManager.getMaxMagnitude(operator, strategy); // Return amount of slashable scaled shares remaining diff --git a/src/contracts/core/ProtocolRegistry.sol b/src/contracts/core/ProtocolRegistry.sol index ff98b5b567..e31c0cdc5c 100644 --- a/src/contracts/core/ProtocolRegistry.sol +++ b/src/contracts/core/ProtocolRegistry.sol @@ -10,26 +10,25 @@ contract ProtocolRegistry is Initializable, AccessControlEnumerableUpgradeable, using ShortStringsUpgradeable for *; using EnumerableMap for EnumerableMap.UintToAddressMap; - /** - * - * INITIALIZING FUNCTIONS - * - */ + /// + /// INITIALIZING FUNCTIONS + /// constructor() ProtocolRegistryStorage() { _disableInitializers(); } /// @inheritdoc IProtocolRegistry - function initialize(address initialAdmin, address pauserMultisig) external initializer { + function initialize( + address initialAdmin, + address pauserMultisig + ) external initializer { _grantRole(DEFAULT_ADMIN_ROLE, initialAdmin); _grantRole(PAUSER_ROLE, pauserMultisig); } - /** - * - * INITIALIZING FUNCTIONS - * - */ + /// + /// INITIALIZING FUNCTIONS + /// /// @inheritdoc IProtocolRegistry function ship( @@ -47,7 +46,10 @@ contract ProtocolRegistry is Initializable, AccessControlEnumerableUpgradeable, } /// @inheritdoc IProtocolRegistry - function configure(address addr, DeploymentConfig calldata config) external onlyRole(DEFAULT_ADMIN_ROLE) { + function configure( + address addr, + DeploymentConfig calldata config + ) external onlyRole(DEFAULT_ADMIN_ROLE) { // Update the config _deploymentConfigs[addr] = config; // Emit the event. @@ -68,11 +70,9 @@ contract ProtocolRegistry is Initializable, AccessControlEnumerableUpgradeable, } } - /** - * - * HELPER FUNCTIONS - * - */ + /// + /// HELPER FUNCTIONS + /// /// @dev Updates the semantic version of the protocol. function _updateSemanticVersion( @@ -84,7 +84,11 @@ contract ProtocolRegistry is Initializable, AccessControlEnumerableUpgradeable, } /// @dev Appends a deployment. - function _appendDeployment(address addr, DeploymentConfig calldata config, string calldata name) internal { + function _appendDeployment( + address addr, + DeploymentConfig calldata config, + string calldata name + ) internal { // Store name => address mapping _deployments.set({key: _unwrap(name.toShortString()), value: addr}); // Store deployment config @@ -100,11 +104,9 @@ contract ProtocolRegistry is Initializable, AccessControlEnumerableUpgradeable, return uint256(ShortString.unwrap(shortString)); } - /** - * - * VIEW FUNCTIONS - * - */ + /// + /// VIEW FUNCTIONS + /// /// @inheritdoc IProtocolRegistry function version() external view virtual returns (string memory) { diff --git a/src/contracts/core/ReleaseManager.sol b/src/contracts/core/ReleaseManager.sol index 5e91e9131a..260ee77154 100644 --- a/src/contracts/core/ReleaseManager.sol +++ b/src/contracts/core/ReleaseManager.sol @@ -8,22 +8,18 @@ import "./storage/ReleaseManagerStorage.sol"; contract ReleaseManager is Initializable, ReleaseManagerStorage, PermissionControllerMixin { using OperatorSetLib for OperatorSet; - /** - * - * INITIALIZING FUNCTIONS - * - */ + /// + /// INITIALIZING FUNCTIONS + /// constructor( IPermissionController _permissionController ) PermissionControllerMixin(_permissionController) { _disableInitializers(); } - /** - * - * EXTERNAL FUNCTIONS - * - */ + /// + /// EXTERNAL FUNCTIONS + /// /// @inheritdoc IReleaseManager function publishRelease( @@ -53,11 +49,9 @@ contract ReleaseManager is Initializable, ReleaseManagerStorage, PermissionContr emit MetadataURIPublished(operatorSet, metadataURI); } - /** - * - * VIEW FUNCTIONS - * - */ + /// + /// VIEW FUNCTIONS + /// /// @inheritdoc IReleaseManager function getTotalReleases( @@ -67,7 +61,10 @@ contract ReleaseManager is Initializable, ReleaseManagerStorage, PermissionContr } /// @inheritdoc IReleaseManager - function getRelease(OperatorSet memory operatorSet, uint256 releaseId) external view returns (Release memory) { + function getRelease( + OperatorSet memory operatorSet, + uint256 releaseId + ) external view returns (Release memory) { return _operatorSetReleases[operatorSet.key()][releaseId]; } @@ -94,7 +91,10 @@ contract ReleaseManager is Initializable, ReleaseManagerStorage, PermissionContr } /// @inheritdoc IReleaseManager - function isValidRelease(OperatorSet memory operatorSet, uint256 releaseId) external view returns (bool) { + function isValidRelease( + OperatorSet memory operatorSet, + uint256 releaseId + ) external view returns (bool) { uint256 totalReleases = getTotalReleases(operatorSet); require(totalReleases > 0, NoReleases()); return releaseId == totalReleases - 1; diff --git a/src/contracts/core/RewardsCoordinator.sol b/src/contracts/core/RewardsCoordinator.sol index 03309ba632..0097166984 100644 --- a/src/contracts/core/RewardsCoordinator.sol +++ b/src/contracts/core/RewardsCoordinator.sol @@ -11,15 +11,13 @@ import "../permissions/Pausable.sol"; import "./storage/RewardsCoordinatorStorage.sol"; import "../mixins/PermissionControllerMixin.sol"; -/** - * @title RewardsCoordinator - * @author Eigen Labs Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice This is the contract for rewards in EigenLayer. The main functionalities of this contract are - * - enabling any ERC20 rewards from AVSs to their operators and stakers for a given time range - * - allowing stakers and operators to claim their earnings including a split bips for operators - * - allowing the protocol to provide ERC20 tokens to stakers over a specified time range - */ +/// @title RewardsCoordinator +/// @author Eigen Labs Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice This is the contract for rewards in EigenLayer. The main functionalities of this contract are +/// - enabling any ERC20 rewards from AVSs to their operators and stakers for a given time range +/// - allowing stakers and operators to claim their earnings including a split bips for operators +/// - allowing the protocol to provide ERC20 tokens to stakers over a specified time range contract RewardsCoordinator is Initializable, OwnableUpgradeable, @@ -61,10 +59,8 @@ contract RewardsCoordinator is _disableInitializers(); } - /** - * @dev Initializes the addresses of the initial owner, pauser registry, rewardsUpdater and - * configures the initial paused status, activationDelay, and defaultOperatorSplitBips. - */ + /// @dev Initializes the addresses of the initial owner, pauser registry, rewardsUpdater and + /// configures the initial paused status, activationDelay, and defaultOperatorSplitBips. /// @inheritdoc IRewardsCoordinator function initialize( address initialOwner, @@ -80,11 +76,9 @@ contract RewardsCoordinator is _setDefaultOperatorSplit(_defaultSplitBips); } - /** - * - * EXTERNAL FUNCTIONS - * - */ + /// + /// EXTERNAL FUNCTIONS + /// /// @inheritdoc IRewardsCoordinator function createAVSRewardsSubmission( @@ -139,7 +133,10 @@ contract RewardsCoordinator is submissionNonce[msg.sender] = nonce + 1; emit RewardsSubmissionForAllEarnersCreated( - msg.sender, nonce, rewardsSubmissionForAllEarnersHash, rewardsSubmission + msg.sender, + nonce, + rewardsSubmissionForAllEarnersHash, + rewardsSubmission ); rewardsSubmission.token.safeTransferFrom(msg.sender, address(this), rewardsSubmission.amount); } @@ -163,7 +160,11 @@ contract RewardsCoordinator is submissionNonce[avs] = nonce + 1; emit OperatorDirectedAVSRewardsSubmissionCreated( - msg.sender, avs, operatorDirectedRewardsSubmissionHash, nonce, operatorDirectedRewardsSubmission + msg.sender, + avs, + operatorDirectedRewardsSubmissionHash, + nonce, + operatorDirectedRewardsSubmission ); operatorDirectedRewardsSubmission.token.safeTransferFrom(msg.sender, address(this), totalAmount); } @@ -194,7 +195,11 @@ contract RewardsCoordinator is submissionNonce[operatorSet.avs] = nonce + 1; emit OperatorDirectedOperatorSetRewardsSubmissionCreated( - msg.sender, operatorDirectedRewardsSubmissionHash, operatorSet, nonce, operatorDirectedRewardsSubmission + msg.sender, + operatorDirectedRewardsSubmissionHash, + operatorSet, + nonce, + operatorDirectedRewardsSubmission ); operatorDirectedRewardsSubmission.token.safeTransferFrom(msg.sender, address(this), totalAmount); } @@ -262,7 +267,10 @@ contract RewardsCoordinator is } /// @inheritdoc IRewardsCoordinator - function setClaimerFor(address earner, address claimer) external checkCanCall(earner) { + function setClaimerFor( + address earner, + address claimer + ) external checkCanCall(earner) { // Require that the earner is an operator or AVS require( delegationManager.isOperator(earner) || allocationManager.getOperatorSetCount(earner) > 0, InvalidEarner() @@ -332,24 +340,26 @@ contract RewardsCoordinator is } /// @inheritdoc IRewardsCoordinator - function setRewardsForAllSubmitter(address _submitter, bool _newValue) external onlyOwner { + function setRewardsForAllSubmitter( + address _submitter, + bool _newValue + ) external onlyOwner { bool prevValue = isRewardsForAllSubmitter[_submitter]; emit RewardsForAllSubmitterSet(_submitter, prevValue, _newValue); isRewardsForAllSubmitter[_submitter] = _newValue; } - /** - * - * INTERNAL FUNCTIONS - * - */ + /// + /// INTERNAL FUNCTIONS + /// - /** - * @notice Internal helper to process reward claims. - * @param claim The RewardsMerkleClaims to be processed. - * @param recipient The address recipient that receives the ERC20 rewards - */ - function _processClaim(RewardsMerkleClaim calldata claim, address recipient) internal { + /// @notice Internal helper to process reward claims. + /// @param claim The RewardsMerkleClaims to be processed. + /// @param recipient The address recipient that receives the ERC20 rewards + function _processClaim( + RewardsMerkleClaim calldata claim, + address recipient + ) internal { DistributionRoot memory root = _distributionRoots[claim.rootIndex]; _checkClaim(claim, root); // If claimerFor earner is not set, claimer is by default the earner. Else set to claimerFor @@ -395,19 +405,24 @@ contract RewardsCoordinator is rewardsUpdater = _rewardsUpdater; } - function _setClaimer(address earner, address claimer) internal { + function _setClaimer( + address earner, + address claimer + ) internal { address prevClaimer = claimerFor[earner]; claimerFor[earner] = claimer; emit ClaimerForSet(earner, prevClaimer, claimer); } - /** - * @notice Internal helper to set the operator split. - * @param operatorSplit The split struct for an Operator - * @param split The split in basis points. - * @param activatedAt The timestamp when the split is activated. - */ - function _setOperatorSplit(OperatorSplit storage operatorSplit, uint16 split, uint32 activatedAt) internal { + /// @notice Internal helper to set the operator split. + /// @param operatorSplit The split struct for an Operator + /// @param split The split in basis points. + /// @param activatedAt The timestamp when the split is activated. + function _setOperatorSplit( + OperatorSplit storage operatorSplit, + uint16 split, + uint32 activatedAt + ) internal { require(split <= ONE_HUNDRED_IN_BIPS, SplitExceedsMax()); require(block.timestamp > operatorSplit.activatedAt, PreviousSplitPending()); @@ -423,9 +438,7 @@ contract RewardsCoordinator is operatorSplit.activatedAt = activatedAt; } - /** - * @notice Common checks for all RewardsSubmissions. - */ + /// @notice Common checks for all RewardsSubmissions. function _validateCommonRewardsSubmission( StrategyAndMultiplier[] calldata strategiesAndMultipliers, uint32 startTimestamp, @@ -454,9 +467,7 @@ contract RewardsCoordinator is } } - /** - * @notice Validate a RewardsSubmission. Called from both `createAVSRewardsSubmission` and `createRewardsForAllSubmission` - */ + /// @notice Validate a RewardsSubmission. Called from both `createAVSRewardsSubmission` and `createRewardsForAllSubmission` function _validateRewardsSubmission( RewardsSubmission calldata rewardsSubmission ) internal view { @@ -468,12 +479,10 @@ contract RewardsCoordinator is require(rewardsSubmission.startTimestamp <= block.timestamp + MAX_FUTURE_LENGTH, StartTimestampTooFarInFuture()); } - /** - * @notice Validate a OperatorDirectedRewardsSubmission. Called from `createOperatorDirectedAVSRewardsSubmission`. - * @dev Not checking for `MAX_FUTURE_LENGTH` (Since operator-directed reward submissions are strictly retroactive). - * @param submission OperatorDirectedRewardsSubmission to validate. - * @return total amount to be transferred from the avs to the contract. - */ + /// @notice Validate a OperatorDirectedRewardsSubmission. Called from `createOperatorDirectedAVSRewardsSubmission`. + /// @dev Not checking for `MAX_FUTURE_LENGTH` (Since operator-directed reward submissions are strictly retroactive). + /// @param submission OperatorDirectedRewardsSubmission to validate. + /// @return total amount to be transferred from the avs to the contract. function _validateOperatorDirectedRewardsSubmission( OperatorDirectedRewardsSubmission calldata submission ) internal view returns (uint256) { @@ -501,7 +510,10 @@ contract RewardsCoordinator is return totalAmount; } - function _checkClaim(RewardsMerkleClaim calldata claim, DistributionRoot memory root) internal view { + function _checkClaim( + RewardsMerkleClaim calldata claim, + DistributionRoot memory root + ) internal view { require(!root.disabled, RootDisabled()); require(block.timestamp >= root.activatedAt, RootNotActivated()); require(claim.tokenIndices.length == claim.tokenTreeProofs.length, InputArrayLengthMismatch()); @@ -525,14 +537,12 @@ contract RewardsCoordinator is } } - /** - * @notice verify inclusion of the token claim proof in the earner token root hash (earnerTokenRoot). - * The token leaf comprises of the IERC20 token and cumulativeAmount of earnings. - * @param earnerTokenRoot root hash of the earner token subtree - * @param tokenLeafIndex index of the token leaf - * @param tokenProof proof of the token leaf in the earner token subtree - * @param tokenLeaf token leaf to be verified - */ + /// @notice verify inclusion of the token claim proof in the earner token root hash (earnerTokenRoot). + /// The token leaf comprises of the IERC20 token and cumulativeAmount of earnings. + /// @param earnerTokenRoot root hash of the earner token subtree + /// @param tokenLeafIndex index of the token leaf + /// @param tokenProof proof of the token leaf in the earner token subtree + /// @param tokenLeaf token leaf to be verified function _verifyTokenClaimProof( bytes32 earnerTokenRoot, uint32 tokenLeafIndex, @@ -556,15 +566,13 @@ contract RewardsCoordinator is ); } - /** - * @notice verify inclusion of earner claim proof in the distribution root. This verifies - * the inclusion of the earner and earnerTokenRoot hash in the tree. The token claims are proven separately - * against the earnerTokenRoot hash (see _verifyTokenClaimProof). The earner leaf comprises of (earner, earnerTokenRoot) - * @param root distribution root that should be read from storage - * @param earnerLeafIndex index of the earner leaf - * @param earnerProof proof of the earners account root in the merkle tree - * @param earnerLeaf leaf of earner merkle tree containing the earner address and earner's token root hash - */ + /// @notice verify inclusion of earner claim proof in the distribution root. This verifies + /// the inclusion of the earner and earnerTokenRoot hash in the tree. The token claims are proven separately + /// against the earnerTokenRoot hash (see _verifyTokenClaimProof). The earner leaf comprises of (earner, earnerTokenRoot) + /// @param root distribution root that should be read from storage + /// @param earnerLeafIndex index of the earner leaf + /// @param earnerProof proof of the earners account root in the merkle tree + /// @param earnerLeaf leaf of earner merkle tree containing the earner address and earner's token root hash function _verifyEarnerClaimProof( bytes32 root, uint32 earnerLeafIndex, @@ -588,12 +596,10 @@ contract RewardsCoordinator is ); } - /** - * @notice Internal helper to get the operator split in basis points. - * @dev It takes default split and activation delay into account while calculating the split. - * @param operatorSplit The split struct for an Operator - * @return The split in basis points. - */ + /// @notice Internal helper to get the operator split in basis points. + /// @dev It takes default split and activation delay into account while calculating the split. + /// @param operatorSplit The split struct for an Operator + /// @return The split in basis points. function _getOperatorSplit( OperatorSplit memory operatorSplit ) internal view returns (uint16) { @@ -611,11 +617,9 @@ contract RewardsCoordinator is } } - /** - * - * VIEW FUNCTIONS - * - */ + /// + /// VIEW FUNCTIONS + /// /// @inheritdoc IRewardsCoordinator function calculateEarnerLeafHash( @@ -640,7 +644,10 @@ contract RewardsCoordinator is } /// @inheritdoc IRewardsCoordinator - function getOperatorAVSSplit(address operator, address avs) external view returns (uint16) { + function getOperatorAVSSplit( + address operator, + address avs + ) external view returns (uint16) { return _getOperatorSplit(_operatorAVSSplitBips[operator][avs]); } @@ -652,7 +659,10 @@ contract RewardsCoordinator is } /// @inheritdoc IRewardsCoordinator - function getOperatorSetSplit(address operator, OperatorSet calldata operatorSet) external view returns (uint16) { + function getOperatorSetSplit( + address operator, + OperatorSet calldata operatorSet + ) external view returns (uint16) { return _getOperatorSplit(_operatorSetSplitBips[operator][operatorSet.key()]); } diff --git a/src/contracts/core/StrategyManager.sol b/src/contracts/core/StrategyManager.sol index 117e6906c1..7377e064b8 100644 --- a/src/contracts/core/StrategyManager.sol +++ b/src/contracts/core/StrategyManager.sol @@ -11,15 +11,13 @@ import "../interfaces/IEigenPodManager.sol"; import "../permissions/Pausable.sol"; import "./storage/StrategyManagerStorage.sol"; -/** - * @title The primary entry- and exit-point for funds into and out of EigenLayer. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice This contract is for managing deposits in different strategies. The main - * functionalities are: - * - adding and removing strategies that any delegator can deposit into - * - enabling deposit of assets into specified strategy(s) - */ +/// @title The primary entry- and exit-point for funds into and out of EigenLayer. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice This contract is for managing deposits in different strategies. The main +/// functionalities are: +/// - adding and removing strategies that any delegator can deposit into +/// - enabling deposit of assets into specified strategy(s) contract StrategyManager is Initializable, OwnableUpgradeable, @@ -52,9 +50,7 @@ contract StrategyManager is _; } - /** - * @param _delegation The delegation contract of EigenLayer. - */ + /// @param _delegation The delegation contract of EigenLayer. constructor( IAllocationManager _allocationManager, IDelegationManager _delegation, @@ -66,12 +62,10 @@ contract StrategyManager is // EXTERNAL FUNCTIONS - /** - * @notice Initializes the strategy manager contract. Sets the `pauserRegistry` (currently **not** modifiable after being set), - * and transfers contract ownership to the specified `initialOwner`. - * @param initialOwner Ownership of this contract is transferred to this address. - * @param initialStrategyWhitelister The initial value of `strategyWhitelister` to set. - */ + /// @notice Initializes the strategy manager contract. Sets the `pauserRegistry` (currently **not** modifiable after being set), + /// and transfers contract ownership to the specified `initialOwner`. + /// @param initialOwner Ownership of this contract is transferred to this address. + /// @param initialStrategyWhitelister The initial value of `strategyWhitelister` to set. function initialize( address initialOwner, address initialStrategyWhitelister, @@ -257,16 +251,18 @@ contract StrategyManager is // INTERNAL FUNCTIONS - /** - * @notice This function adds `shares` for a given `strategy` to the `staker` and runs through the necessary update logic. - * @param staker The address to add shares to - * @param strategy The Strategy in which the `staker` is receiving shares - * @param shares The amount of shares to grant to the `staker` - * @dev In particular, this function calls `delegation.increaseDelegatedShares(staker, strategy, shares)` to ensure that all - * delegated shares are tracked, increases the stored share amount in `stakerDepositShares[staker][strategy]`, and adds `strategy` - * to the `staker`'s list of strategies, if it is not in the list already. - */ - function _addShares(address staker, IStrategy strategy, uint256 shares) internal returns (uint256, uint256) { + /// @notice This function adds `shares` for a given `strategy` to the `staker` and runs through the necessary update logic. + /// @param staker The address to add shares to + /// @param strategy The Strategy in which the `staker` is receiving shares + /// @param shares The amount of shares to grant to the `staker` + /// @dev In particular, this function calls `delegation.increaseDelegatedShares(staker, strategy, shares)` to ensure that all + /// delegated shares are tracked, increases the stored share amount in `stakerDepositShares[staker][strategy]`, and adds `strategy` + /// to the `staker`'s list of strategies, if it is not in the list already. + function _addShares( + address staker, + IStrategy strategy, + uint256 shares + ) internal returns (uint256, uint256) { // sanity checks on inputs require(staker != address(0), StakerAddressZero()); require(shares != 0, SharesAmountZero()); @@ -286,15 +282,13 @@ contract StrategyManager is return (prevDepositShares, shares); } - /** - * @notice Internal function in which `amount` of ERC20 `token` is transferred from `msg.sender` to the Strategy-type contract - * `strategy`, with the resulting shares credited to `staker`. - * @param staker The address that will be credited with the new shares. - * @param strategy The Strategy contract to deposit into. - * @param token The ERC20 token to deposit. - * @param amount The amount of `token` to deposit. - * @return shares The amount of *new* shares in `strategy` that have been credited to the `staker`. - */ + /// @notice Internal function in which `amount` of ERC20 `token` is transferred from `msg.sender` to the Strategy-type contract + /// `strategy`, with the resulting shares credited to `staker`. + /// @param staker The address that will be credited with the new shares. + /// @param strategy The Strategy contract to deposit into. + /// @param token The ERC20 token to deposit. + /// @param amount The amount of `token` to deposit. + /// @return shares The amount of *new* shares in `strategy` that have been credited to the `staker`. function _depositIntoStrategy( address staker, IStrategy strategy, @@ -321,15 +315,13 @@ contract StrategyManager is return shares; } - /** - * @notice Decreases the shares that `staker` holds in `strategy` by `depositSharesToRemove`. - * @param staker The address to decrement shares from - * @param strategy The strategy for which the `staker`'s shares are being decremented - * @param depositSharesToRemove The amount of deposit shares to decrement - * @dev If the amount of shares represents all of the staker`s shares in said strategy, - * then the strategy is removed from stakerStrategyList[staker] and 'true' is returned. Otherwise 'false' is returned. - * Also returns the user's updated deposit shares after decrement. - */ + /// @notice Decreases the shares that `staker` holds in `strategy` by `depositSharesToRemove`. + /// @param staker The address to decrement shares from + /// @param strategy The strategy for which the `staker`'s shares are being decremented + /// @param depositSharesToRemove The amount of deposit shares to decrement + /// @dev If the amount of shares represents all of the staker`s shares in said strategy, + /// then the strategy is removed from stakerStrategyList[staker] and 'true' is returned. Otherwise 'false' is returned. + /// Also returns the user's updated deposit shares after decrement. function _removeDepositShares( address staker, IStrategy strategy, @@ -357,12 +349,13 @@ contract StrategyManager is return userDepositShares; } - /** - * @notice Removes `strategy` from `staker`'s dynamic array of strategies, i.e. from `stakerStrategyList[staker]` - * @param staker The user whose array will have an entry removed - * @param strategy The Strategy to remove from `stakerStrategyList[staker]` - */ - function _removeStrategyFromStakerStrategyList(address staker, IStrategy strategy) internal { + /// @notice Removes `strategy` from `staker`'s dynamic array of strategies, i.e. from `stakerStrategyList[staker]` + /// @param staker The user whose array will have an entry removed + /// @param strategy The Strategy to remove from `stakerStrategyList[staker]` + function _removeStrategyFromStakerStrategyList( + address staker, + IStrategy strategy + ) internal { //loop through all of the strategies, find the right one, then replace uint256 stratsLength = stakerStrategyList[staker].length; uint256 j = 0; @@ -379,13 +372,11 @@ contract StrategyManager is stakerStrategyList[staker].pop(); } - /** - * @notice Clears burn/redistributable shares and sends underlying tokens to recipient. - * @param operatorSet The operator set to clear the shares for. - * @param slashId The slash id to clear the shares for. - * @param strategy The strategy to clear the shares for. - * @param recipient The recipient to withdraw the shares to. - */ + /// @notice Clears burn/redistributable shares and sends underlying tokens to recipient. + /// @param operatorSet The operator set to clear the shares for. + /// @param slashId The slash id to clear the shares for. + /// @param strategy The strategy to clear the shares for. + /// @param recipient The recipient to withdraw the shares to. function _clearBurnOrRedistributableShares( OperatorSet calldata operatorSet, uint256 slashId, @@ -401,11 +392,12 @@ contract StrategyManager is uint256 amountOut; if (sharesToRemove != 0) { // Withdraw the shares to the burn address. - amountOut = IStrategy(strategy).withdraw({ - recipient: recipient, - token: IStrategy(strategy).underlyingToken(), - amountShares: sharesToRemove - }); + amountOut = IStrategy(strategy) + .withdraw({ + recipient: recipient, + token: IStrategy(strategy).underlyingToken(), + amountShares: sharesToRemove + }); // Emit an event to notify the that burnable shares have been decreased. emit BurnOrRedistributableSharesDecreased(operatorSet, slashId, strategy, sharesToRemove); @@ -427,10 +419,8 @@ contract StrategyManager is return amountOut; } - /** - * @notice Internal function for modifying the `strategyWhitelister`. Used inside of the `setStrategyWhitelister` and `initialize` functions. - * @param newStrategyWhitelister The new address for the `strategyWhitelister` to take. - */ + /// @notice Internal function for modifying the `strategyWhitelister`. Used inside of the `setStrategyWhitelister` and `initialize` functions. + /// @param newStrategyWhitelister The new address for the `strategyWhitelister` to take. function _setStrategyWhitelister( address newStrategyWhitelister ) internal { diff --git a/src/contracts/core/storage/AVSDirectoryStorage.sol b/src/contracts/core/storage/AVSDirectoryStorage.sol index 84ee2f8756..010d7000ae 100644 --- a/src/contracts/core/storage/AVSDirectoryStorage.sol +++ b/src/contracts/core/storage/AVSDirectoryStorage.sol @@ -50,10 +50,8 @@ abstract contract AVSDirectoryStorage is IAVSDirectory { delegation = _delegation; } - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[47] private __gap; } diff --git a/src/contracts/core/storage/AllocationManagerStorage.sol b/src/contracts/core/storage/AllocationManagerStorage.sol index c5c8debb4b..6be2b9d92a 100644 --- a/src/contracts/core/storage/AllocationManagerStorage.sol +++ b/src/contracts/core/storage/AllocationManagerStorage.sol @@ -98,7 +98,8 @@ abstract contract AllocationManagerStorage is IAllocationManagerStorage { /// @dev For a strategy, keeps an ordered queue of operator sets that have pending deallocations /// These must be completed in order to free up magnitude for future allocation - mapping(address operator => mapping(IStrategy strategy => DoubleEndedQueue.Bytes32Deque)) internal deallocationQueue; + mapping(address operator => mapping(IStrategy strategy => DoubleEndedQueue.Bytes32Deque)) internal + deallocationQueue; /// @dev Lists the AVSs who has registered metadata and claimed itself as an AVS /// @notice bool is not used and is always true if the avs has registered metadata @@ -132,10 +133,8 @@ abstract contract AllocationManagerStorage is IAllocationManagerStorage { ALLOCATION_CONFIGURATION_DELAY = _ALLOCATION_CONFIGURATION_DELAY; } - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[33] private __gap; } diff --git a/src/contracts/core/storage/DelegationManagerStorage.sol b/src/contracts/core/storage/DelegationManagerStorage.sol index 05f56a05a6..66c8008306 100644 --- a/src/contracts/core/storage/DelegationManagerStorage.sol +++ b/src/contracts/core/storage/DelegationManagerStorage.sol @@ -10,12 +10,10 @@ import "../../interfaces/IAllocationManager.sol"; import {Snapshots} from "../../libraries/Snapshots.sol"; -/** - * @title Storage variables for the `DelegationManager` contract. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice This storage contract is separate from the logic to simplify the upgrade process. - */ +/// @title Storage variables for the `DelegationManager` contract. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice This storage contract is separate from the logic to simplify the upgrade process. abstract contract DelegationManagerStorage is IDelegationManager { using Snapshots for Snapshots.DefaultZeroHistory; @@ -57,15 +55,13 @@ abstract contract DelegationManagerStorage is IDelegationManager { /// @dev Do not remove, deprecated storage. bytes32 internal __deprecated_DOMAIN_SEPARATOR; - /** - * @notice Tracks the current balance of shares an `operator` is delegated according to each `strategy`. - * Updated by both the `StrategyManager` and `EigenPodManager` when a staker's delegatable balance changes, - * and by the `AllocationManager` when the `operator` is slashed. - * - * @dev The following invariant should hold for each `strategy`: - * - * operatorShares[operator] = sum(withdrawable shares of all stakers delegated to operator) - */ + /// @notice Tracks the current balance of shares an `operator` is delegated according to each `strategy`. + /// Updated by both the `StrategyManager` and `EigenPodManager` when a staker's delegatable balance changes, + /// and by the `AllocationManager` when the `operator` is slashed. + /// + /// @dev The following invariant should hold for each `strategy`: + /// + /// operatorShares[operator] = sum(withdrawable shares of all stakers delegated to operator) mapping(address operator => mapping(IStrategy strategy => uint256 shares)) public operatorShares; /// @notice Returns the operator details for a given `operator`. @@ -133,10 +129,8 @@ abstract contract DelegationManagerStorage is IDelegationManager { MIN_WITHDRAWAL_DELAY_BLOCKS = _MIN_WITHDRAWAL_DELAY_BLOCKS; } - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[35] private __gap; } diff --git a/src/contracts/core/storage/ProtocolRegistryStorage.sol b/src/contracts/core/storage/ProtocolRegistryStorage.sol index d1cfcc0a37..969827e5e1 100644 --- a/src/contracts/core/storage/ProtocolRegistryStorage.sol +++ b/src/contracts/core/storage/ProtocolRegistryStorage.sol @@ -6,20 +6,15 @@ import "@openzeppelin/contracts/utils/structs/EnumerableMap.sol"; import "../../interfaces/IProtocolRegistry.sol"; abstract contract ProtocolRegistryStorage is IProtocolRegistry { - /** - * - * CONSTANTS - * - */ - + /// + /// CONSTANTS + /// /// @inheritdoc IProtocolRegistry bytes32 public constant PAUSER_ROLE = hex"01"; - /** - * - * MUTABLE STATE - * - */ + /// + /// MUTABLE STATE + /// /// @notice Returns the semantic version of the protocol. ShortString internal _semanticVersion; @@ -30,10 +25,8 @@ abstract contract ProtocolRegistryStorage is IProtocolRegistry { /// @notice Maps deployment addresses to their configurations. mapping(address => DeploymentConfig) internal _deploymentConfigs; - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[47] private __gap; } diff --git a/src/contracts/core/storage/ReleaseManagerStorage.sol b/src/contracts/core/storage/ReleaseManagerStorage.sol index 6decfa9b95..0b045a0df8 100644 --- a/src/contracts/core/storage/ReleaseManagerStorage.sol +++ b/src/contracts/core/storage/ReleaseManagerStorage.sol @@ -12,10 +12,8 @@ abstract contract ReleaseManagerStorage is IReleaseManager { /// @notice Returns the metadata URI for a given operator set. mapping(bytes32 operatorSetKey => string metadataURI) internal _operatorSetMetadataURI; - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[48] private __gap; } diff --git a/src/contracts/core/storage/RewardsCoordinatorStorage.sol b/src/contracts/core/storage/RewardsCoordinatorStorage.sol index 5cf50fd318..8f0baa9b56 100644 --- a/src/contracts/core/storage/RewardsCoordinatorStorage.sol +++ b/src/contracts/core/storage/RewardsCoordinatorStorage.sol @@ -3,12 +3,10 @@ pragma solidity ^0.8.27; import "../../interfaces/IRewardsCoordinator.sol"; -/** - * @title Storage variables for the `RewardsCoordinator` contract. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice This storage contract is separate from the logic to simplify the upgrade process. - */ +/// @title Storage variables for the `RewardsCoordinator` contract. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice This storage contract is separate from the logic to simplify the upgrade process. abstract contract RewardsCoordinatorStorage is IRewardsCoordinator { // Constants @@ -76,10 +74,8 @@ abstract contract RewardsCoordinatorStorage is IRewardsCoordinator { /// @dev Do not remove, deprecated storage. bytes32 internal __deprecated_DOMAIN_SEPARATOR; - /** - * @notice List of roots submitted by the rewardsUpdater - * @dev Array is internal with an external getter so we can return a `DistributionRoot[] memory` object - */ + /// @notice List of roots submitted by the rewardsUpdater + /// @dev Array is internal with an external getter so we can return a `DistributionRoot[] memory` object DistributionRoot[] internal _distributionRoots; /// Slot 2 @@ -156,10 +152,8 @@ abstract contract RewardsCoordinatorStorage is IRewardsCoordinator { GENESIS_REWARDS_TIMESTAMP = _GENESIS_REWARDS_TIMESTAMP; } - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[35] private __gap; } diff --git a/src/contracts/core/storage/StrategyManagerStorage.sol b/src/contracts/core/storage/StrategyManagerStorage.sol index f63c4c78c3..3d5c84516c 100644 --- a/src/contracts/core/storage/StrategyManagerStorage.sol +++ b/src/contracts/core/storage/StrategyManagerStorage.sol @@ -11,12 +11,10 @@ import "../../interfaces/IEigenPodManager.sol"; import "../../interfaces/IStrategy.sol"; import "../../interfaces/IStrategyManager.sol"; -/** - * @title Storage variables for the `StrategyManager` contract. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice This storage contract is separate from the logic to simplify the upgrade process. - */ +/// @title Storage variables for the `StrategyManager` contract. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice This storage contract is separate from the logic to simplify the upgrade process. abstract contract StrategyManagerStorage is IStrategyManager { // Constants @@ -91,18 +89,17 @@ abstract contract StrategyManagerStorage is IStrategyManager { // Construction - /** - * @param _delegation The delegation contract of EigenLayer. - */ - constructor(IAllocationManager _allocationManager, IDelegationManager _delegation) { + /// @param _delegation The delegation contract of EigenLayer. + constructor( + IAllocationManager _allocationManager, + IDelegationManager _delegation + ) { allocationManager = _allocationManager; delegation = _delegation; } - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[32] private __gap; } diff --git a/src/contracts/interfaces/IAVSDirectory.sol b/src/contracts/interfaces/IAVSDirectory.sol index 643f601e5d..86c0d6aa34 100644 --- a/src/contracts/interfaces/IAVSDirectory.sol +++ b/src/contracts/interfaces/IAVSDirectory.sol @@ -7,7 +7,6 @@ import "./IStrategy.sol"; interface IAVSDirectoryErrors { /// Operator Status - /// @dev Thrown when an operator does not exist in the DelegationManager error OperatorNotRegisteredToEigenLayer(); /// @dev Thrown when an operator is already registered to an AVS. @@ -24,15 +23,12 @@ interface IAVSDirectoryTypes { enum OperatorAVSRegistrationStatus { UNREGISTERED, // Operator not registered to AVS REGISTERED // Operator registered to AVS - } - /** - * @notice Struct representing the registration status of an operator with an operator set. - * Keeps track of last deregistered timestamp for slashability concerns. - * @param registered whether the operator is registered with the operator set - * @param lastDeregisteredTimestamp the timestamp at which the operator was last deregistered - */ + /// @notice Struct representing the registration status of an operator with an operator set. + /// Keeps track of last deregistered timestamp for slashability concerns. + /// @param registered whether the operator is registered with the operator set + /// @param lastDeregisteredTimestamp the timestamp at which the operator was last deregistered struct OperatorSetRegistrationStatus { bool registered; uint32 lastDeregisteredTimestamp; @@ -40,12 +36,12 @@ interface IAVSDirectoryTypes { } interface IAVSDirectoryEvents is IAVSDirectoryTypes { - /** - * @notice Emitted when an operator's registration status with an AVS id updated - * @notice Only used by legacy M2 AVSs that have not integrated with operatorSets. - */ + /// @notice Emitted when an operator's registration status with an AVS id updated + /// @notice Only used by legacy M2 AVSs that have not integrated with operatorSets. event OperatorAVSRegistrationStatusUpdated( - address indexed operator, address indexed avs, OperatorAVSRegistrationStatus status + address indexed operator, + address indexed avs, + OperatorAVSRegistrationStatus status ); /// @notice Emitted when an AVS updates their metadata URI (Uniform Resource Identifier). @@ -54,81 +50,70 @@ interface IAVSDirectoryEvents is IAVSDirectoryTypes { } interface IAVSDirectory is IAVSDirectoryEvents, IAVSDirectoryErrors, ISignatureUtilsMixin { - /** - * - * EXTERNAL FUNCTIONS - * - */ - - /** - * @dev Initializes the addresses of the initial owner and paused status. - */ - function initialize(address initialOwner, uint256 initialPausedStatus) external; + /// + /// EXTERNAL FUNCTIONS + /// + /// @dev Initializes the addresses of the initial owner and paused status. + function initialize( + address initialOwner, + uint256 initialPausedStatus + ) external; - /** - * @notice Called by an AVS to emit an `AVSMetadataURIUpdated` event indicating the information has updated. - * - * @param metadataURI The URI for metadata associated with an AVS. - * - * @dev Note that the `metadataURI` is *never stored* and is only emitted in the `AVSMetadataURIUpdated` event. - */ + /// @notice Called by an AVS to emit an `AVSMetadataURIUpdated` event indicating the information has updated. + /// + /// @param metadataURI The URI for metadata associated with an AVS. + /// + /// @dev Note that the `metadataURI` is *never stored* and is only emitted in the `AVSMetadataURIUpdated` event. function updateAVSMetadataURI( string calldata metadataURI ) external; - /** - * @notice Called by an operator to cancel a salt that has been used to register with an AVS. - * - * @param salt A unique and single use value associated with the approver signature. - */ + /// @notice Called by an operator to cancel a salt that has been used to register with an AVS. + /// + /// @param salt A unique and single use value associated with the approver signature. function cancelSalt( bytes32 salt ) external; - /** - * @notice Legacy function called by the AVS's service manager contract - * to register an operator with the AVS. NOTE: this function will be deprecated in a future release - * after the slashing release. New AVSs should use `registerForOperatorSets` instead. - * - * @param operator The address of the operator to register. - * @param operatorSignature The signature, salt, and expiry of the operator's signature. - * - * @dev msg.sender must be the AVS. - * @dev Only used by legacy M2 AVSs that have not integrated with operator sets. - */ + /// @notice Legacy function called by the AVS's service manager contract + /// to register an operator with the AVS. NOTE: this function will be deprecated in a future release + /// after the slashing release. New AVSs should use `registerForOperatorSets` instead. + /// + /// @param operator The address of the operator to register. + /// @param operatorSignature The signature, salt, and expiry of the operator's signature. + /// + /// @dev msg.sender must be the AVS. + /// @dev Only used by legacy M2 AVSs that have not integrated with operator sets. function registerOperatorToAVS( address operator, ISignatureUtilsMixinTypes.SignatureWithSaltAndExpiry memory operatorSignature ) external; - /** - * @notice Legacy function called by an AVS to deregister an operator from the AVS. - * NOTE: this function will be deprecated in a future release after the slashing release. - * New AVSs integrating should use `deregisterOperatorFromOperatorSets` instead. - * - * @param operator The address of the operator to deregister. - * - * @dev Only used by legacy M2 AVSs that have not integrated with operator sets. - */ + /// @notice Legacy function called by an AVS to deregister an operator from the AVS. + /// NOTE: this function will be deprecated in a future release after the slashing release. + /// New AVSs integrating should use `deregisterOperatorFromOperatorSets` instead. + /// + /// @param operator The address of the operator to deregister. + /// + /// @dev Only used by legacy M2 AVSs that have not integrated with operator sets. function deregisterOperatorFromAVS( address operator ) external; - /** - * - * VIEW FUNCTIONS - * - */ - function operatorSaltIsSpent(address operator, bytes32 salt) external view returns (bool); - - /** - * @notice Calculates the digest hash to be signed by an operator to register with an AVS. - * - * @param operator The account registering as an operator. - * @param avs The AVS the operator is registering with. - * @param salt A unique and single-use value associated with the approver's signature. - * @param expiry The time after which the approver's signature becomes invalid. - */ + /// + /// VIEW FUNCTIONS + /// + function operatorSaltIsSpent( + address operator, + bytes32 salt + ) external view returns (bool); + + /// @notice Calculates the digest hash to be signed by an operator to register with an AVS. + /// + /// @param operator The account registering as an operator. + /// @param avs The AVS the operator is registering with. + /// @param salt A unique and single-use value associated with the approver's signature. + /// @param expiry The time after which the approver's signature becomes invalid. function calculateOperatorAVSRegistrationDigestHash( address operator, address avs, diff --git a/src/contracts/interfaces/IAVSRegistrar.sol b/src/contracts/interfaces/IAVSRegistrar.sol index b36bbba9d2..95e9c8ec53 100644 --- a/src/contracts/interfaces/IAVSRegistrar.sol +++ b/src/contracts/interfaces/IAVSRegistrar.sol @@ -2,15 +2,13 @@ pragma solidity >=0.5.0; interface IAVSRegistrar { - /** - * @notice Called by the AllocationManager when an operator wants to register - * for one or more operator sets. This method should revert if registration - * is unsuccessful. - * @param operator the registering operator - * @param avs the AVS the operator is registering for. This should be the same as IAVSRegistrar.avs() - * @param operatorSetIds the list of operator set ids being registered for - * @param data arbitrary data the operator can provide as part of registration - */ + /// @notice Called by the AllocationManager when an operator wants to register + /// for one or more operator sets. This method should revert if registration + /// is unsuccessful. + /// @param operator the registering operator + /// @param avs the AVS the operator is registering for. This should be the same as IAVSRegistrar.avs() + /// @param operatorSetIds the list of operator set ids being registered for + /// @param data arbitrary data the operator can provide as part of registration function registerOperator( address operator, address avs, @@ -18,19 +16,19 @@ interface IAVSRegistrar { bytes calldata data ) external; - /** - * @notice Called by the AllocationManager when an operator is deregistered from one or more operator sets - * @param operator the deregistering operator - * @param avs the AVS the operator is deregistering from. This should be the same as IAVSRegistrar.avs() - * @param operatorSetIds the list of operator set ids being deregistered from - */ - function deregisterOperator(address operator, address avs, uint32[] calldata operatorSetIds) external; + /// @notice Called by the AllocationManager when an operator is deregistered from one or more operator sets + /// @param operator the deregistering operator + /// @param avs the AVS the operator is deregistering from. This should be the same as IAVSRegistrar.avs() + /// @param operatorSetIds the list of operator set ids being deregistered from + function deregisterOperator( + address operator, + address avs, + uint32[] calldata operatorSetIds + ) external; - /** - * @notice Returns true if the AVS is supported by the registrar - * @param avs the AVS to check - * @return true if the AVS is supported, false otherwise - */ + /// @notice Returns true if the AVS is supported by the registrar + /// @param avs the AVS to check + /// @return true if the AVS is supported, false otherwise function supportsAVS( address avs ) external view returns (bool); diff --git a/src/contracts/interfaces/IAVSTaskHook.sol b/src/contracts/interfaces/IAVSTaskHook.sol index cf3e9bb2c7..850040bddb 100644 --- a/src/contracts/interfaces/IAVSTaskHook.sol +++ b/src/contracts/interfaces/IAVSTaskHook.sol @@ -3,38 +3,33 @@ pragma solidity ^0.8.27; import {ITaskMailboxTypes} from "./ITaskMailbox.sol"; -/** - * @title IAVSTaskHook - * @author Layr Labs, Inc. - * @notice Interface for AVS-specific task lifecycle hooks. - * @dev This interface allows AVSs to implement custom validation logic for tasks. - */ +/// @title IAVSTaskHook +/// @author Layr Labs, Inc. +/// @notice Interface for AVS-specific task lifecycle hooks. +/// @dev This interface allows AVSs to implement custom validation logic for tasks. interface IAVSTaskHook { - /** - * @notice Validates a task before it is created - * @param caller Address that is creating the task - * @param taskParams Task parameters - * @dev This function should revert if the task should not be created - */ - function validatePreTaskCreation(address caller, ITaskMailboxTypes.TaskParams memory taskParams) external view; + /// @notice Validates a task before it is created + /// @param caller Address that is creating the task + /// @param taskParams Task parameters + /// @dev This function should revert if the task should not be created + function validatePreTaskCreation( + address caller, + ITaskMailboxTypes.TaskParams memory taskParams + ) external view; - /** - * @notice Handles a task after it is created - * @param taskHash Unique identifier of the task - * @dev This function can be used to perform additional validation or update AVS-specific state - */ + /// @notice Handles a task after it is created + /// @param taskHash Unique identifier of the task + /// @dev This function can be used to perform additional validation or update AVS-specific state function handlePostTaskCreation( bytes32 taskHash ) external; - /** - * @notice Validates a task before it is submitted for verification - * @param caller Address that is submitting the result - * @param taskHash Unique identifier of the task - * @param cert Certificate proving the validity of the result - * @param result Task execution result data - * @dev This function should revert if the task should not be verified - */ + /// @notice Validates a task before it is submitted for verification + /// @param caller Address that is submitting the result + /// @param taskHash Unique identifier of the task + /// @param cert Certificate proving the validity of the result + /// @param result Task execution result data + /// @dev This function should revert if the task should not be verified function validatePreTaskResultSubmission( address caller, bytes32 taskHash, @@ -42,19 +37,18 @@ interface IAVSTaskHook { bytes memory result ) external view; - /** - * @notice Handles a task result submission - * @param caller Address that submitted the result - * @param taskHash Unique identifier of the task - * @dev This function can be used to perform additional validation or update AVS-specific state - */ - function handlePostTaskResultSubmission(address caller, bytes32 taskHash) external; + /// @notice Handles a task result submission + /// @param caller Address that submitted the result + /// @param taskHash Unique identifier of the task + /// @dev This function can be used to perform additional validation or update AVS-specific state + function handlePostTaskResultSubmission( + address caller, + bytes32 taskHash + ) external; - /** - * @notice Calculates the fee for a task payload against a specific fee market - * @param taskParams The task parameters - * @return The fee for the task - */ + /// @notice Calculates the fee for a task payload against a specific fee market + /// @param taskParams The task parameters + /// @return The fee for the task function calculateTaskFee( ITaskMailboxTypes.TaskParams memory taskParams ) external view returns (uint96); diff --git a/src/contracts/interfaces/IAllocationManager.sol b/src/contracts/interfaces/IAllocationManager.sol index e69a652cbf..604ec80823 100644 --- a/src/contracts/interfaces/IAllocationManager.sol +++ b/src/contracts/interfaces/IAllocationManager.sol @@ -10,7 +10,6 @@ import "./IAVSRegistrar.sol"; interface IAllocationManagerErrors { /// Input Validation - /// @dev Thrown when `wadToSlash` is zero or greater than 1e18 error InvalidWadToSlash(); /// @dev Thrown when two array parameters have mismatching lengths. @@ -72,39 +71,33 @@ interface IAllocationManagerErrors { } interface IAllocationManagerTypes { - /** - * @notice Defines allocation information from a strategy to an operator set, for an operator - * @param currentMagnitude the current magnitude allocated from the strategy to the operator set - * @param pendingDiff a pending change in magnitude, if it exists (0 otherwise) - * @param effectBlock the block at which the pending magnitude diff will take effect - */ + /// @notice Defines allocation information from a strategy to an operator set, for an operator + /// @param currentMagnitude the current magnitude allocated from the strategy to the operator set + /// @param pendingDiff a pending change in magnitude, if it exists (0 otherwise) + /// @param effectBlock the block at which the pending magnitude diff will take effect struct Allocation { uint64 currentMagnitude; int128 pendingDiff; uint32 effectBlock; } - /** - * @notice Parameters for addresses that can slash operatorSets - * @param slasher the address that can slash the operator set - * @param pendingSlasher the address that will become the slasher for the operator set after a delay - * @param effectBlock the block at which the pending slasher will take effect - * @dev It is not possible for the slasher to be the 0 address, which is used to denote if the slasher is not set - */ + /// @notice Parameters for addresses that can slash operatorSets + /// @param slasher the address that can slash the operator set + /// @param pendingSlasher the address that will become the slasher for the operator set after a delay + /// @param effectBlock the block at which the pending slasher will take effect + /// @dev It is not possible for the slasher to be the 0 address, which is used to denote if the slasher is not set struct SlasherParams { address slasher; address pendingSlasher; uint32 effectBlock; } - /** - * @notice Struct containing allocation delay metadata for a given operator. - * @param delay Current allocation delay - * @param isSet Whether the operator has initially set an allocation delay. Note that this could be false but the - * block.number >= effectBlock in which we consider their delay to be configured and active. - * @param pendingDelay The delay that will take effect after `effectBlock` - * @param effectBlock The block number after which a pending delay will take effect - */ + /// @notice Struct containing allocation delay metadata for a given operator. + /// @param delay Current allocation delay + /// @param isSet Whether the operator has initially set an allocation delay. Note that this could be false but the + /// block.number >= effectBlock in which we consider their delay to be configured and active. + /// @param pendingDelay The delay that will take effect after `effectBlock` + /// @param effectBlock The block number after which a pending delay will take effect struct AllocationDelayInfo { uint32 delay; bool isSet; @@ -112,36 +105,30 @@ interface IAllocationManagerTypes { uint32 effectBlock; } - /** - * @notice Contains registration details for an operator pertaining to an operator set - * @param registered Whether the operator is currently registered for the operator set - * @param slashableUntil If the operator is not registered, they are still slashable until - * this block is reached. - */ + /// @notice Contains registration details for an operator pertaining to an operator set + /// @param registered Whether the operator is currently registered for the operator set + /// @param slashableUntil If the operator is not registered, they are still slashable until + /// this block is reached. struct RegistrationStatus { bool registered; uint32 slashableUntil; } - /** - * @notice Contains allocation info for a specific strategy - * @param maxMagnitude the maximum magnitude that can be allocated between all operator sets - * @param encumberedMagnitude the currently-allocated magnitude for the strategy - */ + /// @notice Contains allocation info for a specific strategy + /// @param maxMagnitude the maximum magnitude that can be allocated between all operator sets + /// @param encumberedMagnitude the currently-allocated magnitude for the strategy struct StrategyInfo { uint64 maxMagnitude; uint64 encumberedMagnitude; } - /** - * @notice Struct containing parameters to slashing - * @param operator the address to slash - * @param operatorSetId the ID of the operatorSet the operator is being slashed on behalf of - * @param strategies the set of strategies to slash - * @param wadsToSlash the parts in 1e18 to slash, this will be proportional to the operator's - * slashable stake allocation for the operatorSet - * @param description the description of the slashing provided by the AVS for legibility - */ + /// @notice Struct containing parameters to slashing + /// @param operator the address to slash + /// @param operatorSetId the ID of the operatorSet the operator is being slashed on behalf of + /// @param strategies the set of strategies to slash + /// @param wadsToSlash the parts in 1e18 to slash, this will be proportional to the operator's + /// slashable stake allocation for the operatorSet + /// @param description the description of the slashing provided by the AVS for legibility struct SlashingParams { address operator; uint32 operatorSetId; @@ -150,58 +137,48 @@ interface IAllocationManagerTypes { string description; } - /** - * @notice struct used to modify the allocation of slashable magnitude to an operator set - * @param operatorSet the operator set to modify the allocation for - * @param strategies the strategies to modify allocations for - * @param newMagnitudes the new magnitude to allocate for each strategy to this operator set - */ + /// @notice struct used to modify the allocation of slashable magnitude to an operator set + /// @param operatorSet the operator set to modify the allocation for + /// @param strategies the strategies to modify allocations for + /// @param newMagnitudes the new magnitude to allocate for each strategy to this operator set struct AllocateParams { OperatorSet operatorSet; IStrategy[] strategies; uint64[] newMagnitudes; } - /** - * @notice Parameters used to register for an AVS's operator sets - * @param avs the AVS being registered for - * @param operatorSetIds the operator sets within the AVS to register for - * @param data extra data to be passed to the AVS to complete registration - */ + /// @notice Parameters used to register for an AVS's operator sets + /// @param avs the AVS being registered for + /// @param operatorSetIds the operator sets within the AVS to register for + /// @param data extra data to be passed to the AVS to complete registration struct RegisterParams { address avs; uint32[] operatorSetIds; bytes data; } - /** - * @notice Parameters used to deregister from an AVS's operator sets - * @param operator the operator being deregistered - * @param avs the avs being deregistered from - * @param operatorSetIds the operator sets within the AVS being deregistered from - */ + /// @notice Parameters used to deregister from an AVS's operator sets + /// @param operator the operator being deregistered + /// @param avs the avs being deregistered from + /// @param operatorSetIds the operator sets within the AVS being deregistered from struct DeregisterParams { address operator; address avs; uint32[] operatorSetIds; } - /** - * @notice Parameters used by an AVS to create new operator sets - * @param operatorSetId the id of the operator set to create - * @param strategies the strategies to add as slashable to the operator set - * @dev This struct and its associated method will be deprecated in Early Q2 2026 - */ + /// @notice Parameters used by an AVS to create new operator sets + /// @param operatorSetId the id of the operator set to create + /// @param strategies the strategies to add as slashable to the operator set + /// @dev This struct and its associated method will be deprecated in Early Q2 2026 struct CreateSetParams { uint32 operatorSetId; IStrategy[] strategies; } - /** - * @notice Parameters used by an AVS to create new operator sets - * @param operatorSetId the id of the operator set to create - * @param strategies the strategies to add as slashable to the operator set - * @param slasher the address that will be the slasher for the operator set - */ + /// @notice Parameters used by an AVS to create new operator sets + /// @param operatorSetId the id of the operator set to create + /// @param strategies the strategies to add as slashable to the operator set + /// @param slasher the address that will be the slasher for the operator set struct CreateSetParamsV2 { uint32 operatorSetId; @@ -222,7 +199,11 @@ interface IAllocationManagerEvents is IAllocationManagerTypes { /// @notice Emitted when an operator's magnitude is updated for a given operatorSet and strategy event AllocationUpdated( - address operator, OperatorSet operatorSet, IStrategy strategy, uint64 magnitude, uint32 effectBlock + address operator, + OperatorSet operatorSet, + IStrategy strategy, + uint64 magnitude, + uint32 effectBlock ); /// @notice Emitted when operator's encumbered magnitude is updated for a given strategy @@ -234,7 +215,11 @@ interface IAllocationManagerEvents is IAllocationManagerTypes { /// @notice Emitted when an operator is slashed by an operator set for a strategy /// `wadSlashed` is the proportion of the operator's total delegated stake that was slashed event OperatorSlashed( - address operator, OperatorSet operatorSet, IStrategy[] strategies, uint256[] wadSlashed, string description + address operator, + OperatorSet operatorSet, + IStrategy[] strategies, + uint256[] wadSlashed, + string description ); /// @notice Emitted when an AVS configures the address that will handle registration/deregistration @@ -264,497 +249,450 @@ interface IAllocationManagerEvents is IAllocationManagerTypes { } interface IAllocationManagerStorage is IAllocationManagerEvents { - /** - * @notice The DelegationManager contract for EigenLayer - */ + /// @notice The DelegationManager contract for EigenLayer function delegation() external view returns (IDelegationManager); - /** - * @notice The Eigen strategy contract - * @dev Cannot be added to redistributing operator sets - */ + /// @notice The Eigen strategy contract + /// @dev Cannot be added to redistributing operator sets function eigenStrategy() external view returns (IStrategy); - /** - * @notice Returns the number of blocks between an operator deallocating magnitude and the magnitude becoming - * unslashable and then being able to be reallocated to another operator set. Note that unlike the allocation delay - * which is configurable by the operator, the DEALLOCATION_DELAY is globally fixed and cannot be changed. - */ + /// @notice Returns the number of blocks between an operator deallocating magnitude and the magnitude becoming + /// unslashable and then being able to be reallocated to another operator set. Note that unlike the allocation delay + /// which is configurable by the operator, the DEALLOCATION_DELAY is globally fixed and cannot be changed. function DEALLOCATION_DELAY() external view returns (uint32 delay); - /** - * @notice Delay before alloaction delay modifications take effect. - */ + /// @notice Delay before alloaction delay modifications take effect. function ALLOCATION_CONFIGURATION_DELAY() external view returns (uint32); } interface IAllocationManagerActions is IAllocationManagerErrors, IAllocationManagerEvents, IAllocationManagerStorage { - /** - * @dev Initializes the initial owner and paused status. - */ + /// @dev Initializes the initial owner and paused status. function initialize( uint256 initialPausedStatus ) external; - /** - * @notice Called by an AVS to slash an operator in a given operator set. The operator must be registered - * and have slashable stake allocated to the operator set. - * - * @param avs The AVS address initiating the slash. - * @param params The slashing parameters, containing: - * - operator: The operator to slash. - * - operatorSetId: The ID of the operator set the operator is being slashed from. - * - strategies: Array of strategies to slash allocations from (must be in ascending order). - * - wadsToSlash: Array of proportions to slash from each strategy (must be between 0 and 1e18). - * - description: Description of why the operator was slashed. - * - * @return slashId The ID of the slash. - * @return shares The amount of shares that were slashed for each strategy. - * - * @dev For each strategy: - * 1. Reduces the operator's current allocation magnitude by wadToSlash proportion. - * 2. Reduces the strategy's max and encumbered magnitudes proportionally. - * 3. If there is a pending deallocation, reduces it proportionally. - * 4. Updates the operator's shares in the DelegationManager. - * - * @dev Small slashing amounts may not result in actual token burns due to - * rounding, which will result in small amounts of tokens locked in the contract - * rather than fully burning through the burn mechanism. - */ + /// @notice Called by an AVS to slash an operator in a given operator set. The operator must be registered + /// and have slashable stake allocated to the operator set. + /// + /// @param avs The AVS address initiating the slash. + /// @param params The slashing parameters, containing: + /// - operator: The operator to slash. + /// - operatorSetId: The ID of the operator set the operator is being slashed from. + /// - strategies: Array of strategies to slash allocations from (must be in ascending order). + /// - wadsToSlash: Array of proportions to slash from each strategy (must be between 0 and 1e18). + /// - description: Description of why the operator was slashed. + /// + /// @return slashId The ID of the slash. + /// @return shares The amount of shares that were slashed for each strategy. + /// + /// @dev For each strategy: + /// 1. Reduces the operator's current allocation magnitude by wadToSlash proportion. + /// 2. Reduces the strategy's max and encumbered magnitudes proportionally. + /// 3. If there is a pending deallocation, reduces it proportionally. + /// 4. Updates the operator's shares in the DelegationManager. + /// + /// @dev Small slashing amounts may not result in actual token burns due to + /// rounding, which will result in small amounts of tokens locked in the contract + /// rather than fully burning through the burn mechanism. function slashOperator( address avs, SlashingParams calldata params ) external returns (uint256 slashId, uint256[] memory shares); - /** - * @notice Modifies the proportions of slashable stake allocated to an operator set from a list of strategies - * Note that deallocations remain slashable for DEALLOCATION_DELAY blocks therefore when they are cleared they may - * free up less allocatable magnitude than initially deallocated. - * @param operator the operator to modify allocations for - * @param params array of magnitude adjustments for one or more operator sets - * @dev Updates encumberedMagnitude for the updated strategies - */ - function modifyAllocations(address operator, AllocateParams[] calldata params) external; - - /** - * @notice This function takes a list of strategies and for each strategy, removes from the deallocationQueue - * all clearable deallocations up to max `numToClear` number of deallocations, updating the encumberedMagnitude - * of the operator as needed. - * - * @param operator address to clear deallocations for - * @param strategies a list of strategies to clear deallocations for - * @param numToClear a list of number of pending deallocations to clear for each strategy - * - * @dev can be called permissionlessly by anyone - */ + /// @notice Modifies the proportions of slashable stake allocated to an operator set from a list of strategies + /// Note that deallocations remain slashable for DEALLOCATION_DELAY blocks therefore when they are cleared they may + /// free up less allocatable magnitude than initially deallocated. + /// @param operator the operator to modify allocations for + /// @param params array of magnitude adjustments for one or more operator sets + /// @dev Updates encumberedMagnitude for the updated strategies + function modifyAllocations( + address operator, + AllocateParams[] calldata params + ) external; + + /// @notice This function takes a list of strategies and for each strategy, removes from the deallocationQueue + /// all clearable deallocations up to max `numToClear` number of deallocations, updating the encumberedMagnitude + /// of the operator as needed. + /// + /// @param operator address to clear deallocations for + /// @param strategies a list of strategies to clear deallocations for + /// @param numToClear a list of number of pending deallocations to clear for each strategy + /// + /// @dev can be called permissionlessly by anyone function clearDeallocationQueue( address operator, IStrategy[] calldata strategies, uint16[] calldata numToClear ) external; - /** - * @notice Allows an operator to register for one or more operator sets for an AVS. If the operator - * has any stake allocated to these operator sets, it immediately becomes slashable. - * @dev After registering within the ALM, this method calls the AVS Registrar's `IAVSRegistrar. - * registerOperator` method to complete registration. This call MUST succeed in order for - * registration to be successful. - */ - function registerForOperatorSets(address operator, RegisterParams calldata params) external; - - /** - * @notice Allows an operator or AVS to deregister the operator from one or more of the AVS's operator sets. - * If the operator has any slashable stake allocated to the AVS, it remains slashable until the - * DEALLOCATION_DELAY has passed. - * @dev After deregistering within the ALM, this method calls the AVS Registrar's `IAVSRegistrar. - * deregisterOperator` method to complete deregistration. This call MUST succeed in order for - * deregistration to be successful. - */ + /// @notice Allows an operator to register for one or more operator sets for an AVS. If the operator + /// has any stake allocated to these operator sets, it immediately becomes slashable. + /// @dev After registering within the ALM, this method calls the AVS Registrar's `IAVSRegistrar. + /// registerOperator` method to complete registration. This call MUST succeed in order for + /// registration to be successful. + function registerForOperatorSets( + address operator, + RegisterParams calldata params + ) external; + + /// @notice Allows an operator or AVS to deregister the operator from one or more of the AVS's operator sets. + /// If the operator has any slashable stake allocated to the AVS, it remains slashable until the + /// DEALLOCATION_DELAY has passed. + /// @dev After deregistering within the ALM, this method calls the AVS Registrar's `IAVSRegistrar. + /// deregisterOperator` method to complete deregistration. This call MUST succeed in order for + /// deregistration to be successful. function deregisterFromOperatorSets( DeregisterParams calldata params ) external; - /** - * @notice Called by the delegation manager OR an operator to set an operator's allocation delay. - * This is set when the operator first registers, and is the number of blocks between an operator - * allocating magnitude to an operator set, and the magnitude becoming slashable. - * @param operator The operator to set the delay on behalf of. - * @param delay the allocation delay in blocks - * @dev When the delay is set for a newly-registered operator (via the `DelegationManager.registerAsOperator` method), - * the delay will take effect immediately, allowing for operators to allocate slashable stake immediately. - * Else, the delay will take effect after `ALLOCATION_CONFIGURATION_DELAY` blocks. - */ - function setAllocationDelay(address operator, uint32 delay) external; - - /** - * @notice Called by an AVS to configure the address that is called when an operator registers - * or is deregistered from the AVS's operator sets. If not set (or set to 0), defaults - * to the AVS's address. - * @param registrar the new registrar address - */ - function setAVSRegistrar(address avs, IAVSRegistrar registrar) external; - - /** - * @notice Called by an AVS to emit an `AVSMetadataURIUpdated` event indicating the information has updated. - * - * @param metadataURI The URI for metadata associated with an AVS. - * - * @dev Note that the `metadataURI` is *never stored* and is only emitted in the `AVSMetadataURIUpdated` event. - */ - function updateAVSMetadataURI(address avs, string calldata metadataURI) external; - - /** - * @notice Allows an AVS to create new operator sets, defining strategies that the operator set uses - * @dev Upon creation, the address that can slash the operatorSet is the `avs` address. If you would like to use a different address, - * use the `createOperatorSets` method which takes in `CreateSetParamsV2` instead. - * @dev THIS FUNCTION WILL BE DEPRECATED IN EARLY Q2 2026 IN FAVOR OF `createOperatorSets`, WHICH TAKES IN `CreateSetParamsV2` - * @dev Reverts for: - * - NonexistentAVSMetadata: The AVS metadata is not registered - * - InvalidOperatorSet: The operatorSet already exists - * - InputAddressZero: The slasher is the zero address - */ - function createOperatorSets(address avs, CreateSetParams[] calldata params) external; - - /** - * @notice Allows an AVS to create new operator sets, defining strategies that the operator set uses - * @dev Reverts for: - * - NonexistentAVSMetadata: The AVS metadata is not registered - * - InvalidOperatorSet: The operatorSet already exists - * - InputAddressZero: The slasher is the zero address - */ - function createOperatorSets(address avs, CreateSetParamsV2[] calldata params) external; - - /** - * @notice Allows an AVS to create new Redistribution operator sets. - * @param avs The AVS creating the new operator sets. - * @param params An array of operator set creation parameters. - * @param redistributionRecipients An array of addresses that will receive redistributed funds when operators are slashed. - * @dev Same logic as `createOperatorSets`, except `redistributionRecipients` corresponding to each operator set are stored. - * Additionally, emits `RedistributionOperatorSetCreated` event instead of `OperatorSetCreated` for each created operator set. - * @dev The address that can slash the operatorSet is the `avs` address. If you would like to use a different address, - * use the `createOperatorSets` method which takes in `CreateSetParamsV2` instead. - * @dev THIS FUNCTION WILL BE DEPRECATED IN EARLY Q2 2026 IN FAVOR OF `createRedistributingOperatorSets` WHICH TAKES IN `CreateSetParamsV2` - * @dev Reverts for: - * - InputArrayLengthMismatch: The length of the params array does not match the length of the redistributionRecipients array - * - NonexistentAVSMetadata: The AVS metadata is not registered - * - InputAddressZero: The redistribution recipient is the zero address - * - InvalidRedistributionRecipient: The redistribution recipient is the zero address or the default burn address - * - InvalidOperatorSet: The operatorSet already exists - * - InvalidStrategy: The strategy is the BEACONCHAIN_ETH_STRAT or the EIGEN strategy - * - InputAddressZero: The slasher is the zero address - */ + /// @notice Called by the delegation manager OR an operator to set an operator's allocation delay. + /// This is set when the operator first registers, and is the number of blocks between an operator + /// allocating magnitude to an operator set, and the magnitude becoming slashable. + /// @param operator The operator to set the delay on behalf of. + /// @param delay the allocation delay in blocks + /// @dev When the delay is set for a newly-registered operator (via the `DelegationManager.registerAsOperator` method), + /// the delay will take effect immediately, allowing for operators to allocate slashable stake immediately. + /// Else, the delay will take effect after `ALLOCATION_CONFIGURATION_DELAY` blocks. + function setAllocationDelay( + address operator, + uint32 delay + ) external; + + /// @notice Called by an AVS to configure the address that is called when an operator registers + /// or is deregistered from the AVS's operator sets. If not set (or set to 0), defaults + /// to the AVS's address. + /// @param registrar the new registrar address + function setAVSRegistrar( + address avs, + IAVSRegistrar registrar + ) external; + + /// @notice Called by an AVS to emit an `AVSMetadataURIUpdated` event indicating the information has updated. + /// + /// @param metadataURI The URI for metadata associated with an AVS. + /// + /// @dev Note that the `metadataURI` is *never stored* and is only emitted in the `AVSMetadataURIUpdated` event. + function updateAVSMetadataURI( + address avs, + string calldata metadataURI + ) external; + + /// @notice Allows an AVS to create new operator sets, defining strategies that the operator set uses + /// @dev Upon creation, the address that can slash the operatorSet is the `avs` address. If you would like to use a different address, + /// use the `createOperatorSets` method which takes in `CreateSetParamsV2` instead. + /// @dev THIS FUNCTION WILL BE DEPRECATED IN EARLY Q2 2026 IN FAVOR OF `createOperatorSets`, WHICH TAKES IN `CreateSetParamsV2` + /// @dev Reverts for: + /// - NonexistentAVSMetadata: The AVS metadata is not registered + /// - InvalidOperatorSet: The operatorSet already exists + /// - InputAddressZero: The slasher is the zero address + function createOperatorSets( + address avs, + CreateSetParams[] calldata params + ) external; + + /// @notice Allows an AVS to create new operator sets, defining strategies that the operator set uses + /// @dev Reverts for: + /// - NonexistentAVSMetadata: The AVS metadata is not registered + /// - InvalidOperatorSet: The operatorSet already exists + /// - InputAddressZero: The slasher is the zero address + function createOperatorSets( + address avs, + CreateSetParamsV2[] calldata params + ) external; + + /// @notice Allows an AVS to create new Redistribution operator sets. + /// @param avs The AVS creating the new operator sets. + /// @param params An array of operator set creation parameters. + /// @param redistributionRecipients An array of addresses that will receive redistributed funds when operators are slashed. + /// @dev Same logic as `createOperatorSets`, except `redistributionRecipients` corresponding to each operator set are stored. + /// Additionally, emits `RedistributionOperatorSetCreated` event instead of `OperatorSetCreated` for each created operator set. + /// @dev The address that can slash the operatorSet is the `avs` address. If you would like to use a different address, + /// use the `createOperatorSets` method which takes in `CreateSetParamsV2` instead. + /// @dev THIS FUNCTION WILL BE DEPRECATED IN EARLY Q2 2026 IN FAVOR OF `createRedistributingOperatorSets` WHICH TAKES IN `CreateSetParamsV2` + /// @dev Reverts for: + /// - InputArrayLengthMismatch: The length of the params array does not match the length of the redistributionRecipients array + /// - NonexistentAVSMetadata: The AVS metadata is not registered + /// - InputAddressZero: The redistribution recipient is the zero address + /// - InvalidRedistributionRecipient: The redistribution recipient is the zero address or the default burn address + /// - InvalidOperatorSet: The operatorSet already exists + /// - InvalidStrategy: The strategy is the BEACONCHAIN_ETH_STRAT or the EIGEN strategy + /// - InputAddressZero: The slasher is the zero address function createRedistributingOperatorSets( address avs, CreateSetParams[] calldata params, address[] calldata redistributionRecipients ) external; - /** - * @notice Allows an AVS to create new Redistribution operator sets. - * @param avs The AVS creating the new operator sets. - * @param params An array of operator set creation parameters. - * @param redistributionRecipients An array of addresses that will receive redistributed funds when operators are slashed. - * @dev Same logic as `createOperatorSets`, except `redistributionRecipients` corresponding to each operator set are stored. - * Additionally, emits `RedistributionOperatorSetCreated` event instead of `OperatorSetCreated` for each created operator set. - * @dev Reverts for: - * - InputArrayLengthMismatch: The length of the params array does not match the length of the redistributionRecipients array - * - NonexistentAVSMetadata: The AVS metadata is not registered - * - InputAddressZero: The redistribution recipient is the zero address - * - InvalidRedistributionRecipient: The redistribution recipient is the zero address or the default burn address - * - InvalidOperatorSet: The operatorSet already exists - * - InvalidStrategy: The strategy is the BEACONCHAIN_ETH_STRAT or the EIGEN strategy - * - InputAddressZero: The slasher is the zero address - */ + /// @notice Allows an AVS to create new Redistribution operator sets. + /// @param avs The AVS creating the new operator sets. + /// @param params An array of operator set creation parameters. + /// @param redistributionRecipients An array of addresses that will receive redistributed funds when operators are slashed. + /// @dev Same logic as `createOperatorSets`, except `redistributionRecipients` corresponding to each operator set are stored. + /// Additionally, emits `RedistributionOperatorSetCreated` event instead of `OperatorSetCreated` for each created operator set. + /// @dev Reverts for: + /// - InputArrayLengthMismatch: The length of the params array does not match the length of the redistributionRecipients array + /// - NonexistentAVSMetadata: The AVS metadata is not registered + /// - InputAddressZero: The redistribution recipient is the zero address + /// - InvalidRedistributionRecipient: The redistribution recipient is the zero address or the default burn address + /// - InvalidOperatorSet: The operatorSet already exists + /// - InvalidStrategy: The strategy is the BEACONCHAIN_ETH_STRAT or the EIGEN strategy + /// - InputAddressZero: The slasher is the zero address function createRedistributingOperatorSets( address avs, CreateSetParamsV2[] calldata params, address[] calldata redistributionRecipients ) external; - /** - * @notice Allows an AVS to add strategies to an operator set - * @dev Strategies MUST NOT already exist in the operator set - * @dev If the operatorSet is redistributing, the `BEACONCHAIN_ETH_STRAT` may not be added, since redistribution is not supported for native eth - * @param avs the avs to set strategies for - * @param operatorSetId the operator set to add strategies to - * @param strategies the strategies to add - */ - function addStrategiesToOperatorSet(address avs, uint32 operatorSetId, IStrategy[] calldata strategies) external; - - /** - * @notice Allows an AVS to remove strategies from an operator set - * @dev Strategies MUST already exist in the operator set - * @param avs the avs to remove strategies for - * @param operatorSetId the operator set to remove strategies from - * @param strategies the strategies to remove - */ + /// @notice Allows an AVS to add strategies to an operator set + /// @dev Strategies MUST NOT already exist in the operator set + /// @dev If the operatorSet is redistributing, the `BEACONCHAIN_ETH_STRAT` may not be added, since redistribution is not supported for native eth + /// @param avs the avs to set strategies for + /// @param operatorSetId the operator set to add strategies to + /// @param strategies the strategies to add + function addStrategiesToOperatorSet( + address avs, + uint32 operatorSetId, + IStrategy[] calldata strategies + ) external; + + /// @notice Allows an AVS to remove strategies from an operator set + /// @dev Strategies MUST already exist in the operator set + /// @param avs the avs to remove strategies for + /// @param operatorSetId the operator set to remove strategies from + /// @param strategies the strategies to remove function removeStrategiesFromOperatorSet( address avs, uint32 operatorSetId, IStrategy[] calldata strategies ) external; - /** - * @notice Allows an AVS to update the slasher for an operator set - * @param operatorSet the operator set to update the slasher for - * @param slasher the new slasher - * @dev The new slasher will take effect in DEALLOCATION_DELAY blocks - * @dev The slasher can only be updated if it has already been set. The slasher is set either on operatorSet creation or, - * for operatorSets created prior to v1.9.0, via `migrateSlashers` - * @dev Reverts for: - * - InvalidCaller: The caller cannot update the slasher for the operator set (set via the `PermissionController`) - * - InvalidOperatorSet: The operator set does not exist - * - SlasherNotSet: The slasher has not been set yet - * - InputAddressZero: The slasher is the zero address - */ - function updateSlasher(OperatorSet memory operatorSet, address slasher) external; - - /** - * @notice Allows any address to migrate the slasher from the permission controller to the ALM - * @param operatorSets the list of operator sets to migrate the slasher for - * @dev This function is used to migrate the slasher from the permission controller to the ALM for operatorSets created prior to `v1.9.0` - * @dev Migrates based on the following rules: - * - If there is no slasher set or the slasher in the `PermissionController`is the 0 address, the AVS address will be set as the slasher - * - If there are multiple slashers set in the `PermissionController`, the first address will be set as the slasher - * @dev A migration can only be completed once for a given operatorSet - * @dev This function will be deprecated in Early Q2 2026. EigenLabs will migrate the slasher for all operatorSets created prior to `v1.9.0` - * @dev This function does not revert to allow for simpler offchain calling. It will no-op if: - * - The operator set does not exist - * - The slasher has already been set, either via migration or creation of the operatorSet - */ + /// @notice Allows an AVS to update the slasher for an operator set + /// @param operatorSet the operator set to update the slasher for + /// @param slasher the new slasher + /// @dev The new slasher will take effect in DEALLOCATION_DELAY blocks + /// @dev The slasher can only be updated if it has already been set. The slasher is set either on operatorSet creation or, + /// for operatorSets created prior to v1.9.0, via `migrateSlashers` + /// @dev Reverts for: + /// - InvalidCaller: The caller cannot update the slasher for the operator set (set via the `PermissionController`) + /// - InvalidOperatorSet: The operator set does not exist + /// - SlasherNotSet: The slasher has not been set yet + /// - InputAddressZero: The slasher is the zero address + function updateSlasher( + OperatorSet memory operatorSet, + address slasher + ) external; + + /// @notice Allows any address to migrate the slasher from the permission controller to the ALM + /// @param operatorSets the list of operator sets to migrate the slasher for + /// @dev This function is used to migrate the slasher from the permission controller to the ALM for operatorSets created prior to `v1.9.0` + /// @dev Migrates based on the following rules: + /// - If there is no slasher set or the slasher in the `PermissionController`is the 0 address, the AVS address will be set as the slasher + /// - If there are multiple slashers set in the `PermissionController`, the first address will be set as the slasher + /// @dev A migration can only be completed once for a given operatorSet + /// @dev This function will be deprecated in Early Q2 2026. EigenLabs will migrate the slasher for all operatorSets created prior to `v1.9.0` + /// @dev This function does not revert to allow for simpler offchain calling. It will no-op if: + /// - The operator set does not exist + /// - The slasher has already been set, either via migration or creation of the operatorSet function migrateSlashers( OperatorSet[] memory operatorSets ) external; } interface IAllocationManagerView is IAllocationManagerErrors, IAllocationManagerEvents, IAllocationManagerStorage { - /** - * - * VIEW FUNCTIONS - * - */ - - /** - * @notice Returns the number of operator sets for the AVS - * @param avs the AVS to query - */ + /// + /// VIEW FUNCTIONS + /// + /// @notice Returns the number of operator sets for the AVS + /// @param avs the AVS to query function getOperatorSetCount( address avs ) external view returns (uint256); - /** - * @notice Returns the list of operator sets the operator has current or pending allocations/deallocations in - * @param operator the operator to query - * @return the list of operator sets the operator has current or pending allocations/deallocations in - */ + /// @notice Returns the list of operator sets the operator has current or pending allocations/deallocations in + /// @param operator the operator to query + /// @return the list of operator sets the operator has current or pending allocations/deallocations in function getAllocatedSets( address operator ) external view returns (OperatorSet[] memory); - /** - * @notice Returns the list of strategies an operator has current or pending allocations/deallocations from - * given a specific operator set. - * @param operator the operator to query - * @param operatorSet the operator set to query - * @return the list of strategies - */ + /// @notice Returns the list of strategies an operator has current or pending allocations/deallocations from + /// given a specific operator set. + /// @param operator the operator to query + /// @param operatorSet the operator set to query + /// @return the list of strategies function getAllocatedStrategies( address operator, OperatorSet memory operatorSet ) external view returns (IStrategy[] memory); - /** - * @notice Returns the current/pending stake allocation an operator has from a strategy to an operator set - * @param operator the operator to query - * @param operatorSet the operator set to query - * @param strategy the strategy to query - * @return the current/pending stake allocation - */ + /// @notice Returns the current/pending stake allocation an operator has from a strategy to an operator set + /// @param operator the operator to query + /// @param operatorSet the operator set to query + /// @param strategy the strategy to query + /// @return the current/pending stake allocation function getAllocation( address operator, OperatorSet memory operatorSet, IStrategy strategy ) external view returns (Allocation memory); - /** - * @notice Returns the current/pending stake allocations for multiple operators from a strategy to an operator set - * @param operators the operators to query - * @param operatorSet the operator set to query - * @param strategy the strategy to query - * @return each operator's allocation - */ + /// @notice Returns the current/pending stake allocations for multiple operators from a strategy to an operator set + /// @param operators the operators to query + /// @param operatorSet the operator set to query + /// @param strategy the strategy to query + /// @return each operator's allocation function getAllocations( address[] memory operators, OperatorSet memory operatorSet, IStrategy strategy ) external view returns (Allocation[] memory); - /** - * @notice Given a strategy, returns a list of operator sets and corresponding stake allocations. - * @dev Note that this returns a list of ALL operator sets the operator has allocations in. This means - * some of the returned allocations may be zero. - * @param operator the operator to query - * @param strategy the strategy to query - * @return the list of all operator sets the operator has allocations for - * @return the corresponding list of allocations from the specific `strategy` - */ + /// @notice Given a strategy, returns a list of operator sets and corresponding stake allocations. + /// @dev Note that this returns a list of ALL operator sets the operator has allocations in. This means + /// some of the returned allocations may be zero. + /// @param operator the operator to query + /// @param strategy the strategy to query + /// @return the list of all operator sets the operator has allocations for + /// @return the corresponding list of allocations from the specific `strategy` function getStrategyAllocations( address operator, IStrategy strategy ) external view returns (OperatorSet[] memory, Allocation[] memory); - /** - * @notice For a strategy, get the amount of magnitude that is allocated across one or more operator sets - * @param operator the operator to query - * @param strategy the strategy to get allocatable magnitude for - * @return currently allocated magnitude - */ - function getEncumberedMagnitude(address operator, IStrategy strategy) external view returns (uint64); - - /** - * @notice For a strategy, get the amount of magnitude not currently allocated to any operator set - * @param operator the operator to query - * @param strategy the strategy to get allocatable magnitude for - * @return magnitude available to be allocated to an operator set - */ - function getAllocatableMagnitude(address operator, IStrategy strategy) external view returns (uint64); - - /** - * @notice Returns the maximum magnitude an operator can allocate for the given strategy - * @dev The max magnitude of an operator starts at WAD (1e18), and is decreased anytime - * the operator is slashed. This value acts as a cap on the max magnitude of the operator. - * @param operator the operator to query - * @param strategy the strategy to get the max magnitude for - * @return the max magnitude for the strategy - */ - function getMaxMagnitude(address operator, IStrategy strategy) external view returns (uint64); - - /** - * @notice Returns the maximum magnitude an operator can allocate for the given strategies - * @dev The max magnitude of an operator starts at WAD (1e18), and is decreased anytime - * the operator is slashed. This value acts as a cap on the max magnitude of the operator. - * @param operator the operator to query - * @param strategies the strategies to get the max magnitudes for - * @return the max magnitudes for each strategy - */ + /// @notice For a strategy, get the amount of magnitude that is allocated across one or more operator sets + /// @param operator the operator to query + /// @param strategy the strategy to get allocatable magnitude for + /// @return currently allocated magnitude + function getEncumberedMagnitude( + address operator, + IStrategy strategy + ) external view returns (uint64); + + /// @notice For a strategy, get the amount of magnitude not currently allocated to any operator set + /// @param operator the operator to query + /// @param strategy the strategy to get allocatable magnitude for + /// @return magnitude available to be allocated to an operator set + function getAllocatableMagnitude( + address operator, + IStrategy strategy + ) external view returns (uint64); + + /// @notice Returns the maximum magnitude an operator can allocate for the given strategy + /// @dev The max magnitude of an operator starts at WAD (1e18), and is decreased anytime + /// the operator is slashed. This value acts as a cap on the max magnitude of the operator. + /// @param operator the operator to query + /// @param strategy the strategy to get the max magnitude for + /// @return the max magnitude for the strategy + function getMaxMagnitude( + address operator, + IStrategy strategy + ) external view returns (uint64); + + /// @notice Returns the maximum magnitude an operator can allocate for the given strategies + /// @dev The max magnitude of an operator starts at WAD (1e18), and is decreased anytime + /// the operator is slashed. This value acts as a cap on the max magnitude of the operator. + /// @param operator the operator to query + /// @param strategies the strategies to get the max magnitudes for + /// @return the max magnitudes for each strategy function getMaxMagnitudes( address operator, IStrategy[] calldata strategies ) external view returns (uint64[] memory); - /** - * @notice Returns the maximum magnitudes each operator can allocate for the given strategy - * @dev The max magnitude of an operator starts at WAD (1e18), and is decreased anytime - * the operator is slashed. This value acts as a cap on the max magnitude of the operator. - * @param operators the operators to query - * @param strategy the strategy to get the max magnitudes for - * @return the max magnitudes for each operator - */ + /// @notice Returns the maximum magnitudes each operator can allocate for the given strategy + /// @dev The max magnitude of an operator starts at WAD (1e18), and is decreased anytime + /// the operator is slashed. This value acts as a cap on the max magnitude of the operator. + /// @param operators the operators to query + /// @param strategy the strategy to get the max magnitudes for + /// @return the max magnitudes for each operator function getMaxMagnitudes( address[] calldata operators, IStrategy strategy ) external view returns (uint64[] memory); - /** - * @notice Returns the maximum magnitude an operator can allocate for the given strategies - * at a given block number - * @dev The max magnitude of an operator starts at WAD (1e18), and is decreased anytime - * the operator is slashed. This value acts as a cap on the max magnitude of the operator. - * @param operator the operator to query - * @param strategies the strategies to get the max magnitudes for - * @param blockNumber the blockNumber at which to check the max magnitudes - * @return the max magnitudes for each strategy - */ + /// @notice Returns the maximum magnitude an operator can allocate for the given strategies + /// at a given block number + /// @dev The max magnitude of an operator starts at WAD (1e18), and is decreased anytime + /// the operator is slashed. This value acts as a cap on the max magnitude of the operator. + /// @param operator the operator to query + /// @param strategies the strategies to get the max magnitudes for + /// @param blockNumber the blockNumber at which to check the max magnitudes + /// @return the max magnitudes for each strategy function getMaxMagnitudesAtBlock( address operator, IStrategy[] calldata strategies, uint32 blockNumber ) external view returns (uint64[] memory); - /** - * @notice Returns the time in blocks between an operator allocating slashable magnitude - * and the magnitude becoming slashable. If the delay has not been set, `isSet` will be false. - * @dev The operator must have a configured delay before allocating magnitude - * @param operator The operator to query - * @return isSet Whether the operator has configured a delay - * @return delay The time in blocks between allocating magnitude and magnitude becoming slashable - */ + /// @notice Returns the time in blocks between an operator allocating slashable magnitude + /// and the magnitude becoming slashable. If the delay has not been set, `isSet` will be false. + /// @dev The operator must have a configured delay before allocating magnitude + /// @param operator The operator to query + /// @return isSet Whether the operator has configured a delay + /// @return delay The time in blocks between allocating magnitude and magnitude becoming slashable function getAllocationDelay( address operator ) external view returns (bool isSet, uint32 delay); - /** - * @notice Returns a list of all operator sets the operator is registered for - * @param operator The operator address to query. - */ + /// @notice Returns a list of all operator sets the operator is registered for + /// @param operator The operator address to query. function getRegisteredSets( address operator ) external view returns (OperatorSet[] memory operatorSets); - /** - * @notice Returns whether the operator is registered for the operator set - * @param operator The operator to query - * @param operatorSet The operator set to query - */ - function isMemberOfOperatorSet(address operator, OperatorSet memory operatorSet) external view returns (bool); + /// @notice Returns whether the operator is registered for the operator set + /// @param operator The operator to query + /// @param operatorSet The operator set to query + function isMemberOfOperatorSet( + address operator, + OperatorSet memory operatorSet + ) external view returns (bool); - /** - * @notice Returns whether the operator set exists - */ + /// @notice Returns whether the operator set exists function isOperatorSet( OperatorSet memory operatorSet ) external view returns (bool); - /** - * @notice Returns all the operators registered to an operator set - * @param operatorSet The operatorSet to query. - */ + /// @notice Returns all the operators registered to an operator set + /// @param operatorSet The operatorSet to query. function getMembers( OperatorSet memory operatorSet ) external view returns (address[] memory operators); - /** - * @notice Returns the number of operators registered to an operatorSet. - * @param operatorSet The operatorSet to get the member count for - */ + /// @notice Returns the number of operators registered to an operatorSet. + /// @param operatorSet The operatorSet to get the member count for function getMemberCount( OperatorSet memory operatorSet ) external view returns (uint256); - /** - * @notice Returns the address that handles registration/deregistration for the AVS - * If not set, defaults to the input address (`avs`) - */ + /// @notice Returns the address that handles registration/deregistration for the AVS + /// If not set, defaults to the input address (`avs`) function getAVSRegistrar( address avs ) external view returns (IAVSRegistrar); - /** - * @notice Returns an array of strategies in the operatorSet. - * @param operatorSet The operatorSet to query. - */ + /// @notice Returns an array of strategies in the operatorSet. + /// @param operatorSet The operatorSet to query. function getStrategiesInOperatorSet( OperatorSet memory operatorSet ) external view returns (IStrategy[] memory strategies); - /** - * @notice Returns the minimum amount of stake that will be slashable as of some future block, - * according to each operator's allocation from each strategy to the operator set. Note that this function - * will return 0 for the slashable stake if the operator is not slashable at the time of the call. - * @dev This method queries actual delegated stakes in the DelegationManager and applies - * each operator's allocation to the stake to produce the slashable stake each allocation - * represents. This method does not consider slashable stake in the withdrawal queue even though there could be - * slashable stake in the queue. - * @dev This minimum takes into account `futureBlock`, and will omit any pending magnitude - * diffs that will not be in effect as of `futureBlock`. NOTE that in order to get the true - * minimum slashable stake as of some future block, `futureBlock` MUST be greater than block.number - * @dev NOTE that `futureBlock` should be fewer than `DEALLOCATION_DELAY` blocks in the future, - * or the values returned from this method may not be accurate due to deallocations. - * @param operatorSet the operator set to query - * @param operators the list of operators whose slashable stakes will be returned - * @param strategies the strategies that each slashable stake corresponds to - * @param futureBlock the block at which to get allocation information. Should be a future block. - */ + /// @notice Returns the minimum amount of stake that will be slashable as of some future block, + /// according to each operator's allocation from each strategy to the operator set. Note that this function + /// will return 0 for the slashable stake if the operator is not slashable at the time of the call. + /// @dev This method queries actual delegated stakes in the DelegationManager and applies + /// each operator's allocation to the stake to produce the slashable stake each allocation + /// represents. This method does not consider slashable stake in the withdrawal queue even though there could be + /// slashable stake in the queue. + /// @dev This minimum takes into account `futureBlock`, and will omit any pending magnitude + /// diffs that will not be in effect as of `futureBlock`. NOTE that in order to get the true + /// minimum slashable stake as of some future block, `futureBlock` MUST be greater than block.number + /// @dev NOTE that `futureBlock` should be fewer than `DEALLOCATION_DELAY` blocks in the future, + /// or the values returned from this method may not be accurate due to deallocations. + /// @param operatorSet the operator set to query + /// @param operators the list of operators whose slashable stakes will be returned + /// @param strategies the strategies that each slashable stake corresponds to + /// @param futureBlock the block at which to get allocation information. Should be a future block. function getMinimumSlashableStake( OperatorSet memory operatorSet, address[] memory operators, @@ -762,81 +700,68 @@ interface IAllocationManagerView is IAllocationManagerErrors, IAllocationManager uint32 futureBlock ) external view returns (uint256[][] memory slashableStake); - /** - * @notice Returns the current allocated stake, irrespective of the operator's slashable status for the operatorSet. - * @param operatorSet the operator set to query - * @param operators the operators to query - * @param strategies the strategies to query - */ + /// @notice Returns the current allocated stake, irrespective of the operator's slashable status for the operatorSet. + /// @param operatorSet the operator set to query + /// @param operators the operators to query + /// @param strategies the strategies to query function getAllocatedStake( OperatorSet memory operatorSet, address[] memory operators, IStrategy[] memory strategies ) external view returns (uint256[][] memory slashableStake); - /** - * @notice Returns whether an operator is slashable by an operator set. - * This returns true if the operator is registered or their slashableUntil block has not passed. - * This is because even when operators are deregistered, they still remain slashable for a period of time. - * @param operator the operator to check slashability for - * @param operatorSet the operator set to check slashability for - */ - function isOperatorSlashable(address operator, OperatorSet memory operatorSet) external view returns (bool); - - /** - * @notice Returns the address that can slash a given operator set. - * @param operatorSet The operator set to query. - * @return The address that can slash the operator set. - * @dev If there is a pending slasher that can be applied after the `effectBlock`, the pending slasher will be returned. - */ + /// @notice Returns whether an operator is slashable by an operator set. + /// This returns true if the operator is registered or their slashableUntil block has not passed. + /// This is because even when operators are deregistered, they still remain slashable for a period of time. + /// @param operator the operator to check slashability for + /// @param operatorSet the operator set to check slashability for + function isOperatorSlashable( + address operator, + OperatorSet memory operatorSet + ) external view returns (bool); + + /// @notice Returns the address that can slash a given operator set. + /// @param operatorSet The operator set to query. + /// @return The address that can slash the operator set. + /// @dev If there is a pending slasher that can be applied after the `effectBlock`, the pending slasher will be returned. function getSlasher( OperatorSet memory operatorSet ) external view returns (address); - /** - * @notice Returns pending slasher for a given operator set. - * @param operatorSet The operator set to query. - * @return pendingSlasher The pending slasher for the operator set. This value is 0 if there is no pending slasher. - * @return effectBlock The block at which the pending slasher will take effect. This value is 0 if there is no pending slasher. - */ + /// @notice Returns pending slasher for a given operator set. + /// @param operatorSet The operator set to query. + /// @return pendingSlasher The pending slasher for the operator set. This value is 0 if there is no pending slasher. + /// @return effectBlock The block at which the pending slasher will take effect. This value is 0 if there is no pending slasher. function getPendingSlasher( OperatorSet memory operatorSet ) external view returns (address pendingSlasher, uint32 effectBlock); - /** - * @notice Returns the address where slashed funds will be sent for a given operator set. - * @param operatorSet The Operator Set to query. - * @return For redistributing Operator Sets, returns the configured redistribution address set during Operator Set creation. - * For non-redistributing operator sets, returns the `DEFAULT_BURN_ADDRESS`. - */ + /// @notice Returns the address where slashed funds will be sent for a given operator set. + /// @param operatorSet The Operator Set to query. + /// @return For redistributing Operator Sets, returns the configured redistribution address set during Operator Set creation. + /// For non-redistributing operator sets, returns the `DEFAULT_BURN_ADDRESS`. function getRedistributionRecipient( OperatorSet memory operatorSet ) external view returns (address); - /** - * @notice Returns whether a given operator set supports redistribution - * or not when funds are slashed and burned from EigenLayer. - * @param operatorSet The Operator Set to query. - * @return For redistributing Operator Sets, returns true. - * For non-redistributing Operator Sets, returns false. - */ + /// @notice Returns whether a given operator set supports redistribution + /// or not when funds are slashed and burned from EigenLayer. + /// @param operatorSet The Operator Set to query. + /// @return For redistributing Operator Sets, returns true. + /// For non-redistributing Operator Sets, returns false. function isRedistributingOperatorSet( OperatorSet memory operatorSet ) external view returns (bool); - /** - * @notice Returns the number of slashes for a given operator set. - * @param operatorSet The operator set to query. - * @return The number of slashes for the operator set. - */ + /// @notice Returns the number of slashes for a given operator set. + /// @param operatorSet The operator set to query. + /// @return The number of slashes for the operator set. function getSlashCount( OperatorSet memory operatorSet ) external view returns (uint256); - /** - * @notice Returns whether an operator is slashable by a redistributing operator set. - * @param operator The operator to query. - */ + /// @notice Returns whether an operator is slashable by a redistributing operator set. + /// @param operator The operator to query. function isOperatorRedistributable( address operator ) external view returns (bool); diff --git a/src/contracts/interfaces/IBN254CertificateVerifier.sol b/src/contracts/interfaces/IBN254CertificateVerifier.sol index 64109483b1..aa40279b8c 100644 --- a/src/contracts/interfaces/IBN254CertificateVerifier.sol +++ b/src/contracts/interfaces/IBN254CertificateVerifier.sol @@ -7,33 +7,29 @@ import "./IOperatorTableCalculator.sol"; import "./IBaseCertificateVerifier.sol"; interface IBN254CertificateVerifierTypes is IOperatorTableCalculatorTypes { - /** - * @notice A witness for an operator, used to identify the non-signers for a given certificate - * @param operatorIndex the index of the nonsigner in the `BN254OperatorInfo` tree - * @param operatorInfoProofs merkle proof of the nonsigner at the index. - * Leave empty if the non-signing operator is already stored from a previous verification at the same `referenceTimestamp` - * @param operatorInfo the `BN254OperatorInfo` for the operator. - * Leave empty if the non-signing operator is already stored from a previous verification at the same `referenceTimestamp` - * @dev Non-signing operators are stored in the `BN254CertificateVerifier` upon the first successful certificate verification that includes a merkle proof for the non-signing operator. - * This is done to avoid the need to provide proofs for non-signing operators for each certificate with the same `referenceTimestamp` - */ + /// @notice A witness for an operator, used to identify the non-signers for a given certificate + /// @param operatorIndex the index of the nonsigner in the `BN254OperatorInfo` tree + /// @param operatorInfoProofs merkle proof of the nonsigner at the index. + /// Leave empty if the non-signing operator is already stored from a previous verification at the same `referenceTimestamp` + /// @param operatorInfo the `BN254OperatorInfo` for the operator. + /// Leave empty if the non-signing operator is already stored from a previous verification at the same `referenceTimestamp` + /// @dev Non-signing operators are stored in the `BN254CertificateVerifier` upon the first successful certificate verification that includes a merkle proof for the non-signing operator. + /// This is done to avoid the need to provide proofs for non-signing operators for each certificate with the same `referenceTimestamp` struct BN254OperatorInfoWitness { uint32 operatorIndex; bytes operatorInfoProof; BN254OperatorInfo operatorInfo; } - /** - * @notice A BN254 Certificate - * @param referenceTimestamp a reference timestamp that corresponds to a timestamp at which an operator table was updated for the operatorSet. - * @param messageHash the hash of a task that was completed by operators. The messageHash is defined by the AVS, see `TaskMailbox.sol` for an example implementation. - * NOTE: This value is NOT the message that is signed by operators - see `calculateCertificateDigest` for the signable digest. - * @param signature the G1 signature of the message. The signature is over the signable digest, which is calculated by `calculateCertificateDigest` - * @param apk the G2 aggregate public key - * @param nonSignerWitnesses an array of witnesses of non-signing operators - * @dev Non-signer witnesses MUST be strictly increasing by `operatorIndex` - * @dev The `referenceTimestamp` is used to key into the operatorSet's stake weights. It is NOT the timestamp at which the certificate was generated off-chain - */ + /// @notice A BN254 Certificate + /// @param referenceTimestamp a reference timestamp that corresponds to a timestamp at which an operator table was updated for the operatorSet. + /// @param messageHash the hash of a task that was completed by operators. The messageHash is defined by the AVS, see `TaskMailbox.sol` for an example implementation. + /// NOTE: This value is NOT the message that is signed by operators - see `calculateCertificateDigest` for the signable digest. + /// @param signature the G1 signature of the message. The signature is over the signable digest, which is calculated by `calculateCertificateDigest` + /// @param apk the G2 aggregate public key + /// @param nonSignerWitnesses an array of witnesses of non-signing operators + /// @dev Non-signer witnesses MUST be strictly increasing by `operatorIndex` + /// @dev The `referenceTimestamp` is used to key into the operatorSet's stake weights. It is NOT the timestamp at which the certificate was generated off-chain struct BN254Certificate { uint32 referenceTimestamp; bytes32 messageHash; @@ -95,23 +91,20 @@ interface IBN254CertificateVerifier is /// a. An in-flight certificate for a past reference timestamp and an operator table update for a newer reference timestamp. The AVS should decide whether it /// wants to only confirm tasks against the *latest* certificate /// b. An in-flight certificate against a stake table with a majority-stake operator that has been slashed or removed from the operatorSet - - /** - * @notice updates the operatorSet with the operator table (i.e. stake weights) and its configuration - * @param operatorSet the operatorSet to update the operator table for - * @param referenceTimestamp the timestamp at which the operatorSetInfo (i.e. operator table) was sourced - * @param operatorSetInfo the operator table for this operatorSet. This includes the `totalWeights`, `operatorInfoTreeRoot`, `aggregatePubkey`, and `numOperators`. - * See `IOperatorTableCalculator.BN254OperatorSetInfo` for more details - * @param operatorSetConfig the configuration of the operatorSet, which includes the owner and max staleness period - * @dev This function can only be called by the `OperatorTableUpdater` contract, which is itself permissionless to call - * @dev The `referenceTimestamp` must correspond to a reference timestamp for a globalTableRoot stored in the `OperatorTableUpdater` - * In addition, it must be greater than the latest reference timestamp for the given operatorSet - * @dev Reverts for: - * - OnlyTableUpdater: Caller is not the authorized OperatorTableUpdater - * - TableUpdateStale: referenceTimestamp is not greater than the latest reference timestamp - * @dev Emits the following events: - * - TableUpdated: When operator table is successfully updated - */ + /// @notice updates the operatorSet with the operator table (i.e. stake weights) and its configuration + /// @param operatorSet the operatorSet to update the operator table for + /// @param referenceTimestamp the timestamp at which the operatorSetInfo (i.e. operator table) was sourced + /// @param operatorSetInfo the operator table for this operatorSet. This includes the `totalWeights`, `operatorInfoTreeRoot`, `aggregatePubkey`, and `numOperators`. + /// See `IOperatorTableCalculator.BN254OperatorSetInfo` for more details + /// @param operatorSetConfig the configuration of the operatorSet, which includes the owner and max staleness period + /// @dev This function can only be called by the `OperatorTableUpdater` contract, which is itself permissionless to call + /// @dev The `referenceTimestamp` must correspond to a reference timestamp for a globalTableRoot stored in the `OperatorTableUpdater` + /// In addition, it must be greater than the latest reference timestamp for the given operatorSet + /// @dev Reverts for: + /// - OnlyTableUpdater: Caller is not the authorized OperatorTableUpdater + /// - TableUpdateStale: referenceTimestamp is not greater than the latest reference timestamp + /// @dev Emits the following events: + /// - TableUpdated: When operator table is successfully updated function updateOperatorTable( OperatorSet calldata operatorSet, uint32 referenceTimestamp, @@ -119,105 +112,97 @@ interface IBN254CertificateVerifier is OperatorSetConfig calldata operatorSetConfig ) external; - /** - * @notice verifies a certificate against the operator table for a given reference timestamp - * @param operatorSet the operatorSet that the certificate is for - * @param cert a certificate - * @return totalSignedStakeWeights total stake weight that signed the certificate for each stake type. Each - * index corresponds to a stake type in the `weights` array in the `BN254OperatorSetInfo` struct - * @dev The `referenceTimestamp` in the `BN254Certificate` is used to determine the operator table to use for the verification - * @dev AVS' are responsible for managing potential race conditions when certificates are signed close to operator table updates. Some examples include: - * a. An in-flight certificate for a past reference timestamp and an operator table update for a newer reference timestamp. The AVS should decide whether it - * wants to only confirm tasks against the *latest* certificate - * b. An in-flight certificate against a stake table with a majority-stake operator that has been slashed or removed from the operatorSet - * @dev Reverts if the certificate's `referenceTimestamp` is too stale with respect to the `maxStalenessPeriod` of the operatorSet - * @dev This function is *non-view* because it caches non-signing operator info upon a successful certificate verification. See `getNonsignerOperatorInfo` for more details - * @dev Reverts for: - * - CertificateStale: Certificate referenceTimestamp is too stale per maxStalenessPeriod - * - ReferenceTimestampDoesNotExist: No operator table exists for the referenceTimestamp - * - RootDisabled: The global table root for this timestamp has been disabled - * - InvalidOperatorIndex: Operator index provided in nonSigner witness is invalid - * - NonSignerIndicesNotSorted: Non-signer witnesses are not strictly increasing by operatorIndex - * - VerificationFailed: Merkle proof verification failed or BLS signature verification failed - */ + /// @notice verifies a certificate against the operator table for a given reference timestamp + /// @param operatorSet the operatorSet that the certificate is for + /// @param cert a certificate + /// @return totalSignedStakeWeights total stake weight that signed the certificate for each stake type. Each + /// index corresponds to a stake type in the `weights` array in the `BN254OperatorSetInfo` struct + /// @dev The `referenceTimestamp` in the `BN254Certificate` is used to determine the operator table to use for the verification + /// @dev AVS' are responsible for managing potential race conditions when certificates are signed close to operator table updates. Some examples include: + /// a. An in-flight certificate for a past reference timestamp and an operator table update for a newer reference timestamp. The AVS should decide whether it + /// wants to only confirm tasks against the *latest* certificate + /// b. An in-flight certificate against a stake table with a majority-stake operator that has been slashed or removed from the operatorSet + /// @dev Reverts if the certificate's `referenceTimestamp` is too stale with respect to the `maxStalenessPeriod` of the operatorSet + /// @dev This function is *non-view* because it caches non-signing operator info upon a successful certificate verification. See `getNonsignerOperatorInfo` for more details + /// @dev Reverts for: + /// - CertificateStale: Certificate referenceTimestamp is too stale per maxStalenessPeriod + /// - ReferenceTimestampDoesNotExist: No operator table exists for the referenceTimestamp + /// - RootDisabled: The global table root for this timestamp has been disabled + /// - InvalidOperatorIndex: Operator index provided in nonSigner witness is invalid + /// - NonSignerIndicesNotSorted: Non-signer witnesses are not strictly increasing by operatorIndex + /// - VerificationFailed: Merkle proof verification failed or BLS signature verification failed function verifyCertificate( OperatorSet memory operatorSet, BN254Certificate memory cert ) external returns (uint256[] memory totalSignedStakeWeights); - /** - * @notice verifies a certificate and makes sure that the signed stakes meet - * provided portions of the total stake weight on the AVS - * @param operatorSet the operatorSet that the certificate is for - * @param cert the certificate - * @param totalStakeProportionThresholds the proportion, in BPS, of total stake weight that - * the signed stake of the certificate should meet. Each index corresponds to - * a stake type in the `totalWeights` array in the `BN254OperatorSetInfo` - * @return Whether or not certificate is valid and meets proportion thresholds - * @dev The `referenceTimestamp` in the `BN254Certificate` is used to determine the operator table to use for the verification - * @dev AVS' are responsible for managing potential race conditions when certificates are signed close to operator table updates. Some examples include: - * a. An in-flight certificate for a past reference timestamp and an operator table update for a newer reference timestamp. The AVS should decide whether it - * wants to only confirm tasks against the *latest* certificate - * b. An in-flight certificate against a stake table with a majority-stake operator that has been slashed or removed from the operatorSet - * @dev Reverts if the certificate's `referenceTimestamp` is too stale with respect to the `maxStalenessPeriod` of the operatorSet - * @dev This function is *non-view* because it caches non-signing operator info upon a successful certificate verification. See `getNonsignerOperatorInfo` for more details - * @dev Reverts for: - * - CertificateStale: Certificate referenceTimestamp is too stale per maxStalenessPeriod - * - ReferenceTimestampDoesNotExist: No operator table exists for the referenceTimestamp - * - RootDisabled: The global table root for this timestamp has been disabled - * - InvalidOperatorIndex: Operator index provided in nonSigner witness is invalid - * - NonSignerIndicesNotSorted: Non-signer witnesses are not strictly increasing by operatorIndex - * - VerificationFailed: Merkle proof verification failed or BLS signature verification failed - * - ArrayLengthMismatch: signedStakes length does not equal totalStakeProportionThresholds length - */ + /// @notice verifies a certificate and makes sure that the signed stakes meet + /// provided portions of the total stake weight on the AVS + /// @param operatorSet the operatorSet that the certificate is for + /// @param cert the certificate + /// @param totalStakeProportionThresholds the proportion, in BPS, of total stake weight that + /// the signed stake of the certificate should meet. Each index corresponds to + /// a stake type in the `totalWeights` array in the `BN254OperatorSetInfo` + /// @return Whether or not certificate is valid and meets proportion thresholds + /// @dev The `referenceTimestamp` in the `BN254Certificate` is used to determine the operator table to use for the verification + /// @dev AVS' are responsible for managing potential race conditions when certificates are signed close to operator table updates. Some examples include: + /// a. An in-flight certificate for a past reference timestamp and an operator table update for a newer reference timestamp. The AVS should decide whether it + /// wants to only confirm tasks against the *latest* certificate + /// b. An in-flight certificate against a stake table with a majority-stake operator that has been slashed or removed from the operatorSet + /// @dev Reverts if the certificate's `referenceTimestamp` is too stale with respect to the `maxStalenessPeriod` of the operatorSet + /// @dev This function is *non-view* because it caches non-signing operator info upon a successful certificate verification. See `getNonsignerOperatorInfo` for more details + /// @dev Reverts for: + /// - CertificateStale: Certificate referenceTimestamp is too stale per maxStalenessPeriod + /// - ReferenceTimestampDoesNotExist: No operator table exists for the referenceTimestamp + /// - RootDisabled: The global table root for this timestamp has been disabled + /// - InvalidOperatorIndex: Operator index provided in nonSigner witness is invalid + /// - NonSignerIndicesNotSorted: Non-signer witnesses are not strictly increasing by operatorIndex + /// - VerificationFailed: Merkle proof verification failed or BLS signature verification failed + /// - ArrayLengthMismatch: signedStakes length does not equal totalStakeProportionThresholds length function verifyCertificateProportion( OperatorSet memory operatorSet, BN254Certificate memory cert, uint16[] memory totalStakeProportionThresholds ) external returns (bool); - /** - * @notice verifies a certificate and makes sure that the signed stakes meet - * provided nominal stake thresholds - * @param operatorSet the operatorSet that the certificate is for - * @param cert the certificate - * @param totalStakeNominalThresholds the nominal amount of stake that - * the signed stake of the certificate should meet. Each index corresponds to - * a stake type in the `totalWeights` array in the `BN254OperatorSetInfo` - * @return Whether or not certificate is valid and meets nominal thresholds - * @dev The `referenceTimestamp` in the `BN254Certificate` is used to determine the operator table to use for the verification - * @dev AVS' are responsible for managing potential race conditions when certificates are signed close to operator table updates. Some examples include: - * a. An in-flight certificate for a past reference timestamp and an operator table update for a newer reference timestamp. The AVS should decide whether it - * wants to only confirm tasks against the *latest* certificate - * b. An in-flight certificate against a stake table with a majority-stake operator that has been slashed or removed from the operatorSet - * @dev Reverts if the certificate's `referenceTimestamp` is too stale with respect to the `maxStalenessPeriod` of the operatorSet - * @dev This function is *non-view* because it caches non-signing operator info upon a successful certificate verification. See `getNonsignerOperatorInfo` for more details - * @dev Reverts for: - * - CertificateStale: Certificate referenceTimestamp is too stale per maxStalenessPeriod - * - ReferenceTimestampDoesNotExist: No operator table exists for the referenceTimestamp - * - RootDisabled: The global table root for this timestamp has been disabled - * - InvalidOperatorIndex: Operator index provided in nonSigner witness is invalid - * - NonSignerIndicesNotSorted: Non-signer witnesses are not strictly increasing by operatorIndex - * - VerificationFailed: Merkle proof verification failed or BLS signature verification failed - * - ArrayLengthMismatch: signedStakes length does not equal totalStakeNominalThresholds length - */ + /// @notice verifies a certificate and makes sure that the signed stakes meet + /// provided nominal stake thresholds + /// @param operatorSet the operatorSet that the certificate is for + /// @param cert the certificate + /// @param totalStakeNominalThresholds the nominal amount of stake that + /// the signed stake of the certificate should meet. Each index corresponds to + /// a stake type in the `totalWeights` array in the `BN254OperatorSetInfo` + /// @return Whether or not certificate is valid and meets nominal thresholds + /// @dev The `referenceTimestamp` in the `BN254Certificate` is used to determine the operator table to use for the verification + /// @dev AVS' are responsible for managing potential race conditions when certificates are signed close to operator table updates. Some examples include: + /// a. An in-flight certificate for a past reference timestamp and an operator table update for a newer reference timestamp. The AVS should decide whether it + /// wants to only confirm tasks against the *latest* certificate + /// b. An in-flight certificate against a stake table with a majority-stake operator that has been slashed or removed from the operatorSet + /// @dev Reverts if the certificate's `referenceTimestamp` is too stale with respect to the `maxStalenessPeriod` of the operatorSet + /// @dev This function is *non-view* because it caches non-signing operator info upon a successful certificate verification. See `getNonsignerOperatorInfo` for more details + /// @dev Reverts for: + /// - CertificateStale: Certificate referenceTimestamp is too stale per maxStalenessPeriod + /// - ReferenceTimestampDoesNotExist: No operator table exists for the referenceTimestamp + /// - RootDisabled: The global table root for this timestamp has been disabled + /// - InvalidOperatorIndex: Operator index provided in nonSigner witness is invalid + /// - NonSignerIndicesNotSorted: Non-signer witnesses are not strictly increasing by operatorIndex + /// - VerificationFailed: Merkle proof verification failed or BLS signature verification failed + /// - ArrayLengthMismatch: signedStakes length does not equal totalStakeNominalThresholds length function verifyCertificateNominal( OperatorSet memory operatorSet, BN254Certificate memory cert, uint256[] memory totalStakeNominalThresholds ) external returns (bool); - /** - * @notice Convenience function to attempt signature verification with gas limit for safety - * @param msgHash The message hash that was signed - * @param aggPubkey The aggregate public key of signers - * @param apkG2 The G2 point representation of the aggregate public key - * @param signature The BLS signature to verify - * @return pairingSuccessful Whether the pairing operation completed successfully - * @return signatureValid Whether the signature is valid - * @dev This function should be used off-chain to validate a signature. Careful consideration should be taken - * when parsing `pairingSuccessful` and `signatureValid`. Refer to our internal usage of this function - */ + /// @notice Convenience function to attempt signature verification with gas limit for safety + /// @param msgHash The message hash that was signed + /// @param aggPubkey The aggregate public key of signers + /// @param apkG2 The G2 point representation of the aggregate public key + /// @param signature The BLS signature to verify + /// @return pairingSuccessful Whether the pairing operation completed successfully + /// @return signatureValid Whether the signature is valid + /// @dev This function should be used off-chain to validate a signature. Careful consideration should be taken + /// when parsing `pairingSuccessful` and `signatureValid`. Refer to our internal usage of this function function trySignatureVerification( bytes32 msgHash, BN254.G1Point memory aggPubkey, @@ -225,71 +210,63 @@ interface IBN254CertificateVerifier is BN254.G1Point memory signature ) external view returns (bool pairingSuccessful, bool signatureValid); - /** - * @notice Get cached nonsigner operator info - * @param operatorSet The operatorSet - * @param referenceTimestamp The reference timestamp - * @param operatorIndex The operator index - * @return The cached operator info, empty if the operator is not in the cache - * @dev The non-signing operatorInfo is stored upon a successful certificate verification. Once cached, - * merkle proofs for non-signing operators do not need to be passed in as part of the `BN254Certificate` for a given reference timestamp - * @dev Non-signing operators are stored on the `operatorInfoTreeRoot` that is transported in the `BN254OperatorSetInfo` struct on an operator table update - * @dev The tree structure of the `operatorInfoTreeRoot` is as follows. (Below is a tree of height 2 -- in practice, each tree will have a height appropriate for the total number of leaves.) - * ``` - * OperatorInfoTreeRoot - * | - * ┌──────┴──────┐ - * │ │ - * Internal Node Internal Node - * (0-1) (2-3) - * │ │ - * ┌─────┴─────┐ ┌───┴───┐ - * │ │ │ │ - * Leaf 0 Leaf 1 Leaf 2 Leaf 3 - * BN254OperatorInfo #1 #2 #3 - * #0 - * ``` - */ + /// @notice Get cached nonsigner operator info + /// @param operatorSet The operatorSet + /// @param referenceTimestamp The reference timestamp + /// @param operatorIndex The operator index + /// @return The cached operator info, empty if the operator is not in the cache + /// @dev The non-signing operatorInfo is stored upon a successful certificate verification. Once cached, + /// merkle proofs for non-signing operators do not need to be passed in as part of the `BN254Certificate` for a given reference timestamp + /// @dev Non-signing operators are stored on the `operatorInfoTreeRoot` that is transported in the `BN254OperatorSetInfo` struct on an operator table update + /// @dev The tree structure of the `operatorInfoTreeRoot` is as follows. (Below is a tree of height 2 -- in practice, each tree will have a height appropriate for the total number of leaves.) + /// ``` + /// OperatorInfoTreeRoot + /// | + /// ┌──────┴──────┐ + /// │ │ + /// Internal Node Internal Node + /// (0-1) (2-3) + /// │ │ + /// ┌─────┴─────┐ ┌───┴───┐ + /// │ │ │ │ + /// Leaf 0 Leaf 1 Leaf 2 Leaf 3 + /// BN254OperatorInfo #1 #2 #3 + /// #0 + /// ``` function getNonsignerOperatorInfo( OperatorSet memory operatorSet, uint32 referenceTimestamp, uint256 operatorIndex ) external view returns (BN254OperatorInfo memory); - /** - * @notice Check if a nonsigner is cached - * @param operatorSet The operator set - * @param referenceTimestamp The reference timestamp - * @param operatorIndex The operator index - * @return Whether the operator is cached - * @dev The non-signing operatorInfo is stored upon a successful certificate verification. Once cached, - * merkle proofs for non-signing operators do not need to be passed in as part of the `BN254Certificate` for a given reference timestamp - */ + /// @notice Check if a nonsigner is cached + /// @param operatorSet The operator set + /// @param referenceTimestamp The reference timestamp + /// @param operatorIndex The operator index + /// @return Whether the operator is cached + /// @dev The non-signing operatorInfo is stored upon a successful certificate verification. Once cached, + /// merkle proofs for non-signing operators do not need to be passed in as part of the `BN254Certificate` for a given reference timestamp function isNonsignerCached( OperatorSet memory operatorSet, uint32 referenceTimestamp, uint256 operatorIndex ) external view returns (bool); - /** - * @notice Get operator set info for a timestamp - * @param operatorSet The operator set - * @param referenceTimestamp The reference timestamp - * @return The operator set info, empty if the operatorSet has not been updated for the given reference timestamp - */ + /// @notice Get operator set info for a timestamp + /// @param operatorSet The operator set + /// @param referenceTimestamp The reference timestamp + /// @return The operator set info, empty if the operatorSet has not been updated for the given reference timestamp function getOperatorSetInfo( OperatorSet memory operatorSet, uint32 referenceTimestamp ) external view returns (BN254OperatorSetInfo memory); - /** - * @notice Calculate the digest for a certificate, which must be signed over by operators who complete a task - * @param referenceTimestamp The reference timestamp - * @param messageHash The message hash of the task - * @return The digest - * @dev This is a chain-agnostic digest, so it can be used to verify certificates across - * multiple destination chains - */ + /// @notice Calculate the digest for a certificate, which must be signed over by operators who complete a task + /// @param referenceTimestamp The reference timestamp + /// @param messageHash The message hash of the task + /// @return The digest + /// @dev This is a chain-agnostic digest, so it can be used to verify certificates across + /// multiple destination chains function calculateCertificateDigest( uint32 referenceTimestamp, bytes32 messageHash diff --git a/src/contracts/interfaces/IBackingEigen.sol b/src/contracts/interfaces/IBackingEigen.sol index c8e031bd6c..682f6f82f3 100644 --- a/src/contracts/interfaces/IBackingEigen.sol +++ b/src/contracts/interfaces/IBackingEigen.sol @@ -4,46 +4,46 @@ pragma solidity >=0.5.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IBackingEigen is IERC20 { - /** - * @notice This function allows the owner to set the allowedFrom status of an address - * @param from the address whose allowedFrom status is being set - * @param isAllowedFrom the new allowedFrom status - */ - function setAllowedFrom(address from, bool isAllowedFrom) external; + /// @notice This function allows the owner to set the allowedFrom status of an address + /// @param from the address whose allowedFrom status is being set + /// @param isAllowedFrom the new allowedFrom status + function setAllowedFrom( + address from, + bool isAllowedFrom + ) external; - /** - * @notice This function allows the owner to set the allowedTo status of an address - * @param to the address whose allowedTo status is being set - * @param isAllowedTo the new allowedTo status - */ - function setAllowedTo(address to, bool isAllowedTo) external; + /// @notice This function allows the owner to set the allowedTo status of an address + /// @param to the address whose allowedTo status is being set + /// @param isAllowedTo the new allowedTo status + function setAllowedTo( + address to, + bool isAllowedTo + ) external; - /** - * @notice Allows the owner to disable transfer restrictions - */ + /// @notice Allows the owner to disable transfer restrictions function disableTransferRestrictions() external; - /** - * @notice An initializer function that sets initial values for the contract's state variables. - */ + /// @notice An initializer function that sets initial values for the contract's state variables. function initialize( address initialOwner ) external; // @notice Allows the contract owner to modify an entry in the `isMinter` mapping. - function setIsMinter(address minterAddress, bool newStatus) external; + function setIsMinter( + address minterAddress, + bool newStatus + ) external; - /** - * @notice Allows any privileged address to mint `amount` new tokens to the address `to`. - * @dev Callable only by an address that has `isMinter` set to true. - */ - function mint(address to, uint256 amount) external; + /// @notice Allows any privileged address to mint `amount` new tokens to the address `to`. + /// @dev Callable only by an address that has `isMinter` set to true. + function mint( + address to, + uint256 amount + ) external; - /** - * @dev Destroys `amount` tokens from the caller. - * - * See {ERC20-_burn}. - */ + /// @dev Destroys `amount` tokens from the caller. + /// + /// See {ERC20-_burn}. function burn( uint256 amount ) external; @@ -54,16 +54,12 @@ interface IBackingEigen is IERC20 { /// @notice the timestamp after which transfer restrictions are disabled function transferRestrictionsDisabledAfter() external view returns (uint256); - /** - * @dev Clock used for flagging checkpoints. Has been overridden to implement timestamp based - * checkpoints (and voting). - */ + /// @dev Clock used for flagging checkpoints. Has been overridden to implement timestamp based + /// checkpoints (and voting). function clock() external view returns (uint48); - /** - * @dev Machine-readable description of the clock as specified in EIP-6372. - * Has been overridden to inform callers that this contract uses timestamps instead of block numbers, to match `clock()` - */ + /// @dev Machine-readable description of the clock as specified in EIP-6372. + /// Has been overridden to inform callers that this contract uses timestamps instead of block numbers, to match `clock()` // solhint-disable-next-line func-name-mixedcase function CLOCK_MODE() external pure returns (string memory); } diff --git a/src/contracts/interfaces/IBaseCertificateVerifier.sol b/src/contracts/interfaces/IBaseCertificateVerifier.sol index 23837a3098..9aff49ef72 100644 --- a/src/contracts/interfaces/IBaseCertificateVerifier.sol +++ b/src/contracts/interfaces/IBaseCertificateVerifier.sol @@ -79,81 +79,68 @@ interface IBaseCertificateVerifier is /// a. An in-flight certificate for a past reference timestamp and an operator table update for a newer reference timestamp. The AVS should decide whether it /// wants to only confirm tasks against the *latest* certificate /// b. An in-flight certificate against a stake table with a majority-stake operator that has been slashed or removed from the operatorSet - - /** - * @notice The address of the owner of the operatorSet - * @param operatorSet The operatorSet to get the owner of - * @return The owner - * @dev The owner of the OperatorSet is not used by this contract, but can be used by periphery contracts - * to gate access control for on-chain operations - * @dev This value is set by the AVS in the `CrossChainRegistry` and transported by the multichain protocol when the operator table is updated - */ + /// @notice The address of the owner of the operatorSet + /// @param operatorSet The operatorSet to get the owner of + /// @return The owner + /// @dev The owner of the OperatorSet is not used by this contract, but can be used by periphery contracts + /// to gate access control for on-chain operations + /// @dev This value is set by the AVS in the `CrossChainRegistry` and transported by the multichain protocol when the operator table is updated function getOperatorSetOwner( OperatorSet memory operatorSet ) external view returns (address); - /** - * @notice The max staleness period of the operator table for a given operatorSet. This value is AVS-set and - * transported by the multichain protocol - * @param operatorSet The operatorSet to get the max staleness period of - * @return The max staleness period - * @dev A staleness period of 0 allows for certificates to be verified against any timestamp in the past - * @dev Staleness periods cannot be greater than 0 and less than the update cadence of the `OperatorTables`, since - * certificates would be unable to be validated against. This value is set and bounds enforced in the `CrossChainRegistry` - * @dev This value is NOT checkpointed. A new staleness period applies to ALL certificates, regardless of a certificate's reference timestamp - * @dev This value is set by the AVS in the `CrossChainRegistry` and transported by the multichain protocol when the operator table is updated - */ + /// @notice The max staleness period of the operator table for a given operatorSet. This value is AVS-set and + /// transported by the multichain protocol + /// @param operatorSet The operatorSet to get the max staleness period of + /// @return The max staleness period + /// @dev A staleness period of 0 allows for certificates to be verified against any timestamp in the past + /// @dev Staleness periods cannot be greater than 0 and less than the update cadence of the `OperatorTables`, since + /// certificates would be unable to be validated against. This value is set and bounds enforced in the `CrossChainRegistry` + /// @dev This value is NOT checkpointed. A new staleness period applies to ALL certificates, regardless of a certificate's reference timestamp + /// @dev This value is set by the AVS in the `CrossChainRegistry` and transported by the multichain protocol when the operator table is updated function maxOperatorTableStaleness( OperatorSet memory operatorSet ) external view returns (uint32); - /** - * @notice The latest reference timestamp of the operator table for a given operatorSet. This value is - * updated each time an operator table is updated - * @param operatorSet The operatorSet to get the latest reference timestamp of - * @return The latest reference timestamp, 0 if the operatorSet has never been updated - * @dev The latest reference timestamp is set when the operator table is updated - * @dev The reference timestamp denotes the timestamp at which the operator table was calculated by the multichain protocol - */ + /// @notice The latest reference timestamp of the operator table for a given operatorSet. This value is + /// updated each time an operator table is updated + /// @param operatorSet The operatorSet to get the latest reference timestamp of + /// @return The latest reference timestamp, 0 if the operatorSet has never been updated + /// @dev The latest reference timestamp is set when the operator table is updated + /// @dev The reference timestamp denotes the timestamp at which the operator table was calculated by the multichain protocol function latestReferenceTimestamp( OperatorSet memory operatorSet ) external view returns (uint32); - /** - * @notice Whether the operator table has been updated for a given reference timestamp - * @param operatorSet The operatorSet to check - * @param referenceTimestamp The reference timestamp to check - * @return Whether the reference timestamp has been updated - * @dev The reference timestamp is set when the operator table is updated - */ + /// @notice Whether the operator table has been updated for a given reference timestamp + /// @param operatorSet The operatorSet to check + /// @param referenceTimestamp The reference timestamp to check + /// @return Whether the reference timestamp has been updated + /// @dev The reference timestamp is set when the operator table is updated function isReferenceTimestampSet( OperatorSet memory operatorSet, uint32 referenceTimestamp ) external view returns (bool); - /** - * @notice Get the total stake weights for all operators at a given reference timestamp - * @param operatorSet The operator set to calculate stakes for - * @param referenceTimestamp The reference timestamp - * @return The sum of stake weights for each stake type, empty if the operatorSet has not been updated for the given reference timestamp - * @dev The stake weights are defined in the AVS's `OperatorTableCalculator` and transported by the multichain protocol. An example - * of this can be [slashable_stake, delegated_stake, strategy_i_stake, ...], where each stake type is an element in the array. - * The stake weights are defined by the operatorSet's `OperatorTableCalculator` and transported by the multichain protocol - * @dev For ECDSA, this function *reverts* if the reference timestamp is not set or the number of operators is 0 - * @dev For BN254, this function returns empty array if the reference timestamp is not set or the number of operators is 0 - */ + /// @notice Get the total stake weights for all operators at a given reference timestamp + /// @param operatorSet The operator set to calculate stakes for + /// @param referenceTimestamp The reference timestamp + /// @return The sum of stake weights for each stake type, empty if the operatorSet has not been updated for the given reference timestamp + /// @dev The stake weights are defined in the AVS's `OperatorTableCalculator` and transported by the multichain protocol. An example + /// of this can be [slashable_stake, delegated_stake, strategy_i_stake, ...], where each stake type is an element in the array. + /// The stake weights are defined by the operatorSet's `OperatorTableCalculator` and transported by the multichain protocol + /// @dev For ECDSA, this function *reverts* if the reference timestamp is not set or the number of operators is 0 + /// @dev For BN254, this function returns empty array if the reference timestamp is not set or the number of operators is 0 function getTotalStakeWeights( OperatorSet memory operatorSet, uint32 referenceTimestamp ) external view returns (uint256[] memory); - /** - * @notice Get the number of operators at a given reference timestamp - * @param operatorSet The operator set to get the number of operators for - * @param referenceTimestamp The reference timestamp - * @return The number of operators - * @dev Returns 0 if the reference timestamp is not set or the number of operators is 0 - */ + /// @notice Get the number of operators at a given reference timestamp + /// @param operatorSet The operator set to get the number of operators for + /// @param referenceTimestamp The reference timestamp + /// @return The number of operators + /// @dev Returns 0 if the reference timestamp is not set or the number of operators is 0 function getOperatorCount( OperatorSet memory operatorSet, uint32 referenceTimestamp diff --git a/src/contracts/interfaces/ICrossChainRegistry.sol b/src/contracts/interfaces/ICrossChainRegistry.sol index 3650bcda3a..c2a47b2f71 100644 --- a/src/contracts/interfaces/ICrossChainRegistry.sol +++ b/src/contracts/interfaces/ICrossChainRegistry.sol @@ -64,15 +64,13 @@ interface ICrossChainRegistryErrors { } interface ICrossChainRegistryTypes { - /** - * @notice A per-operatorSet configuration struct that is transported from the CrossChainRegistry on L1. - * @param owner the permissioned owner of the OperatorSet on L2 that can be used by downstream contracts to authorize actions - * @param maxStalenessPeriod the maximum staleness period of the operatorSet, in seconds - * - * @dev A `maxStalenessPeriod` of 0 completely removes staleness checks, allowing certificates to be validated regardless of their timestamp - * @dev A nonzero `maxStalenessPeriod` has a floor of the table update cadence, which is the frequency at which operator tables are expected - * to be updated. The table update cadence is set by the owner of the `CrossChainRegistry` - */ + /// @notice A per-operatorSet configuration struct that is transported from the CrossChainRegistry on L1. + /// @param owner the permissioned owner of the OperatorSet on L2 that can be used by downstream contracts to authorize actions + /// @param maxStalenessPeriod the maximum staleness period of the operatorSet, in seconds + /// + /// @dev A `maxStalenessPeriod` of 0 completely removes staleness checks, allowing certificates to be validated regardless of their timestamp + /// @dev A nonzero `maxStalenessPeriod` has a floor of the table update cadence, which is the frequency at which operator tables are expected + /// to be updated. The table update cadence is set by the owner of the `CrossChainRegistry` struct OperatorSetConfig { address owner; uint32 maxStalenessPeriod; @@ -110,231 +108,203 @@ interface ICrossChainRegistryEvents is ICrossChainRegistryTypes { /// @notice The CrossChainRegistry allows AVSs to register their operatorSets and the associated operator table for cross-chain transport by the multichain protocol interface ICrossChainRegistry is ICrossChainRegistryErrors, ICrossChainRegistryEvents { - /** - * @notice Creates a generation reservation, which transports the operator table of an operatorSet to all whitelisted chains - * @param operatorSet the operatorSet to make a reservation for - * @param operatorTableCalculator the address of the operatorTableCalculator. This contract is deployed (or a template is used) by the AVS - * to calculate the stake weights for the operatorSet. See `IOperatorTableCalculator` for more details - * @param config the config to set for the operatorSet, which includes the owner of the operatorSet and the max staleness period - * @dev Tables are transported at a cadence of `tableUpdateCadence` seconds. The `maxStalenessPeriod` is used to determine the maximum - * @dev msg.sender must be an authorized caller for operatorSet.avs - * @dev Once a generation reservation is created, the operator table will be transported to all chains that are whitelisted - * @dev It is expected that the AVS has: - * - Deployed or is using a generalizable `OperatorTableCalculator` to calculate its operator's stake weights - * - Set the `KeyType` for the operatorSet in the `KeyRegistrar`, even if the AVS is not using the `KeyRegistrar` for operator key management - * - Valid Key Types are given in the `IKeyRegistrarTypes.CurveType` enum. The `KeyType` must not be `NONE` - * - Created an operatorSet in the `AllocationManager` - * @dev Reverts for: - * - CurrentlyPaused: Generation reservations are paused - * - InvalidPermissions: Caller is not an authorized caller for operatorSet.avs - * - InvalidOperatorSet: The operatorSet does not exist in the AllocationManager - * - KeyTypeNotSet: The key type is not set for the operatorSet in the KeyRegistrar - * - GenerationReservationAlreadyExists: A generation reservation already exists for the operatorSet - * - InvalidStalenessPeriod: The maxStalenessPeriod is invalid - * @dev Emits the following events: - * - GenerationReservationCreated: When the generation reservation is successfully created - * - OperatorTableCalculatorSet: When the operator table calculator is set for the operatorSet - * - OperatorSetConfigSet: When the operator set config is set for the operatorSet - */ + /// @notice Creates a generation reservation, which transports the operator table of an operatorSet to all whitelisted chains + /// @param operatorSet the operatorSet to make a reservation for + /// @param operatorTableCalculator the address of the operatorTableCalculator. This contract is deployed (or a template is used) by the AVS + /// to calculate the stake weights for the operatorSet. See `IOperatorTableCalculator` for more details + /// @param config the config to set for the operatorSet, which includes the owner of the operatorSet and the max staleness period + /// @dev Tables are transported at a cadence of `tableUpdateCadence` seconds. The `maxStalenessPeriod` is used to determine the maximum + /// @dev msg.sender must be an authorized caller for operatorSet.avs + /// @dev Once a generation reservation is created, the operator table will be transported to all chains that are whitelisted + /// @dev It is expected that the AVS has: + /// - Deployed or is using a generalizable `OperatorTableCalculator` to calculate its operator's stake weights + /// - Set the `KeyType` for the operatorSet in the `KeyRegistrar`, even if the AVS is not using the `KeyRegistrar` for operator key management + /// - Valid Key Types are given in the `IKeyRegistrarTypes.CurveType` enum. The `KeyType` must not be `NONE` + /// - Created an operatorSet in the `AllocationManager` + /// @dev Reverts for: + /// - CurrentlyPaused: Generation reservations are paused + /// - InvalidPermissions: Caller is not an authorized caller for operatorSet.avs + /// - InvalidOperatorSet: The operatorSet does not exist in the AllocationManager + /// - KeyTypeNotSet: The key type is not set for the operatorSet in the KeyRegistrar + /// - GenerationReservationAlreadyExists: A generation reservation already exists for the operatorSet + /// - InvalidStalenessPeriod: The maxStalenessPeriod is invalid + /// @dev Emits the following events: + /// - GenerationReservationCreated: When the generation reservation is successfully created + /// - OperatorTableCalculatorSet: When the operator table calculator is set for the operatorSet + /// - OperatorSetConfigSet: When the operator set config is set for the operatorSet function createGenerationReservation( OperatorSet calldata operatorSet, IOperatorTableCalculator operatorTableCalculator, OperatorSetConfig calldata config ) external; - /** - * @notice Removes a generation reservation for a given operatorSet - * @param operatorSet the operatorSet to remove - * @dev msg.sender must be an authorized caller for operatorSet.avs - * @dev Reverts for: - * - CurrentlyPaused: Generation reservations are paused - * - InvalidPermissions: Caller is not an authorized caller for operatorSet.avs - * - InvalidOperatorSet: The operatorSet does not exist in the AllocationManager - * - GenerationReservationDoesNotExist: A generation reservation does not exist for the operatorSet - * @dev Emits the following events: - * - OperatorTableCalculatorRemoved: When the operator table calculator is removed - * - OperatorSetConfigRemoved: When the operator set config is removed - * - GenerationReservationRemoved: When the generation reservation is removed - */ + /// @notice Removes a generation reservation for a given operatorSet + /// @param operatorSet the operatorSet to remove + /// @dev msg.sender must be an authorized caller for operatorSet.avs + /// @dev Reverts for: + /// - CurrentlyPaused: Generation reservations are paused + /// - InvalidPermissions: Caller is not an authorized caller for operatorSet.avs + /// - InvalidOperatorSet: The operatorSet does not exist in the AllocationManager + /// - GenerationReservationDoesNotExist: A generation reservation does not exist for the operatorSet + /// @dev Emits the following events: + /// - OperatorTableCalculatorRemoved: When the operator table calculator is removed + /// - OperatorSetConfigRemoved: When the operator set config is removed + /// - GenerationReservationRemoved: When the generation reservation is removed function removeGenerationReservation( OperatorSet calldata operatorSet ) external; - /** - * @notice Sets the operatorTableCalculator for the operatorSet - * @param operatorSet the operatorSet whose operatorTableCalculator is desired to be set - * @param operatorTableCalculator the contract to call to calculate the operator table - * @dev msg.sender must be an authorized caller for operatorSet.avs - * @dev operatorSet must have an active reservation - * @dev Reverts for: - * - CurrentlyPaused: Setting the operatorTableCalculator is paused - * - InvalidPermissions: Caller is not an authorized caller for operatorSet.avs - * - InvalidOperatorSet: The operatorSet does not exist in the AllocationManager - * - GenerationReservationDoesNotExist: A generation reservation does not exist for the operatorSet - * @dev Emits the following events: - * - OperatorTableCalculatorSet: When the operator table calculator is successfully set - */ + /// @notice Sets the operatorTableCalculator for the operatorSet + /// @param operatorSet the operatorSet whose operatorTableCalculator is desired to be set + /// @param operatorTableCalculator the contract to call to calculate the operator table + /// @dev msg.sender must be an authorized caller for operatorSet.avs + /// @dev operatorSet must have an active reservation + /// @dev Reverts for: + /// - CurrentlyPaused: Setting the operatorTableCalculator is paused + /// - InvalidPermissions: Caller is not an authorized caller for operatorSet.avs + /// - InvalidOperatorSet: The operatorSet does not exist in the AllocationManager + /// - GenerationReservationDoesNotExist: A generation reservation does not exist for the operatorSet + /// @dev Emits the following events: + /// - OperatorTableCalculatorSet: When the operator table calculator is successfully set function setOperatorTableCalculator( OperatorSet calldata operatorSet, IOperatorTableCalculator operatorTableCalculator ) external; - /** - * @notice Sets the operatorSetConfig for a given operatorSet - * @param operatorSet the operatorSet to set the operatorSetConfig for - * @param config the config to set, which includes the owner of the operatorSet and the max staleness period - * @dev msg.sender must be an authorized caller for operatorSet.avs - * @dev operatorSet must have an active generation reservation - * @dev The max staleness period is NOT checkpointed and is applied globally regardless of the reference timestamp of a certificate - * @dev Reverts for: - * - CurrentlyPaused: Setting the operatorSetConfig is paused - * - InvalidPermissions: Caller is not an authorized caller for operatorSet.avs - * - InvalidOperatorSet: The operatorSet does not exist in the AllocationManager - * - GenerationReservationDoesNotExist: A generation reservation does not exist for the operatorSet - * - InvalidStalenessPeriod: The maxStalenessPeriod is invalid - * @dev Emits the following events: - * - OperatorSetConfigSet: When the operator set config is successfully set - */ - function setOperatorSetConfig(OperatorSet calldata operatorSet, OperatorSetConfig calldata config) external; - - /** - * @notice Adds chainIDs to the whitelist of chainIDs that are transported to by the multichain protocol - * @param chainIDs the chainIDs to add to the whitelist - * @param operatorTableUpdaters the operatorTableUpdaters for each whitelisted chainID - * @dev msg.sender must be the owner of the CrossChainRegistry - * @dev Reverts for: - * - "Ownable: caller is not the owner": Caller is not the owner of the contract - * - CurrentlyPaused: Chain whitelisting is paused - * - ArrayLengthMismatch: The chainIDs and operatorTableUpdaters arrays have different lengths - * - InvalidChainId: Any chainID is zero - * - ChainIDAlreadyWhitelisted: Any chainID is already whitelisted - * @dev Emits the following events: - * - ChainIDAddedToWhitelist: When each chainID is successfully added to the whitelist - */ - function addChainIDsToWhitelist(uint256[] calldata chainIDs, address[] calldata operatorTableUpdaters) external; - - /** - * @notice Removes chainIDs from the whitelist of chainIDs - * @param chainIDs the chainIDs to remove from the whitelist - * @dev msg.sender must be the owner of the CrossChainRegistry - * @dev Reverts for: - * - "Ownable: caller is not the owner": Caller is not the owner of the contract - * - CurrentlyPaused: Chain whitelisting is paused - * - ChainIDNotWhitelisted: Any chainID is not currently whitelisted - * @dev Emits the following events: - * - ChainIDRemovedFromWhitelist: When each chainID is successfully removed from the whitelist - */ + /// @notice Sets the operatorSetConfig for a given operatorSet + /// @param operatorSet the operatorSet to set the operatorSetConfig for + /// @param config the config to set, which includes the owner of the operatorSet and the max staleness period + /// @dev msg.sender must be an authorized caller for operatorSet.avs + /// @dev operatorSet must have an active generation reservation + /// @dev The max staleness period is NOT checkpointed and is applied globally regardless of the reference timestamp of a certificate + /// @dev Reverts for: + /// - CurrentlyPaused: Setting the operatorSetConfig is paused + /// - InvalidPermissions: Caller is not an authorized caller for operatorSet.avs + /// - InvalidOperatorSet: The operatorSet does not exist in the AllocationManager + /// - GenerationReservationDoesNotExist: A generation reservation does not exist for the operatorSet + /// - InvalidStalenessPeriod: The maxStalenessPeriod is invalid + /// @dev Emits the following events: + /// - OperatorSetConfigSet: When the operator set config is successfully set + function setOperatorSetConfig( + OperatorSet calldata operatorSet, + OperatorSetConfig calldata config + ) external; + + /// @notice Adds chainIDs to the whitelist of chainIDs that are transported to by the multichain protocol + /// @param chainIDs the chainIDs to add to the whitelist + /// @param operatorTableUpdaters the operatorTableUpdaters for each whitelisted chainID + /// @dev msg.sender must be the owner of the CrossChainRegistry + /// @dev Reverts for: + /// - "Ownable: caller is not the owner": Caller is not the owner of the contract + /// - CurrentlyPaused: Chain whitelisting is paused + /// - ArrayLengthMismatch: The chainIDs and operatorTableUpdaters arrays have different lengths + /// - InvalidChainId: Any chainID is zero + /// - ChainIDAlreadyWhitelisted: Any chainID is already whitelisted + /// @dev Emits the following events: + /// - ChainIDAddedToWhitelist: When each chainID is successfully added to the whitelist + function addChainIDsToWhitelist( + uint256[] calldata chainIDs, + address[] calldata operatorTableUpdaters + ) external; + + /// @notice Removes chainIDs from the whitelist of chainIDs + /// @param chainIDs the chainIDs to remove from the whitelist + /// @dev msg.sender must be the owner of the CrossChainRegistry + /// @dev Reverts for: + /// - "Ownable: caller is not the owner": Caller is not the owner of the contract + /// - CurrentlyPaused: Chain whitelisting is paused + /// - ChainIDNotWhitelisted: Any chainID is not currently whitelisted + /// @dev Emits the following events: + /// - ChainIDRemovedFromWhitelist: When each chainID is successfully removed from the whitelist function removeChainIDsFromWhitelist( uint256[] calldata chainIDs ) external; - /** - * @notice Sets the table update cadence in seconds. This is the frequency at which operator tables are expected to be updated on all destination chains - * @param tableUpdateCadence the table update cadence - * @dev msg.sender must be the owner of the CrossChainRegistry - * @dev The table update cadence cannot be 0 - * @dev Reverts for: - * - "Ownable: caller is not the owner": Caller is not the owner of the contract - * - InvalidTableUpdateCadence: The tableUpdateCadence is zero - * @dev Emits the following events: - * - TableUpdateCadenceSet: When the table update cadence is successfully set - * @dev The table update cadence is weekly on mainnet and daily on testnet - */ + /// @notice Sets the table update cadence in seconds. This is the frequency at which operator tables are expected to be updated on all destination chains + /// @param tableUpdateCadence the table update cadence + /// @dev msg.sender must be the owner of the CrossChainRegistry + /// @dev The table update cadence cannot be 0 + /// @dev Reverts for: + /// - "Ownable: caller is not the owner": Caller is not the owner of the contract + /// - InvalidTableUpdateCadence: The tableUpdateCadence is zero + /// @dev Emits the following events: + /// - TableUpdateCadenceSet: When the table update cadence is successfully set + /// @dev The table update cadence is weekly on mainnet and daily on testnet function setTableUpdateCadence( uint32 tableUpdateCadence ) external; - /** - * - * VIEW FUNCTIONS - * - */ + /// + /// VIEW FUNCTIONS + /// - /** - * @notice Gets the active generation reservations - * @return An array of operatorSets with active generationReservations - */ + /// @notice Gets the active generation reservations + /// @return An array of operatorSets with active generationReservations function getActiveGenerationReservations() external view returns (OperatorSet[] memory); - /** - * @notice Gets the active generation reservations by range - * @param startIndex the start index of the range, inclusive - * @param endIndex the end index of the range, exclusive - * @return An array of operatorSets with active generationReservations - * @dev Reverts for: - * - InvalidRange: startIndex is greater than endIndex - * - InvalidEndIndex: endIndex is greater than the length of the active generation reservations array - */ + /// @notice Gets the active generation reservations by range + /// @param startIndex the start index of the range, inclusive + /// @param endIndex the end index of the range, exclusive + /// @return An array of operatorSets with active generationReservations + /// @dev Reverts for: + /// - InvalidRange: startIndex is greater than endIndex + /// - InvalidEndIndex: endIndex is greater than the length of the active generation reservations array function getActiveGenerationReservationsByRange( uint256 startIndex, uint256 endIndex ) external view returns (OperatorSet[] memory); - /** - * @notice Checks if a given operatorSet has an active generation reservation - * @param operatorSet the operatorSet to check - * @return True if the operatorSet has an active generation reservation, false otherwise - */ + /// @notice Checks if a given operatorSet has an active generation reservation + /// @param operatorSet the operatorSet to check + /// @return True if the operatorSet has an active generation reservation, false otherwise function hasActiveGenerationReservation( OperatorSet memory operatorSet ) external view returns (bool); - /** - * @notice Gets the operatorTableCalculator for a given operatorSet - * @param operatorSet the operatorSet to get the operatorTableCalculator for - * @dev You should check if an operatorSet has an active generation reservation prior to calling this method - * @return The operatorTableCalculator for the given operatorSet - */ + /// @notice Gets the operatorTableCalculator for a given operatorSet + /// @param operatorSet the operatorSet to get the operatorTableCalculator for + /// @dev You should check if an operatorSet has an active generation reservation prior to calling this method + /// @return The operatorTableCalculator for the given operatorSet function getOperatorTableCalculator( OperatorSet memory operatorSet ) external view returns (IOperatorTableCalculator); - /** - * @notice Gets the operatorSetConfig for a given operatorSet - * @param operatorSet the operatorSet to get the operatorSetConfig for - * @dev You should check if an operatorSet has an active generation reservation prior to calling this method - * @return The operatorSetConfig for the given operatorSet - */ + /// @notice Gets the operatorSetConfig for a given operatorSet + /// @param operatorSet the operatorSet to get the operatorSetConfig for + /// @dev You should check if an operatorSet has an active generation reservation prior to calling this method + /// @return The operatorSetConfig for the given operatorSet function getOperatorSetConfig( OperatorSet memory operatorSet ) external view returns (OperatorSetConfig memory); - /** - * @notice Calculates the operatorTableBytes for a given operatorSet - * @param operatorSet the operatorSet to calculate the operator table for - * @return the encoded operatorTableBytes containing: - * - operatorSet details - * - curve type from KeyRegistrar - * - operator set configuration - * - calculated operator table from the calculator contract - * @dev You should check if an operatorSet has an active generation reservation prior to calling this method - * @dev This function aggregates data from multiple sources for cross-chain transport - * @dev Reverts when the call to the operatorTableCalculator contract call fails - */ + /// @notice Calculates the operatorTableBytes for a given operatorSet + /// @param operatorSet the operatorSet to calculate the operator table for + /// @return the encoded operatorTableBytes containing: + /// - operatorSet details + /// - curve type from KeyRegistrar + /// - operator set configuration + /// - calculated operator table from the calculator contract + /// @dev You should check if an operatorSet has an active generation reservation prior to calling this method + /// @dev This function aggregates data from multiple sources for cross-chain transport + /// @dev Reverts when the call to the operatorTableCalculator contract call fails function calculateOperatorTableBytes( OperatorSet calldata operatorSet ) external view returns (bytes memory); - /** - * @notice Gets the list of chains that are supported by the CrossChainRegistry - * @return An array of chainIDs that are supported by the CrossChainRegistry - * @return An array of operatorTableUpdaters corresponding to each chainID - */ + /// @notice Gets the list of chains that are supported by the CrossChainRegistry + /// @return An array of chainIDs that are supported by the CrossChainRegistry + /// @return An array of operatorTableUpdaters corresponding to each chainID function getSupportedChains() external view returns (uint256[] memory, address[] memory); - /** - * @notice Gets the table update cadence, in seconds - * @return The table update cadence, in seconds - * @dev The table update cadence is applicable to all whitelisted chains, and is the - * frequency at which operator tables are expected to be updated on all destination chains - */ + /// @notice Gets the table update cadence, in seconds + /// @return The table update cadence, in seconds + /// @dev The table update cadence is applicable to all whitelisted chains, and is the + /// frequency at which operator tables are expected to be updated on all destination chains function getTableUpdateCadence() external view returns (uint32); - /** - * @notice Gets the number of active generation reservations - * @return The number of active generation reservations - * @dev This function can be used in conjunction with the paginated version of `getActiveGenerationReservations` - * to iterate over all active generation reservations - */ + /// @notice Gets the number of active generation reservations + /// @return The number of active generation reservations + /// @dev This function can be used in conjunction with the paginated version of `getActiveGenerationReservations` + /// to iterate over all active generation reservations function getActiveGenerationReservationCount() external view returns (uint256); } diff --git a/src/contracts/interfaces/IDelegationManager.sol b/src/contracts/interfaces/IDelegationManager.sol index 2a7de0a02c..ef2eef48d5 100644 --- a/src/contracts/interfaces/IDelegationManager.sol +++ b/src/contracts/interfaces/IDelegationManager.sol @@ -61,22 +61,18 @@ interface IDelegationManagerTypes { struct OperatorDetails { /// @notice DEPRECATED -- this field is no longer used, payments are handled in RewardsCoordinator.sol address __deprecated_earningsReceiver; - /** - * @notice Address to verify signatures when a staker wishes to delegate to the operator, as well as controlling "forced undelegations". - * @dev Signature verification follows these rules: - * 1) If this address is left as address(0), then any staker will be free to delegate to the operator, i.e. no signature verification will be performed. - * 2) If this address is an EOA (i.e. it has no code), then we follow standard ECDSA signature verification for delegations to the operator. - * 3) If this address is a contract (i.e. it has code) then we forward a call to the contract and verify that it returns the correct EIP-1271 "magic value". - */ + /// @notice Address to verify signatures when a staker wishes to delegate to the operator, as well as controlling "forced undelegations". + /// @dev Signature verification follows these rules: + /// 1) If this address is left as address(0), then any staker will be free to delegate to the operator, i.e. no signature verification will be performed. + /// 2) If this address is an EOA (i.e. it has no code), then we follow standard ECDSA signature verification for delegations to the operator. + /// 3) If this address is a contract (i.e. it has code) then we forward a call to the contract and verify that it returns the correct EIP-1271 "magic value". address delegationApprover; /// @notice DEPRECATED -- this field is no longer used. An analogous field is the `allocationDelay` stored in the AllocationManager uint32 __deprecated_stakerOptOutWindowBlocks; } - /** - * @notice Abstract struct used in calculating an EIP712 signature for an operator's delegationApprover to approve that a specific staker delegate to the operator. - * @dev Used in computing the `DELEGATION_APPROVAL_TYPEHASH` and as a reference in the computation of the approverDigestHash in the `_delegate` function. - */ + /// @notice Abstract struct used in calculating an EIP712 signature for an operator's delegationApprover to approve that a specific staker delegate to the operator. + /// @dev Used in computing the `DELEGATION_APPROVAL_TYPEHASH` and as a reference in the computation of the approverDigestHash in the `_delegate` function. struct DelegationApproval { // the staker who is delegating address staker; @@ -88,22 +84,20 @@ interface IDelegationManagerTypes { uint256 expiry; } - /** - * @dev A struct representing an existing queued withdrawal. After the withdrawal delay has elapsed, this withdrawal can be completed via `completeQueuedWithdrawal`. - * A `Withdrawal` is created by the `DelegationManager` when `queueWithdrawals` is called. The `withdrawalRoots` hashes returned by `queueWithdrawals` can be used - * to fetch the corresponding `Withdrawal` from storage (via `getQueuedWithdrawal`). - * - * @param staker The address that queued the withdrawal - * @param delegatedTo The address that the staker was delegated to at the time the withdrawal was queued. Used to determine if additional slashing occurred before - * this withdrawal became completable. - * @param withdrawer The address that will call the contract to complete the withdrawal. Note that this will always equal `staker`; alternate withdrawers are not - * supported at this time. - * @param nonce The staker's `cumulativeWithdrawalsQueued` at time of queuing. Used to ensure withdrawals have unique hashes. - * @param startBlock The block number when the withdrawal was queued. - * @param strategies The strategies requested for withdrawal when the withdrawal was queued - * @param scaledShares The staker's deposit shares requested for withdrawal, scaled by the staker's `depositScalingFactor`. Upon completion, these will be - * scaled by the appropriate slashing factor as of the withdrawal's completable block. The result is what is actually withdrawable. - */ + /// @dev A struct representing an existing queued withdrawal. After the withdrawal delay has elapsed, this withdrawal can be completed via `completeQueuedWithdrawal`. + /// A `Withdrawal` is created by the `DelegationManager` when `queueWithdrawals` is called. The `withdrawalRoots` hashes returned by `queueWithdrawals` can be used + /// to fetch the corresponding `Withdrawal` from storage (via `getQueuedWithdrawal`). + /// + /// @param staker The address that queued the withdrawal + /// @param delegatedTo The address that the staker was delegated to at the time the withdrawal was queued. Used to determine if additional slashing occurred before + /// this withdrawal became completable. + /// @param withdrawer The address that will call the contract to complete the withdrawal. Note that this will always equal `staker`; alternate withdrawers are not + /// supported at this time. + /// @param nonce The staker's `cumulativeWithdrawalsQueued` at time of queuing. Used to ensure withdrawals have unique hashes. + /// @param startBlock The block number when the withdrawal was queued. + /// @param strategies The strategies requested for withdrawal when the withdrawal was queued + /// @param scaledShares The staker's deposit shares requested for withdrawal, scaled by the staker's `depositScalingFactor`. Upon completion, these will be + /// scaled by the appropriate slashing factor as of the withdrawal's completable block. The result is what is actually withdrawable. struct Withdrawal { address staker; address delegatedTo; @@ -114,15 +108,13 @@ interface IDelegationManagerTypes { uint256[] scaledShares; } - /** - * @param strategies The strategies to withdraw from - * @param depositShares For each strategy, the number of deposit shares to withdraw. Deposit shares can - * be queried via `getDepositedShares`. - * NOTE: The number of shares ultimately received when a withdrawal is completed may be lower depositShares - * if the staker or their delegated operator has experienced slashing. - * @param __deprecated_withdrawer This field is ignored. The only party that may complete a withdrawal - * is the staker that originally queued it. Alternate withdrawers are not supported. - */ + /// @param strategies The strategies to withdraw from + /// @param depositShares For each strategy, the number of deposit shares to withdraw. Deposit shares can + /// be queried via `getDepositedShares`. + /// NOTE: The number of shares ultimately received when a withdrawal is completed may be lower depositShares + /// if the staker or their delegated operator has experienced slashing. + /// @param __deprecated_withdrawer This field is ignored. The only party that may complete a withdrawal + /// is the staker that originally queued it. Alternate withdrawers are not supported. struct QueuedWithdrawalParams { IStrategy[] strategies; uint256[] depositShares; @@ -137,10 +129,8 @@ interface IDelegationManagerEvents is IDelegationManagerTypes { /// @notice Emitted when an operator updates their delegation approver event DelegationApproverUpdated(address indexed operator, address newDelegationApprover); - /** - * @notice Emitted when @param operator indicates that they are updating their MetadataURI string - * @dev Note that these strings are *never stored in storage* and are instead purely emitted in events for off-chain indexing - */ + /// @notice Emitted when @param operator indicates that they are updating their MetadataURI string + /// @dev Note that these strings are *never stored in storage* and are instead purely emitted in events for off-chain indexing event OperatorMetadataURIUpdated(address indexed operator, string metadataURI); /// @notice Emitted whenever an operator's shares are increased for a given strategy. Note that shares is the delta in the operator's shares. @@ -161,12 +151,10 @@ interface IDelegationManagerEvents is IDelegationManagerTypes { /// @notice Emitted when a staker's depositScalingFactor is updated event DepositScalingFactorUpdated(address staker, IStrategy strategy, uint256 newDepositScalingFactor); - /** - * @notice Emitted when a new withdrawal is queued. - * @param withdrawalRoot Is the hash of the `withdrawal`. - * @param withdrawal Is the withdrawal itself. - * @param sharesToWithdraw Is an array of the expected shares that were queued for withdrawal corresponding to the strategies in the `withdrawal`. - */ + /// @notice Emitted when a new withdrawal is queued. + /// @param withdrawalRoot Is the hash of the `withdrawal`. + /// @param withdrawal Is the withdrawal itself. + /// @param sharesToWithdraw Is an array of the expected shares that were queued for withdrawal corresponding to the strategies in the `withdrawal`. event SlashingWithdrawalQueued(bytes32 withdrawalRoot, Withdrawal withdrawal, uint256[] sharesToWithdraw); /// @notice Emitted when a queued withdrawal is completed @@ -176,161 +164,143 @@ interface IDelegationManagerEvents is IDelegationManagerTypes { event OperatorSharesSlashed(address indexed operator, IStrategy strategy, uint256 totalSlashedShares); } -/** - * @title DelegationManager - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice This is the contract for delegation in EigenLayer. The main functionalities of this contract are - * - enabling anyone to register as an operator in EigenLayer - * - allowing operators to specify parameters related to stakers who delegate to them - * - enabling any staker to delegate its stake to the operator of its choice (a given staker can only delegate to a single operator at a time) - * - enabling a staker to undelegate its assets from the operator it is delegated to (performed as part of the withdrawal process, initiated through the StrategyManager) - */ +/// @title DelegationManager +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice This is the contract for delegation in EigenLayer. The main functionalities of this contract are +/// - enabling anyone to register as an operator in EigenLayer +/// - allowing operators to specify parameters related to stakers who delegate to them +/// - enabling any staker to delegate its stake to the operator of its choice (a given staker can only delegate to a single operator at a time) +/// - enabling a staker to undelegate its assets from the operator it is delegated to (performed as part of the withdrawal process, initiated through the StrategyManager) interface IDelegationManager is ISignatureUtilsMixin, IDelegationManagerErrors, IDelegationManagerEvents { - /** - * @dev Initializes the initial owner and paused status. - */ + /// @dev Initializes the initial owner and paused status. function initialize( uint256 initialPausedStatus ) external; - /** - * @notice Registers the caller as an operator in EigenLayer. - * @param initDelegationApprover is an address that, if set, must provide a signature when stakers delegate - * to an operator. - * @param allocationDelay The delay before allocations take effect. - * @param metadataURI is a URI for the operator's metadata, i.e. a link providing more details on the operator. - * - * @dev Once an operator is registered, they cannot 'deregister' as an operator, and they will forever be considered "delegated to themself". - * @dev This function will revert if the caller is already delegated to an operator. - * @dev Note that the `metadataURI` is *never stored * and is only emitted in the `OperatorMetadataURIUpdated` event - */ + /// @notice Registers the caller as an operator in EigenLayer. + /// @param initDelegationApprover is an address that, if set, must provide a signature when stakers delegate + /// to an operator. + /// @param allocationDelay The delay before allocations take effect. + /// @param metadataURI is a URI for the operator's metadata, i.e. a link providing more details on the operator. + /// + /// @dev Once an operator is registered, they cannot 'deregister' as an operator, and they will forever be considered "delegated to themself". + /// @dev This function will revert if the caller is already delegated to an operator. + /// @dev Note that the `metadataURI` is *never stored * and is only emitted in the `OperatorMetadataURIUpdated` event function registerAsOperator( address initDelegationApprover, uint32 allocationDelay, string calldata metadataURI ) external; - /** - * @notice Updates an operator's stored `delegationApprover`. - * @param operator is the operator to update the delegationApprover for - * @param newDelegationApprover is the new delegationApprover for the operator - * - * @dev The caller must have previously registered as an operator in EigenLayer. - */ - function modifyOperatorDetails(address operator, address newDelegationApprover) external; - - /** - * @notice Called by an operator to emit an `OperatorMetadataURIUpdated` event indicating the information has updated. - * @param operator The operator to update metadata for - * @param metadataURI The URI for metadata associated with an operator - * @dev Note that the `metadataURI` is *never stored * and is only emitted in the `OperatorMetadataURIUpdated` event - */ - function updateOperatorMetadataURI(address operator, string calldata metadataURI) external; - - /** - * @notice Caller delegates their stake to an operator. - * @param operator The account (`msg.sender`) is delegating its assets to for use in serving applications built on EigenLayer. - * @param approverSignatureAndExpiry (optional) Verifies the operator approves of this delegation - * @param approverSalt (optional) A unique single use value tied to an individual signature. - * @dev The signature/salt are used ONLY if the operator has configured a delegationApprover. - * If they have not, these params can be left empty. - */ + /// @notice Updates an operator's stored `delegationApprover`. + /// @param operator is the operator to update the delegationApprover for + /// @param newDelegationApprover is the new delegationApprover for the operator + /// + /// @dev The caller must have previously registered as an operator in EigenLayer. + function modifyOperatorDetails( + address operator, + address newDelegationApprover + ) external; + + /// @notice Called by an operator to emit an `OperatorMetadataURIUpdated` event indicating the information has updated. + /// @param operator The operator to update metadata for + /// @param metadataURI The URI for metadata associated with an operator + /// @dev Note that the `metadataURI` is *never stored * and is only emitted in the `OperatorMetadataURIUpdated` event + function updateOperatorMetadataURI( + address operator, + string calldata metadataURI + ) external; + + /// @notice Caller delegates their stake to an operator. + /// @param operator The account (`msg.sender`) is delegating its assets to for use in serving applications built on EigenLayer. + /// @param approverSignatureAndExpiry (optional) Verifies the operator approves of this delegation + /// @param approverSalt (optional) A unique single use value tied to an individual signature. + /// @dev The signature/salt are used ONLY if the operator has configured a delegationApprover. + /// If they have not, these params can be left empty. function delegateTo( address operator, SignatureWithExpiry memory approverSignatureAndExpiry, bytes32 approverSalt ) external; - /** - * @notice Undelegates the staker from their operator and queues a withdrawal for all of their shares - * @param staker The account to be undelegated - * @return withdrawalRoots The roots of the newly queued withdrawals, if a withdrawal was queued. Returns - * an empty array if none was queued. - * - * @dev Reverts if the `staker` is also an operator, since operators are not allowed to undelegate from themselves. - * @dev Reverts if the caller is not the staker, nor the operator who the staker is delegated to, nor the operator's specified "delegationApprover" - * @dev Reverts if the `staker` is not delegated to an operator - */ + /// @notice Undelegates the staker from their operator and queues a withdrawal for all of their shares + /// @param staker The account to be undelegated + /// @return withdrawalRoots The roots of the newly queued withdrawals, if a withdrawal was queued. Returns + /// an empty array if none was queued. + /// + /// @dev Reverts if the `staker` is also an operator, since operators are not allowed to undelegate from themselves. + /// @dev Reverts if the caller is not the staker, nor the operator who the staker is delegated to, nor the operator's specified "delegationApprover" + /// @dev Reverts if the `staker` is not delegated to an operator function undelegate( address staker ) external returns (bytes32[] memory withdrawalRoots); - /** - * @notice Undelegates the staker from their current operator, and redelegates to `newOperator` - * Queues a withdrawal for all of the staker's withdrawable shares. These shares will only be - * delegated to `newOperator` AFTER the withdrawal is completed. - * @dev This method acts like a call to `undelegate`, then `delegateTo` - * @param newOperator the new operator that will be delegated all assets - * @dev NOTE: the following 2 params are ONLY checked if `newOperator` has a `delegationApprover`. - * If not, they can be left empty. - * @param newOperatorApproverSig A signature from the operator's `delegationApprover` - * @param approverSalt A unique single use value tied to the approver's signature - */ + /// @notice Undelegates the staker from their current operator, and redelegates to `newOperator` + /// Queues a withdrawal for all of the staker's withdrawable shares. These shares will only be + /// delegated to `newOperator` AFTER the withdrawal is completed. + /// @dev This method acts like a call to `undelegate`, then `delegateTo` + /// @param newOperator the new operator that will be delegated all assets + /// @dev NOTE: the following 2 params are ONLY checked if `newOperator` has a `delegationApprover`. + /// If not, they can be left empty. + /// @param newOperatorApproverSig A signature from the operator's `delegationApprover` + /// @param approverSalt A unique single use value tied to the approver's signature function redelegate( address newOperator, SignatureWithExpiry memory newOperatorApproverSig, bytes32 approverSalt ) external returns (bytes32[] memory withdrawalRoots); - /** - * @notice Allows a staker to queue a withdrawal of their deposit shares. The withdrawal can be - * completed after the MIN_WITHDRAWAL_DELAY_BLOCKS via either of the completeQueuedWithdrawal methods. - * - * While in the queue, these shares are removed from the staker's balance, as well as from their operator's - * delegated share balance (if applicable). Note that while in the queue, deposit shares are still subject - * to slashing. If any slashing has occurred, the shares received may be less than the queued deposit shares. - * - * @dev To view all the staker's strategies/deposit shares that can be queued for withdrawal, see `getDepositedShares` - * @dev To view the current conversion between a staker's deposit shares and withdrawable shares, see `getWithdrawableShares` - */ + /// @notice Allows a staker to queue a withdrawal of their deposit shares. The withdrawal can be + /// completed after the MIN_WITHDRAWAL_DELAY_BLOCKS via either of the completeQueuedWithdrawal methods. + /// + /// While in the queue, these shares are removed from the staker's balance, as well as from their operator's + /// delegated share balance (if applicable). Note that while in the queue, deposit shares are still subject + /// to slashing. If any slashing has occurred, the shares received may be less than the queued deposit shares. + /// + /// @dev To view all the staker's strategies/deposit shares that can be queued for withdrawal, see `getDepositedShares` + /// @dev To view the current conversion between a staker's deposit shares and withdrawable shares, see `getWithdrawableShares` function queueWithdrawals( QueuedWithdrawalParams[] calldata params ) external returns (bytes32[] memory); - /** - * @notice Used to complete a queued withdrawal - * @param withdrawal The withdrawal to complete - * @param tokens Array in which the i-th entry specifies the `token` input to the 'withdraw' function of the i-th Strategy in the `withdrawal.strategies` array. - * @param tokens For each `withdrawal.strategies`, the underlying token of the strategy - * NOTE: if `receiveAsTokens` is false, the `tokens` array is unused and can be filled with default values. However, `tokens.length` MUST still be equal to `withdrawal.strategies.length`. - * NOTE: For the `beaconChainETHStrategy`, the corresponding `tokens` value is ignored (can be 0). - * @param receiveAsTokens If true, withdrawn shares will be converted to tokens and sent to the caller. If false, the caller receives shares that can be delegated to an operator. - * NOTE: if the caller receives shares and is currently delegated to an operator, the received shares are - * automatically delegated to the caller's current operator. - */ + /// @notice Used to complete a queued withdrawal + /// @param withdrawal The withdrawal to complete + /// @param tokens Array in which the i-th entry specifies the `token` input to the 'withdraw' function of the i-th Strategy in the `withdrawal.strategies` array. + /// @param tokens For each `withdrawal.strategies`, the underlying token of the strategy + /// NOTE: if `receiveAsTokens` is false, the `tokens` array is unused and can be filled with default values. However, `tokens.length` MUST still be equal to `withdrawal.strategies.length`. + /// NOTE: For the `beaconChainETHStrategy`, the corresponding `tokens` value is ignored (can be 0). + /// @param receiveAsTokens If true, withdrawn shares will be converted to tokens and sent to the caller. If false, the caller receives shares that can be delegated to an operator. + /// NOTE: if the caller receives shares and is currently delegated to an operator, the received shares are + /// automatically delegated to the caller's current operator. function completeQueuedWithdrawal( Withdrawal calldata withdrawal, IERC20[] calldata tokens, bool receiveAsTokens ) external; - /** - * @notice Used to complete multiple queued withdrawals - * @param withdrawals Array of Withdrawals to complete. See `completeQueuedWithdrawal` for the usage of a single Withdrawal. - * @param tokens Array of tokens for each Withdrawal. See `completeQueuedWithdrawal` for the usage of a single array. - * @param receiveAsTokens Whether or not to complete each withdrawal as tokens. See `completeQueuedWithdrawal` for the usage of a single boolean. - * @dev See `completeQueuedWithdrawal` for relevant dev tags - */ + /// @notice Used to complete multiple queued withdrawals + /// @param withdrawals Array of Withdrawals to complete. See `completeQueuedWithdrawal` for the usage of a single Withdrawal. + /// @param tokens Array of tokens for each Withdrawal. See `completeQueuedWithdrawal` for the usage of a single array. + /// @param receiveAsTokens Whether or not to complete each withdrawal as tokens. See `completeQueuedWithdrawal` for the usage of a single boolean. + /// @dev See `completeQueuedWithdrawal` for relevant dev tags function completeQueuedWithdrawals( Withdrawal[] calldata withdrawals, IERC20[][] calldata tokens, bool[] calldata receiveAsTokens ) external; - /** - * @notice Called by a share manager when a staker's deposit share balance in a strategy increases. - * This method delegates any new shares to an operator (if applicable), and updates the staker's - * deposit scaling factor regardless. - * @param staker The address whose deposit shares have increased - * @param strategy The strategy in which shares have been deposited - * @param prevDepositShares The number of deposit shares the staker had in the strategy prior to the increase - * @param addedShares The number of deposit shares added by the staker - * - * @dev Note that if the either the staker's current operator has been slashed 100% for `strategy`, OR the - * staker has been slashed 100% on the beacon chain such that the calculated slashing factor is 0, this - * method WILL REVERT. - */ + /// @notice Called by a share manager when a staker's deposit share balance in a strategy increases. + /// This method delegates any new shares to an operator (if applicable), and updates the staker's + /// deposit scaling factor regardless. + /// @param staker The address whose deposit shares have increased + /// @param strategy The strategy in which shares have been deposited + /// @param prevDepositShares The number of deposit shares the staker had in the strategy prior to the increase + /// @param addedShares The number of deposit shares added by the staker + /// + /// @dev Note that if the either the staker's current operator has been slashed 100% for `strategy`, OR the + /// staker has been slashed 100% on the beacon chain such that the calculated slashing factor is 0, this + /// method WILL REVERT. function increaseDelegatedShares( address staker, IStrategy strategy, @@ -338,35 +308,31 @@ interface IDelegationManager is ISignatureUtilsMixin, IDelegationManagerErrors, uint256 addedShares ) external; - /** - * @notice If the staker is delegated, decreases its operator's shares in response to - * a decrease in balance in the beaconChainETHStrategy - * @param staker the staker whose operator's balance will be decreased - * @param curDepositShares the current deposit shares held by the staker - * @param beaconChainSlashingFactorDecrease the amount that the staker's beaconChainSlashingFactor has decreased by - * @dev Note: `beaconChainSlashingFactorDecrease` are assumed to ALWAYS be < 1 WAD. - * These invariants are maintained in the EigenPodManager. - */ + /// @notice If the staker is delegated, decreases its operator's shares in response to + /// a decrease in balance in the beaconChainETHStrategy + /// @param staker the staker whose operator's balance will be decreased + /// @param curDepositShares the current deposit shares held by the staker + /// @param beaconChainSlashingFactorDecrease the amount that the staker's beaconChainSlashingFactor has decreased by + /// @dev Note: `beaconChainSlashingFactorDecrease` are assumed to ALWAYS be < 1 WAD. + /// These invariants are maintained in the EigenPodManager. function decreaseDelegatedShares( address staker, uint256 curDepositShares, uint64 beaconChainSlashingFactorDecrease ) external; - /** - * @notice Decreases the operator's shares in storage after a slash and increases the burnable shares by calling - * into either the StrategyManager or EigenPodManager (if the strategy is beaconChainETH). - * @param operator The operator to decrease shares for. - * @param operatorSet The operator set to decrease shares for. - * @param slashId The slash id to decrease shares for. - * @param strategy The strategy to decrease shares for. - * @param prevMaxMagnitude The previous maxMagnitude of the operator. - * @param newMaxMagnitude The new maxMagnitude of the operator. - * @dev Callable only by the AllocationManager. - * @dev Note: Assumes `prevMaxMagnitude <= newMaxMagnitude`. This invariant is maintained in - * the AllocationManager. - * @return totalDepositSharesToSlash The total deposit shares to burn or redistribute. - */ + /// @notice Decreases the operator's shares in storage after a slash and increases the burnable shares by calling + /// into either the StrategyManager or EigenPodManager (if the strategy is beaconChainETH). + /// @param operator The operator to decrease shares for. + /// @param operatorSet The operator set to decrease shares for. + /// @param slashId The slash id to decrease shares for. + /// @param strategy The strategy to decrease shares for. + /// @param prevMaxMagnitude The previous maxMagnitude of the operator. + /// @param newMaxMagnitude The new maxMagnitude of the operator. + /// @dev Callable only by the AllocationManager. + /// @dev Note: Assumes `prevMaxMagnitude <= newMaxMagnitude`. This invariant is maintained in + /// the AllocationManager. + /// @return totalDepositSharesToSlash The total deposit shares to burn or redistribute. function slashOperatorShares( address operator, OperatorSet calldata operatorSet, @@ -376,27 +342,24 @@ interface IDelegationManager is ISignatureUtilsMixin, IDelegationManagerErrors, uint64 newMaxMagnitude ) external returns (uint256 totalDepositSharesToSlash); - /** - * - * VIEW FUNCTIONS - * - */ - - /** - * @notice returns the address of the operator that `staker` is delegated to. - * @notice Mapping: staker => operator whom the staker is currently delegated to. - * @dev Note that returning address(0) indicates that the staker is not actively delegated to any operator. - */ + /// + /// VIEW FUNCTIONS + /// + + /// @notice returns the address of the operator that `staker` is delegated to. + /// @notice Mapping: staker => operator whom the staker is currently delegated to. + /// @dev Note that returning address(0) indicates that the staker is not actively delegated to any operator. function delegatedTo( address staker ) external view returns (address); - /** - * @notice Mapping: delegationApprover => 32-byte salt => whether or not the salt has already been used by the delegationApprover. - * @dev Salts are used in the `delegateTo` function. Note that this function only processes the delegationApprover's - * signature + the provided salt if the operator being delegated to has specified a nonzero address as their `delegationApprover`. - */ - function delegationApproverSaltIsSpent(address _delegationApprover, bytes32 salt) external view returns (bool); + /// @notice Mapping: delegationApprover => 32-byte salt => whether or not the salt has already been used by the delegationApprover. + /// @dev Salts are used in the `delegateTo` function. Note that this function only processes the delegationApprover's + /// signature + the provided salt if the operator being delegated to has specified a nonzero address as their `delegationApprover`. + function delegationApproverSaltIsSpent( + address _delegationApprover, + bytes32 salt + ) external view returns (bool); /// @notice Mapping: staker => cumulative number of queued withdrawals they have ever initiated. /// @dev This only increments (doesn't decrement), and is used to help ensure that otherwise identical withdrawals have unique hashes. @@ -404,110 +367,92 @@ interface IDelegationManager is ISignatureUtilsMixin, IDelegationManagerErrors, address staker ) external view returns (uint256); - /** - * @notice Returns 'true' if `staker` *is* actively delegated, and 'false' otherwise. - */ + /// @notice Returns 'true' if `staker` *is* actively delegated, and 'false' otherwise. function isDelegated( address staker ) external view returns (bool); - /** - * @notice Returns true is an operator has previously registered for delegation. - */ + /// @notice Returns true is an operator has previously registered for delegation. function isOperator( address operator ) external view returns (bool); - /** - * @notice Returns the delegationApprover account for an operator - */ + /// @notice Returns the delegationApprover account for an operator function delegationApprover( address operator ) external view returns (address); - /** - * @notice Returns the shares that an operator has delegated to them in a set of strategies - * @param operator the operator to get shares for - * @param strategies the strategies to get shares for - */ + /// @notice Returns the shares that an operator has delegated to them in a set of strategies + /// @param operator the operator to get shares for + /// @param strategies the strategies to get shares for function getOperatorShares( address operator, IStrategy[] memory strategies ) external view returns (uint256[] memory); - /** - * @notice Returns the shares that a set of operators have delegated to them in a set of strategies - * @param operators the operators to get shares for - * @param strategies the strategies to get shares for - */ + /// @notice Returns the shares that a set of operators have delegated to them in a set of strategies + /// @param operators the operators to get shares for + /// @param strategies the strategies to get shares for function getOperatorsShares( address[] memory operators, IStrategy[] memory strategies ) external view returns (uint256[][] memory); - /** - * @notice Returns amount of withdrawable shares from an operator for a strategy that is still in the queue - * and therefore slashable. - * @param operator the operator to get shares for - * @param strategy the strategy to get shares for - * @return the amount of shares that are slashable in the withdrawal queue for an operator and a strategy - * @dev If multiple slashes occur to shares in the queue, the function properly accounts for the fewer - * number of shares that are available to be slashed. - */ - function getSlashableSharesInQueue(address operator, IStrategy strategy) external view returns (uint256); - - /** - * @notice Given a staker and a set of strategies, return the shares they can queue for withdrawal and the - * corresponding depositShares. - * This value depends on which operator the staker is delegated to. - * The shares amount returned is the actual amount of Strategy shares the staker would receive (subject - * to each strategy's underlying shares to token ratio). - */ + /// @notice Returns amount of withdrawable shares from an operator for a strategy that is still in the queue + /// and therefore slashable. + /// @param operator the operator to get shares for + /// @param strategy the strategy to get shares for + /// @return the amount of shares that are slashable in the withdrawal queue for an operator and a strategy + /// @dev If multiple slashes occur to shares in the queue, the function properly accounts for the fewer + /// number of shares that are available to be slashed. + function getSlashableSharesInQueue( + address operator, + IStrategy strategy + ) external view returns (uint256); + + /// @notice Given a staker and a set of strategies, return the shares they can queue for withdrawal and the + /// corresponding depositShares. + /// This value depends on which operator the staker is delegated to. + /// The shares amount returned is the actual amount of Strategy shares the staker would receive (subject + /// to each strategy's underlying shares to token ratio). function getWithdrawableShares( address staker, IStrategy[] memory strategies ) external view returns (uint256[] memory withdrawableShares, uint256[] memory depositShares); - /** - * @notice Returns the number of shares in storage for a staker and all their strategies - */ + /// @notice Returns the number of shares in storage for a staker and all their strategies function getDepositedShares( address staker ) external view returns (IStrategy[] memory, uint256[] memory); - /** - * @notice Returns the scaling factor applied to a staker's deposits for a given strategy - */ - function depositScalingFactor(address staker, IStrategy strategy) external view returns (uint256); + /// @notice Returns the scaling factor applied to a staker's deposits for a given strategy + function depositScalingFactor( + address staker, + IStrategy strategy + ) external view returns (uint256); - /** - * @notice Returns the Withdrawal associated with a `withdrawalRoot`. - * @param withdrawalRoot The hash identifying the queued withdrawal. - * @return withdrawal The withdrawal details. - */ + /// @notice Returns the Withdrawal associated with a `withdrawalRoot`. + /// @param withdrawalRoot The hash identifying the queued withdrawal. + /// @return withdrawal The withdrawal details. function queuedWithdrawals( bytes32 withdrawalRoot ) external view returns (Withdrawal memory withdrawal); - /** - * @notice Returns the Withdrawal and corresponding shares associated with a `withdrawalRoot` - * @param withdrawalRoot The hash identifying the queued withdrawal - * @return withdrawal The withdrawal details - * @return shares Array of shares corresponding to each strategy in the withdrawal - * @dev The shares are what a user would receive from completing a queued withdrawal, assuming all slashings are applied - * @dev Withdrawals queued before the slashing release cannot be queried with this method - */ + /// @notice Returns the Withdrawal and corresponding shares associated with a `withdrawalRoot` + /// @param withdrawalRoot The hash identifying the queued withdrawal + /// @return withdrawal The withdrawal details + /// @return shares Array of shares corresponding to each strategy in the withdrawal + /// @dev The shares are what a user would receive from completing a queued withdrawal, assuming all slashings are applied + /// @dev Withdrawals queued before the slashing release cannot be queried with this method function getQueuedWithdrawal( bytes32 withdrawalRoot ) external view returns (Withdrawal memory withdrawal, uint256[] memory shares); - /** - * @notice Returns all queued withdrawals and their corresponding shares for a staker. - * @param staker The address of the staker to query withdrawals for. - * @return withdrawals Array of Withdrawal structs containing details about each queued withdrawal. - * @return shares 2D array of shares, where each inner array corresponds to the strategies in the withdrawal. - * @dev The shares are what a user would receive from completing a queued withdrawal, assuming all slashings are applied. - */ + /// @notice Returns all queued withdrawals and their corresponding shares for a staker. + /// @param staker The address of the staker to query withdrawals for. + /// @return withdrawals Array of Withdrawal structs containing details about each queued withdrawal. + /// @return shares 2D array of shares, where each inner array corresponds to the strategies in the withdrawal. + /// @dev The shares are what a user would receive from completing a queued withdrawal, assuming all slashings are applied. function getQueuedWithdrawals( address staker ) external view returns (Withdrawal[] memory withdrawals, uint256[][] memory shares); @@ -518,15 +463,13 @@ interface IDelegationManager is ISignatureUtilsMixin, IDelegationManagerErrors, address staker ) external view returns (bytes32[] memory); - /** - * @notice Converts shares for a set of strategies to deposit shares, likely in order to input into `queueWithdrawals`. - * This function will revert from a division by 0 error if any of the staker's strategies have a slashing factor of 0. - * @param staker the staker to convert shares for - * @param strategies the strategies to convert shares for - * @param withdrawableShares the shares to convert - * @return the deposit shares - * @dev will be a few wei off due to rounding errors - */ + /// @notice Converts shares for a set of strategies to deposit shares, likely in order to input into `queueWithdrawals`. + /// This function will revert from a division by 0 error if any of the staker's strategies have a slashing factor of 0. + /// @param staker the staker to convert shares for + /// @param strategies the strategies to convert shares for + /// @param withdrawableShares the shares to convert + /// @return the deposit shares + /// @dev will be a few wei off due to rounding errors function convertToDepositShares( address staker, IStrategy[] memory strategies, @@ -538,14 +481,12 @@ interface IDelegationManager is ISignatureUtilsMixin, IDelegationManagerErrors, Withdrawal memory withdrawal ) external pure returns (bytes32); - /** - * @notice Calculates the digest hash to be signed by the operator's delegationApprove and used in the `delegateTo` function. - * @param staker The account delegating their stake - * @param operator The account receiving delegated stake - * @param _delegationApprover the operator's `delegationApprover` who will be signing the delegationHash (in general) - * @param approverSalt A unique and single use value associated with the approver signature. - * @param expiry Time after which the approver's signature becomes invalid - */ + /// @notice Calculates the digest hash to be signed by the operator's delegationApprove and used in the `delegateTo` function. + /// @param staker The account delegating their stake + /// @param operator The account receiving delegated stake + /// @param _delegationApprover the operator's `delegationApprover` who will be signing the delegationHash (in general) + /// @param approverSalt A unique and single use value associated with the approver signature. + /// @param expiry Time after which the approver's signature becomes invalid function calculateDelegationApprovalDigestHash( address staker, address operator, @@ -557,13 +498,11 @@ interface IDelegationManager is ISignatureUtilsMixin, IDelegationManagerErrors, /// @notice return address of the beaconChainETHStrategy function beaconChainETHStrategy() external view returns (IStrategy); - /** - * @notice Returns the minimum withdrawal delay in blocks to pass for withdrawals queued to be completable. - * Also applies to legacy withdrawals so any withdrawals not completed prior to the slashing upgrade will be subject - * to this longer delay. - * @dev Backwards-compatible interface to return the internal `MIN_WITHDRAWAL_DELAY_BLOCKS` value - * @dev Previous value in storage was deprecated. See `__deprecated_minWithdrawalDelayBlocks` - */ + /// @notice Returns the minimum withdrawal delay in blocks to pass for withdrawals queued to be completable. + /// Also applies to legacy withdrawals so any withdrawals not completed prior to the slashing upgrade will be subject + /// to this longer delay. + /// @dev Backwards-compatible interface to return the internal `MIN_WITHDRAWAL_DELAY_BLOCKS` value + /// @dev Previous value in storage was deprecated. See `__deprecated_minWithdrawalDelayBlocks` function minWithdrawalDelayBlocks() external view returns (uint32); /// @notice The EIP-712 typehash for the DelegationApproval struct used by the contract diff --git a/src/contracts/interfaces/IECDSACertificateVerifier.sol b/src/contracts/interfaces/IECDSACertificateVerifier.sol index 799c179815..9ba4c541ba 100644 --- a/src/contracts/interfaces/IECDSACertificateVerifier.sol +++ b/src/contracts/interfaces/IECDSACertificateVerifier.sol @@ -28,17 +28,15 @@ interface IECDSACertificateVerifierErrors { } interface IECDSACertificateVerifierTypes is IOperatorTableCalculatorTypes { - /** - * @notice A Certificate used to verify a set of ECDSA signatures for an off-chain task - * @param referenceTimestamp a reference timestamp that corresponds to a timestamp at which an operator table was updated for the operatorSet - * @param messageHash the hash of a task that was completed by operators. The messageHash is defined by the AVS, see `TaskMailbox.sol` for an example implementation. - * NOTE: This value is NOT the message that is signed by operators - see `calculateCertificateDigest` for the signable digest. - * @param sig the concatenated signature of each signing operator, in ascending order of signer address. The signature should be over the signable digest, - * which is calculated by `calculateCertificateDigest` - * @dev The signers can be sorted via OZ sort library - * @dev ECDSA certificates DO NOT support smart contract signatures - * @dev The `referenceTimestamp` is used to key into the operatorSet's stake weights. It is NOT the timestamp at which the certificate was generated off-chain - */ + /// @notice A Certificate used to verify a set of ECDSA signatures for an off-chain task + /// @param referenceTimestamp a reference timestamp that corresponds to a timestamp at which an operator table was updated for the operatorSet + /// @param messageHash the hash of a task that was completed by operators. The messageHash is defined by the AVS, see `TaskMailbox.sol` for an example implementation. + /// NOTE: This value is NOT the message that is signed by operators - see `calculateCertificateDigest` for the signable digest. + /// @param sig the concatenated signature of each signing operator, in ascending order of signer address. The signature should be over the signable digest, + /// which is calculated by `calculateCertificateDigest` + /// @dev The signers can be sorted via OZ sort library + /// @dev ECDSA certificates DO NOT support smart contract signatures + /// @dev The `referenceTimestamp` is used to key into the operatorSet's stake weights. It is NOT the timestamp at which the certificate was generated off-chain struct ECDSACertificate { uint32 referenceTimestamp; bytes32 messageHash; @@ -86,23 +84,20 @@ interface IECDSACertificateVerifier is /// a. An in-flight certificate for a past reference timestamp and an operator table update for a newer reference timestamp. The AVS should decide whether it /// wants to only confirm tasks against the *latest* certificate /// b. An in-flight certificate against a stake table with a majority-stake operator that has been slashed or removed from the operatorSet - - /** - * @notice updates the operatorSet with the operator table (i.e. stake weights) and its configuration - * @param operatorSet the operatorSet to update the operator table for - * @param referenceTimestamp the timestamp at which the operatorInfos (i.e. operator table) was sourced - * @param operatorInfos the operatorInfos to update the operator table with. - * See `IOperatorTableCalculator.ECDSAOperatorInfo` for more details - * @param operatorSetConfig the configuration of the operatorSet, which includes the owner and max staleness period - * @dev This function can only be called by the `OperatorTableUpdater` contract, which is itself permissionless to call - * @dev The `referenceTimestamp` must correspond to a reference timestamp for a globalTableRoot stored in the `OperatorTableUpdater` - * In addition, it must be greater than the latest reference timestamp for the given operatorSet - * @dev Reverts for: - * - OnlyTableUpdater: Caller is not the operatorTableUpdater - * - TableUpdateStale: The referenceTimestamp is not greater than the latest reference timestamp - * @dev Emits the following events: - * - TableUpdated: When the operator table is successfully updated - */ + /// @notice updates the operatorSet with the operator table (i.e. stake weights) and its configuration + /// @param operatorSet the operatorSet to update the operator table for + /// @param referenceTimestamp the timestamp at which the operatorInfos (i.e. operator table) was sourced + /// @param operatorInfos the operatorInfos to update the operator table with. + /// See `IOperatorTableCalculator.ECDSAOperatorInfo` for more details + /// @param operatorSetConfig the configuration of the operatorSet, which includes the owner and max staleness period + /// @dev This function can only be called by the `OperatorTableUpdater` contract, which is itself permissionless to call + /// @dev The `referenceTimestamp` must correspond to a reference timestamp for a globalTableRoot stored in the `OperatorTableUpdater` + /// In addition, it must be greater than the latest reference timestamp for the given operatorSet + /// @dev Reverts for: + /// - OnlyTableUpdater: Caller is not the operatorTableUpdater + /// - TableUpdateStale: The referenceTimestamp is not greater than the latest reference timestamp + /// @dev Emits the following events: + /// - TableUpdated: When the operator table is successfully updated function updateOperatorTable( OperatorSet calldata operatorSet, uint32 referenceTimestamp, @@ -110,152 +105,136 @@ interface IECDSACertificateVerifier is OperatorSetConfig calldata operatorSetConfig ) external; - /** - * @notice verifies a certificate against the operator table for a given reference timestamp - * @param operatorSet the operatorSet that the certificate is for - * @param cert a certificate - * @return totalSignedStakeWeights total stake weight that signed the certificate for each stake type. Each - * index corresponds to a stake type in the `weights` array in the `ECDSAOperatorInfo` struct - * @return signers array of addresses that signed the certificate - * @dev This function DOES NOT support smart contact signatures - * @dev The `referenceTimestamp` in the `ECDSACertificate` is used to determine the operator table to use for the verification - * @dev AVS' are responsible for managing potential race conditions when certificates are signed close to operator table updates. Some examples include: - * a. An in-flight certificate for a past reference timestamp and an operator table update for a newer reference timestamp. The AVS should decide whether it - * wants to only confirm tasks against the *latest* certificate - * b. An in-flight certificate against a stake table with a majority-stake operator that has been slashed or removed from the operatorSet - * @dev Reverts for: - * - CertificateStale: The certificate's referenceTimestamp is too stale with respect to the maxStalenessPeriod of the operatorSet - * - ReferenceTimestampDoesNotExist: The root at referenceTimestamp does not exist - * - RootDisabled: The root at referenceTimestamp is not valid - * - InvalidSignatureLength: Signatures are not proper length - * - InvalidSignature: Each signature is not valid - * - SignersNotOrdered: Signatures are not ordered by signer address ascending - * - ReferenceTimestampDoesNotExist: The operatorSet has not been updated for the referenceTimestamp - * - OperatorCountZero: There are zero operators for the referenceTimestamp - * - VerificationFailed: Any signer is not a registered operator - */ + /// @notice verifies a certificate against the operator table for a given reference timestamp + /// @param operatorSet the operatorSet that the certificate is for + /// @param cert a certificate + /// @return totalSignedStakeWeights total stake weight that signed the certificate for each stake type. Each + /// index corresponds to a stake type in the `weights` array in the `ECDSAOperatorInfo` struct + /// @return signers array of addresses that signed the certificate + /// @dev This function DOES NOT support smart contact signatures + /// @dev The `referenceTimestamp` in the `ECDSACertificate` is used to determine the operator table to use for the verification + /// @dev AVS' are responsible for managing potential race conditions when certificates are signed close to operator table updates. Some examples include: + /// a. An in-flight certificate for a past reference timestamp and an operator table update for a newer reference timestamp. The AVS should decide whether it + /// wants to only confirm tasks against the *latest* certificate + /// b. An in-flight certificate against a stake table with a majority-stake operator that has been slashed or removed from the operatorSet + /// @dev Reverts for: + /// - CertificateStale: The certificate's referenceTimestamp is too stale with respect to the maxStalenessPeriod of the operatorSet + /// - ReferenceTimestampDoesNotExist: The root at referenceTimestamp does not exist + /// - RootDisabled: The root at referenceTimestamp is not valid + /// - InvalidSignatureLength: Signatures are not proper length + /// - InvalidSignature: Each signature is not valid + /// - SignersNotOrdered: Signatures are not ordered by signer address ascending + /// - ReferenceTimestampDoesNotExist: The operatorSet has not been updated for the referenceTimestamp + /// - OperatorCountZero: There are zero operators for the referenceTimestamp + /// - VerificationFailed: Any signer is not a registered operator function verifyCertificate( OperatorSet calldata operatorSet, ECDSACertificate memory cert ) external view returns (uint256[] memory totalSignedStakeWeights, address[] memory signers); - /** - * @notice verifies a certificate and makes sure that the signed stakes meet - * provided portions of the total stake weight on the AVS - * @param operatorSet the operatorSet to verify the certificate for - * @param cert a certificate - * @param totalStakeProportionThresholds the proportion, in BPS, of total stake weight that - * the signed stake of the certificate should meet. Each index corresponds to - * a stake type in the `weights` array in the `ECDSAOperatorInfo` - * @return Whether or not the certificate is valid and meets thresholds - * @return signers array of addresses that signed the certificate - * @dev This function DOES NOT support smart contact signatures - * @dev The `referenceTimestamp` in the `ECDSACertificate` is used to determine the operator table to use for the verification - * @dev AVS' are responsible for managing potential race conditions when certificates are signed close to operator table updates. Some examples include: - * a. An in-flight certificate for a past reference timestamp and an operator table update for a newer reference timestamp. The AVS should decide whether it - * wants to only confirm tasks against the *latest* certificate - * b. An in-flight certificate against a stake table with a majority-stake operator that has been slashed or removed from the operatorSet - * @dev Reverts for: - * - All requirements from verifyCertificate - * - ArrayLengthMismatch: signedStakes.length does not equal totalStakeProportionThresholds.length - */ + /// @notice verifies a certificate and makes sure that the signed stakes meet + /// provided portions of the total stake weight on the AVS + /// @param operatorSet the operatorSet to verify the certificate for + /// @param cert a certificate + /// @param totalStakeProportionThresholds the proportion, in BPS, of total stake weight that + /// the signed stake of the certificate should meet. Each index corresponds to + /// a stake type in the `weights` array in the `ECDSAOperatorInfo` + /// @return Whether or not the certificate is valid and meets thresholds + /// @return signers array of addresses that signed the certificate + /// @dev This function DOES NOT support smart contact signatures + /// @dev The `referenceTimestamp` in the `ECDSACertificate` is used to determine the operator table to use for the verification + /// @dev AVS' are responsible for managing potential race conditions when certificates are signed close to operator table updates. Some examples include: + /// a. An in-flight certificate for a past reference timestamp and an operator table update for a newer reference timestamp. The AVS should decide whether it + /// wants to only confirm tasks against the *latest* certificate + /// b. An in-flight certificate against a stake table with a majority-stake operator that has been slashed or removed from the operatorSet + /// @dev Reverts for: + /// - All requirements from verifyCertificate + /// - ArrayLengthMismatch: signedStakes.length does not equal totalStakeProportionThresholds.length function verifyCertificateProportion( OperatorSet calldata operatorSet, ECDSACertificate memory cert, uint16[] memory totalStakeProportionThresholds ) external view returns (bool, address[] memory signers); - /** - * @notice verifies a certificate and makes sure that the signed stakes meet - * provided nominal stake thresholds - * @param operatorSet the operatorSet that the certificate is for - * @param cert a certificate - * @param totalStakeNominalThresholds the nominal amount of total stake weight that - * the signed stake of the certificate should meet. Each index corresponds to - * a stake type in the `weights` array in the `ECDSAOperatorInfo` - * @return Whether or not the certificate is valid and meets thresholds - * @return signers array of addresses that signed the certificate - * @dev This function DOES NOT support smart contact signatures - * @dev The `referenceTimestamp` in the `ECDSACertificate` is used to determine the operator table to use for the verification - * @dev AVS' are responsible for managing potential race conditions when certificates are signed close to operator table updates. Some examples include: - * a. An in-flight certificate for a past reference timestamp and an operator table update for a newer reference timestamp. The AVS should decide whether it - * wants to only confirm tasks against the *latest* certificate - * b. An in-flight certificate against a stake table with a majority-stake operator that has been slashed or removed from the operatorSet - * @dev Reverts for: - * - All requirements from verifyCertificate - * - ArrayLengthMismatch: signedStakes.length does not equal totalStakeNominalThresholds.length - */ + /// @notice verifies a certificate and makes sure that the signed stakes meet + /// provided nominal stake thresholds + /// @param operatorSet the operatorSet that the certificate is for + /// @param cert a certificate + /// @param totalStakeNominalThresholds the nominal amount of total stake weight that + /// the signed stake of the certificate should meet. Each index corresponds to + /// a stake type in the `weights` array in the `ECDSAOperatorInfo` + /// @return Whether or not the certificate is valid and meets thresholds + /// @return signers array of addresses that signed the certificate + /// @dev This function DOES NOT support smart contact signatures + /// @dev The `referenceTimestamp` in the `ECDSACertificate` is used to determine the operator table to use for the verification + /// @dev AVS' are responsible for managing potential race conditions when certificates are signed close to operator table updates. Some examples include: + /// a. An in-flight certificate for a past reference timestamp and an operator table update for a newer reference timestamp. The AVS should decide whether it + /// wants to only confirm tasks against the *latest* certificate + /// b. An in-flight certificate against a stake table with a majority-stake operator that has been slashed or removed from the operatorSet + /// @dev Reverts for: + /// - All requirements from verifyCertificate + /// - ArrayLengthMismatch: signedStakes.length does not equal totalStakeNominalThresholds.length function verifyCertificateNominal( OperatorSet calldata operatorSet, ECDSACertificate memory cert, uint256[] memory totalStakeNominalThresholds ) external view returns (bool, address[] memory signers); - /** - * @notice Get operator infos for a timestamp, which for each operator is the operator's signing key and stake weights - * @param operatorSet The operator set - * @param referenceTimestamp The reference timestamp - * @return The operator infos, empty if the operatorSet has not been updated for the given reference timestamp - */ + /// @notice Get operator infos for a timestamp, which for each operator is the operator's signing key and stake weights + /// @param operatorSet The operator set + /// @param referenceTimestamp The reference timestamp + /// @return The operator infos, empty if the operatorSet has not been updated for the given reference timestamp function getOperatorInfos( OperatorSet calldata operatorSet, uint32 referenceTimestamp ) external view returns (ECDSAOperatorInfo[] memory); - /** - * @notice Get a single operator info by index - * @param operatorSet The operator set - * @param referenceTimestamp The reference timestamp - * @param operatorIndex The index of the operator - * @return The operator info, empty if the operatorSet has not been updated for the given reference timestamp - * @dev The index is at most the number of operators in the operatorSet at the given reference timestamp, - * which is given by `getOperatorCount` - * @dev Reverts for: - * - IndexOutOfBounds: operatorIndex is greater than or equal to the number of operators - */ + /// @notice Get a single operator info by index + /// @param operatorSet The operator set + /// @param referenceTimestamp The reference timestamp + /// @param operatorIndex The index of the operator + /// @return The operator info, empty if the operatorSet has not been updated for the given reference timestamp + /// @dev The index is at most the number of operators in the operatorSet at the given reference timestamp, + /// which is given by `getOperatorCount` + /// @dev Reverts for: + /// - IndexOutOfBounds: operatorIndex is greater than or equal to the number of operators function getOperatorInfo( OperatorSet calldata operatorSet, uint32 referenceTimestamp, uint256 operatorIndex ) external view returns (ECDSAOperatorInfo memory); - /** - * @notice Override domainSeparator to not include chainId - * @return The domain separator hash without chainId - * @dev This function overrides the base domainSeparator to not include chainId to replay - * certificates across multiple destination chains - */ + /// @notice Override domainSeparator to not include chainId + /// @return The domain separator hash without chainId + /// @dev This function overrides the base domainSeparator to not include chainId to replay + /// certificates across multiple destination chains function domainSeparator() external view returns (bytes32); - /** - * @notice Calculate the EIP-712 digest bytes for a certificate, returning the raw bytes of the digest - * @param referenceTimestamp The reference timestamp - * @param messageHash The message hash of the task - * @return The EIP-712 digest - * @dev EIP-712 is a standard ECDSA signature verification framework. See https://eips.ethereum.org/EIPS/eip-712 for more details - * @dev This function is public to allow offchain tools to calculate the same digest - * @dev Note: This does not support smart contract based signatures for multichain - * @dev This is a chain-agnostic digest, so it can be used to verify certificates across - * multiple destination chains - * @dev This function returns the raw bytes of the digest, which still need to be hashed - * before signing with ECDSA - */ + /// @notice Calculate the EIP-712 digest bytes for a certificate, returning the raw bytes of the digest + /// @param referenceTimestamp The reference timestamp + /// @param messageHash The message hash of the task + /// @return The EIP-712 digest + /// @dev EIP-712 is a standard ECDSA signature verification framework. See https://eips.ethereum.org/EIPS/eip-712 for more details + /// @dev This function is public to allow offchain tools to calculate the same digest + /// @dev Note: This does not support smart contract based signatures for multichain + /// @dev This is a chain-agnostic digest, so it can be used to verify certificates across + /// multiple destination chains + /// @dev This function returns the raw bytes of the digest, which still need to be hashed + /// before signing with ECDSA function calculateCertificateDigestBytes( uint32 referenceTimestamp, bytes32 messageHash ) external view returns (bytes memory); - /** - * @notice Calculate the EIP-712 digest for a certificate, returning the hash of the digest - * @param referenceTimestamp The reference timestamp - * @param messageHash The message hash of the task - * @return The EIP-712 digest - * @dev EIP-712 is a standard ECDSA signature verification framework. See https://eips.ethereum.org/EIPS/eip-712 for more details - * @dev This function is public to allow offchain tools to calculate the same digest - * @dev Note: This does not support smart contract based signatures for multichain - * @dev This is a chain-agnostic digest, so it can be used to verify certificates across - * multiple destination chains - */ + /// @notice Calculate the EIP-712 digest for a certificate, returning the hash of the digest + /// @param referenceTimestamp The reference timestamp + /// @param messageHash The message hash of the task + /// @return The EIP-712 digest + /// @dev EIP-712 is a standard ECDSA signature verification framework. See https://eips.ethereum.org/EIPS/eip-712 for more details + /// @dev This function is public to allow offchain tools to calculate the same digest + /// @dev Note: This does not support smart contract based signatures for multichain + /// @dev This is a chain-agnostic digest, so it can be used to verify certificates across + /// multiple destination chains function calculateCertificateDigest( uint32 referenceTimestamp, bytes32 messageHash diff --git a/src/contracts/interfaces/IEigen.sol b/src/contracts/interfaces/IEigen.sol index 0de79374bf..7dce5fa38a 100644 --- a/src/contracts/interfaces/IEigen.sol +++ b/src/contracts/interfaces/IEigen.sol @@ -4,54 +4,44 @@ pragma solidity >=0.5.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IEigen is IERC20 { - /** - * @notice This function allows the owner to set the allowedFrom status of an address - * @param from the address whose allowedFrom status is being set - * @param isAllowedFrom the new allowedFrom status - */ - function setAllowedFrom(address from, bool isAllowedFrom) external; - - /** - * @notice This function allows the owner to set the allowedTo status of an address - * @param to the address whose allowedTo status is being set - * @param isAllowedTo the new allowedTo status - */ - function setAllowedTo(address to, bool isAllowedTo) external; - - /** - * @notice Allows the owner to disable transfer restrictions - */ + /// @notice This function allows the owner to set the allowedFrom status of an address + /// @param from the address whose allowedFrom status is being set + /// @param isAllowedFrom the new allowedFrom status + function setAllowedFrom( + address from, + bool isAllowedFrom + ) external; + + /// @notice This function allows the owner to set the allowedTo status of an address + /// @param to the address whose allowedTo status is being set + /// @param isAllowedTo the new allowedTo status + function setAllowedTo( + address to, + bool isAllowedTo + ) external; + + /// @notice Allows the owner to disable transfer restrictions function disableTransferRestrictions() external; - /** - * @notice This function allows minter to mint tokens - */ + /// @notice This function allows minter to mint tokens function mint() external; - /** - * @notice This function allows bEIGEN holders to wrap their tokens into Eigen - */ + /// @notice This function allows bEIGEN holders to wrap their tokens into Eigen function wrap( uint256 amount ) external; - /** - * @notice This function allows Eigen holders to unwrap their tokens into bEIGEN - */ + /// @notice This function allows Eigen holders to unwrap their tokens into bEIGEN function unwrap( uint256 amount ) external; - /** - * @dev Clock used for flagging checkpoints. Has been overridden to implement timestamp based - * checkpoints (and voting). - */ + /// @dev Clock used for flagging checkpoints. Has been overridden to implement timestamp based + /// checkpoints (and voting). function clock() external view returns (uint48); - /** - * @dev Machine-readable description of the clock as specified in EIP-6372. - * Has been overridden to inform callers that this contract uses timestamps instead of block numbers, to match `clock()` - */ + /// @dev Machine-readable description of the clock as specified in EIP-6372. + /// Has been overridden to inform callers that this contract uses timestamps instead of block numbers, to match `clock()` // solhint-disable-next-line func-name-mixedcase function CLOCK_MODE() external pure returns (string memory); } diff --git a/src/contracts/interfaces/IEigenPod.sol b/src/contracts/interfaces/IEigenPod.sol index 70119b082f..89f06ef127 100644 --- a/src/contracts/interfaces/IEigenPod.sol +++ b/src/contracts/interfaces/IEigenPod.sol @@ -86,15 +86,12 @@ interface IEigenPodTypes { INACTIVE, // doesnt exist ACTIVE, // staked on ethpos and withdrawal credentials are pointed to the EigenPod WITHDRAWN // withdrawn from the Beacon Chain - } - /** - * @param validatorIndex index of the validator on the beacon chain - * @param restakedBalanceGwei amount of beacon chain ETH restaked on EigenLayer in gwei - * @param lastCheckpointedAt timestamp of the validator's most recent balance update - * @param status last recorded status of the validator - */ + /// @param validatorIndex index of the validator on the beacon chain + /// @param restakedBalanceGwei amount of beacon chain ETH restaked on EigenLayer in gwei + /// @param lastCheckpointedAt timestamp of the validator's most recent balance update + /// @param status last recorded status of the validator struct ValidatorInfo { uint64 validatorIndex; uint64 restakedBalanceGwei; @@ -110,25 +107,21 @@ interface IEigenPodTypes { uint64 prevBeaconBalanceGwei; } - /** - * @param srcPubkey the pubkey of the source validator for the consolidation - * @param targetPubkey the pubkey of the target validator for the consolidation - * @dev Note that if srcPubkey == targetPubkey, this is a "switch request," and will - * change the validator's withdrawal credential type from 0x01 to 0x02. - * For more notes on usage, see `requestConsolidation` - */ + /// @param srcPubkey the pubkey of the source validator for the consolidation + /// @param targetPubkey the pubkey of the target validator for the consolidation + /// @dev Note that if srcPubkey == targetPubkey, this is a "switch request," and will + /// change the validator's withdrawal credential type from 0x01 to 0x02. + /// For more notes on usage, see `requestConsolidation` struct ConsolidationRequest { bytes srcPubkey; bytes targetPubkey; } - /** - * @param pubkey the pubkey of the validator to withdraw from - * @param amountGwei the amount (in gwei) to withdraw from the beacon chain to the pod - * @dev Note that if amountGwei == 0, this is a "full exit request," and will fully exit - * the validator to the pod. - * For more notes on usage, see `requestWithdrawal` - */ + /// @param pubkey the pubkey of the validator to withdraw from + /// @param amountGwei the amount (in gwei) to withdraw from the beacon chain to the pod + /// @dev Note that if amountGwei == 0, this is a "full exit request," and will fully exit + /// the validator to the pod. + /// For more notes on usage, see `requestWithdrawal` struct WithdrawalRequest { bytes pubkey; uint64 amountGwei; @@ -157,7 +150,9 @@ interface IEigenPodEvents is IEigenPodTypes { /// @notice Emitted when a checkpoint is created event CheckpointCreated( - uint64 indexed checkpointTimestamp, bytes32 indexed beaconBlockRoot, uint256 validatorCount + uint64 indexed checkpointTimestamp, + bytes32 indexed beaconBlockRoot, + uint256 validatorCount ); /// @notice Emitted when a checkpoint is finalized @@ -182,13 +177,11 @@ interface IEigenPodEvents is IEigenPodTypes { event WithdrawalRequested(bytes32 indexed validatorPubkeyHash, uint64 withdrawalAmountGwei); } -/** - * @title The implementation contract used for restaking beacon chain ETH on EigenLayer - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @dev Note that all beacon chain balances are stored as gwei within the beacon chain datastructures. We choose - * to account balances in terms of gwei in the EigenPod contract and convert to wei when making calls to other contracts - */ +/// @title The implementation contract used for restaking beacon chain ETH on EigenLayer +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @dev Note that all beacon chain balances are stored as gwei within the beacon chain datastructures. We choose +/// to account balances in terms of gwei in the EigenPod contract and convert to wei when making calls to other contracts interface IEigenPod is IEigenPodErrors, IEigenPodEvents { /// @notice Used to initialize the pointers to contracts crucial to the pod's functionality, in beacon proxy construction from EigenPodManager function initialize( @@ -197,60 +190,59 @@ interface IEigenPod is IEigenPodErrors, IEigenPodEvents { /// @notice Called by EigenPodManager when the owner wants to create another ETH validator. /// @dev This function only supports staking to a 0x01 validator. For compounding validators, please interact directly with the deposit contract. - function stake(bytes calldata pubkey, bytes calldata signature, bytes32 depositDataRoot) external payable; - - /** - * @notice Transfers `amountWei` from this contract to the `recipient`. Only callable by the EigenPodManager as part - * of the DelegationManager's withdrawal flow. - * @dev `amountWei` is not required to be a whole Gwei amount. Amounts less than a Gwei multiple may be unrecoverable due to Gwei conversion. - */ - function withdrawRestakedBeaconChainETH(address recipient, uint256 amount) external; - - /** - * @dev Create a checkpoint used to prove this pod's active validator set. Checkpoints are completed - * by submitting one checkpoint proof per ACTIVE validator. During the checkpoint process, the total - * change in ACTIVE validator balance is tracked, and any validators with 0 balance are marked `WITHDRAWN`. - * @dev Once finalized, the pod owner is awarded shares corresponding to: - * - the total change in their ACTIVE validator balances - * - any ETH in the pod not already awarded shares - * @dev A checkpoint cannot be created if the pod already has an outstanding checkpoint. If - * this is the case, the pod owner MUST complete the existing checkpoint before starting a new one. - * @param revertIfNoBalance Forces a revert if the pod ETH balance is 0. This allows the pod owner - * to prevent accidentally starting a checkpoint that will not increase their shares - */ + function stake( + bytes calldata pubkey, + bytes calldata signature, + bytes32 depositDataRoot + ) external payable; + + /// @notice Transfers `amountWei` from this contract to the `recipient`. Only callable by the EigenPodManager as part + /// of the DelegationManager's withdrawal flow. + /// @dev `amountWei` is not required to be a whole Gwei amount. Amounts less than a Gwei multiple may be unrecoverable due to Gwei conversion. + function withdrawRestakedBeaconChainETH( + address recipient, + uint256 amount + ) external; + + /// @dev Create a checkpoint used to prove this pod's active validator set. Checkpoints are completed + /// by submitting one checkpoint proof per ACTIVE validator. During the checkpoint process, the total + /// change in ACTIVE validator balance is tracked, and any validators with 0 balance are marked `WITHDRAWN`. + /// @dev Once finalized, the pod owner is awarded shares corresponding to: + /// - the total change in their ACTIVE validator balances + /// - any ETH in the pod not already awarded shares + /// @dev A checkpoint cannot be created if the pod already has an outstanding checkpoint. If + /// this is the case, the pod owner MUST complete the existing checkpoint before starting a new one. + /// @param revertIfNoBalance Forces a revert if the pod ETH balance is 0. This allows the pod owner + /// to prevent accidentally starting a checkpoint that will not increase their shares function startCheckpoint( bool revertIfNoBalance ) external; - /** - * @dev Progress the current checkpoint towards completion by submitting one or more validator - * checkpoint proofs. Anyone can call this method to submit proofs towards the current checkpoint. - * For each validator proven, the current checkpoint's `proofsRemaining` decreases. - * @dev If the checkpoint's `proofsRemaining` reaches 0, the checkpoint is finalized. - * (see `_updateCheckpoint` for more details) - * @dev This method can only be called when there is a currently-active checkpoint. - * @param balanceContainerProof proves the beacon's current balance container root against a checkpoint's `beaconBlockRoot` - * @param proofs Proofs for one or more validator current balances against the `balanceContainerRoot` - */ + /// @dev Progress the current checkpoint towards completion by submitting one or more validator + /// checkpoint proofs. Anyone can call this method to submit proofs towards the current checkpoint. + /// For each validator proven, the current checkpoint's `proofsRemaining` decreases. + /// @dev If the checkpoint's `proofsRemaining` reaches 0, the checkpoint is finalized. + /// (see `_updateCheckpoint` for more details) + /// @dev This method can only be called when there is a currently-active checkpoint. + /// @param balanceContainerProof proves the beacon's current balance container root against a checkpoint's `beaconBlockRoot` + /// @param proofs Proofs for one or more validator current balances against the `balanceContainerRoot` function verifyCheckpointProofs( BeaconChainProofs.BalanceContainerProof calldata balanceContainerProof, BeaconChainProofs.BalanceProof[] calldata proofs ) external; - /** - * @dev Verify one or more validators have their withdrawal credentials pointed at this EigenPod, and award - * shares based on their effective balance. Proven validators are marked `ACTIVE` within the EigenPod, and - * future checkpoint proofs will need to include them. - * @dev Withdrawal credential proofs MUST NOT be older than `currentCheckpointTimestamp`. - * @dev Validators proven via this method MUST NOT have an exit epoch set already. - * @param beaconTimestamp the beacon chain timestamp sent to the 4788 oracle contract. Corresponds - * to the parent beacon block root against which the proof is verified. - * @param stateRootProof proves a beacon state root against a beacon block root - * @param validatorIndices a list of validator indices being proven - * @param validatorFieldsProofs proofs of each validator's `validatorFields` against the beacon state root - * @param validatorFields the fields of the beacon chain "Validator" container. See consensus specs for - * details: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator - */ + /// @dev Verify one or more validators have their withdrawal credentials pointed at this EigenPod, and award + /// shares based on their effective balance. Proven validators are marked `ACTIVE` within the EigenPod, and + /// future checkpoint proofs will need to include them. + /// @dev Withdrawal credential proofs MUST NOT be older than `currentCheckpointTimestamp`. + /// @dev Validators proven via this method MUST NOT have an exit epoch set already. + /// @param beaconTimestamp the beacon chain timestamp sent to the 4788 oracle contract. Corresponds + /// to the parent beacon block root against which the proof is verified. + /// @param stateRootProof proves a beacon state root against a beacon block root + /// @param validatorIndices a list of validator indices being proven + /// @param validatorFieldsProofs proofs of each validator's `validatorFields` against the beacon state root + /// @param validatorFields the fields of the beacon chain "Validator" container. See consensus specs for + /// details: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator function verifyWithdrawalCredentials( uint64 beaconTimestamp, BeaconChainProofs.StateRootProof calldata stateRootProof, @@ -259,36 +251,34 @@ interface IEigenPod is IEigenPodErrors, IEigenPodEvents { bytes32[][] calldata validatorFields ) external; - /** - * @dev Prove that one of this pod's active validators was slashed on the beacon chain. A successful - * staleness proof allows the caller to start a checkpoint. - * - * @dev Note that in order to start a checkpoint, any existing checkpoint must already be completed! - * (See `_startCheckpoint` for details) - * - * @dev Note that this method allows anyone to start a checkpoint as soon as a slashing occurs on the beacon - * chain. This is intended to make it easier to external watchers to keep a pod's balance up to date. - * - * @dev Note too that beacon chain slashings are not instant. There is a delay between the initial slashing event - * and the validator's final exit back to the execution layer. During this time, the validator's balance may or - * may not drop further due to a correlation penalty. This method allows proof of a slashed validator - * to initiate a checkpoint for as long as the validator remains on the beacon chain. Once the validator - * has exited and been checkpointed at 0 balance, they are no longer "checkpoint-able" and cannot be proven - * "stale" via this method. - * See https://eth2book.info/capella/part3/transition/epoch/#slashings for more info. - * - * @param beaconTimestamp the beacon chain timestamp sent to the 4788 oracle contract. Corresponds - * to the parent beacon block root against which the proof is verified. - * @param stateRootProof proves a beacon state root against a beacon block root - * @param proof the fields of the beacon chain "Validator" container, along with a merkle proof against - * the beacon state root. See the consensus specs for more details: - * https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator - * - * @dev Staleness conditions: - * - Validator's last checkpoint is older than `beaconTimestamp` - * - Validator MUST be in `ACTIVE` status in the pod - * - Validator MUST be slashed on the beacon chain - */ + /// @dev Prove that one of this pod's active validators was slashed on the beacon chain. A successful + /// staleness proof allows the caller to start a checkpoint. + /// + /// @dev Note that in order to start a checkpoint, any existing checkpoint must already be completed! + /// (See `_startCheckpoint` for details) + /// + /// @dev Note that this method allows anyone to start a checkpoint as soon as a slashing occurs on the beacon + /// chain. This is intended to make it easier to external watchers to keep a pod's balance up to date. + /// + /// @dev Note too that beacon chain slashings are not instant. There is a delay between the initial slashing event + /// and the validator's final exit back to the execution layer. During this time, the validator's balance may or + /// may not drop further due to a correlation penalty. This method allows proof of a slashed validator + /// to initiate a checkpoint for as long as the validator remains on the beacon chain. Once the validator + /// has exited and been checkpointed at 0 balance, they are no longer "checkpoint-able" and cannot be proven + /// "stale" via this method. + /// See https://eth2book.info/capella/part3/transition/epoch/#slashings for more info. + /// + /// @param beaconTimestamp the beacon chain timestamp sent to the 4788 oracle contract. Corresponds + /// to the parent beacon block root against which the proof is verified. + /// @param stateRootProof proves a beacon state root against a beacon block root + /// @param proof the fields of the beacon chain "Validator" container, along with a merkle proof against + /// the beacon state root. See the consensus specs for more details: + /// https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator + /// + /// @dev Staleness conditions: + /// - Validator's last checkpoint is older than `beaconTimestamp` + /// - Validator MUST be in `ACTIVE` status in the pod + /// - Validator MUST be slashed on the beacon chain function verifyStaleBalance( uint64 beaconTimestamp, BeaconChainProofs.StateRootProof calldata stateRootProof, @@ -389,7 +379,11 @@ interface IEigenPod is IEigenPodErrors, IEigenPodEvents { ) external payable; /// @notice called by owner of a pod to remove any ERC20s deposited in the pod - function recoverTokens(IERC20[] memory tokenList, uint256[] memory amountsToWithdraw, address recipient) external; + function recoverTokens( + IERC20[] memory tokenList, + uint256[] memory amountsToWithdraw, + address recipient + ) external; /// @notice Allows the owner of a pod to update the proof submitter, a permissioned /// address that can call various EigenPod methods, but cannot trigger asset withdrawals @@ -403,11 +397,9 @@ interface IEigenPod is IEigenPodErrors, IEigenPodEvents { address newProofSubmitter ) external; - /** - * - * VIEW METHODS - * - */ + /// + /// VIEW METHODS + /// /// @notice An address with permissions to call `startCheckpoint` and `verifyWithdrawalCredentials`, set /// by the podOwner. This role exists to allow a podOwner to designate a hot wallet that can call diff --git a/src/contracts/interfaces/IEigenPodManager.sol b/src/contracts/interfaces/IEigenPodManager.sol index fe9d1ac0b2..e095c47892 100644 --- a/src/contracts/interfaces/IEigenPodManager.sol +++ b/src/contracts/interfaces/IEigenPodManager.sol @@ -54,7 +54,9 @@ interface IEigenPodManagerEvents { /// @notice Emitted when a staker's beaconChainSlashingFactor is updated event BeaconChainSlashingFactorDecreased( - address staker, uint64 prevBeaconChainSlashingFactor, uint64 newBeaconChainSlashingFactor + address staker, + uint64 prevBeaconChainSlashingFactor, + uint64 newBeaconChainSlashingFactor ); /// @notice Emitted when an operator is slashed and shares to be burned are increased @@ -68,26 +70,22 @@ interface IEigenPodManagerEvents { } interface IEigenPodManagerTypes { - /** - * @notice The amount of beacon chain slashing experienced by a pod owner as a proportion of WAD - * @param isSet whether the slashingFactor has ever been updated. Used to distinguish between - * a value of "0" and an uninitialized value. - * @param slashingFactor the proportion of the pod owner's balance that has been decreased due to - * slashing or other beacon chain balance decreases. - * @dev NOTE: if !isSet, `slashingFactor` should be treated as WAD. `slashingFactor` is monotonically - * decreasing and can hit 0 if fully slashed. - */ + /// @notice The amount of beacon chain slashing experienced by a pod owner as a proportion of WAD + /// @param isSet whether the slashingFactor has ever been updated. Used to distinguish between + /// a value of "0" and an uninitialized value. + /// @param slashingFactor the proportion of the pod owner's balance that has been decreased due to + /// slashing or other beacon chain balance decreases. + /// @dev NOTE: if !isSet, `slashingFactor` should be treated as WAD. `slashingFactor` is monotonically + /// decreasing and can hit 0 if fully slashed. struct BeaconChainSlashingFactor { bool isSet; uint64 slashingFactor; } } -/** - * @title Interface for factory that creates and manages solo staking pods that have their withdrawal credentials pointed to EigenLayer. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - */ +/// @title Interface for factory that creates and manages solo staking pods that have their withdrawal credentials pointed to EigenLayer. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service interface IEigenPodManager is IEigenPodManagerErrors, IEigenPodManagerEvents, @@ -95,33 +93,31 @@ interface IEigenPodManager is IShareManager, IPausable { - /** - * @notice Creates an EigenPod for the sender. - * @dev Function will revert if the `msg.sender` already has an EigenPod. - * @dev Returns EigenPod address - */ + /// @notice Creates an EigenPod for the sender. + /// @dev Function will revert if the `msg.sender` already has an EigenPod. + /// @dev Returns EigenPod address function createPod() external returns (address); - /** - * @notice Stakes for a new beacon chain validator on the sender's EigenPod. - * Also creates an EigenPod for the sender if they don't have one already. - * @param pubkey The 48 bytes public key of the beacon chain validator. - * @param signature The validator's signature of the deposit data. - * @param depositDataRoot The root/hash of the deposit data for the validator's deposit. - */ - function stake(bytes calldata pubkey, bytes calldata signature, bytes32 depositDataRoot) external payable; - - /** - * @notice Adds any positive share delta to the pod owner's deposit shares, and delegates them to the pod - * owner's operator (if applicable). A negative share delta does NOT impact the pod owner's deposit shares, - * but will reduce their beacon chain slashing factor and delegated shares accordingly. - * @param podOwner is the pod owner whose balance is being updated. - * @param prevRestakedBalanceWei is the total amount restaked through the pod before the balance update, including - * any amount currently in the withdrawal queue. - * @param balanceDeltaWei is the amount the balance changed - * @dev Callable only by the podOwner's EigenPod contract. - * @dev Reverts if `sharesDelta` is not a whole Gwei amount - */ + /// @notice Stakes for a new beacon chain validator on the sender's EigenPod. + /// Also creates an EigenPod for the sender if they don't have one already. + /// @param pubkey The 48 bytes public key of the beacon chain validator. + /// @param signature The validator's signature of the deposit data. + /// @param depositDataRoot The root/hash of the deposit data for the validator's deposit. + function stake( + bytes calldata pubkey, + bytes calldata signature, + bytes32 depositDataRoot + ) external payable; + + /// @notice Adds any positive share delta to the pod owner's deposit shares, and delegates them to the pod + /// owner's operator (if applicable). A negative share delta does NOT impact the pod owner's deposit shares, + /// but will reduce their beacon chain slashing factor and delegated shares accordingly. + /// @param podOwner is the pod owner whose balance is being updated. + /// @param prevRestakedBalanceWei is the total amount restaked through the pod before the balance update, including + /// any amount currently in the withdrawal queue. + /// @param balanceDeltaWei is the amount the balance changed + /// @dev Callable only by the podOwner's EigenPod contract. + /// @dev Reverts if `sharesDelta` is not a whole Gwei amount function recordBeaconChainETHBalanceUpdate( address podOwner, uint256 prevRestakedBalanceWei, @@ -162,14 +158,12 @@ interface IEigenPodManager is /// @notice Returns the number of EigenPods that have been created function numPods() external view returns (uint256); - /** - * @notice Mapping from Pod owner owner to the number of shares they have in the virtual beacon chain ETH strategy. - * @dev The share amount can become negative. This is necessary to accommodate the fact that a pod owner's virtual beacon chain ETH shares can - * decrease between the pod owner queuing and completing a withdrawal. - * When the pod owner's shares would otherwise increase, this "deficit" is decreased first _instead_. - * Likewise, when a withdrawal is completed, this "deficit" is decreased and the withdrawal amount is decreased; We can think of this - * as the withdrawal "paying off the deficit". - */ + /// @notice Mapping from Pod owner owner to the number of shares they have in the virtual beacon chain ETH strategy. + /// @dev The share amount can become negative. This is necessary to accommodate the fact that a pod owner's virtual beacon chain ETH shares can + /// decrease between the pod owner queuing and completing a withdrawal. + /// When the pod owner's shares would otherwise increase, this "deficit" is decreased first _instead_. + /// Likewise, when a withdrawal is completed, this "deficit" is decreased and the withdrawal amount is decreased; We can think of this + /// as the withdrawal "paying off the deficit". function podOwnerDepositShares( address podOwner ) external view returns (int256); @@ -177,10 +171,8 @@ interface IEigenPodManager is /// @notice returns canonical, virtual beaconChainETH strategy function beaconChainETHStrategy() external view returns (IStrategy); - /** - * @notice Returns the historical sum of proportional balance decreases a pod owner has experienced when - * updating their pod's balance. - */ + /// @notice Returns the historical sum of proportional balance decreases a pod owner has experienced when + /// updating their pod's balance. function beaconChainSlashingFactor( address staker ) external view returns (uint64); diff --git a/src/contracts/interfaces/IKeyRegistrar.sol b/src/contracts/interfaces/IKeyRegistrar.sol index 15e5302de4..e49d30e4e7 100644 --- a/src/contracts/interfaces/IKeyRegistrar.sol +++ b/src/contracts/interfaces/IKeyRegistrar.sol @@ -118,70 +118,67 @@ interface IKeyRegistrarEvents is IKeyRegistrarTypes { /// @dev For the multichain protocol, the key type of the operatorSet must be set in the `KeyRegistrar`, but the /// AVS is not required to use the KeyRegistrar for operator key management and can implement its own registry interface IKeyRegistrar is IKeyRegistrarErrors, IKeyRegistrarEvents { - /** - * @notice Configures an operator set with curve type - * @param operatorSet The operator set to configure - * @param curveType Type of curve (ECDSA, BN254) - * @dev Only authorized callers for the AVS can configure operator sets - * @dev This function sets the minimum rotation delay to type(uint64).max, effectively disabling key rotation. - * If key rotation is desired, use `configureOperatorSetWithMinDelay` instead. - * @dev Consider using `configureOperatorSetWithMinDelay` for new integrations to enable key rotation flexibility. - * @dev Reverts for: - * - InvalidPermissions: Caller is not authorized for the AVS (via the PermissionController) - * - InvalidCurveType: The curve type is not ECDSA or BN254 - * - ConfigurationAlreadySet: The operator set is already configured - * @dev Emits the following events: - * - OperatorSetConfigured: When the operator set is successfully configured with a curve type - * - MinKeyRotationDelaySet: With delay set to type(uint64).max (rotation disabled) - */ - function configureOperatorSet(OperatorSet memory operatorSet, CurveType curveType) external; - - /** - * @notice Configures an operator set with curve type and minimum rotation delay - * @param operatorSet The operator set to configure - * @param curveType Type of curve (ECDSA, BN254) - * @param minDelaySeconds Minimum delay in seconds before a rotation can activate. Set to type(uint64).max to disable rotation - * @dev Only authorized callers for the AVS can configure operator sets - * @dev Reverts for: - * - InvalidPermissions: Caller is not authorized for the AVS (via the PermissionController) - * - InvalidCurveType: The curve type is not ECDSA or BN254 - * - ConfigurationAlreadySet: The operator set is already configured - * @dev Emits the following events: - * - OperatorSetConfigured: When the operator set is successfully configured with a curve type - * - MinKeyRotationDelaySet: When the minimum rotation delay is set - */ + /// @notice Configures an operator set with curve type + /// @param operatorSet The operator set to configure + /// @param curveType Type of curve (ECDSA, BN254) + /// @dev Only authorized callers for the AVS can configure operator sets + /// @dev This function sets the minimum rotation delay to type(uint64).max, effectively disabling key rotation. + /// If key rotation is desired, use `configureOperatorSetWithMinDelay` instead. + /// @dev Consider using `configureOperatorSetWithMinDelay` for new integrations to enable key rotation flexibility. + /// @dev Reverts for: + /// - InvalidPermissions: Caller is not authorized for the AVS (via the PermissionController) + /// - InvalidCurveType: The curve type is not ECDSA or BN254 + /// - ConfigurationAlreadySet: The operator set is already configured + /// @dev Emits the following events: + /// - OperatorSetConfigured: When the operator set is successfully configured with a curve type + /// - MinKeyRotationDelaySet: With delay set to type(uint64).max (rotation disabled) + function configureOperatorSet( + OperatorSet memory operatorSet, + CurveType curveType + ) external; + + /// @notice Configures an operator set with curve type and minimum rotation delay + /// @param operatorSet The operator set to configure + /// @param curveType Type of curve (ECDSA, BN254) + /// @param minDelaySeconds Minimum delay in seconds before a rotation can activate. Set to type(uint64).max to disable rotation + /// @dev Only authorized callers for the AVS can configure operator sets + /// @dev Reverts for: + /// - InvalidPermissions: Caller is not authorized for the AVS (via the PermissionController) + /// - InvalidCurveType: The curve type is not ECDSA or BN254 + /// - ConfigurationAlreadySet: The operator set is already configured + /// @dev Emits the following events: + /// - OperatorSetConfigured: When the operator set is successfully configured with a curve type + /// - MinKeyRotationDelaySet: When the minimum rotation delay is set function configureOperatorSetWithMinDelay( OperatorSet memory operatorSet, CurveType curveType, uint64 minDelaySeconds ) external; - /** - * @notice Registers a cryptographic key for an operator with a specific operator set - * @param operator Address of the operator to register key for - * @param operatorSet The operator set to register the key for - * @param pubkey Public key bytes. For ECDSA, this is the address of the key. For BN254, this is the G1 and G2 key combined (see `encodeBN254KeyData`) - * @param signature Signature proving ownership. For ECDSA this is a signature of the `getECDSAKeyRegistrationMessageHash`. For BN254 this is a signature of the `getBN254KeyRegistrationMessageHash`. - * @dev Can be called by operator directly or by addresses they've authorized via the `PermissionController` - * @dev There exist no restriction on the state of the operator with respect to the operatorSet. That is, an operator - * does not have to be registered for the operator in the `AllocationManager` to register a key for it - * @dev For ECDSA, we allow a smart contract to be the pubkey (via ERC1271 signatures), but note that the multichain protocol DOES NOT support smart contract signatures - * @dev Reverts for: - * - InvalidPermissions: Caller is not the operator or authorized via the PermissionController - * - OperatorSetNotConfigured: The operator set is not configured - * - OperatorAlreadyRegistered: The operator is already registered for the operatorSet in the KeyRegistrar - * - InvalidKeyFormat: For ECDSA: The key is not exactly 20 bytes - * - ZeroPubkey: For ECDSA: The key is the zero address - * - KeyAlreadyRegistered: For ECDSA: The key is already registered globally by hash - * - InvalidSignature: For ECDSA: The signature is not valid - * - InvalidKeyFormat: For BN254: The key data is not exactly 192 bytes - * - InvalidSignature: For BN254: The signature is not exactly 64 bytes - * - ZeroPubkey: For BN254: The G1 point is the zero point - * - InvalidSignature: For BN254: The signature is not valid - * - KeyAlreadyRegistered: For BN254: The key is already registered globally by hash - * @dev Emits the following events: - * - KeyRegistered: When the key is successfully registered for the operator and operatorSet - */ + /// @notice Registers a cryptographic key for an operator with a specific operator set + /// @param operator Address of the operator to register key for + /// @param operatorSet The operator set to register the key for + /// @param pubkey Public key bytes. For ECDSA, this is the address of the key. For BN254, this is the G1 and G2 key combined (see `encodeBN254KeyData`) + /// @param signature Signature proving ownership. For ECDSA this is a signature of the `getECDSAKeyRegistrationMessageHash`. For BN254 this is a signature of the `getBN254KeyRegistrationMessageHash`. + /// @dev Can be called by operator directly or by addresses they've authorized via the `PermissionController` + /// @dev There exist no restriction on the state of the operator with respect to the operatorSet. That is, an operator + /// does not have to be registered for the operator in the `AllocationManager` to register a key for it + /// @dev For ECDSA, we allow a smart contract to be the pubkey (via ERC1271 signatures), but note that the multichain protocol DOES NOT support smart contract signatures + /// @dev Reverts for: + /// - InvalidPermissions: Caller is not the operator or authorized via the PermissionController + /// - OperatorSetNotConfigured: The operator set is not configured + /// - OperatorAlreadyRegistered: The operator is already registered for the operatorSet in the KeyRegistrar + /// - InvalidKeyFormat: For ECDSA: The key is not exactly 20 bytes + /// - ZeroPubkey: For ECDSA: The key is the zero address + /// - KeyAlreadyRegistered: For ECDSA: The key is already registered globally by hash + /// - InvalidSignature: For ECDSA: The signature is not valid + /// - InvalidKeyFormat: For BN254: The key data is not exactly 192 bytes + /// - InvalidSignature: For BN254: The signature is not exactly 64 bytes + /// - ZeroPubkey: For BN254: The G1 point is the zero point + /// - InvalidSignature: For BN254: The signature is not valid + /// - KeyAlreadyRegistered: For BN254: The key is already registered globally by hash + /// @dev Emits the following events: + /// - KeyRegistered: When the key is successfully registered for the operator and operatorSet function registerKey( address operator, OperatorSet memory operatorSet, @@ -189,42 +186,41 @@ interface IKeyRegistrar is IKeyRegistrarErrors, IKeyRegistrarEvents { bytes calldata signature ) external; - /** - * @notice Deregisters a cryptographic key for an operator with a specific operator set - * @param operator Address of the operator to deregister key for - * @param operatorSet The operator set to deregister the key from - * @dev Can be called by the operator directly or by addresses they've authorized via the `PermissionController` - * @dev Keys remain in global key registry to prevent reuse - * @dev Reverts for: - * - InvalidPermissions: Caller is not authorized for the operator (via the PermissionController) - * - OperatorStillSlashable: The operator is still slashable for the AVS - * - OperatorSetNotConfigured: The operator set is not configured - * - KeyNotFound: The operator does not have a registered key for this operator set - * @dev Emits the following events: - * - KeyDeregistered: When the key is successfully deregistered for the operator and operatorSet - */ - function deregisterKey(address operator, OperatorSet memory operatorSet) external; - - /** - * @notice Rotates an operator's key for an operator set, replacing the current key with a new key - * @param operator Address of the operator whose key is being rotated - * @param operatorSet The operator set for which the key is being rotated - * @param newPubkey New public key bytes. For ECDSA, this is the address of the key. For BN254, this is the G1 and G2 key combined (see `encodeBN254KeyData`) - * @param signature Signature from the new key proving ownership over the appropriate registration message hash - * @dev The new key will activate at block.timestamp + the minimum rotation delay configured for the operator set - * @dev Keys remain in the global key registry to prevent reuse - * @dev There is no slashability restriction for rotation; operators may rotate while slashable - * @dev Reverts for: - * - InvalidPermissions: Caller is not authorized for the operator (via the PermissionController) - * - OperatorSetNotConfigured: The operator set is not configured - * - KeyNotFound: The operator does not have a registered key for this operator set - * - PendingRotationExists: A rotation is already scheduled and has not yet activated - * - RotationDisabled: Key rotation is disabled for this operator set (minDelay set to type(uint64).max) - * - InvalidKeyFormat / ZeroPubkey / InvalidSignature: New key data/signature invalid per curve type - * - KeyAlreadyRegistered: New key is already globally registered - * @dev Emits the following event: - * - KeyRotationScheduled: When the rotation is successfully scheduled - */ + /// @notice Deregisters a cryptographic key for an operator with a specific operator set + /// @param operator Address of the operator to deregister key for + /// @param operatorSet The operator set to deregister the key from + /// @dev Can be called by the operator directly or by addresses they've authorized via the `PermissionController` + /// @dev Keys remain in global key registry to prevent reuse + /// @dev Reverts for: + /// - InvalidPermissions: Caller is not authorized for the operator (via the PermissionController) + /// - OperatorStillSlashable: The operator is still slashable for the AVS + /// - OperatorSetNotConfigured: The operator set is not configured + /// - KeyNotFound: The operator does not have a registered key for this operator set + /// @dev Emits the following events: + /// - KeyDeregistered: When the key is successfully deregistered for the operator and operatorSet + function deregisterKey( + address operator, + OperatorSet memory operatorSet + ) external; + + /// @notice Rotates an operator's key for an operator set, replacing the current key with a new key + /// @param operator Address of the operator whose key is being rotated + /// @param operatorSet The operator set for which the key is being rotated + /// @param newPubkey New public key bytes. For ECDSA, this is the address of the key. For BN254, this is the G1 and G2 key combined (see `encodeBN254KeyData`) + /// @param signature Signature from the new key proving ownership over the appropriate registration message hash + /// @dev The new key will activate at block.timestamp + the minimum rotation delay configured for the operator set + /// @dev Keys remain in the global key registry to prevent reuse + /// @dev There is no slashability restriction for rotation; operators may rotate while slashable + /// @dev Reverts for: + /// - InvalidPermissions: Caller is not authorized for the operator (via the PermissionController) + /// - OperatorSetNotConfigured: The operator set is not configured + /// - KeyNotFound: The operator does not have a registered key for this operator set + /// - PendingRotationExists: A rotation is already scheduled and has not yet activated + /// - RotationDisabled: Key rotation is disabled for this operator set (minDelay set to type(uint64).max) + /// - InvalidKeyFormat / ZeroPubkey / InvalidSignature: New key data/signature invalid per curve type + /// - KeyAlreadyRegistered: New key is already globally registered + /// @dev Emits the following event: + /// - KeyRotationScheduled: When the rotation is successfully scheduled function rotateKey( address operator, OperatorSet memory operatorSet, @@ -232,149 +228,138 @@ interface IKeyRegistrar is IKeyRegistrarErrors, IKeyRegistrarEvents { bytes calldata signature ) external; - /** - * @notice Sets the minimum allowed rotation delay for an operator set - * @param operatorSet The operator set to configure - * @param minDelaySeconds The minimum rotation delay in seconds - * @dev Only callable by the AVS or its authorized caller via the PermissionController - */ - function setMinKeyRotationDelay(OperatorSet memory operatorSet, uint64 minDelaySeconds) external; - - /** - * @notice Finalizes a scheduled rotation if activation time has passed, compacting storage - * @notice This is optional, getters already return the correct active key based on time - * @param operator The operator address - * @param operatorSet The operator set - * @return success True if a pending rotation was finalized - */ + /// @notice Sets the minimum allowed rotation delay for an operator set + /// @param operatorSet The operator set to configure + /// @param minDelaySeconds The minimum rotation delay in seconds + /// @dev Only callable by the AVS or its authorized caller via the PermissionController + function setMinKeyRotationDelay( + OperatorSet memory operatorSet, + uint64 minDelaySeconds + ) external; + + /// @notice Finalizes a scheduled rotation if activation time has passed, compacting storage + /// @notice This is optional, getters already return the correct active key based on time + /// @param operator The operator address + /// @param operatorSet The operator set + /// @return success True if a pending rotation was finalized function finalizeScheduledRotation( address operator, OperatorSet memory operatorSet ) external returns (bool success); - /** - * @notice Checks if a key is registered for an operator with a specific operator set - * @param operatorSet The operator set to check - * @param operator Address of the operator - * @return True if the key is registered, false otherwise - * @dev If the operatorSet is not configured, this function will return false - */ - function isRegistered(OperatorSet memory operatorSet, address operator) external view returns (bool); - - /** - * @notice Gets the curve type for an operator set - * @param operatorSet The operator set to get the curve type for - * @return The curve type, either ECDSA, BN254, or NONE - */ + /// @notice Checks if a key is registered for an operator with a specific operator set + /// @param operatorSet The operator set to check + /// @param operator Address of the operator + /// @return True if the key is registered, false otherwise + /// @dev If the operatorSet is not configured, this function will return false + function isRegistered( + OperatorSet memory operatorSet, + address operator + ) external view returns (bool); + + /// @notice Gets the curve type for an operator set + /// @param operatorSet The operator set to get the curve type for + /// @return The curve type, either ECDSA, BN254, or NONE function getOperatorSetCurveType( OperatorSet memory operatorSet ) external view returns (CurveType); - /** - * @notice Gets the BN254 public key for an operator with a specific operator set - * @param operatorSet The operator set to get the key for - * @param operator Address of the operator - * @return g1Point The BN254 G1 public key - * @return g2Point The BN254 G2 public key - * @dev Reverts for: - * - InvalidCurveType: The operatorSet is not configured for BN254 - * @dev Returns empty points if the operator has not registered a key for the operatorSet. We - * recommend calling `isRegistered` first to check if the operator has a key registered - */ + /// @notice Gets the BN254 public key for an operator with a specific operator set + /// @param operatorSet The operator set to get the key for + /// @param operator Address of the operator + /// @return g1Point The BN254 G1 public key + /// @return g2Point The BN254 G2 public key + /// @dev Reverts for: + /// - InvalidCurveType: The operatorSet is not configured for BN254 + /// @dev Returns empty points if the operator has not registered a key for the operatorSet. We + /// recommend calling `isRegistered` first to check if the operator has a key registered function getBN254Key( OperatorSet memory operatorSet, address operator ) external view returns (BN254.G1Point memory g1Point, BN254.G2Point memory g2Point); - /** - * @notice Gets the ECDSA public key for an operator with a specific operator set as bytes - * @param operatorSet The operator set to get the key for - * @param operator Address of the operator - * @return pubkey The ECDSA public key in bytes format - * @dev Reverts for: - * - InvalidCurveType: The operatorSet is not configured for ECDSA - * @dev Returns 0x0 if the operator has not registered a key for the operatorSet. We - * recommend calling `isRegistered` first to check if the operator has a key registered - */ - function getECDSAKey(OperatorSet memory operatorSet, address operator) external view returns (bytes memory); - - /** - * @notice Gets the ECDSA public key for an operator with a specific operator set - * @param operatorSet The operator set to get the key for - * @param operator Address of the operator - * @return pubkey The ECDSA public key in address format - * @dev Reverts for: - * - InvalidCurveType: The operatorSet is not configured for ECDSA - * @dev Returns 0x0 if the operator has not registered a key for the operatorSet. We - * recommend calling `isRegistered` first to check if the operator has a key registered - */ - function getECDSAAddress(OperatorSet memory operatorSet, address operator) external view returns (address); - - /** - * @notice Checks if a key hash is globally registered - * @param keyHash Hash of the key - * @return True if the key is globally registered - */ + /// @notice Gets the ECDSA public key for an operator with a specific operator set as bytes + /// @param operatorSet The operator set to get the key for + /// @param operator Address of the operator + /// @return pubkey The ECDSA public key in bytes format + /// @dev Reverts for: + /// - InvalidCurveType: The operatorSet is not configured for ECDSA + /// @dev Returns 0x0 if the operator has not registered a key for the operatorSet. We + /// recommend calling `isRegistered` first to check if the operator has a key registered + function getECDSAKey( + OperatorSet memory operatorSet, + address operator + ) external view returns (bytes memory); + + /// @notice Gets the ECDSA public key for an operator with a specific operator set + /// @param operatorSet The operator set to get the key for + /// @param operator Address of the operator + /// @return pubkey The ECDSA public key in address format + /// @dev Reverts for: + /// - InvalidCurveType: The operatorSet is not configured for ECDSA + /// @dev Returns 0x0 if the operator has not registered a key for the operatorSet. We + /// recommend calling `isRegistered` first to check if the operator has a key registered + function getECDSAAddress( + OperatorSet memory operatorSet, + address operator + ) external view returns (address); + + /// @notice Checks if a key hash is globally registered + /// @param keyHash Hash of the key + /// @return True if the key is globally registered function isKeyGloballyRegistered( bytes32 keyHash ) external view returns (bool); - /** - * @notice Gets the key hash for an operator with a specific operator set - * @param operatorSet The operator set to get the key hash for - * @param operator Address of the operator - * @return keyHash The key hash - */ - function getKeyHash(OperatorSet memory operatorSet, address operator) external view returns (bytes32); - - /** - * @notice Gets the operator from signing key - * @param operatorSet The operator set to get the operator for - * @param keyData The key data. For ECDSA, this is the signing key address. For BN254, this can be either the G1 key or the G1 and G2 key combined. - * @return operator. Returns 0x0 if the key is not registered - * @return status registration status. Returns false if the key is not registered - * @dev This function decodes the key data based on the curve type of the operator set - * @dev This function will return the operator address even if the operator is not registered for the operator set - * @dev Reverts for: - * - InvalidCurveType: The CurveType is not configured - */ + /// @notice Gets the key hash for an operator with a specific operator set + /// @param operatorSet The operator set to get the key hash for + /// @param operator Address of the operator + /// @return keyHash The key hash + function getKeyHash( + OperatorSet memory operatorSet, + address operator + ) external view returns (bytes32); + + /// @notice Gets the operator from signing key + /// @param operatorSet The operator set to get the operator for + /// @param keyData The key data. For ECDSA, this is the signing key address. For BN254, this can be either the G1 key or the G1 and G2 key combined. + /// @return operator. Returns 0x0 if the key is not registered + /// @return status registration status. Returns false if the key is not registered + /// @dev This function decodes the key data based on the curve type of the operator set + /// @dev This function will return the operator address even if the operator is not registered for the operator set + /// @dev Reverts for: + /// - InvalidCurveType: The CurveType is not configured function getOperatorFromSigningKey( OperatorSet memory operatorSet, bytes memory keyData ) external view returns (address, bool); - /** - * @notice Returns the message hash for ECDSA key registration, which must be signed by the key when registering an ECDSA key - * @param operator The operator address - * @param operatorSet The operator set - * @param keyAddress The address of the key - * @return The message hash for signing - */ + /// @notice Returns the message hash for ECDSA key registration, which must be signed by the key when registering an ECDSA key + /// @param operator The operator address + /// @param operatorSet The operator set + /// @param keyAddress The address of the key + /// @return The message hash for signing function getECDSAKeyRegistrationMessageHash( address operator, OperatorSet memory operatorSet, address keyAddress ) external view returns (bytes32); - /** - * @notice Returns the message hash for BN254 key registration, which must be signed by the key when registering a BN254 key - * @param operator The operator address - * @param operatorSet The operator set - * @param keyData The BN254 key data - * @return The message hash for signing - */ + /// @notice Returns the message hash for BN254 key registration, which must be signed by the key when registering a BN254 key + /// @param operator The operator address + /// @param operatorSet The operator set + /// @param keyData The BN254 key data + /// @return The message hash for signing function getBN254KeyRegistrationMessageHash( address operator, OperatorSet memory operatorSet, bytes calldata keyData ) external view returns (bytes32); - /** - * @notice Encodes the BN254 key data into a bytes array - * @param g1Point The BN254 G1 public key - * @param g2Point The BN254 G2 public key - * @return The encoded key data - */ + /// @notice Encodes the BN254 key data into a bytes array + /// @param g1Point The BN254 G1 public key + /// @param g2Point The BN254 G2 public key + /// @return The encoded key data function encodeBN254KeyData( BN254.G1Point memory g1Point, BN254.G2Point memory g2Point diff --git a/src/contracts/interfaces/IOperatorTableCalculator.sol b/src/contracts/interfaces/IOperatorTableCalculator.sol index 39a7d34428..2287362171 100644 --- a/src/contracts/interfaces/IOperatorTableCalculator.sol +++ b/src/contracts/interfaces/IOperatorTableCalculator.sol @@ -6,44 +6,40 @@ import "../libraries/OperatorSetLib.sol"; interface IOperatorTableCalculatorTypes { /// BN254 Table Calculator Types - /** - * @notice A struct that contains information about a single operator for a given BN254 operatorSet - * @param pubkey The G1 public key of the operator - * @param weights The weights of the operator for a single operatorSet - * - * @dev The `weights` array is as a list of arbitrary stake types. For example, - * it can be [slashable_stake, delegated_stake, strategy_i_stake, ...]. Each stake type is an element in the array. - * The stake weights are defined by the operatorSet's `OperatorTableCalculator` and transported by the multichain protocol - * - * @dev An AVS defines the `weights` array based on the criteria it wants to use for distribution and verification of off-chain tasks. - * For example, a slashable that wants to distribute some tasks based on `EIGEN` stake and other based on `stETH` stake would - * use [slashable_EIGEN_stake, slashable_stETH_stake] as the `weights` array - * - * @dev It is up to the AVS to define the `weights` array, which is used by the `IBN254CertificateVerifier` to verify Certificates - * - * @dev For each operator, the `weights` array should be the same length and composition, otherwise verification issues can arise - */ + /// @notice A struct that contains information about a single operator for a given BN254 operatorSet + /// @param pubkey The G1 public key of the operator + /// @param weights The weights of the operator for a single operatorSet + /// + /// @dev The `weights` array is as a list of arbitrary stake types. For example, + /// it can be [slashable_stake, delegated_stake, strategy_i_stake, ...]. Each stake type is an element in the array. + /// The stake weights are defined by the operatorSet's `OperatorTableCalculator` and transported by the multichain protocol + /// + /// @dev An AVS defines the `weights` array based on the criteria it wants to use for distribution and verification of off-chain tasks. + /// For example, a slashable that wants to distribute some tasks based on `EIGEN` stake and other based on `stETH` stake would + /// use [slashable_EIGEN_stake, slashable_stETH_stake] as the `weights` array + /// + /// @dev It is up to the AVS to define the `weights` array, which is used by the `IBN254CertificateVerifier` to verify Certificates + /// + /// @dev For each operator, the `weights` array should be the same length and composition, otherwise verification issues can arise struct BN254OperatorInfo { BN254.G1Point pubkey; uint256[] weights; } - /** - * @notice A struct that contains information about all operators for a given BN254OperatorSet - * @param operatorInfoTreeRoot The root of the operatorInfo tree - * @param numOperators The number of operators in the operatorSet - * @param aggregatePubkey The aggregate G1 public key of the operators in the operatorSet - * @param totalWeights The total stake weights of the operators in the operatorSet - * - * @dev The operatorInfoTreeRoot is the root of a merkle tree that contains the operatorInfos for each operator in the operatorSet. - * It is calculated on-chain by the `BN254TableCalculator` and used by the `IBN254CertificateVerifier` to verify stakes against the non-signing operators - * - * @dev Retrieval of the `aggregatePubKey` depends on maintaining a key registry contract, see `KeyRegistrar` for an example implementation - * - * @dev The `totalWeights` array should be the same length and composition as each individual `weights` array in `BN254OperatorInfo`. - * For example, if there are 3 operators with individual weights arrays with composition of [delegated_stake, slashable_stake] - * of [100, 200], [300, 400], and [500, 600], the `totalWeights` array would be [900, 1200] - */ + /// @notice A struct that contains information about all operators for a given BN254OperatorSet + /// @param operatorInfoTreeRoot The root of the operatorInfo tree + /// @param numOperators The number of operators in the operatorSet + /// @param aggregatePubkey The aggregate G1 public key of the operators in the operatorSet + /// @param totalWeights The total stake weights of the operators in the operatorSet + /// + /// @dev The operatorInfoTreeRoot is the root of a merkle tree that contains the operatorInfos for each operator in the operatorSet. + /// It is calculated on-chain by the `BN254TableCalculator` and used by the `IBN254CertificateVerifier` to verify stakes against the non-signing operators + /// + /// @dev Retrieval of the `aggregatePubKey` depends on maintaining a key registry contract, see `KeyRegistrar` for an example implementation + /// + /// @dev The `totalWeights` array should be the same length and composition as each individual `weights` array in `BN254OperatorInfo`. + /// For example, if there are 3 operators with individual weights arrays with composition of [delegated_stake, slashable_stake] + /// of [100, 200], [300, 400], and [500, 600], the `totalWeights` array would be [900, 1200] struct BN254OperatorSetInfo { bytes32 operatorInfoTreeRoot; uint256 numOperators; @@ -53,23 +49,21 @@ interface IOperatorTableCalculatorTypes { /// ECDSA Table Calculator Types - /** - * @notice A struct that contains information about a single operator for an ECDSA signing key - * @param pubkey The address of the signing ECDSA key of the operator and not the operator address itself. - * @param weights The weights of the operator for a single operatorSet - * - * @dev The `weights` array can be defined as a list of arbitrary stake types. For example, - * it can be [slashable_stake, delegated_stake, strategy_i_stake, ...]. Each stake type is an element in the array. - * The stake weights are defined by the operatorSet's `OperatorTableCalculator` and transported by the multichain protocol - * - * @dev An AVS defines the `weights` array based on the criteria it wants to use for distribution and verification of off-chain tasks. - * For example, a slashable operatorSet that wants to distribute some tasks based on `EIGEN` stake and other based on `stETH` stake would - * use [slashable_EIGEN_stake, slashable_stETH_stake] as the `weights` array - * - * @dev It is up to the AVS to define the `weights` array, which is used by the `IECDSACertificateVerifier` to verify Certificates - * - * @dev For each operator, the `weights` array should be the same length and composition, otherwise verification issues can arise - */ + /// @notice A struct that contains information about a single operator for an ECDSA signing key + /// @param pubkey The address of the signing ECDSA key of the operator and not the operator address itself. + /// @param weights The weights of the operator for a single operatorSet + /// + /// @dev The `weights` array can be defined as a list of arbitrary stake types. For example, + /// it can be [slashable_stake, delegated_stake, strategy_i_stake, ...]. Each stake type is an element in the array. + /// The stake weights are defined by the operatorSet's `OperatorTableCalculator` and transported by the multichain protocol + /// + /// @dev An AVS defines the `weights` array based on the criteria it wants to use for distribution and verification of off-chain tasks. + /// For example, a slashable operatorSet that wants to distribute some tasks based on `EIGEN` stake and other based on `stETH` stake would + /// use [slashable_EIGEN_stake, slashable_stETH_stake] as the `weights` array + /// + /// @dev It is up to the AVS to define the `weights` array, which is used by the `IECDSACertificateVerifier` to verify Certificates + /// + /// @dev For each operator, the `weights` array should be the same length and composition, otherwise verification issues can arise struct ECDSAOperatorInfo { address pubkey; uint256[] weights; @@ -85,40 +79,33 @@ interface IOperatorTableCalculator { /// @dev To distribute stake-weighted tasks to operators, the AVS should read this contract (via RPC) at the `referenceTimestamp` /// for which the operator table was updated on the destination chains /// @dev The operatorTableCalculator is configured by the AVS in the core `CrossChainRegistry` contract - - /** - * @notice Calculates the operator table, in bytes, for a given operatorSet - * @param operatorSet the operatorSet to calculate the operator table for - * @return operatorTableBytes the operatorTableBytes for the given operatorSet - * @dev The `operatorTableBytes` is used by the offchain multichain protocol to calculate and merkleize the operator table - */ + /// @notice Calculates the operator table, in bytes, for a given operatorSet + /// @param operatorSet the operatorSet to calculate the operator table for + /// @return operatorTableBytes the operatorTableBytes for the given operatorSet + /// @dev The `operatorTableBytes` is used by the offchain multichain protocol to calculate and merkleize the operator table function calculateOperatorTableBytes( OperatorSet calldata operatorSet ) external view returns (bytes memory operatorTableBytes); - /** - * @notice Get the operator stake weights for a given operatorSet - * @param operatorSet The operatorSet to get the stake weights for - * @return operators The addresses of the operators in the operatorSet - * @return weights The stake weights for each operator in the operatorSet, this is a 2D array where the first index is the operator - * and the second index is the stake weight. - * @dev The `weights` array is as a list of arbitrary stake types. For example, - * it can be [slashable_stake, delegated_stake, strategy_i_stake, ...]. Each stake type is an element in the array - * @dev This function can be used by the AVS to distribute stake-weighted tasks to operators. Specifically, the AVS should read this function - * at the `referenceTimestamp` for which the operator table was updated on the destination chains - */ + /// @notice Get the operator stake weights for a given operatorSet + /// @param operatorSet The operatorSet to get the stake weights for + /// @return operators The addresses of the operators in the operatorSet + /// @return weights The stake weights for each operator in the operatorSet, this is a 2D array where the first index is the operator + /// and the second index is the stake weight. + /// @dev The `weights` array is as a list of arbitrary stake types. For example, + /// it can be [slashable_stake, delegated_stake, strategy_i_stake, ...]. Each stake type is an element in the array + /// @dev This function can be used by the AVS to distribute stake-weighted tasks to operators. Specifically, the AVS should read this function + /// at the `referenceTimestamp` for which the operator table was updated on the destination chains function getOperatorSetWeights( OperatorSet calldata operatorSet ) external view returns (address[] memory operators, uint256[][] memory weights); - /** - * @notice Get the weights for a given operator in a given operatorSet - * @param operatorSet The operatorSet to get the weight for - * @param operator The operator to get the weight for - * @return weights The weights for the operator in the operatorSet - * @dev The `weights` array is as a list of arbitrary stake types. For example, - * it can be [slashable_stake, delegated_stake, strategy_i_stake, ...]. Each stake type is an element in the array - */ + /// @notice Get the weights for a given operator in a given operatorSet + /// @param operatorSet The operatorSet to get the weight for + /// @param operator The operator to get the weight for + /// @return weights The weights for the operator in the operatorSet + /// @dev The `weights` array is as a list of arbitrary stake types. For example, + /// it can be [slashable_stake, delegated_stake, strategy_i_stake, ...]. Each stake type is an element in the array function getOperatorWeights( OperatorSet calldata operatorSet, address operator diff --git a/src/contracts/interfaces/IOperatorTableUpdater.sol b/src/contracts/interfaces/IOperatorTableUpdater.sol index 2aae4e29b5..038d2c77a9 100644 --- a/src/contracts/interfaces/IOperatorTableUpdater.sol +++ b/src/contracts/interfaces/IOperatorTableUpdater.sol @@ -71,29 +71,21 @@ interface IOperatorTableUpdaterErrors { } interface IOperatorTableUpdaterEvents { - /** - * @notice Emitted when a new global table root is set - * @param referenceTimestamp the timestamp of the global table root - * @param globalTableRoot the root of the global table - */ + /// @notice Emitted when a new global table root is set + /// @param referenceTimestamp the timestamp of the global table root + /// @param globalTableRoot the root of the global table event NewGlobalTableRoot(uint32 indexed referenceTimestamp, bytes32 indexed globalTableRoot); - /** - * @notice Emitted when the generator is updated - * @param operatorSet The operatorSet which certifies against global roots - */ + /// @notice Emitted when the generator is updated + /// @param operatorSet The operatorSet which certifies against global roots event GeneratorUpdated(OperatorSet operatorSet); - /** - * @notice Emitted when the global root confirmation threshold is updated - * @param bps The threshold, in bps, for a global root to be signed off on and updated - */ + /// @notice Emitted when the global root confirmation threshold is updated + /// @param bps The threshold, in bps, for a global root to be signed off on and updated event GlobalRootConfirmationThresholdUpdated(uint16 bps); - /** - * @notice Emitted when a global table root is disabled - * @param globalTableRoot the global table root that was disabled - */ + /// @notice Emitted when a global table root is disabled + /// @param globalTableRoot the global table root that was disabled event GlobalRootDisabled(bytes32 indexed globalTableRoot); } @@ -105,25 +97,23 @@ interface IOperatorTableUpdater is IKeyRegistrarTypes, ICrossChainRegistryTypes { - /** - * @notice Sets the global table root - * @param globalTableRootCert certificate of the global table root, signed by the `Generator`. This is a `BN254Certificate` - * @param globalTableRoot merkle root of all operatorSet tables - * @param referenceTimestamp block timestamp at which the global table root was calculated - * @param referenceBlockNumber block number, corresponding to the `referenceTimestamp` of the global table root - * @dev Any entity can submit with a valid certificate signed off by the `Generator` - * @dev The `msgHash` in the `globalOperatorTableRootCert` is the hash of the `globalTableRoot`, `referenceTimestamp`, and `referenceBlockNumber` - * @dev Per the `BN254CertificateVerifier`, the value that the `Generator` signs over is given by `calculateGlobalTableUpdateSignableDigest` - * @dev The `referenceTimestamp` nested in the `globalTableRootCert` should be `getGeneratorReferenceTimestamp` (ie. `GENERATOR_REFERENCE_TIMESTAMP`), whereas - * the `referenceTimestamp` passed directly in the calldata is the block timestamp at which the global table root was calculated - * @dev Reverts for: - * - GlobalTableRootInFuture: referenceTimestamp is in the future - * - GlobalTableRootStale: referenceTimestamp is not greater than latest reference timestamp - * - InvalidMessageHash: certificate messageHash does not match expected EIP-712 hash - * - CertificateInvalid: certificate verification failed against confirmation threshold - * @dev Emits the following events: - * - NewGlobalTableRoot: When global table root is successfully confirmed - */ + /// @notice Sets the global table root + /// @param globalTableRootCert certificate of the global table root, signed by the `Generator`. This is a `BN254Certificate` + /// @param globalTableRoot merkle root of all operatorSet tables + /// @param referenceTimestamp block timestamp at which the global table root was calculated + /// @param referenceBlockNumber block number, corresponding to the `referenceTimestamp` of the global table root + /// @dev Any entity can submit with a valid certificate signed off by the `Generator` + /// @dev The `msgHash` in the `globalOperatorTableRootCert` is the hash of the `globalTableRoot`, `referenceTimestamp`, and `referenceBlockNumber` + /// @dev Per the `BN254CertificateVerifier`, the value that the `Generator` signs over is given by `calculateGlobalTableUpdateSignableDigest` + /// @dev The `referenceTimestamp` nested in the `globalTableRootCert` should be `getGeneratorReferenceTimestamp` (ie. `GENERATOR_REFERENCE_TIMESTAMP`), whereas + /// the `referenceTimestamp` passed directly in the calldata is the block timestamp at which the global table root was calculated + /// @dev Reverts for: + /// - GlobalTableRootInFuture: referenceTimestamp is in the future + /// - GlobalTableRootStale: referenceTimestamp is not greater than latest reference timestamp + /// - InvalidMessageHash: certificate messageHash does not match expected EIP-712 hash + /// - CertificateInvalid: certificate verification failed against confirmation threshold + /// @dev Emits the following events: + /// - NewGlobalTableRoot: When global table root is successfully confirmed function confirmGlobalTableRoot( BN254Certificate calldata globalTableRootCert, bytes32 globalTableRoot, @@ -131,57 +121,54 @@ interface IOperatorTableUpdater is uint32 referenceBlockNumber ) external; - /** - * @notice The threshold, in bps, for a global root to be signed off on and updated - * @dev Only callable by the owner of the contract - * @dev Reverts for: - * - "Ownable: caller is not the owner": caller is not the owner - * - InvalidConfirmationThreshold: bps is greater than MAX_BPS (10000) - * @dev Emits the following events: - * - GlobalRootConfirmationThresholdUpdated: When threshold is successfully updated - */ + /// @notice The threshold, in bps, for a global root to be signed off on and updated + /// @dev Only callable by the owner of the contract + /// @dev Reverts for: + /// - "Ownable: caller is not the owner": caller is not the owner + /// - InvalidConfirmationThreshold: bps is greater than MAX_BPS (10000) + /// @dev Emits the following events: + /// - GlobalRootConfirmationThresholdUpdated: When threshold is successfully updated function setGlobalRootConfirmationThreshold( uint16 bps ) external; - /** - * @notice Updates the `Generator` to a new operatorSet - * @param generator The operatorSet which certifies against global roots - * @param generatorInfo The operatorSetInfo for the generator - * @dev We have a separate function for updating this operatorSet since it's not transported and updated - * in the same way as the other operatorSets - * @dev Only callable by the owner of the contract - * @dev Uses GENERATOR_GLOBAL_TABLE_ROOT constant to break circular dependency for certificate verification - * @dev We ensure that there are no collisions with other reference timestamps because we expect the generator to have an initial reference timestamp of 0 - * @dev The `_latestReferenceTimestamp` is not updated since this root is ONLY used for the `Generator` - * @dev The `_referenceBlockNumber` and `_referenceTimestamps` mappings are not updated since they are only used for introspection for official operatorSets - * @dev Reverts for: - * - "Ownable: caller is not the owner": caller is not the owner - * - InvalidGenerator: generator has a non-zero reference timestamp - * @dev Emits the following events: - * - GeneratorUpdated: When generator is successfully updated - */ - function updateGenerator(OperatorSet calldata generator, BN254OperatorSetInfo calldata generatorInfo) external; - - /** - * @notice Updates an operator table - * @param referenceTimestamp the reference timestamp of the globalTableRoot - * @param globalTableRoot the new globalTableRoot - * @param operatorSetIndex the index of the given operatorSet being updated - * @param proof the proof of the leaf at index against the globalTableRoot - * @param operatorTableBytes the bytes of the operator table - * @dev This function calls `updateOperatorTable` on the `ECDSACertificateVerifier` or `BN254CertificateVerifier` - * depending on the `KeyType` of the operatorSet, which is encoded in the `operatorTableBytes` - * @dev Function silently returns if the `referenceTimestamp` has already been updated for the `operatorSet` - * @dev Reverts for: - * - InvalidRoot: globalTableRoot is disabled or invalid - * - InvalidOperatorSet: operatorSet is the generator (not allowed for regular updates) - * - TableUpdateForPastTimestamp: referenceTimestamp is not greater than latest for the operatorSet - * - InvalidGlobalTableRoot: provided globalTableRoot does not match stored root for referenceTimestamp - * - InvalidOperatorSetProof: merkle proof verification failed - * - InvalidCurveType: unsupported curve type in operatorTableBytes - * @dev The operator table is updated at a cadence of `tableUpdateCadence` seconds, which is given by `CrossChainRegistry.tableUpdateCadence` - */ + /// @notice Updates the `Generator` to a new operatorSet + /// @param generator The operatorSet which certifies against global roots + /// @param generatorInfo The operatorSetInfo for the generator + /// @dev We have a separate function for updating this operatorSet since it's not transported and updated + /// in the same way as the other operatorSets + /// @dev Only callable by the owner of the contract + /// @dev Uses GENERATOR_GLOBAL_TABLE_ROOT constant to break circular dependency for certificate verification + /// @dev We ensure that there are no collisions with other reference timestamps because we expect the generator to have an initial reference timestamp of 0 + /// @dev The `_latestReferenceTimestamp` is not updated since this root is ONLY used for the `Generator` + /// @dev The `_referenceBlockNumber` and `_referenceTimestamps` mappings are not updated since they are only used for introspection for official operatorSets + /// @dev Reverts for: + /// - "Ownable: caller is not the owner": caller is not the owner + /// - InvalidGenerator: generator has a non-zero reference timestamp + /// @dev Emits the following events: + /// - GeneratorUpdated: When generator is successfully updated + function updateGenerator( + OperatorSet calldata generator, + BN254OperatorSetInfo calldata generatorInfo + ) external; + + /// @notice Updates an operator table + /// @param referenceTimestamp the reference timestamp of the globalTableRoot + /// @param globalTableRoot the new globalTableRoot + /// @param operatorSetIndex the index of the given operatorSet being updated + /// @param proof the proof of the leaf at index against the globalTableRoot + /// @param operatorTableBytes the bytes of the operator table + /// @dev This function calls `updateOperatorTable` on the `ECDSACertificateVerifier` or `BN254CertificateVerifier` + /// depending on the `KeyType` of the operatorSet, which is encoded in the `operatorTableBytes` + /// @dev Function silently returns if the `referenceTimestamp` has already been updated for the `operatorSet` + /// @dev Reverts for: + /// - InvalidRoot: globalTableRoot is disabled or invalid + /// - InvalidOperatorSet: operatorSet is the generator (not allowed for regular updates) + /// - TableUpdateForPastTimestamp: referenceTimestamp is not greater than latest for the operatorSet + /// - InvalidGlobalTableRoot: provided globalTableRoot does not match stored root for referenceTimestamp + /// - InvalidOperatorSetProof: merkle proof verification failed + /// - InvalidCurveType: unsupported curve type in operatorTableBytes + /// @dev The operator table is updated at a cadence of `tableUpdateCadence` seconds, which is given by `CrossChainRegistry.tableUpdateCadence` function updateOperatorTable( uint32 referenceTimestamp, bytes32 globalTableRoot, @@ -190,137 +177,107 @@ interface IOperatorTableUpdater is bytes calldata operatorTableBytes ) external; - /** - * @notice Disables a global table root - * @param globalTableRoot the global table root to disable - * @dev Only callable by the pauser - * @dev Cannot disable the GENERATOR_GLOBAL_TABLE_ROOT - * @dev Reverts for: - * - OnlyPauser: caller is not the pauser - * - InvalidRoot: globalTableRoot is already disabled or does not exist - * - CannotDisableGeneratorRoot: attempting to disable the generator's global table root - * @dev Emits the following events: - * - GlobalRootDisabled: When global table root is successfully disabled - */ + /// @notice Disables a global table root + /// @param globalTableRoot the global table root to disable + /// @dev Only callable by the pauser + /// @dev Cannot disable the GENERATOR_GLOBAL_TABLE_ROOT + /// @dev Reverts for: + /// - OnlyPauser: caller is not the pauser + /// - InvalidRoot: globalTableRoot is already disabled or does not exist + /// - CannotDisableGeneratorRoot: attempting to disable the generator's global table root + /// @dev Emits the following events: + /// - GlobalRootDisabled: When global table root is successfully disabled function disableRoot( bytes32 globalTableRoot ) external; - /** - * @notice Get the current global table root - * @return globalTableRoot the current global table root - */ + /// @notice Get the current global table root + /// @return globalTableRoot the current global table root function getCurrentGlobalTableRoot() external view returns (bytes32 globalTableRoot); - /** - * @notice Get the table root by timestamp - * @param referenceTimestamp the timestamp of the table root - * @return tableRoot the table root at the given timestamp - */ + /// @notice Get the table root by timestamp + /// @param referenceTimestamp the timestamp of the table root + /// @return tableRoot the table root at the given timestamp function getGlobalTableRootByTimestamp( uint32 referenceTimestamp ) external view returns (bytes32 tableRoot); - /** - * @notice Get the operatorSet which certifies against global roots - * @return The operatorSet which certifies against global roots - */ + /// @notice Get the operatorSet which certifies against global roots + /// @return The operatorSet which certifies against global roots function getGenerator() external view returns (OperatorSet memory); - /** - * @notice Get the certificate verifier for a given key type - * @param curveType The curve type - * @return The certificate verifier for the given key type - */ + /// @notice Get the certificate verifier for a given key type + /// @param curveType The curve type + /// @return The certificate verifier for the given key type function getCertificateVerifier( CurveType curveType ) external view returns (address); - /** - * @notice Get the latest reference timestamp - * @return The latest reference timestamp - */ + /// @notice Get the latest reference timestamp + /// @return The latest reference timestamp function getLatestReferenceTimestamp() external view returns (uint32); - /** - * @notice Get the latest reference block number - * @return The latest reference block number - */ + /// @notice Get the latest reference block number + /// @return The latest reference block number function getLatestReferenceBlockNumber() external view returns (uint32); - /** - * @notice Get the reference block number for a given reference timestamp - * @param referenceTimestamp the reference timestamp - * @return The reference block number for the given reference timestamp - */ + /// @notice Get the reference block number for a given reference timestamp + /// @param referenceTimestamp the reference timestamp + /// @return The reference block number for the given reference timestamp function getReferenceBlockNumberByTimestamp( uint32 referenceTimestamp ) external view returns (uint32); - /** - * @notice Get the reference timestamp for a given reference block number - * @param referenceBlockNumber the reference block number - * @return The reference timestamp for the given reference block number - */ + /// @notice Get the reference timestamp for a given reference block number + /// @param referenceBlockNumber the reference block number + /// @return The reference timestamp for the given reference block number function getReferenceTimestampByBlockNumber( uint32 referenceBlockNumber ) external view returns (uint32); - /** - * @notice Get the message hash for the certificate of a global table root update - * @param globalTableRoot the global table root - * @param referenceTimestamp the reference timestamp - * @param referenceBlockNumber the reference block number - * @return The message hash for a global table root - */ + /// @notice Get the message hash for the certificate of a global table root update + /// @param globalTableRoot the global table root + /// @param referenceTimestamp the reference timestamp + /// @param referenceBlockNumber the reference block number + /// @return The message hash for a global table root function getGlobalTableUpdateMessageHash( bytes32 globalTableRoot, uint32 referenceTimestamp, uint32 referenceBlockNumber ) external view returns (bytes32); - /** - * @notice Get the signable digest for confirming a global table root update - * @param globalTableRoot the global table root - * @param referenceTimestamp the reference timestamp used when computing the message hash - * @param referenceBlockNumber the reference block number - * @return The digest to be signed by the Generator - * @dev Calls into the `BN254CertificateVerifier` to calculate the signable digest - */ + /// @notice Get the signable digest for confirming a global table root update + /// @param globalTableRoot the global table root + /// @param referenceTimestamp the reference timestamp used when computing the message hash + /// @param referenceBlockNumber the reference block number + /// @return The digest to be signed by the Generator + /// @dev Calls into the `BN254CertificateVerifier` to calculate the signable digest function getGlobalTableUpdateSignableDigest( bytes32 globalTableRoot, uint32 referenceTimestamp, uint32 referenceBlockNumber ) external view returns (bytes32); - /** - * @notice Get the reference timestamp of the generator - * @return The reference timestamp of the generator - * @dev The `Generator's` referenceTimestamp is hardcoded to 1. See `GENERATOR_REFERENCE_TIMESTAMP` in `OperatorTableUpdaterStorage.sol` - */ + /// @notice Get the reference timestamp of the generator + /// @return The reference timestamp of the generator + /// @dev The `Generator's` referenceTimestamp is hardcoded to 1. See `GENERATOR_REFERENCE_TIMESTAMP` in `OperatorTableUpdaterStorage.sol` function getGeneratorReferenceTimestamp() external view returns (uint32); - /** - * @notice Get the operator set config for the Generator - * @return The operator set config for the Generator - * @dev The Generator's config has maxStalenessPeriod = 0 and owner = address(operatorTableUpdater) - */ + /// @notice Get the operator set config for the Generator + /// @return The operator set config for the Generator + /// @dev The Generator's config has maxStalenessPeriod = 0 and owner = address(operatorTableUpdater) function getGeneratorConfig() external view returns (OperatorSetConfig memory); - /** - * @notice Get the validity status of a global table root - * @param globalTableRoot the global table root - * @return The validity status of the global table root - */ + /// @notice Get the validity status of a global table root + /// @param globalTableRoot the global table root + /// @return The validity status of the global table root function isRootValid( bytes32 globalTableRoot ) external view returns (bool); - /** - * @notice Get the validity status of a global table root by timestamp - * @param referenceTimestamp the reference timestamp - * @return The validity status of the global table root - */ + /// @notice Get the validity status of a global table root by timestamp + /// @param referenceTimestamp the reference timestamp + /// @return The validity status of the global table root function isRootValidByTimestamp( uint32 referenceTimestamp ) external view returns (bool); diff --git a/src/contracts/interfaces/IPausable.sol b/src/contracts/interfaces/IPausable.sol index d152df371a..eb0594ed1e 100644 --- a/src/contracts/interfaces/IPausable.sol +++ b/src/contracts/interfaces/IPausable.sol @@ -3,22 +3,20 @@ pragma solidity >=0.5.0; import "../interfaces/IPauserRegistry.sol"; -/** - * @title Adds pausability to a contract, with pausing & unpausing controlled by the `pauser` and `unpauser` of a PauserRegistry contract. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice Contracts that inherit from this contract may define their own `pause` and `unpause` (and/or related) functions. - * These functions should be permissioned as "onlyPauser" which defers to a `PauserRegistry` for determining access control. - * @dev Pausability is implemented using a uint256, which allows up to 256 different single bit-flags; each bit can potentially pause different functionality. - * Inspiration for this was taken from the NearBridge design here https://etherscan.io/address/0x3FEFc5A4B1c02f21cBc8D3613643ba0635b9a873#code. - * For the `pause` and `unpause` functions we've implemented, if you pause, you can only flip (any number of) switches to on/1 (aka "paused"), and if you unpause, - * you can only flip (any number of) switches to off/0 (aka "paused"). - * If you want a pauseXYZ function that just flips a single bit / "pausing flag", it will: - * 1) 'bit-wise and' (aka `&`) a flag with the current paused state (as a uint256) - * 2) update the paused state to this new value - * @dev We note as well that we have chosen to identify flags by their *bit index* as opposed to their numerical value, so, e.g. defining `DEPOSITS_PAUSED = 3` - * indicates specifically that if the *third bit* of `_paused` is flipped -- i.e. it is a '1' -- then deposits should be paused - */ +/// @title Adds pausability to a contract, with pausing & unpausing controlled by the `pauser` and `unpauser` of a PauserRegistry contract. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice Contracts that inherit from this contract may define their own `pause` and `unpause` (and/or related) functions. +/// These functions should be permissioned as "onlyPauser" which defers to a `PauserRegistry` for determining access control. +/// @dev Pausability is implemented using a uint256, which allows up to 256 different single bit-flags; each bit can potentially pause different functionality. +/// Inspiration for this was taken from the NearBridge design here https://etherscan.io/address/0x3FEFc5A4B1c02f21cBc8D3613643ba0635b9a873#code. +/// For the `pause` and `unpause` functions we've implemented, if you pause, you can only flip (any number of) switches to on/1 (aka "paused"), and if you unpause, +/// you can only flip (any number of) switches to off/0 (aka "paused"). +/// If you want a pauseXYZ function that just flips a single bit / "pausing flag", it will: +/// 1) 'bit-wise and' (aka `&`) a flag with the current paused state (as a uint256) +/// 2) update the paused state to this new value +/// @dev We note as well that we have chosen to identify flags by their *bit index* as opposed to their numerical value, so, e.g. defining `DEPOSITS_PAUSED = 3` +/// indicates specifically that if the *third bit* of `_paused` is flipped -- i.e. it is a '1' -- then deposits should be paused interface IPausable { /// @dev Thrown when caller is not pauser. error OnlyPauser(); @@ -40,27 +38,21 @@ interface IPausable { /// @notice Address of the `PauserRegistry` contract that this contract defers to for determining access control (for pausing). function pauserRegistry() external view returns (IPauserRegistry); - /** - * @notice This function is used to pause an EigenLayer contract's functionality. - * It is permissioned to the `pauser` address, which is expected to be a low threshold multisig. - * @param newPausedStatus represents the new value for `_paused` to take, which means it may flip several bits at once. - * @dev This function can only pause functionality, and thus cannot 'unflip' any bit in `_paused` from 1 to 0. - */ + /// @notice This function is used to pause an EigenLayer contract's functionality. + /// It is permissioned to the `pauser` address, which is expected to be a low threshold multisig. + /// @param newPausedStatus represents the new value for `_paused` to take, which means it may flip several bits at once. + /// @dev This function can only pause functionality, and thus cannot 'unflip' any bit in `_paused` from 1 to 0. function pause( uint256 newPausedStatus ) external; - /** - * @notice Alias for `pause(type(uint256).max)`. - */ + /// @notice Alias for `pause(type(uint256).max)`. function pauseAll() external; - /** - * @notice This function is used to unpause an EigenLayer contract's functionality. - * It is permissioned to the `unpauser` address, which is expected to be a high threshold multisig or governance contract. - * @param newPausedStatus represents the new value for `_paused` to take, which means it may flip several bits at once. - * @dev This function can only unpause functionality, and thus cannot 'flip' any bit in `_paused` from 0 to 1. - */ + /// @notice This function is used to unpause an EigenLayer contract's functionality. + /// It is permissioned to the `unpauser` address, which is expected to be a high threshold multisig or governance contract. + /// @param newPausedStatus represents the new value for `_paused` to take, which means it may flip several bits at once. + /// @dev This function can only unpause functionality, and thus cannot 'flip' any bit in `_paused` from 0 to 1. function unpause( uint256 newPausedStatus ) external; diff --git a/src/contracts/interfaces/IPauserRegistry.sol b/src/contracts/interfaces/IPauserRegistry.sol index e20fd77a77..9d44a9d9d1 100644 --- a/src/contracts/interfaces/IPauserRegistry.sol +++ b/src/contracts/interfaces/IPauserRegistry.sol @@ -1,11 +1,9 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.5.0; -/** - * @title Interface for the `PauserRegistry` contract. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - */ +/// @title Interface for the `PauserRegistry` contract. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service interface IPauserRegistry { error OnlyUnpauser(); error InputAddressZero(); diff --git a/src/contracts/interfaces/IPermissionController.sol b/src/contracts/interfaces/IPermissionController.sol index 6deca8206c..1598226b31 100644 --- a/src/contracts/interfaces/IPermissionController.sol +++ b/src/contracts/interfaces/IPermissionController.sol @@ -41,128 +41,136 @@ interface IPermissionControllerEvents { } interface IPermissionController is IPermissionControllerErrors, IPermissionControllerEvents { - /** - * @notice Sets a pending admin for an account. - * @param account The account to set the pending admin for. - * @param admin The address to set as pending admin. - * @dev The pending admin must accept the role before becoming an active admin. - * @dev Multiple admins can be set for a single account. - */ - function addPendingAdmin(address account, address admin) external; - - /** - * @notice Removes a pending admin from an account before they have accepted the role. - * @param account The account to remove the pending admin from. - * @param admin The pending admin address to remove. - * @dev Only an existing admin of the account can remove a pending admin. - */ - function removePendingAdmin(address account, address admin) external; - - /** - * @notice Allows a pending admin to accept their admin role for an account. - * @param account The account to accept the admin role for. - * @dev Only addresses that were previously set as pending admins can accept the role. - */ + /// @notice Sets a pending admin for an account. + /// @param account The account to set the pending admin for. + /// @param admin The address to set as pending admin. + /// @dev The pending admin must accept the role before becoming an active admin. + /// @dev Multiple admins can be set for a single account. + function addPendingAdmin( + address account, + address admin + ) external; + + /// @notice Removes a pending admin from an account before they have accepted the role. + /// @param account The account to remove the pending admin from. + /// @param admin The pending admin address to remove. + /// @dev Only an existing admin of the account can remove a pending admin. + function removePendingAdmin( + address account, + address admin + ) external; + + /// @notice Allows a pending admin to accept their admin role for an account. + /// @param account The account to accept the admin role for. + /// @dev Only addresses that were previously set as pending admins can accept the role. function acceptAdmin( address account ) external; - /** - * @notice Removes an active admin from an account. - * @param account The account to remove the admin from. - * @param admin The admin address to remove. - * @dev Only an existing admin of the account can remove another admin. - * @dev Will revert if removing this admin would leave the account with zero admins. - */ - function removeAdmin(address account, address admin) external; - - /** - * @notice Sets an appointee who can call specific functions on behalf of an account. - * @param account The account to set the appointee for. - * @param appointee The address to be given permission. - * @param target The contract address the appointee can interact with. - * @param selector The function selector the appointee can call. - * @dev Only an admin of the account can set appointees. - */ - function setAppointee(address account, address appointee, address target, bytes4 selector) external; - - /** - * @notice Removes an appointee's permission to call a specific function. - * @param account The account to remove the appointee from. - * @param appointee The appointee address to remove. - * @param target The contract address to remove permissions for. - * @param selector The function selector to remove permissions for. - * @dev Only an admin of the account can remove appointees. - */ - function removeAppointee(address account, address appointee, address target, bytes4 selector) external; - - /** - * @notice Checks if a given address is an admin of an account. - * @param account The account to check admin status for. - * @param caller The address to check. - * @dev If the account has no admins, returns true only if the caller is the account itself. - * @return Returns true if the caller is an admin, false otherwise. - */ - function isAdmin(address account, address caller) external view returns (bool); - - /** - * @notice Checks if an address is currently a pending admin for an account. - * @param account The account to check pending admin status for. - * @param pendingAdmin The address to check. - * @return Returns true if the address is a pending admin, false otherwise. - */ - function isPendingAdmin(address account, address pendingAdmin) external view returns (bool); - - /** - * @notice Retrieves all active admins for an account. - * @param account The account to get the admins for. - * @dev If the account has no admins, returns an array containing only the account address. - * @return An array of admin addresses. - */ + /// @notice Removes an active admin from an account. + /// @param account The account to remove the admin from. + /// @param admin The admin address to remove. + /// @dev Only an existing admin of the account can remove another admin. + /// @dev Will revert if removing this admin would leave the account with zero admins. + function removeAdmin( + address account, + address admin + ) external; + + /// @notice Sets an appointee who can call specific functions on behalf of an account. + /// @param account The account to set the appointee for. + /// @param appointee The address to be given permission. + /// @param target The contract address the appointee can interact with. + /// @param selector The function selector the appointee can call. + /// @dev Only an admin of the account can set appointees. + function setAppointee( + address account, + address appointee, + address target, + bytes4 selector + ) external; + + /// @notice Removes an appointee's permission to call a specific function. + /// @param account The account to remove the appointee from. + /// @param appointee The appointee address to remove. + /// @param target The contract address to remove permissions for. + /// @param selector The function selector to remove permissions for. + /// @dev Only an admin of the account can remove appointees. + function removeAppointee( + address account, + address appointee, + address target, + bytes4 selector + ) external; + + /// @notice Checks if a given address is an admin of an account. + /// @param account The account to check admin status for. + /// @param caller The address to check. + /// @dev If the account has no admins, returns true only if the caller is the account itself. + /// @return Returns true if the caller is an admin, false otherwise. + function isAdmin( + address account, + address caller + ) external view returns (bool); + + /// @notice Checks if an address is currently a pending admin for an account. + /// @param account The account to check pending admin status for. + /// @param pendingAdmin The address to check. + /// @return Returns true if the address is a pending admin, false otherwise. + function isPendingAdmin( + address account, + address pendingAdmin + ) external view returns (bool); + + /// @notice Retrieves all active admins for an account. + /// @param account The account to get the admins for. + /// @dev If the account has no admins, returns an array containing only the account address. + /// @return An array of admin addresses. function getAdmins( address account ) external view returns (address[] memory); - /** - * @notice Retrieves all pending admins for an account. - * @param account The account to get the pending admins for. - * @return An array of pending admin addresses. - */ + /// @notice Retrieves all pending admins for an account. + /// @param account The account to get the pending admins for. + /// @return An array of pending admin addresses. function getPendingAdmins( address account ) external view returns (address[] memory); - /** - * @notice Checks if a caller has permission to call a specific function. - * @param account The account to check permissions for. - * @param caller The address attempting to make the call. - * @param target The contract address being called. - * @param selector The function selector being called. - * @dev Returns true if the caller is either an admin or an appointed caller. - * @dev Be mindful that upgrades to the contract may invalidate the appointee's permissions. - * This is only possible if a function's selector changes (e.g. if a function's parameters are modified). - * @return Returns true if the caller has permission, false otherwise. - */ - function canCall(address account, address caller, address target, bytes4 selector) external view returns (bool); - - /** - * @notice Retrieves all permissions granted to an appointee for a given account. - * @param account The account to check appointee permissions for. - * @param appointee The appointee address to check. - * @return Two arrays: target contract addresses and their corresponding function selectors. - */ + /// @notice Checks if a caller has permission to call a specific function. + /// @param account The account to check permissions for. + /// @param caller The address attempting to make the call. + /// @param target The contract address being called. + /// @param selector The function selector being called. + /// @dev Returns true if the caller is either an admin or an appointed caller. + /// @dev Be mindful that upgrades to the contract may invalidate the appointee's permissions. + /// This is only possible if a function's selector changes (e.g. if a function's parameters are modified). + /// @return Returns true if the caller has permission, false otherwise. + function canCall( + address account, + address caller, + address target, + bytes4 selector + ) external view returns (bool); + + /// @notice Retrieves all permissions granted to an appointee for a given account. + /// @param account The account to check appointee permissions for. + /// @param appointee The appointee address to check. + /// @return Two arrays: target contract addresses and their corresponding function selectors. function getAppointeePermissions( address account, address appointee ) external view returns (address[] memory, bytes4[] memory); - /** - * @notice Retrieves all appointees that can call a specific function for an account. - * @param account The account to get appointees for. - * @param target The contract address to check. - * @param selector The function selector to check. - * @dev Does not include admins in the returned list, even though they have calling permission. - * @return An array of appointee addresses. - */ - function getAppointees(address account, address target, bytes4 selector) external view returns (address[] memory); + /// @notice Retrieves all appointees that can call a specific function for an account. + /// @param account The account to get appointees for. + /// @param target The contract address to check. + /// @param selector The function selector to check. + /// @dev Does not include admins in the returned list, even though they have calling permission. + /// @return An array of appointee addresses. + function getAppointees( + address account, + address target, + bytes4 selector + ) external view returns (address[] memory); } diff --git a/src/contracts/interfaces/IProtocolRegistry.sol b/src/contracts/interfaces/IProtocolRegistry.sol index ac021706e0..6f85d2529a 100644 --- a/src/contracts/interfaces/IProtocolRegistry.sol +++ b/src/contracts/interfaces/IProtocolRegistry.sol @@ -4,11 +4,9 @@ pragma solidity ^0.8.27; interface IProtocolRegistryErrors {} interface IProtocolRegistryTypes { - /** - * @notice Configuration for a protocol deployment. - * @param pausable Whether this deployment can be paused. - * @param deprecated Whether this deployment is deprecated. - */ + /// @notice Configuration for a protocol deployment. + /// @param pausable Whether this deployment can be paused. + /// @param deprecated Whether this deployment is deprecated. struct DeploymentConfig { bool pausable; bool deprecated; @@ -16,45 +14,38 @@ interface IProtocolRegistryTypes { } interface IProtocolRegistryEvents is IProtocolRegistryTypes { - /** - * @notice Emitted when a deployment is shipped. - * @param addr The address of the deployment. - * @param config The configuration for the deployment. - */ + /// @notice Emitted when a deployment is shipped. + /// @param addr The address of the deployment. + /// @param config The configuration for the deployment. event DeploymentShipped(address indexed addr, DeploymentConfig config); - /** - * @notice Emitted when a deployment is configured. - * @param addr The address of the deployment. - * @param config The configuration for the deployment. - */ + /// @notice Emitted when a deployment is configured. + /// @param addr The address of the deployment. + /// @param config The configuration for the deployment. event DeploymentConfigured(address indexed addr, DeploymentConfig config); - /** - * @notice Emitted when the semantic version is updated. - * @param previousSemanticVersion The previous semantic version. - * @param semanticVersion The new semantic version. - */ + /// @notice Emitted when the semantic version is updated. + /// @param previousSemanticVersion The previous semantic version. + /// @param semanticVersion The new semantic version. event SemanticVersionUpdated(string previousSemanticVersion, string semanticVersion); } interface IProtocolRegistry is IProtocolRegistryErrors, IProtocolRegistryEvents { - /** - * @notice Initializes the ProtocolRegistry with the initial admin. - * @param initialAdmin The address to set as the initial admin. - * @param pauserMultisig The address to set as the pauser multisig. - */ - function initialize(address initialAdmin, address pauserMultisig) external; - - /** - * @notice Ships a list of deployments. - * @dev Only callable by the admin. - * @param addresses The addresses of the deployments to ship. - * @param configs The configurations of the deployments to ship. - * @param contractNames The names of the contracts to ship. - * @param semanticVersion The semantic version to ship. - * @dev Contract names must be in ALL CAPS and contain NO SPACES (e.g., "ALLOCATIONMANAGER"). - */ + /// @notice Initializes the ProtocolRegistry with the initial admin. + /// @param initialAdmin The address to set as the initial admin. + /// @param pauserMultisig The address to set as the pauser multisig. + function initialize( + address initialAdmin, + address pauserMultisig + ) external; + + /// @notice Ships a list of deployments. + /// @dev Only callable by the admin. + /// @param addresses The addresses of the deployments to ship. + /// @param configs The configurations of the deployments to ship. + /// @param contractNames The names of the contracts to ship. + /// @param semanticVersion The semantic version to ship. + /// @dev Contract names must be in ALL CAPS and contain NO SPACES (e.g., "ALLOCATIONMANAGER"). function ship( address[] calldata addresses, DeploymentConfig[] calldata configs, @@ -62,74 +53,59 @@ interface IProtocolRegistry is IProtocolRegistryErrors, IProtocolRegistryEvents string calldata semanticVersion ) external; - /** - * @notice Configures a deployment. - * @dev Only callable by the admin. - * @param addr The address of the deployment to configure. - * @param config The configuration to set. - */ - function configure(address addr, DeploymentConfig calldata config) external; - - /** - * @notice Pauses all deployments that support pausing. - * @dev Loops over all deployments and attempts to invoke `pauseAll()` on each contract that is marked as pausable. - * Silently ignores errors during calls for rapid pausing in emergencies. Pauser role only. - */ + /// @notice Configures a deployment. + /// @dev Only callable by the admin. + /// @param addr The address of the deployment to configure. + /// @param config The configuration to set. + function configure( + address addr, + DeploymentConfig calldata config + ) external; + + /// @notice Pauses all deployments that support pausing. + /// @dev Loops over all deployments and attempts to invoke `pauseAll()` on each contract that is marked as pausable. + /// Silently ignores errors during calls for rapid pausing in emergencies. Pauser role only. function pauseAll() external; - /** - * @notice Returns the full semantic version string of the protocol (e.g. "1.2.3"). - * @dev Follows Semantic Versioning 2.0.0 (see https://semver.org/). - * @return The SemVer-formatted version string of the protocol. - */ + /// @notice Returns the full semantic version string of the protocol (e.g. "1.2.3"). + /// @dev Follows Semantic Versioning 2.0.0 (see https://semver.org/). + /// @return The SemVer-formatted version string of the protocol. function version() external view returns (string memory); - /** - * @notice Returns the major version component of the protocol's semantic version. - * @dev Extracts and returns only the major version number as a string (e.g. "1" for version "1.2.3"). - * @return The major version number as a string. - */ + /// @notice Returns the major version component of the protocol's semantic version. + /// @dev Extracts and returns only the major version number as a string (e.g. "1" for version "1.2.3"). + /// @return The major version number as a string. function majorVersion() external view returns (string memory); - /** - * @notice Returns a deployment by name. - * @param name The name of the deployment to get. - * @return address The address of the deployment. - */ + /// @notice Returns a deployment by name. + /// @param name The name of the deployment to get. + /// @return address The address of the deployment. function getAddress( string calldata name ) external view returns (address); - /** - * @notice Returns a deployment by name. - * @param name The name of the deployment to get. - * @return addr The address. - * @return config The configuration. - */ + /// @notice Returns a deployment by name. + /// @param name The name of the deployment to get. + /// @return addr The address. + /// @return config The configuration. function getDeployment( string calldata name ) external view returns (address addr, DeploymentConfig memory config); - /** - * @notice Returns all deployments. - * @return names The names of the deployments. - * @return addresses The addresses. - * @return configs The configurations. - */ + /// @notice Returns all deployments. + /// @return names The names of the deployments. + /// @return addresses The addresses. + /// @return configs The configurations. function getAllDeployments() external view returns (string[] memory names, address[] memory addresses, DeploymentConfig[] memory configs); - /** - * @notice Returns the total number of deployments. - * @return The total number of deployments. - */ + /// @notice Returns the total number of deployments. + /// @return The total number of deployments. function totalDeployments() external view returns (uint256); - /** - * @notice Returns the pauser role for the protocol. - * @return The pauser role for the protocol. - */ + /// @notice Returns the pauser role for the protocol. + /// @return The pauser role for the protocol. function PAUSER_ROLE() external view returns (bytes32); } diff --git a/src/contracts/interfaces/IProxyAdmin.sol b/src/contracts/interfaces/IProxyAdmin.sol index 2eadbc6cd0..8f45a586b8 100644 --- a/src/contracts/interfaces/IProxyAdmin.sol +++ b/src/contracts/interfaces/IProxyAdmin.sol @@ -2,58 +2,56 @@ // OpenZeppelin Contracts v4.4.1 (proxy/transparent/ProxyAdmin.sol) pragma solidity ^0.8.0; -/** - * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an - * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}. - */ +/// @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an +/// explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}. interface IProxyAdmin { - /** - * @dev Returns the current implementation of `proxy`. - * - * Requirements: - * - * - This contract must be the admin of `proxy`. - */ + /// @dev Returns the current implementation of `proxy`. + /// + /// Requirements: + /// + /// - This contract must be the admin of `proxy`. function getProxyImplementation( address proxy ) external view returns (address); - /** - * @dev Returns the current admin of `proxy`. - * - * Requirements: - * - * - This contract must be the admin of `proxy`. - */ + /// @dev Returns the current admin of `proxy`. + /// + /// Requirements: + /// + /// - This contract must be the admin of `proxy`. function getProxyAdmin( address proxy ) external view returns (address); - /** - * @dev Changes the admin of `proxy` to `newAdmin`. - * - * Requirements: - * - * - This contract must be the current admin of `proxy`. - */ - function changeProxyAdmin(address proxy, address newAdmin) external; + /// @dev Changes the admin of `proxy` to `newAdmin`. + /// + /// Requirements: + /// + /// - This contract must be the current admin of `proxy`. + function changeProxyAdmin( + address proxy, + address newAdmin + ) external; - /** - * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. - * - * Requirements: - * - * - This contract must be the admin of `proxy`. - */ - function upgrade(address proxy, address implementation) external; + /// @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. + /// + /// Requirements: + /// + /// - This contract must be the admin of `proxy`. + function upgrade( + address proxy, + address implementation + ) external; - /** - * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See - * {TransparentUpgradeableProxy-upgradeToAndCall}. - * - * Requirements: - * - * - This contract must be the admin of `proxy`. - */ - function upgradeAndCall(address proxy, address implementation, bytes memory data) external payable; + /// @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See + /// {TransparentUpgradeableProxy-upgradeToAndCall}. + /// + /// Requirements: + /// + /// - This contract must be the admin of `proxy`. + function upgradeAndCall( + address proxy, + address implementation, + bytes memory data + ) external payable; } diff --git a/src/contracts/interfaces/IReleaseManager.sol b/src/contracts/interfaces/IReleaseManager.sol index 8cf45c8493..dd8e6dcc08 100644 --- a/src/contracts/interfaces/IReleaseManager.sol +++ b/src/contracts/interfaces/IReleaseManager.sol @@ -49,12 +49,9 @@ interface IReleaseManagerEvents is IReleaseManagerTypes { } interface IReleaseManager is IReleaseManagerErrors, IReleaseManagerEvents { - /** - * - * WRITE FUNCTIONS - * - */ - + /// + /// WRITE FUNCTIONS + /// /// @notice Publishes a new release for an operator set. /// @dev If the upgradeByTime is 0, the release is meant to signal an instant upgrade. /// @param operatorSet The operator set this release is for. @@ -68,13 +65,14 @@ interface IReleaseManager is IReleaseManagerErrors, IReleaseManagerEvents { /// @notice Publishes a metadata URI for an operator set. /// @param operatorSet The operator set this metadata URI is for. /// @param metadataURI The metadata URI that was published. - function publishMetadataURI(OperatorSet calldata operatorSet, string calldata metadataURI) external; + function publishMetadataURI( + OperatorSet calldata operatorSet, + string calldata metadataURI + ) external; - /** - * - * VIEW FUNCTIONS - * - */ + /// + /// VIEW FUNCTIONS + /// /// @notice Returns the total number of releases for an operator set. /// @param operatorSet The operator set to query. @@ -88,7 +86,10 @@ interface IReleaseManager is IReleaseManagerErrors, IReleaseManagerEvents { /// @param operatorSet The operator set to query. /// @param releaseId The id of the release to get. /// @return The release at the specified index. - function getRelease(OperatorSet memory operatorSet, uint256 releaseId) external view returns (Release memory); + function getRelease( + OperatorSet memory operatorSet, + uint256 releaseId + ) external view returns (Release memory); /// @notice Returns the latest release for an operator set. /// @dev If the upgradeByTime is 0, the release is meant to signal an instant upgrade. @@ -111,7 +112,10 @@ interface IReleaseManager is IReleaseManagerErrors, IReleaseManagerEvents { /// @param operatorSet The operator set to query. /// @param releaseId The id of the release to check. /// @return True if the release is the latest release, false otherwise. - function isValidRelease(OperatorSet memory operatorSet, uint256 releaseId) external view returns (bool); + function isValidRelease( + OperatorSet memory operatorSet, + uint256 releaseId + ) external view returns (bool); /// @notice Returns the metadata URI for an operator set. /// @param operatorSet The operator set to query. diff --git a/src/contracts/interfaces/IRewardsCoordinator.sol b/src/contracts/interfaces/IRewardsCoordinator.sol index bfd30cb803..2d90609260 100644 --- a/src/contracts/interfaces/IRewardsCoordinator.sol +++ b/src/contracts/interfaces/IRewardsCoordinator.sol @@ -93,65 +93,57 @@ interface IRewardsCoordinatorErrors { } interface IRewardsCoordinatorTypes { - /** - * @notice A linear combination of strategies and multipliers for AVSs to weigh - * EigenLayer strategies. - * @param strategy The EigenLayer strategy to be used for the rewards submission - * @param multiplier The weight of the strategy in the rewards submission - */ + /// @notice A linear combination of strategies and multipliers for AVSs to weigh + /// EigenLayer strategies. + /// @param strategy The EigenLayer strategy to be used for the rewards submission + /// @param multiplier The weight of the strategy in the rewards submission struct StrategyAndMultiplier { IStrategy strategy; uint96 multiplier; } - /** - * @notice A reward struct for an operator - * @param operator The operator to be rewarded - * @param amount The reward amount for the operator - */ + /// @notice A reward struct for an operator + /// @param operator The operator to be rewarded + /// @param amount The reward amount for the operator struct OperatorReward { address operator; uint256 amount; } - /** - * @notice A split struct for an Operator - * @param oldSplitBips The old split in basis points. This is the split that is active if `block.timestamp < activatedAt` - * @param newSplitBips The new split in basis points. This is the split that is active if `block.timestamp >= activatedAt` - * @param activatedAt The timestamp at which the split will be activated - */ + /// @notice A split struct for an Operator + /// @param oldSplitBips The old split in basis points. This is the split that is active if `block.timestamp < activatedAt` + /// @param newSplitBips The new split in basis points. This is the split that is active if `block.timestamp >= activatedAt` + /// @param activatedAt The timestamp at which the split will be activated struct OperatorSplit { uint16 oldSplitBips; uint16 newSplitBips; uint32 activatedAt; } - /** - * Sliding Window for valid RewardsSubmission startTimestamp - * - * Scenario A: GENESIS_REWARDS_TIMESTAMP IS WITHIN RANGE - * <-----MAX_RETROACTIVE_LENGTH-----> t (block.timestamp) <---MAX_FUTURE_LENGTH---> - * <--------------------valid range for startTimestamp------------------------> - * ^ - * GENESIS_REWARDS_TIMESTAMP - * - * - * Scenario B: GENESIS_REWARDS_TIMESTAMP IS OUT OF RANGE - * <-----MAX_RETROACTIVE_LENGTH-----> t (block.timestamp) <---MAX_FUTURE_LENGTH---> - * <------------------------valid range for startTimestamp------------------------> - * ^ - * GENESIS_REWARDS_TIMESTAMP - * @notice RewardsSubmission struct submitted by AVSs when making rewards for their operators and stakers - * RewardsSubmission can be for a time range within the valid window for startTimestamp and must be within max duration. - * See `createAVSRewardsSubmission()` for more details. - * @param strategiesAndMultipliers The strategies and their relative weights - * cannot have duplicate strategies and need to be sorted in ascending address order - * @param token The rewards token to be distributed - * @param amount The total amount of tokens to be distributed - * @param startTimestamp The timestamp (seconds) at which the submission range is considered for distribution - * could start in the past or in the future but within a valid range. See the diagram above. - * @param duration The duration of the submission range in seconds. Must be <= MAX_REWARDS_DURATION - */ + /// Sliding Window for valid RewardsSubmission startTimestamp + /// + /// Scenario A: GENESIS_REWARDS_TIMESTAMP IS WITHIN RANGE + /// <-----MAX_RETROACTIVE_LENGTH-----> t (block.timestamp) <---MAX_FUTURE_LENGTH---> + /// <--------------------valid range for startTimestamp------------------------> + /// ^ + /// GENESIS_REWARDS_TIMESTAMP + /// + /// + /// Scenario B: GENESIS_REWARDS_TIMESTAMP IS OUT OF RANGE + /// <-----MAX_RETROACTIVE_LENGTH-----> t (block.timestamp) <---MAX_FUTURE_LENGTH---> + /// <------------------------valid range for startTimestamp------------------------> + /// ^ + /// GENESIS_REWARDS_TIMESTAMP + /// @notice RewardsSubmission struct submitted by AVSs when making rewards for their operators and stakers + /// RewardsSubmission can be for a time range within the valid window for startTimestamp and must be within max duration. + /// See `createAVSRewardsSubmission()` for more details. + /// @param strategiesAndMultipliers The strategies and their relative weights + /// cannot have duplicate strategies and need to be sorted in ascending address order + /// @param token The rewards token to be distributed + /// @param amount The total amount of tokens to be distributed + /// @param startTimestamp The timestamp (seconds) at which the submission range is considered for distribution + /// could start in the past or in the future but within a valid range. See the diagram above. + /// @param duration The duration of the submission range in seconds. Must be <= MAX_REWARDS_DURATION struct RewardsSubmission { StrategyAndMultiplier[] strategiesAndMultipliers; IERC20 token; @@ -160,15 +152,13 @@ interface IRewardsCoordinatorTypes { uint32 duration; } - /** - * @notice OperatorDirectedRewardsSubmission struct submitted by AVSs when making operator-directed rewards for their operators and stakers. - * @param strategiesAndMultipliers The strategies and their relative weights. - * @param token The rewards token to be distributed. - * @param operatorRewards The rewards for the operators. - * @param startTimestamp The timestamp (seconds) at which the submission range is considered for distribution. - * @param duration The duration of the submission range in seconds. - * @param description Describes what the rewards submission is for. - */ + /// @notice OperatorDirectedRewardsSubmission struct submitted by AVSs when making operator-directed rewards for their operators and stakers. + /// @param strategiesAndMultipliers The strategies and their relative weights. + /// @param token The rewards token to be distributed. + /// @param operatorRewards The rewards for the operators. + /// @param startTimestamp The timestamp (seconds) at which the submission range is considered for distribution. + /// @param duration The duration of the submission range in seconds. + /// @param description Describes what the rewards submission is for. struct OperatorDirectedRewardsSubmission { StrategyAndMultiplier[] strategiesAndMultipliers; IERC20 token; @@ -178,15 +168,13 @@ interface IRewardsCoordinatorTypes { string description; } - /** - * @notice A distribution root is a merkle root of the distribution of earnings for a given period. - * The RewardsCoordinator stores all historical distribution roots so that earners can claim their earnings against older roots - * if they wish but the merkle tree contains the cumulative earnings of all earners and tokens for a given period so earners (or their claimers if set) - * only need to claim against the latest root to claim all available earnings. - * @param root The merkle root of the distribution - * @param rewardsCalculationEndTimestamp The timestamp (seconds) until which rewards have been calculated - * @param activatedAt The timestamp (seconds) at which the root can be claimed against - */ + /// @notice A distribution root is a merkle root of the distribution of earnings for a given period. + /// The RewardsCoordinator stores all historical distribution roots so that earners can claim their earnings against older roots + /// if they wish but the merkle tree contains the cumulative earnings of all earners and tokens for a given period so earners (or their claimers if set) + /// only need to claim against the latest root to claim all available earnings. + /// @param root The merkle root of the distribution + /// @param rewardsCalculationEndTimestamp The timestamp (seconds) until which rewards have been calculated + /// @param activatedAt The timestamp (seconds) at which the root can be claimed against struct DistributionRoot { bytes32 root; uint32 rewardsCalculationEndTimestamp; @@ -194,47 +182,41 @@ interface IRewardsCoordinatorTypes { bool disabled; } - /** - * @notice Internal leaf in the merkle tree for the earner's account leaf - * @param earner The address of the earner - * @param earnerTokenRoot The merkle root of the earner's token subtree - * Each leaf in the earner's token subtree is a TokenTreeMerkleLeaf - */ + /// @notice Internal leaf in the merkle tree for the earner's account leaf + /// @param earner The address of the earner + /// @param earnerTokenRoot The merkle root of the earner's token subtree + /// Each leaf in the earner's token subtree is a TokenTreeMerkleLeaf struct EarnerTreeMerkleLeaf { address earner; bytes32 earnerTokenRoot; } - /** - * @notice The actual leaves in the distribution merkle tree specifying the token earnings - * for the respective earner's subtree. Each leaf is a claimable amount of a token for an earner. - * @param token The token for which the earnings are being claimed - * @param cumulativeEarnings The cumulative earnings of the earner for the token - */ + /// @notice The actual leaves in the distribution merkle tree specifying the token earnings + /// for the respective earner's subtree. Each leaf is a claimable amount of a token for an earner. + /// @param token The token for which the earnings are being claimed + /// @param cumulativeEarnings The cumulative earnings of the earner for the token struct TokenTreeMerkleLeaf { IERC20 token; uint256 cumulativeEarnings; } - /** - * @notice A claim against a distribution root called by an - * earners claimer (could be the earner themselves). Each token claim will claim the difference - * between the cumulativeEarnings of the earner and the cumulativeClaimed of the claimer. - * Each claim can specify which of the earner's earned tokens they want to claim. - * See `processClaim()` for more details. - * @param rootIndex The index of the root in the list of DistributionRoots - * @param earnerIndex The index of the earner's account root in the merkle tree - * @param earnerTreeProof The proof of the earner's EarnerTreeMerkleLeaf against the merkle root - * @param earnerLeaf The earner's EarnerTreeMerkleLeaf struct, providing the earner address and earnerTokenRoot - * @param tokenIndices The indices of the token leaves in the earner's subtree - * @param tokenTreeProofs The proofs of the token leaves against the earner's earnerTokenRoot - * @param tokenLeaves The token leaves to be claimed - * @dev The merkle tree is structured with the merkle root at the top and EarnerTreeMerkleLeaf as internal leaves - * in the tree. Each earner leaf has its own subtree with TokenTreeMerkleLeaf as leaves in the subtree. - * To prove a claim against a specified rootIndex(which specifies the distributionRoot being used), - * the claim will first verify inclusion of the earner leaf in the tree against _distributionRoots[rootIndex].root. - * Then for each token, it will verify inclusion of the token leaf in the earner's subtree against the earner's earnerTokenRoot. - */ + /// @notice A claim against a distribution root called by an + /// earners claimer (could be the earner themselves). Each token claim will claim the difference + /// between the cumulativeEarnings of the earner and the cumulativeClaimed of the claimer. + /// Each claim can specify which of the earner's earned tokens they want to claim. + /// See `processClaim()` for more details. + /// @param rootIndex The index of the root in the list of DistributionRoots + /// @param earnerIndex The index of the earner's account root in the merkle tree + /// @param earnerTreeProof The proof of the earner's EarnerTreeMerkleLeaf against the merkle root + /// @param earnerLeaf The earner's EarnerTreeMerkleLeaf struct, providing the earner address and earnerTokenRoot + /// @param tokenIndices The indices of the token leaves in the earner's subtree + /// @param tokenTreeProofs The proofs of the token leaves against the earner's earnerTokenRoot + /// @param tokenLeaves The token leaves to be claimed + /// @dev The merkle tree is structured with the merkle root at the top and EarnerTreeMerkleLeaf as internal leaves + /// in the tree. Each earner leaf has its own subtree with TokenTreeMerkleLeaf as leaves in the subtree. + /// To prove a claim against a specified rootIndex(which specifies the distributionRoot being used), + /// the claim will first verify inclusion of the earner leaf in the tree against _distributionRoots[rootIndex].root. + /// Then for each token, it will verify inclusion of the token leaf in the earner's subtree against the earner's earnerTokenRoot. struct RewardsMerkleClaim { uint32 rootIndex; uint32 earnerIndex; @@ -245,21 +227,19 @@ interface IRewardsCoordinatorTypes { TokenTreeMerkleLeaf[] tokenLeaves; } - /** - * @notice Parameters for the RewardsCoordinator constructor - * @param delegationManager The address of the DelegationManager contract - * @param strategyManager The address of the StrategyManager contract - * @param allocationManager The address of the AllocationManager contract - * @param pauserRegistry The address of the PauserRegistry contract - * @param permissionController The address of the PermissionController contract - * @param CALCULATION_INTERVAL_SECONDS The interval at which rewards are calculated - * @param MAX_REWARDS_DURATION The maximum duration of a rewards submission - * @param MAX_RETROACTIVE_LENGTH The maximum retroactive length of a rewards submission - * @param MAX_FUTURE_LENGTH The maximum future length of a rewards submission - * @param GENESIS_REWARDS_TIMESTAMP The timestamp at which rewards are first calculated - * @param version The semantic version of the contract (e.g. "1.2.3") - * @dev Needed to avoid stack-too-deep errors - */ + /// @notice Parameters for the RewardsCoordinator constructor + /// @param delegationManager The address of the DelegationManager contract + /// @param strategyManager The address of the StrategyManager contract + /// @param allocationManager The address of the AllocationManager contract + /// @param pauserRegistry The address of the PauserRegistry contract + /// @param permissionController The address of the PermissionController contract + /// @param CALCULATION_INTERVAL_SECONDS The interval at which rewards are calculated + /// @param MAX_REWARDS_DURATION The maximum duration of a rewards submission + /// @param MAX_RETROACTIVE_LENGTH The maximum retroactive length of a rewards submission + /// @param MAX_FUTURE_LENGTH The maximum future length of a rewards submission + /// @param GENESIS_REWARDS_TIMESTAMP The timestamp at which rewards are first calculated + /// @param version The semantic version of the contract (e.g. "1.2.3") + /// @dev Needed to avoid stack-too-deep errors struct RewardsCoordinatorConstructorParams { IDelegationManager delegationManager; IStrategyManager strategyManager; @@ -299,14 +279,12 @@ interface IRewardsCoordinatorEvents is IRewardsCoordinatorTypes { RewardsSubmission rewardsSubmission ); - /** - * @notice Emitted when an AVS creates a valid `OperatorDirectedRewardsSubmission` - * @param caller The address calling `createOperatorDirectedAVSRewardsSubmission`. - * @param avs The avs on behalf of which the operator-directed rewards are being submitted. - * @param operatorDirectedRewardsSubmissionHash Keccak256 hash of (`avs`, `submissionNonce` and `operatorDirectedRewardsSubmission`). - * @param submissionNonce Current nonce of the avs. Used to generate a unique submission hash. - * @param operatorDirectedRewardsSubmission The Operator-Directed Rewards Submission. Contains the token, start timestamp, duration, operator rewards, description and, strategy and multipliers. - */ + /// @notice Emitted when an AVS creates a valid `OperatorDirectedRewardsSubmission` + /// @param caller The address calling `createOperatorDirectedAVSRewardsSubmission`. + /// @param avs The avs on behalf of which the operator-directed rewards are being submitted. + /// @param operatorDirectedRewardsSubmissionHash Keccak256 hash of (`avs`, `submissionNonce` and `operatorDirectedRewardsSubmission`). + /// @param submissionNonce Current nonce of the avs. Used to generate a unique submission hash. + /// @param operatorDirectedRewardsSubmission The Operator-Directed Rewards Submission. Contains the token, start timestamp, duration, operator rewards, description and, strategy and multipliers. event OperatorDirectedAVSRewardsSubmissionCreated( address indexed caller, address indexed avs, @@ -315,14 +293,12 @@ interface IRewardsCoordinatorEvents is IRewardsCoordinatorTypes { OperatorDirectedRewardsSubmission operatorDirectedRewardsSubmission ); - /** - * @notice Emitted when an AVS creates a valid `OperatorDirectedRewardsSubmission` for an operator set. - * @param caller The address calling `createOperatorDirectedOperatorSetRewardsSubmission`. - * @param operatorDirectedRewardsSubmissionHash Keccak256 hash of (`avs`, `submissionNonce` and `operatorDirectedRewardsSubmission`). - * @param operatorSet The operatorSet on behalf of which the operator-directed rewards are being submitted. - * @param submissionNonce Current nonce of the avs. Used to generate a unique submission hash. - * @param operatorDirectedRewardsSubmission The Operator-Directed Rewards Submission. Contains the token, start timestamp, duration, operator rewards, description and, strategy and multipliers. - */ + /// @notice Emitted when an AVS creates a valid `OperatorDirectedRewardsSubmission` for an operator set. + /// @param caller The address calling `createOperatorDirectedOperatorSetRewardsSubmission`. + /// @param operatorDirectedRewardsSubmissionHash Keccak256 hash of (`avs`, `submissionNonce` and `operatorDirectedRewardsSubmission`). + /// @param operatorSet The operatorSet on behalf of which the operator-directed rewards are being submitted. + /// @param submissionNonce Current nonce of the avs. Used to generate a unique submission hash. + /// @param operatorDirectedRewardsSubmission The Operator-Directed Rewards Submission. Contains the token, start timestamp, duration, operator rewards, description and, strategy and multipliers. event OperatorDirectedOperatorSetRewardsSubmissionCreated( address indexed caller, bytes32 indexed operatorDirectedRewardsSubmissionHash, @@ -335,21 +311,21 @@ interface IRewardsCoordinatorEvents is IRewardsCoordinatorTypes { event RewardsUpdaterSet(address indexed oldRewardsUpdater, address indexed newRewardsUpdater); event RewardsForAllSubmitterSet( - address indexed rewardsForAllSubmitter, bool indexed oldValue, bool indexed newValue + address indexed rewardsForAllSubmitter, + bool indexed oldValue, + bool indexed newValue ); event ActivationDelaySet(uint32 oldActivationDelay, uint32 newActivationDelay); event DefaultOperatorSplitBipsSet(uint16 oldDefaultOperatorSplitBips, uint16 newDefaultOperatorSplitBips); - /** - * @notice Emitted when the operator split for an AVS is set. - * @param caller The address calling `setOperatorAVSSplit`. - * @param operator The operator on behalf of which the split is being set. - * @param avs The avs for which the split is being set by the operator. - * @param activatedAt The timestamp at which the split will be activated. - * @param oldOperatorAVSSplitBips The old split for the operator for the AVS. - * @param newOperatorAVSSplitBips The new split for the operator for the AVS. - */ + /// @notice Emitted when the operator split for an AVS is set. + /// @param caller The address calling `setOperatorAVSSplit`. + /// @param operator The operator on behalf of which the split is being set. + /// @param avs The avs for which the split is being set by the operator. + /// @param activatedAt The timestamp at which the split will be activated. + /// @param oldOperatorAVSSplitBips The old split for the operator for the AVS. + /// @param newOperatorAVSSplitBips The new split for the operator for the AVS. event OperatorAVSSplitBipsSet( address indexed caller, address indexed operator, @@ -359,14 +335,12 @@ interface IRewardsCoordinatorEvents is IRewardsCoordinatorTypes { uint16 newOperatorAVSSplitBips ); - /** - * @notice Emitted when the operator split for Programmatic Incentives is set. - * @param caller The address calling `setOperatorPISplit`. - * @param operator The operator on behalf of which the split is being set. - * @param activatedAt The timestamp at which the split will be activated. - * @param oldOperatorPISplitBips The old split for the operator for Programmatic Incentives. - * @param newOperatorPISplitBips The new split for the operator for Programmatic Incentives. - */ + /// @notice Emitted when the operator split for Programmatic Incentives is set. + /// @param caller The address calling `setOperatorPISplit`. + /// @param operator The operator on behalf of which the split is being set. + /// @param activatedAt The timestamp at which the split will be activated. + /// @param oldOperatorPISplitBips The old split for the operator for Programmatic Incentives. + /// @param newOperatorPISplitBips The new split for the operator for Programmatic Incentives. event OperatorPISplitBipsSet( address indexed caller, address indexed operator, @@ -375,15 +349,13 @@ interface IRewardsCoordinatorEvents is IRewardsCoordinatorTypes { uint16 newOperatorPISplitBips ); - /** - * @notice Emitted when the operator split for a given operatorSet is set. - * @param caller The address calling `setOperatorSetSplit`. - * @param operator The operator on behalf of which the split is being set. - * @param operatorSet The operatorSet for which the split is being set. - * @param activatedAt The timestamp at which the split will be activated. - * @param oldOperatorSetSplitBips The old split for the operator for the operatorSet. - * @param newOperatorSetSplitBips The new split for the operator for the operatorSet. - */ + /// @notice Emitted when the operator split for a given operatorSet is set. + /// @param caller The address calling `setOperatorSetSplit`. + /// @param operator The operator on behalf of which the split is being set. + /// @param operatorSet The operatorSet for which the split is being set. + /// @param activatedAt The timestamp at which the split will be activated. + /// @param oldOperatorSetSplitBips The old split for the operator for the operatorSet. + /// @param newOperatorSetSplitBips The new split for the operator for the operatorSet. event OperatorSetSplitBipsSet( address indexed caller, address indexed operator, @@ -416,20 +388,16 @@ interface IRewardsCoordinatorEvents is IRewardsCoordinatorTypes { ); } -/** - * @title Interface for the `IRewardsCoordinator` contract. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice Allows AVSs to make "Rewards Submissions", which get distributed amongst the AVSs' confirmed - * Operators and the Stakers delegated to those Operators. - * Calculations are performed based on the completed RewardsSubmission, with the results posted in - * a Merkle root against which Stakers & Operators can make claims. - */ +/// @title Interface for the `IRewardsCoordinator` contract. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice Allows AVSs to make "Rewards Submissions", which get distributed amongst the AVSs' confirmed +/// Operators and the Stakers delegated to those Operators. +/// Calculations are performed based on the completed RewardsSubmission, with the results posted in +/// a Merkle root against which Stakers & Operators can make claims. interface IRewardsCoordinator is IRewardsCoordinatorErrors, IRewardsCoordinatorEvents { - /** - * @dev Initializes the addresses of the initial owner, pauser registry, rewardsUpdater and - * configures the initial paused status, activationDelay, and defaultOperatorSplitBips. - */ + /// @dev Initializes the addresses of the initial owner, pauser registry, rewardsUpdater and + /// configures the initial paused status, activationDelay, and defaultOperatorSplitBips. function initialize( address initialOwner, uint256 initialPausedStatus, @@ -438,216 +406,204 @@ interface IRewardsCoordinator is IRewardsCoordinatorErrors, IRewardsCoordinatorE uint16 _defaultSplitBips ) external; - /** - * @notice Creates a new rewards submission on behalf of an AVS, to be split amongst the - * set of stakers delegated to operators who are registered to the `avs` - * @param rewardsSubmissions The rewards submissions being created - * @dev Expected to be called by the ServiceManager of the AVS on behalf of which the submission is being made - * @dev The duration of the `rewardsSubmission` cannot exceed `MAX_REWARDS_DURATION` - * @dev The duration of the `rewardsSubmission` cannot be 0 and must be a multiple of `CALCULATION_INTERVAL_SECONDS` - * @dev The tokens are sent to the `RewardsCoordinator` contract - * @dev Strategies must be in ascending order of addresses to check for duplicates - * @dev This function will revert if the `rewardsSubmission` is malformed, - * e.g. if the `strategies` and `weights` arrays are of non-equal lengths - */ + /// @notice Creates a new rewards submission on behalf of an AVS, to be split amongst the + /// set of stakers delegated to operators who are registered to the `avs` + /// @param rewardsSubmissions The rewards submissions being created + /// @dev Expected to be called by the ServiceManager of the AVS on behalf of which the submission is being made + /// @dev The duration of the `rewardsSubmission` cannot exceed `MAX_REWARDS_DURATION` + /// @dev The duration of the `rewardsSubmission` cannot be 0 and must be a multiple of `CALCULATION_INTERVAL_SECONDS` + /// @dev The tokens are sent to the `RewardsCoordinator` contract + /// @dev Strategies must be in ascending order of addresses to check for duplicates + /// @dev This function will revert if the `rewardsSubmission` is malformed, + /// e.g. if the `strategies` and `weights` arrays are of non-equal lengths function createAVSRewardsSubmission( RewardsSubmission[] calldata rewardsSubmissions ) external; - /** - * @notice similar to `createAVSRewardsSubmission` except the rewards are split amongst *all* stakers - * rather than just those delegated to operators who are registered to a single avs and is - * a permissioned call based on isRewardsForAllSubmitter mapping. - * @param rewardsSubmissions The rewards submissions being created - */ + /// @notice similar to `createAVSRewardsSubmission` except the rewards are split amongst *all* stakers + /// rather than just those delegated to operators who are registered to a single avs and is + /// a permissioned call based on isRewardsForAllSubmitter mapping. + /// @param rewardsSubmissions The rewards submissions being created function createRewardsForAllSubmission( RewardsSubmission[] calldata rewardsSubmissions ) external; - /** - * @notice Creates a new rewards submission for all earners across all AVSs. - * Earners in this case indicating all operators and their delegated stakers. Undelegated stake - * is not rewarded from this RewardsSubmission. This interface is only callable - * by the token hopper contract from the Eigen Foundation - * @param rewardsSubmissions The rewards submissions being created - */ + /// @notice Creates a new rewards submission for all earners across all AVSs. + /// Earners in this case indicating all operators and their delegated stakers. Undelegated stake + /// is not rewarded from this RewardsSubmission. This interface is only callable + /// by the token hopper contract from the Eigen Foundation + /// @param rewardsSubmissions The rewards submissions being created function createRewardsForAllEarners( RewardsSubmission[] calldata rewardsSubmissions ) external; - /** - * @notice Creates a new operator-directed rewards submission on behalf of an AVS, to be split amongst the operators and - * set of stakers delegated to operators who are registered to the `avs`. - * @param avs The AVS on behalf of which the reward is being submitted - * @param operatorDirectedRewardsSubmissions The operator-directed rewards submissions being created - * @dev Expected to be called by the ServiceManager of the AVS on behalf of which the submission is being made - * @dev The duration of the `rewardsSubmission` cannot exceed `MAX_REWARDS_DURATION` - * @dev The duration of the `rewardsSubmission` cannot be 0 and must be a multiple of `CALCULATION_INTERVAL_SECONDS` - * @dev The tokens are sent to the `RewardsCoordinator` contract - * @dev The `RewardsCoordinator` contract needs a token approval of sum of all `operatorRewards` in the `operatorDirectedRewardsSubmissions`, before calling this function. - * @dev Strategies must be in ascending order of addresses to check for duplicates - * @dev Operators must be in ascending order of addresses to check for duplicates. - * @dev This function will revert if the `operatorDirectedRewardsSubmissions` is malformed. - */ + /// @notice Creates a new operator-directed rewards submission on behalf of an AVS, to be split amongst the operators and + /// set of stakers delegated to operators who are registered to the `avs`. + /// @param avs The AVS on behalf of which the reward is being submitted + /// @param operatorDirectedRewardsSubmissions The operator-directed rewards submissions being created + /// @dev Expected to be called by the ServiceManager of the AVS on behalf of which the submission is being made + /// @dev The duration of the `rewardsSubmission` cannot exceed `MAX_REWARDS_DURATION` + /// @dev The duration of the `rewardsSubmission` cannot be 0 and must be a multiple of `CALCULATION_INTERVAL_SECONDS` + /// @dev The tokens are sent to the `RewardsCoordinator` contract + /// @dev The `RewardsCoordinator` contract needs a token approval of sum of all `operatorRewards` in the `operatorDirectedRewardsSubmissions`, before calling this function. + /// @dev Strategies must be in ascending order of addresses to check for duplicates + /// @dev Operators must be in ascending order of addresses to check for duplicates. + /// @dev This function will revert if the `operatorDirectedRewardsSubmissions` is malformed. function createOperatorDirectedAVSRewardsSubmission( address avs, OperatorDirectedRewardsSubmission[] calldata operatorDirectedRewardsSubmissions ) external; - /** - * @notice Creates a new operator-directed rewards submission for an operator set, to be split amongst the operators and - * set of stakers delegated to operators who are part of the operator set. - * @param operatorSet The operator set for which the rewards are being submitted - * @param operatorDirectedRewardsSubmissions The operator-directed rewards submissions being created - * @dev Expected to be called by the AVS that created the operator set - * @dev The duration of the `rewardsSubmission` cannot exceed `MAX_REWARDS_DURATION` - * @dev The duration of the `rewardsSubmission` cannot be 0 and must be a multiple of `CALCULATION_INTERVAL_SECONDS` - * @dev The tokens are sent to the `RewardsCoordinator` contract - * @dev The `RewardsCoordinator` contract needs a token approval of sum of all `operatorRewards` in the `operatorDirectedRewardsSubmissions`, before calling this function - * @dev Strategies must be in ascending order of addresses to check for duplicates - * @dev Operators must be in ascending order of addresses to check for duplicates - * @dev This function will revert if the `operatorDirectedRewardsSubmissions` is malformed - */ + /// @notice Creates a new operator-directed rewards submission for an operator set, to be split amongst the operators and + /// set of stakers delegated to operators who are part of the operator set. + /// @param operatorSet The operator set for which the rewards are being submitted + /// @param operatorDirectedRewardsSubmissions The operator-directed rewards submissions being created + /// @dev Expected to be called by the AVS that created the operator set + /// @dev The duration of the `rewardsSubmission` cannot exceed `MAX_REWARDS_DURATION` + /// @dev The duration of the `rewardsSubmission` cannot be 0 and must be a multiple of `CALCULATION_INTERVAL_SECONDS` + /// @dev The tokens are sent to the `RewardsCoordinator` contract + /// @dev The `RewardsCoordinator` contract needs a token approval of sum of all `operatorRewards` in the `operatorDirectedRewardsSubmissions`, before calling this function + /// @dev Strategies must be in ascending order of addresses to check for duplicates + /// @dev Operators must be in ascending order of addresses to check for duplicates + /// @dev This function will revert if the `operatorDirectedRewardsSubmissions` is malformed function createOperatorDirectedOperatorSetRewardsSubmission( OperatorSet calldata operatorSet, OperatorDirectedRewardsSubmission[] calldata operatorDirectedRewardsSubmissions ) external; - /** - * @notice Claim rewards against a given root (read from _distributionRoots[claim.rootIndex]). - * Earnings are cumulative so earners don't have to claim against all distribution roots they have earnings for, - * they can simply claim against the latest root and the contract will calculate the difference between - * their cumulativeEarnings and cumulativeClaimed. This difference is then transferred to recipient address. - * @param claim The RewardsMerkleClaim to be processed. - * Contains the root index, earner, token leaves, and required proofs - * @param recipient The address recipient that receives the ERC20 rewards - * @dev only callable by the valid claimer, that is - * if claimerFor[claim.earner] is address(0) then only the earner can claim, otherwise only - * claimerFor[claim.earner] can claim the rewards. - */ - function processClaim(RewardsMerkleClaim calldata claim, address recipient) external; - - /** - * @notice Batch claim rewards against a given root (read from _distributionRoots[claim.rootIndex]). - * Earnings are cumulative so earners don't have to claim against all distribution roots they have earnings for, - * they can simply claim against the latest root and the contract will calculate the difference between - * their cumulativeEarnings and cumulativeClaimed. This difference is then transferred to recipient address. - * @param claims The RewardsMerkleClaims to be processed. - * Contains the root index, earner, token leaves, and required proofs - * @param recipient The address recipient that receives the ERC20 rewards - * @dev only callable by the valid claimer, that is - * if claimerFor[claim.earner] is address(0) then only the earner can claim, otherwise only - * claimerFor[claim.earner] can claim the rewards. - * @dev This function may fail to execute with a large number of claims due to gas limits. Use a smaller array of claims if necessary. - */ - function processClaims(RewardsMerkleClaim[] calldata claims, address recipient) external; - - /** - * @notice Creates a new distribution root. activatedAt is set to block.timestamp + activationDelay - * @param root The merkle root of the distribution - * @param rewardsCalculationEndTimestamp The timestamp until which rewards have been calculated - * @dev Only callable by the rewardsUpdater - */ - function submitRoot(bytes32 root, uint32 rewardsCalculationEndTimestamp) external; - - /** - * @notice allow the rewardsUpdater to disable/cancel a pending root submission in case of an error - * @param rootIndex The index of the root to be disabled - */ + /// @notice Claim rewards against a given root (read from _distributionRoots[claim.rootIndex]). + /// Earnings are cumulative so earners don't have to claim against all distribution roots they have earnings for, + /// they can simply claim against the latest root and the contract will calculate the difference between + /// their cumulativeEarnings and cumulativeClaimed. This difference is then transferred to recipient address. + /// @param claim The RewardsMerkleClaim to be processed. + /// Contains the root index, earner, token leaves, and required proofs + /// @param recipient The address recipient that receives the ERC20 rewards + /// @dev only callable by the valid claimer, that is + /// if claimerFor[claim.earner] is address(0) then only the earner can claim, otherwise only + /// claimerFor[claim.earner] can claim the rewards. + function processClaim( + RewardsMerkleClaim calldata claim, + address recipient + ) external; + + /// @notice Batch claim rewards against a given root (read from _distributionRoots[claim.rootIndex]). + /// Earnings are cumulative so earners don't have to claim against all distribution roots they have earnings for, + /// they can simply claim against the latest root and the contract will calculate the difference between + /// their cumulativeEarnings and cumulativeClaimed. This difference is then transferred to recipient address. + /// @param claims The RewardsMerkleClaims to be processed. + /// Contains the root index, earner, token leaves, and required proofs + /// @param recipient The address recipient that receives the ERC20 rewards + /// @dev only callable by the valid claimer, that is + /// if claimerFor[claim.earner] is address(0) then only the earner can claim, otherwise only + /// claimerFor[claim.earner] can claim the rewards. + /// @dev This function may fail to execute with a large number of claims due to gas limits. Use a smaller array of claims if necessary. + function processClaims( + RewardsMerkleClaim[] calldata claims, + address recipient + ) external; + + /// @notice Creates a new distribution root. activatedAt is set to block.timestamp + activationDelay + /// @param root The merkle root of the distribution + /// @param rewardsCalculationEndTimestamp The timestamp until which rewards have been calculated + /// @dev Only callable by the rewardsUpdater + function submitRoot( + bytes32 root, + uint32 rewardsCalculationEndTimestamp + ) external; + + /// @notice allow the rewardsUpdater to disable/cancel a pending root submission in case of an error + /// @param rootIndex The index of the root to be disabled function disableRoot( uint32 rootIndex ) external; - /** - * @notice Sets the address of the entity that can call `processClaim` on ehalf of an earner - * @param claimer The address of the entity that can call `processClaim` on behalf of the earner - * @dev Assumes msg.sender is the earner - */ + /// @notice Sets the address of the entity that can call `processClaim` on ehalf of an earner + /// @param claimer The address of the entity that can call `processClaim` on behalf of the earner + /// @dev Assumes msg.sender is the earner function setClaimerFor( address claimer ) external; - /** - * @notice Sets the address of the entity that can call `processClaim` on behalf of an earner - * @param earner The address to set the claimer for - * @param claimer The address of the entity that can call `processClaim` on behalf of the earner - * @dev Only callable by operators or AVSs. We define an AVS that has created at least one - * operatorSet in the `AllocationManager` - */ - function setClaimerFor(address earner, address claimer) external; - - /** - * @notice Sets the delay in timestamp before a posted root can be claimed against - * @dev Only callable by the contract owner - * @param _activationDelay The new value for activationDelay - */ + /// @notice Sets the address of the entity that can call `processClaim` on behalf of an earner + /// @param earner The address to set the claimer for + /// @param claimer The address of the entity that can call `processClaim` on behalf of the earner + /// @dev Only callable by operators or AVSs. We define an AVS that has created at least one + /// operatorSet in the `AllocationManager` + function setClaimerFor( + address earner, + address claimer + ) external; + + /// @notice Sets the delay in timestamp before a posted root can be claimed against + /// @dev Only callable by the contract owner + /// @param _activationDelay The new value for activationDelay function setActivationDelay( uint32 _activationDelay ) external; - /** - * @notice Sets the default split for all operators across all avss. - * @param split The default split for all operators across all avss in bips. - * @dev Only callable by the contract owner. - */ + /// @notice Sets the default split for all operators across all avss. + /// @param split The default split for all operators across all avss in bips. + /// @dev Only callable by the contract owner. function setDefaultOperatorSplit( uint16 split ) external; - /** - * @notice Sets the split for a specific operator for a specific avs - * @param operator The operator who is setting the split - * @param avs The avs for which the split is being set by the operator - * @param split The split for the operator for the specific avs in bips. - * @dev Only callable by the operator - * @dev Split has to be between 0 and 10000 bips (inclusive) - * @dev The split will be activated after the activation delay - */ - function setOperatorAVSSplit(address operator, address avs, uint16 split) external; - - /** - * @notice Sets the split for a specific operator for Programmatic Incentives. - * @param operator The operator on behalf of which the split is being set. - * @param split The split for the operator for Programmatic Incentives in bips. - * @dev Only callable by the operator - * @dev Split has to be between 0 and 10000 bips (inclusive) - * @dev The split will be activated after the activation delay - */ - function setOperatorPISplit(address operator, uint16 split) external; - - /** - * @notice Sets the split for a specific operator for a specific operatorSet. - * @param operator The operator who is setting the split. - * @param operatorSet The operatorSet for which the split is being set by the operator. - * @param split The split for the operator for the specific operatorSet in bips. - * @dev Only callable by the operator - * @dev Split has to be between 0 and 10000 bips (inclusive) - * @dev The split will be activated after the activation delay - */ - function setOperatorSetSplit(address operator, OperatorSet calldata operatorSet, uint16 split) external; - - /** - * @notice Sets the permissioned `rewardsUpdater` address which can post new roots - * @dev Only callable by the contract owner - * @param _rewardsUpdater The address of the new rewardsUpdater - */ + /// @notice Sets the split for a specific operator for a specific avs + /// @param operator The operator who is setting the split + /// @param avs The avs for which the split is being set by the operator + /// @param split The split for the operator for the specific avs in bips. + /// @dev Only callable by the operator + /// @dev Split has to be between 0 and 10000 bips (inclusive) + /// @dev The split will be activated after the activation delay + function setOperatorAVSSplit( + address operator, + address avs, + uint16 split + ) external; + + /// @notice Sets the split for a specific operator for Programmatic Incentives. + /// @param operator The operator on behalf of which the split is being set. + /// @param split The split for the operator for Programmatic Incentives in bips. + /// @dev Only callable by the operator + /// @dev Split has to be between 0 and 10000 bips (inclusive) + /// @dev The split will be activated after the activation delay + function setOperatorPISplit( + address operator, + uint16 split + ) external; + + /// @notice Sets the split for a specific operator for a specific operatorSet. + /// @param operator The operator who is setting the split. + /// @param operatorSet The operatorSet for which the split is being set by the operator. + /// @param split The split for the operator for the specific operatorSet in bips. + /// @dev Only callable by the operator + /// @dev Split has to be between 0 and 10000 bips (inclusive) + /// @dev The split will be activated after the activation delay + function setOperatorSetSplit( + address operator, + OperatorSet calldata operatorSet, + uint16 split + ) external; + + /// @notice Sets the permissioned `rewardsUpdater` address which can post new roots + /// @dev Only callable by the contract owner + /// @param _rewardsUpdater The address of the new rewardsUpdater function setRewardsUpdater( address _rewardsUpdater ) external; - /** - * @notice Sets the permissioned `rewardsForAllSubmitter` address which can submit createRewardsForAllSubmission - * @dev Only callable by the contract owner - * @param _submitter The address of the rewardsForAllSubmitter - * @param _newValue The new value for isRewardsForAllSubmitter - */ - function setRewardsForAllSubmitter(address _submitter, bool _newValue) external; + /// @notice Sets the permissioned `rewardsForAllSubmitter` address which can submit createRewardsForAllSubmission + /// @dev Only callable by the contract owner + /// @param _submitter The address of the rewardsForAllSubmitter + /// @param _newValue The new value for isRewardsForAllSubmitter + function setRewardsForAllSubmitter( + address _submitter, + bool _newValue + ) external; - /** - * - * VIEW FUNCTIONS - * - */ + /// + /// VIEW FUNCTIONS + /// /// @notice Delay in timestamp (seconds) before a posted root can be claimed against function activationDelay() external view returns (uint32); @@ -661,13 +617,19 @@ interface IRewardsCoordinator is IRewardsCoordinatorErrors, IRewardsCoordinatorE ) external view returns (address); /// @notice Mapping: claimer => token => total amount claimed - function cumulativeClaimed(address claimer, IERC20 token) external view returns (uint256); + function cumulativeClaimed( + address claimer, + IERC20 token + ) external view returns (uint256); /// @notice the default split for all operators across all avss function defaultOperatorSplitBips() external view returns (uint16); /// @notice the split for a specific `operator` for a specific `avs` - function getOperatorAVSSplit(address operator, address avs) external view returns (uint16); + function getOperatorAVSSplit( + address operator, + address avs + ) external view returns (uint16); /// @notice the split for a specific `operator` for Programmatic Incentives function getOperatorPISplit( @@ -675,7 +637,10 @@ interface IRewardsCoordinator is IRewardsCoordinatorErrors, IRewardsCoordinatorE ) external view returns (uint16); /// @notice Returns the split for a specific `operator` for a given `operatorSet` - function getOperatorSetSplit(address operator, OperatorSet calldata operatorSet) external view returns (uint16); + function getOperatorSetSplit( + address operator, + OperatorSet calldata operatorSet + ) external view returns (uint16); /// @notice return the hash of the earner's leaf function calculateEarnerLeafHash( @@ -716,10 +681,8 @@ interface IRewardsCoordinator is IRewardsCoordinatorErrors, IRewardsCoordinatorE /// @notice The address of the entity that can update the contract with new merkle roots function rewardsUpdater() external view returns (address); - /** - * @notice The interval in seconds at which the calculation for a RewardsSubmission distribution is done. - * @dev Rewards Submission durations must be multiples of this interval. - */ + /// @notice The interval in seconds at which the calculation for a RewardsSubmission distribution is done. + /// @dev Rewards Submission durations must be multiples of this interval. function CALCULATION_INTERVAL_SECONDS() external view returns (uint32); /// @notice The maximum amount of time (seconds) that a RewardsSubmission can span over diff --git a/src/contracts/interfaces/IShareManager.sol b/src/contracts/interfaces/IShareManager.sol index 212ae2c08d..ff41a54b0b 100644 --- a/src/contracts/interfaces/IShareManager.sol +++ b/src/contracts/interfaces/IShareManager.sol @@ -5,12 +5,10 @@ import "../libraries/SlashingLib.sol"; import "./IStrategy.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../libraries/OperatorSetLib.sol"; -/** - * @title Interface for a `IShareManager` contract. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice This contract is used by the DelegationManager as a unified interface to interact with the EigenPodManager and StrategyManager - */ +/// @title Interface for a `IShareManager` contract. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice This contract is used by the DelegationManager as a unified interface to interact with the EigenPodManager and StrategyManager interface IShareManager { /// @notice Used by the DelegationManager to remove a Staker's shares from a particular strategy when entering the withdrawal queue @@ -26,27 +24,37 @@ interface IShareManager { /// @dev strategy must be beaconChainETH when talking to the EigenPodManager /// @return existingDepositShares the shares the staker had before any were added /// @return addedShares the new shares added to the staker's balance - function addShares(address staker, IStrategy strategy, uint256 shares) external returns (uint256, uint256); + function addShares( + address staker, + IStrategy strategy, + uint256 shares + ) external returns (uint256, uint256); /// @notice Used by the DelegationManager to convert deposit shares to tokens and send them to a staker /// @dev strategy must be beaconChainETH when talking to the EigenPodManager /// @dev token is not validated when talking to the EigenPodManager - function withdrawSharesAsTokens(address staker, IStrategy strategy, IERC20 token, uint256 shares) external; + function withdrawSharesAsTokens( + address staker, + IStrategy strategy, + IERC20 token, + uint256 shares + ) external; /// @notice Returns the current shares of `user` in `strategy` /// @dev strategy must be beaconChainETH when talking to the EigenPodManager /// @dev returns 0 if the user has negative shares - function stakerDepositShares(address user, IStrategy strategy) external view returns (uint256 depositShares); + function stakerDepositShares( + address user, + IStrategy strategy + ) external view returns (uint256 depositShares); - /** - * @notice Increase the amount of burnable/redistributable shares for a given Strategy. This is called by the DelegationManager - * when an operator is slashed in EigenLayer. - * @param operatorSet The operator set to burn shares in. - * @param slashId The slash id to burn shares in. - * @param strategy The strategy to burn shares in. - * @param addedSharesToBurn The amount of added shares to burn. - * @dev This function is only called by the DelegationManager when an operator is slashed. - */ + /// @notice Increase the amount of burnable/redistributable shares for a given Strategy. This is called by the DelegationManager + /// when an operator is slashed in EigenLayer. + /// @param operatorSet The operator set to burn shares in. + /// @param slashId The slash id to burn shares in. + /// @param strategy The strategy to burn shares in. + /// @param addedSharesToBurn The amount of added shares to burn. + /// @dev This function is only called by the DelegationManager when an operator is slashed. function increaseBurnOrRedistributableShares( OperatorSet calldata operatorSet, uint256 slashId, diff --git a/src/contracts/interfaces/ISignatureUtilsMixin.sol b/src/contracts/interfaces/ISignatureUtilsMixin.sol index a34e17e475..f6107426a4 100644 --- a/src/contracts/interfaces/ISignatureUtilsMixin.sol +++ b/src/contracts/interfaces/ISignatureUtilsMixin.sol @@ -30,11 +30,9 @@ interface ISignatureUtilsMixinTypes { } } -/** - * @title The interface for common signature utilities. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - */ +/// @title The interface for common signature utilities. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service interface ISignatureUtilsMixin is ISignatureUtilsMixinErrors, ISignatureUtilsMixinTypes { /// @notice Computes the EIP-712 domain separator used for signature validation. /// @dev The domain separator is computed according to EIP-712 specification, using: diff --git a/src/contracts/interfaces/IStrategy.sol b/src/contracts/interfaces/IStrategy.sol index 0cea069598..d15c17f107 100644 --- a/src/contracts/interfaces/IStrategy.sol +++ b/src/contracts/interfaces/IStrategy.sol @@ -25,120 +25,103 @@ interface IStrategyErrors { } interface IStrategyEvents { - /** - * @notice Used to emit an event for the exchange rate between 1 share and underlying token in a strategy contract - * @param rate is the exchange rate in wad 18 decimals - * @dev Tokens that do not have 18 decimals must have offchain services scale the exchange rate by the proper magnitude - */ + /// @notice Used to emit an event for the exchange rate between 1 share and underlying token in a strategy contract + /// @param rate is the exchange rate in wad 18 decimals + /// @dev Tokens that do not have 18 decimals must have offchain services scale the exchange rate by the proper magnitude event ExchangeRateEmitted(uint256 rate); - /** - * Used to emit the underlying token and its decimals on strategy creation - * @notice token - * @param token is the ERC20 token of the strategy - * @param decimals are the decimals of the ERC20 token in the strategy - */ + /// Used to emit the underlying token and its decimals on strategy creation + /// @notice token + /// @param token is the ERC20 token of the strategy + /// @param decimals are the decimals of the ERC20 token in the strategy event StrategyTokenSet(IERC20 token, uint8 decimals); } -/** - * @title Minimal interface for an `Strategy` contract. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice Custom `Strategy` implementations may expand extensively on this interface. - */ +/// @title Minimal interface for an `Strategy` contract. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice Custom `Strategy` implementations may expand extensively on this interface. interface IStrategy is IStrategyErrors, IStrategyEvents { - /** - * @notice Used to deposit tokens into this Strategy - * @param token is the ERC20 token being deposited - * @param amount is the amount of token being deposited - * @dev This function is only callable by the strategyManager contract. It is invoked inside of the strategyManager's - * `depositIntoStrategy` function, and individual share balances are recorded in the strategyManager as well. - * @return newShares is the number of new shares issued at the current exchange ratio. - */ - function deposit(IERC20 token, uint256 amount) external returns (uint256); - - /** - * @notice Used to withdraw tokens from this Strategy, to the `recipient`'s address - * @param recipient is the address to receive the withdrawn funds - * @param token is the ERC20 token being transferred out - * @param amountShares is the amount of shares being withdrawn - * @dev This function is only callable by the strategyManager contract. It is invoked inside of the strategyManager's - * other functions, and individual share balances are recorded in the strategyManager as well. - * @return amountOut is the amount of tokens being transferred out. - */ - function withdraw(address recipient, IERC20 token, uint256 amountShares) external returns (uint256); - - /** - * @notice Used to convert a number of shares to the equivalent amount of underlying tokens for this strategy. - * For a staker using this function and trying to calculate the amount of underlying tokens they have in total they - * should input into `amountShares` their withdrawable shares read from the `DelegationManager` contract. - * @notice In contrast to `sharesToUnderlyingView`, this function **may** make state modifications - * @param amountShares is the amount of shares to calculate its conversion into the underlying token - * @return The amount of underlying tokens corresponding to the input `amountShares` - * @dev Implementation for these functions in particular may vary significantly for different strategies - */ + /// @notice Used to deposit tokens into this Strategy + /// @param token is the ERC20 token being deposited + /// @param amount is the amount of token being deposited + /// @dev This function is only callable by the strategyManager contract. It is invoked inside of the strategyManager's + /// `depositIntoStrategy` function, and individual share balances are recorded in the strategyManager as well. + /// @return newShares is the number of new shares issued at the current exchange ratio. + function deposit( + IERC20 token, + uint256 amount + ) external returns (uint256); + + /// @notice Used to withdraw tokens from this Strategy, to the `recipient`'s address + /// @param recipient is the address to receive the withdrawn funds + /// @param token is the ERC20 token being transferred out + /// @param amountShares is the amount of shares being withdrawn + /// @dev This function is only callable by the strategyManager contract. It is invoked inside of the strategyManager's + /// other functions, and individual share balances are recorded in the strategyManager as well. + /// @return amountOut is the amount of tokens being transferred out. + function withdraw( + address recipient, + IERC20 token, + uint256 amountShares + ) external returns (uint256); + + /// @notice Used to convert a number of shares to the equivalent amount of underlying tokens for this strategy. + /// For a staker using this function and trying to calculate the amount of underlying tokens they have in total they + /// should input into `amountShares` their withdrawable shares read from the `DelegationManager` contract. + /// @notice In contrast to `sharesToUnderlyingView`, this function **may** make state modifications + /// @param amountShares is the amount of shares to calculate its conversion into the underlying token + /// @return The amount of underlying tokens corresponding to the input `amountShares` + /// @dev Implementation for these functions in particular may vary significantly for different strategies function sharesToUnderlying( uint256 amountShares ) external returns (uint256); - /** - * @notice Used to convert an amount of underlying tokens to the equivalent amount of shares in this strategy. - * @notice In contrast to `underlyingToSharesView`, this function **may** make state modifications - * @param amountUnderlying is the amount of `underlyingToken` to calculate its conversion into strategy shares - * @return The amount of shares corresponding to the input `amountUnderlying`. This is used as deposit shares - * in the `StrategyManager` contract. - * @dev Implementation for these functions in particular may vary significantly for different strategies - */ + /// @notice Used to convert an amount of underlying tokens to the equivalent amount of shares in this strategy. + /// @notice In contrast to `underlyingToSharesView`, this function **may** make state modifications + /// @param amountUnderlying is the amount of `underlyingToken` to calculate its conversion into strategy shares + /// @return The amount of shares corresponding to the input `amountUnderlying`. This is used as deposit shares + /// in the `StrategyManager` contract. + /// @dev Implementation for these functions in particular may vary significantly for different strategies function underlyingToShares( uint256 amountUnderlying ) external returns (uint256); - /** - * @notice convenience function for fetching the current underlying value of all of the `user`'s shares in - * this strategy. In contrast to `userUnderlyingView`, this function **may** make state modifications - */ + /// @notice convenience function for fetching the current underlying value of all of the `user`'s shares in + /// this strategy. In contrast to `userUnderlyingView`, this function **may** make state modifications function userUnderlying( address user ) external returns (uint256); - /** - * @notice convenience function for fetching the current total shares of `user` in this strategy, by - * querying the `strategyManager` contract - */ + /// @notice convenience function for fetching the current total shares of `user` in this strategy, by + /// querying the `strategyManager` contract function shares( address user ) external view returns (uint256); - /** - * @notice Used to convert a number of shares to the equivalent amount of underlying tokens for this strategy. - * For a staker using this function and trying to calculate the amount of underlying tokens they have in total they - * should input into `amountShares` their withdrawable shares read from the `DelegationManager` contract. - * @notice In contrast to `sharesToUnderlying`, this function guarantees no state modifications - * @param amountShares is the amount of shares to calculate its conversion into the underlying token - * @return The amount of underlying tokens corresponding to the input `amountShares` - * @dev Implementation for these functions in particular may vary significantly for different strategies - */ + /// @notice Used to convert a number of shares to the equivalent amount of underlying tokens for this strategy. + /// For a staker using this function and trying to calculate the amount of underlying tokens they have in total they + /// should input into `amountShares` their withdrawable shares read from the `DelegationManager` contract. + /// @notice In contrast to `sharesToUnderlying`, this function guarantees no state modifications + /// @param amountShares is the amount of shares to calculate its conversion into the underlying token + /// @return The amount of underlying tokens corresponding to the input `amountShares` + /// @dev Implementation for these functions in particular may vary significantly for different strategies function sharesToUnderlyingView( uint256 amountShares ) external view returns (uint256); - /** - * @notice Used to convert an amount of underlying tokens to the equivalent amount of shares in this strategy. - * @notice In contrast to `underlyingToShares`, this function guarantees no state modifications - * @param amountUnderlying is the amount of `underlyingToken` to calculate its conversion into strategy shares - * @return The amount of shares corresponding to the input `amountUnderlying`. This is used as deposit shares - * in the `StrategyManager` contract. - * @dev Implementation for these functions in particular may vary significantly for different strategies - */ + /// @notice Used to convert an amount of underlying tokens to the equivalent amount of shares in this strategy. + /// @notice In contrast to `underlyingToShares`, this function guarantees no state modifications + /// @param amountUnderlying is the amount of `underlyingToken` to calculate its conversion into strategy shares + /// @return The amount of shares corresponding to the input `amountUnderlying`. This is used as deposit shares + /// in the `StrategyManager` contract. + /// @dev Implementation for these functions in particular may vary significantly for different strategies function underlyingToSharesView( uint256 amountUnderlying ) external view returns (uint256); - /** - * @notice convenience function for fetching the current underlying value of all of the `user`'s shares in - * this strategy. In contrast to `userUnderlying`, this function guarantees no state modifications - */ + /// @notice convenience function for fetching the current underlying value of all of the `user`'s shares in + /// this strategy. In contrast to `userUnderlying`, this function guarantees no state modifications function userUnderlyingView( address user ) external view returns (uint256); diff --git a/src/contracts/interfaces/IStrategyFactory.sol b/src/contracts/interfaces/IStrategyFactory.sol index 137659cc34..9054b6827a 100644 --- a/src/contracts/interfaces/IStrategyFactory.sol +++ b/src/contracts/interfaces/IStrategyFactory.sol @@ -5,12 +5,10 @@ import "@openzeppelin/contracts/proxy/beacon/IBeacon.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./IStrategy.sol"; -/** - * @title Interface for the `StrategyFactory` contract. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @dev This may not be compatible with non-standard ERC20 tokens. Caution is warranted. - */ +/// @title Interface for the `StrategyFactory` contract. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @dev This may not be compatible with non-standard ERC20 tokens. Caution is warranted. interface IStrategyFactory { /// @dev Thrown when attempting to deploy a strategy for a blacklisted token. error BlacklistedToken(); @@ -35,27 +33,21 @@ interface IStrategyFactory { IERC20 token ) external view returns (IStrategy); - /** - * @notice Deploy a new strategyBeacon contract for the ERC20 token. - * @param token the token to deploy a strategy for - * @dev A strategy contract must not yet exist for the token. - * $dev Immense caution is warranted for non-standard ERC20 tokens, particularly "reentrant" tokens - * like those that conform to ERC777. - */ + /// @notice Deploy a new strategyBeacon contract for the ERC20 token. + /// @param token the token to deploy a strategy for + /// @dev A strategy contract must not yet exist for the token. + /// $dev Immense caution is warranted for non-standard ERC20 tokens, particularly "reentrant" tokens + /// like those that conform to ERC777. function deployNewStrategy( IERC20 token ) external returns (IStrategy newStrategy); - /** - * @notice Owner-only function to pass through a call to `StrategyManager.addStrategiesToDepositWhitelist` - */ + /// @notice Owner-only function to pass through a call to `StrategyManager.addStrategiesToDepositWhitelist` function whitelistStrategies( IStrategy[] calldata strategiesToWhitelist ) external; - /** - * @notice Owner-only function to pass through a call to `StrategyManager.removeStrategiesFromDepositWhitelist` - */ + /// @notice Owner-only function to pass through a call to `StrategyManager.removeStrategiesFromDepositWhitelist` function removeStrategiesFromWhitelist( IStrategy[] calldata strategiesToRemoveFromWhitelist ) external; diff --git a/src/contracts/interfaces/IStrategyManager.sol b/src/contracts/interfaces/IStrategyManager.sol index 05aa079899..4c196f667d 100644 --- a/src/contracts/interfaces/IStrategyManager.sol +++ b/src/contracts/interfaces/IStrategyManager.sol @@ -28,12 +28,10 @@ interface IStrategyManagerErrors { } interface IStrategyManagerEvents { - /** - * @notice Emitted when a new deposit occurs on behalf of `staker`. - * @param staker Is the staker who is depositing funds into EigenLayer. - * @param strategy Is the strategy that `staker` has deposited into. - * @param shares Is the number of new shares `staker` has been granted in `strategy`. - */ + /// @notice Emitted when a new deposit occurs on behalf of `staker`. + /// @param staker Is the staker who is depositing funds into EigenLayer. + /// @param strategy Is the strategy that `staker` has deposited into. + /// @param shares Is the number of new shares `staker` has been granted in `strategy`. event Deposit(address staker, IStrategy strategy, uint256 shares); /// @notice Emitted when the `strategyWhitelister` is changed @@ -47,12 +45,18 @@ interface IStrategyManagerEvents { /// @notice Emitted when an operator is slashed and shares to be burned or redistributed are increased event BurnOrRedistributableSharesIncreased( - OperatorSet operatorSet, uint256 slashId, IStrategy strategy, uint256 shares + OperatorSet operatorSet, + uint256 slashId, + IStrategy strategy, + uint256 shares ); /// @notice Emitted when shares marked for burning or redistribution are decreased and transferred to the operator set's redistribution recipient event BurnOrRedistributableSharesDecreased( - OperatorSet operatorSet, uint256 slashId, IStrategy strategy, uint256 shares + OperatorSet operatorSet, + uint256 slashId, + IStrategy strategy, + uint256 shares ); /// @notice Emitted when shares are burnt @@ -60,61 +64,53 @@ interface IStrategyManagerEvents { event BurnableSharesDecreased(IStrategy strategy, uint256 shares); } -/** - * @title Interface for the primary entrypoint for funds into EigenLayer. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice See the `StrategyManager` contract itself for implementation details. - */ +/// @title Interface for the primary entrypoint for funds into EigenLayer. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice See the `StrategyManager` contract itself for implementation details. interface IStrategyManager is IStrategyManagerErrors, IStrategyManagerEvents, IShareManager { - /** - * @notice Initializes the strategy manager contract. Sets the `pauserRegistry` (currently **not** modifiable after being set), - * and transfers contract ownership to the specified `initialOwner`. - * @param initialOwner Ownership of this contract is transferred to this address. - * @param initialStrategyWhitelister The initial value of `strategyWhitelister` to set. - * @param initialPausedStatus The initial value of `_paused` to set. - */ + /// @notice Initializes the strategy manager contract. Sets the `pauserRegistry` (currently **not** modifiable after being set), + /// and transfers contract ownership to the specified `initialOwner`. + /// @param initialOwner Ownership of this contract is transferred to this address. + /// @param initialStrategyWhitelister The initial value of `strategyWhitelister` to set. + /// @param initialPausedStatus The initial value of `_paused` to set. function initialize( address initialOwner, address initialStrategyWhitelister, uint256 initialPausedStatus ) external; - /** - * @notice Deposits `amount` of `token` into the specified `strategy` and credits shares to the caller - * @param strategy the strategy that handles `token` - * @param token the token from which the `amount` will be transferred - * @param amount the number of tokens to deposit - * @return depositShares the number of deposit shares credited to the caller - * @dev The caller must have previously approved this contract to transfer at least `amount` of `token` on their behalf. - * - * WARNING: Be extremely cautious when depositing tokens that do not strictly adhere to ERC20 standards. - * Tokens that diverge significantly from ERC20 norms can cause unexpected behavior in token balances for - * that strategy, e.g. ERC-777 tokens allowing cross-contract reentrancy. - */ + /// @notice Deposits `amount` of `token` into the specified `strategy` and credits shares to the caller + /// @param strategy the strategy that handles `token` + /// @param token the token from which the `amount` will be transferred + /// @param amount the number of tokens to deposit + /// @return depositShares the number of deposit shares credited to the caller + /// @dev The caller must have previously approved this contract to transfer at least `amount` of `token` on their behalf. + /// + /// WARNING: Be extremely cautious when depositing tokens that do not strictly adhere to ERC20 standards. + /// Tokens that diverge significantly from ERC20 norms can cause unexpected behavior in token balances for + /// that strategy, e.g. ERC-777 tokens allowing cross-contract reentrancy. function depositIntoStrategy( IStrategy strategy, IERC20 token, uint256 amount ) external returns (uint256 depositShares); - /** - * @notice Deposits `amount` of `token` into the specified `strategy` and credits shares to the `staker` - * Note tokens are transferred from `msg.sender`, NOT from `staker`. This method allows the caller, using a - * signature, to deposit their tokens to another staker's balance. - * @param strategy the strategy that handles `token` - * @param token the token from which the `amount` will be transferred - * @param amount the number of tokens to transfer from the caller to the strategy - * @param staker the staker that the deposited assets will be credited to - * @param expiry the timestamp at which the signature expires - * @param signature a valid ECDSA or EIP-1271 signature from `staker` - * @return depositShares the number of deposit shares credited to `staker` - * @dev The caller must have previously approved this contract to transfer at least `amount` of `token` on their behalf. - * - * WARNING: Be extremely cautious when depositing tokens that do not strictly adhere to ERC20 standards. - * Tokens that diverge significantly from ERC20 norms can cause unexpected behavior in token balances for - * that strategy, e.g. ERC-777 tokens allowing cross-contract reentrancy. - */ + /// @notice Deposits `amount` of `token` into the specified `strategy` and credits shares to the `staker` + /// Note tokens are transferred from `msg.sender`, NOT from `staker`. This method allows the caller, using a + /// signature, to deposit their tokens to another staker's balance. + /// @param strategy the strategy that handles `token` + /// @param token the token from which the `amount` will be transferred + /// @param amount the number of tokens to transfer from the caller to the strategy + /// @param staker the staker that the deposited assets will be credited to + /// @param expiry the timestamp at which the signature expires + /// @param signature a valid ECDSA or EIP-1271 signature from `staker` + /// @return depositShares the number of deposit shares credited to `staker` + /// @dev The caller must have previously approved this contract to transfer at least `amount` of `token` on their behalf. + /// + /// WARNING: Be extremely cautious when depositing tokens that do not strictly adhere to ERC20 standards. + /// Tokens that diverge significantly from ERC20 norms can cause unexpected behavior in token balances for + /// that strategy, e.g. ERC-777 tokens allowing cross-contract reentrancy. function depositIntoStrategyWithSignature( IStrategy strategy, IERC20 token, @@ -124,97 +120,79 @@ interface IStrategyManager is IStrategyManagerErrors, IStrategyManagerEvents, IS bytes memory signature ) external returns (uint256 depositShares); - /** - * @notice Legacy burn strategy shares for the given strategy by calling into the strategy to transfer - * to the default burn address. - * @param strategy The strategy to burn shares in. - * @dev This function will be DEPRECATED in a release after redistribution - */ + /// @notice Legacy burn strategy shares for the given strategy by calling into the strategy to transfer + /// to the default burn address. + /// @param strategy The strategy to burn shares in. + /// @dev This function will be DEPRECATED in a release after redistribution function burnShares( IStrategy strategy ) external; - /** - * @notice Removes burned shares from storage and transfers the underlying tokens for the slashId to the redistribution recipient. - * @dev Reentrancy is checked in the `clearBurnOrRedistributableSharesByStrategy` function. - * @param operatorSet The operator set to burn shares in. - * @param slashId The slash ID to burn shares in. - * @return The amounts of tokens transferred to the redistribution recipient for each strategy - */ + /// @notice Removes burned shares from storage and transfers the underlying tokens for the slashId to the redistribution recipient. + /// @dev Reentrancy is checked in the `clearBurnOrRedistributableSharesByStrategy` function. + /// @param operatorSet The operator set to burn shares in. + /// @param slashId The slash ID to burn shares in. + /// @return The amounts of tokens transferred to the redistribution recipient for each strategy function clearBurnOrRedistributableShares( OperatorSet calldata operatorSet, uint256 slashId ) external returns (uint256[] memory); - /** - * @notice Removes a single strategy's shares from storage and transfers the underlying tokens for the slashId to the redistribution recipient. - * @param operatorSet The operator set to burn shares in. - * @param slashId The slash ID to burn shares in. - * @param strategy The strategy to burn shares in. - * @return The amount of tokens transferred to the redistribution recipient for the strategy. - */ + /// @notice Removes a single strategy's shares from storage and transfers the underlying tokens for the slashId to the redistribution recipient. + /// @param operatorSet The operator set to burn shares in. + /// @param slashId The slash ID to burn shares in. + /// @param strategy The strategy to burn shares in. + /// @return The amount of tokens transferred to the redistribution recipient for the strategy. function clearBurnOrRedistributableSharesByStrategy( OperatorSet calldata operatorSet, uint256 slashId, IStrategy strategy ) external returns (uint256); - /** - * @notice Returns the strategies and shares that have NOT been sent to the redistribution recipient for a given slashId. - * @param operatorSet The operator set to burn or redistribute shares in. - * @param slashId The slash ID to burn or redistribute shares in. - * @return The strategies and shares for the given slashId. - */ + /// @notice Returns the strategies and shares that have NOT been sent to the redistribution recipient for a given slashId. + /// @param operatorSet The operator set to burn or redistribute shares in. + /// @param slashId The slash ID to burn or redistribute shares in. + /// @return The strategies and shares for the given slashId. function getBurnOrRedistributableShares( OperatorSet calldata operatorSet, uint256 slashId ) external view returns (IStrategy[] memory, uint256[] memory); - /** - * @notice Returns the shares for a given strategy for a given slashId. - * @param operatorSet The operator set to burn or redistribute shares in. - * @param slashId The slash ID to burn or redistribute shares in. - * @param strategy The strategy to get the shares for. - * @return The shares for the given strategy for the given slashId. - * @dev This function will return revert if the shares have already been sent to the redistribution recipient. - */ + /// @notice Returns the shares for a given strategy for a given slashId. + /// @param operatorSet The operator set to burn or redistribute shares in. + /// @param slashId The slash ID to burn or redistribute shares in. + /// @param strategy The strategy to get the shares for. + /// @return The shares for the given strategy for the given slashId. + /// @dev This function will return revert if the shares have already been sent to the redistribution recipient. function getBurnOrRedistributableShares( OperatorSet calldata operatorSet, uint256 slashId, IStrategy strategy ) external view returns (uint256); - /** - * @notice Returns the number of strategies that have NOT been sent to the redistribution recipient for a given slashId. - * @param operatorSet The operator set to burn or redistribute shares in. - * @param slashId The slash ID to burn or redistribute shares in. - * @return The number of strategies for the given slashId. - */ + /// @notice Returns the number of strategies that have NOT been sent to the redistribution recipient for a given slashId. + /// @param operatorSet The operator set to burn or redistribute shares in. + /// @param slashId The slash ID to burn or redistribute shares in. + /// @return The number of strategies for the given slashId. function getBurnOrRedistributableCount( OperatorSet calldata operatorSet, uint256 slashId ) external view returns (uint256); - /** - * @notice Owner-only function to change the `strategyWhitelister` address. - * @param newStrategyWhitelister new address for the `strategyWhitelister`. - */ + /// @notice Owner-only function to change the `strategyWhitelister` address. + /// @param newStrategyWhitelister new address for the `strategyWhitelister`. function setStrategyWhitelister( address newStrategyWhitelister ) external; - /** - * @notice Owner-only function that adds the provided Strategies to the 'whitelist' of strategies that stakers can deposit into - * @param strategiesToWhitelist Strategies that will be added to the `strategyIsWhitelistedForDeposit` mapping (if they aren't in it already) - */ + /// @notice Owner-only function that adds the provided Strategies to the 'whitelist' of strategies that stakers can deposit into + /// @param strategiesToWhitelist Strategies that will be added to the `strategyIsWhitelistedForDeposit` mapping (if they aren't in it already) function addStrategiesToDepositWhitelist( IStrategy[] calldata strategiesToWhitelist ) external; - /** - * @notice Owner-only function that removes the provided Strategies from the 'whitelist' of strategies that stakers can deposit into - * @param strategiesToRemoveFromWhitelist Strategies that will be removed to the `strategyIsWhitelistedForDeposit` mapping (if they are in it) - */ + /// @notice Owner-only function that removes the provided Strategies from the 'whitelist' of strategies that stakers can deposit into + /// @param strategiesToRemoveFromWhitelist Strategies that will be removed to the `strategyIsWhitelistedForDeposit` mapping (if they are in it) function removeStrategiesFromDepositWhitelist( IStrategy[] calldata strategiesToRemoveFromWhitelist ) external; @@ -224,10 +202,8 @@ interface IStrategyManager is IStrategyManagerErrors, IStrategyManagerEvents, IS IStrategy strategy ) external view returns (bool); - /** - * @notice Get all details on the staker's deposits and corresponding shares - * @return (staker's strategies, shares in these strategies) - */ + /// @notice Get all details on the staker's deposits and corresponding shares + /// @return (staker's strategies, shares in these strategies) function getDeposits( address staker ) external view returns (IStrategy[] memory, uint256[] memory); @@ -242,7 +218,10 @@ interface IStrategyManager is IStrategyManagerErrors, IStrategyManagerEvents, IS ) external view returns (uint256); /// @notice Returns the current shares of `user` in `strategy` - function stakerDepositShares(address user, IStrategy strategy) external view returns (uint256 shares); + function stakerDepositShares( + address user, + IStrategy strategy + ) external view returns (uint256 shares); /// @notice Returns the single, central Delegation contract of EigenLayer function delegation() external view returns (IDelegationManager); @@ -256,26 +235,22 @@ interface IStrategyManager is IStrategyManagerErrors, IStrategyManagerEvents, IS IStrategy strategy ) external view returns (uint256); - /** - * @notice Gets every strategy with burnable shares and the amount of burnable shares in each said strategy - * - * @dev This function will be deprecated in a release after redistribution - * WARNING: This operation can copy the entire storage to memory, which can be quite expensive. This is designed - * to mostly be used by view accessors that are queried without any gas fees. Users should keep in mind that - * this function has an unbounded cost, and using it as part of a state-changing function may render the function - * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. - */ + /// @notice Gets every strategy with burnable shares and the amount of burnable shares in each said strategy + /// + /// @dev This function will be deprecated in a release after redistribution + /// WARNING: This operation can copy the entire storage to memory, which can be quite expensive. This is designed + /// to mostly be used by view accessors that are queried without any gas fees. Users should keep in mind that + /// this function has an unbounded cost, and using it as part of a state-changing function may render the function + /// uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. function getStrategiesWithBurnableShares() external view returns (address[] memory, uint256[] memory); - /** - * @param staker The address of the staker. - * @param strategy The strategy to deposit into. - * @param token The token to deposit. - * @param amount The amount of `token` to deposit. - * @param nonce The nonce of the staker. - * @param expiry The expiry of the signature. - * @return The EIP-712 signable digest hash. - */ + /// @param staker The address of the staker. + /// @param strategy The strategy to deposit into. + /// @param token The token to deposit. + /// @param amount The amount of `token` to deposit. + /// @param nonce The nonce of the staker. + /// @param expiry The expiry of the signature. + /// @return The EIP-712 signable digest hash. function calculateStrategyDepositDigestHash( address staker, IStrategy strategy, @@ -285,18 +260,14 @@ interface IStrategyManager is IStrategyManagerErrors, IStrategyManagerEvents, IS uint256 expiry ) external view returns (bytes32); - /** - * @notice Returns the operator sets that have pending burn or redistributable shares. - * @return The operator sets that have pending burn or redistributable shares. - */ + /// @notice Returns the operator sets that have pending burn or redistributable shares. + /// @return The operator sets that have pending burn or redistributable shares. function getPendingOperatorSets() external view returns (OperatorSet[] memory); - /** - * @notice Returns the slash IDs that are pending to be burned or redistributed. - * @dev This function will return revert if the operator set has no pending burn or redistributable shares. - * @param operatorSet The operator set to get the pending slash IDs for. - * @return The slash IDs that are pending to be burned or redistributed. - */ + /// @notice Returns the slash IDs that are pending to be burned or redistributed. + /// @dev This function will return revert if the operator set has no pending burn or redistributable shares. + /// @param operatorSet The operator set to get the pending slash IDs for. + /// @return The slash IDs that are pending to be burned or redistributed. function getPendingSlashIds( OperatorSet calldata operatorSet ) external view returns (uint256[] memory); diff --git a/src/contracts/interfaces/ITaskMailbox.sol b/src/contracts/interfaces/ITaskMailbox.sol index 9afb0710a3..8a99c038c0 100644 --- a/src/contracts/interfaces/ITaskMailbox.sol +++ b/src/contracts/interfaces/ITaskMailbox.sol @@ -9,39 +9,31 @@ import {IECDSACertificateVerifierTypes} from "./IECDSACertificateVerifier.sol"; import {IKeyRegistrarTypes} from "./IKeyRegistrar.sol"; import {OperatorSet} from "../libraries/OperatorSetLib.sol"; -/** - * @title ITaskMailboxTypes - * @notice Interface defining the type structures used in the TaskMailbox - */ +/// @title ITaskMailboxTypes +/// @notice Interface defining the type structures used in the TaskMailbox interface ITaskMailboxTypes { - /** - * @notice Enum defining the type of consensus mechanism - */ + /// @notice Enum defining the type of consensus mechanism enum ConsensusType { NONE, STAKE_PROPORTION_THRESHOLD } - /** - * @notice Consensus configuration for task verification - * @param consensusType The type of consensus mechanism - * @param value Encoded consensus parameters based on consensusType - */ + /// @notice Consensus configuration for task verification + /// @param consensusType The type of consensus mechanism + /// @param value Encoded consensus parameters based on consensusType struct Consensus { ConsensusType consensusType; bytes value; } - /** - * @notice Configuration for the executor operator set - * @param taskHook Address of the AVS task hook contract - * @param taskSLA Time (in seconds) within which the task must be completed - * @param feeToken ERC20 token used for task fees - * @param curveType The curve type used for signature verification - * @param feeCollector Address to receive AVS fees - * @param consensus Consensus configuration for task verification - * @param taskMetadata Additional metadata for task execution - */ + /// @notice Configuration for the executor operator set + /// @param taskHook Address of the AVS task hook contract + /// @param taskSLA Time (in seconds) within which the task must be completed + /// @param feeToken ERC20 token used for task fees + /// @param curveType The curve type used for signature verification + /// @param feeCollector Address to receive AVS fees + /// @param consensus Consensus configuration for task verification + /// @param taskMetadata Additional metadata for task execution struct ExecutorOperatorSetTaskConfig { IAVSTaskHook taskHook; uint96 taskSLA; @@ -52,45 +44,38 @@ interface ITaskMailboxTypes { bytes taskMetadata; } - /** - * @notice Parameters for creating a new task - * @param refundCollector Address to receive refunds if task is not completed - * @param executorOperatorSet The operator set that will execute the task - * @param payload Task payload - */ + /// @notice Parameters for creating a new task + /// @param refundCollector Address to receive refunds if task is not completed + /// @param executorOperatorSet The operator set that will execute the task + /// @param payload Task payload struct TaskParams { address refundCollector; OperatorSet executorOperatorSet; bytes payload; } - /** - * @notice Status of a task in the system - */ + /// @notice Status of a task in the system enum TaskStatus { NONE, // 0 - Default value for uninitialized tasks CREATED, // 1 - Task has been created VERIFIED, // 2 - Task has been verified EXPIRED // 3 - Task has expired - } - /** - * @notice Complete task information - * @param creator Address that created the task - * @param creationTime Block timestamp when task was created - * @param avs Address of the AVS handling the task - * @param avsFee Fee paid to the AVS - * @param refundCollector Address to receive refunds - * @param executorOperatorSetId ID of the operator set executing the task - * @param feeSplit Percentage split of fees taken by the TaskMailbox in basis points - * @param status Current status of the task - * @param isFeeRefunded Whether the fee has been refunded - * @param executorOperatorSetTaskConfig Configuration for executor operator set task execution - * @param payload Task payload - * @param executorCert Executor certificate - * @param result Task execution result data - */ + /// @notice Complete task information + /// @param creator Address that created the task + /// @param creationTime Block timestamp when task was created + /// @param avs Address of the AVS handling the task + /// @param avsFee Fee paid to the AVS + /// @param refundCollector Address to receive refunds + /// @param executorOperatorSetId ID of the operator set executing the task + /// @param feeSplit Percentage split of fees taken by the TaskMailbox in basis points + /// @param status Current status of the task + /// @param isFeeRefunded Whether the fee has been refunded + /// @param executorOperatorSetTaskConfig Configuration for executor operator set task execution + /// @param payload Task payload + /// @param executorCert Executor certificate + /// @param result Task execution result data struct Task { address creator; uint96 creationTime; @@ -109,10 +94,8 @@ interface ITaskMailboxTypes { } } -/** - * @title ITaskMailboxErrors - * @notice Interface defining errors that can be thrown by the TaskMailbox - */ +/// @title ITaskMailboxErrors +/// @notice Interface defining errors that can be thrown by the TaskMailbox interface ITaskMailboxErrors is ITaskMailboxTypes { /// @notice Thrown when a certificate verification threshold is not met error ThresholdNotMet(); @@ -180,29 +163,26 @@ interface ITaskMailboxErrors is ITaskMailboxTypes { error TaskSLAExceedsMaximum(); } -/** - * @title ITaskMailboxEvents - * @notice Interface defining events emitted by the TaskMailbox - */ +/// @title ITaskMailboxEvents +/// @notice Interface defining events emitted by the TaskMailbox interface ITaskMailboxEvents is ITaskMailboxTypes { - /** - * @notice Emitted when an executor operator set is registered - * @param caller Address that called the registration function - * @param avs Address of the AVS being registered - * @param executorOperatorSetId ID of the executor operator set - * @param isRegistered Whether the operator set is registered - */ + /// @notice Emitted when an executor operator set is registered + /// @param caller Address that called the registration function + /// @param avs Address of the AVS being registered + /// @param executorOperatorSetId ID of the executor operator set + /// @param isRegistered Whether the operator set is registered event ExecutorOperatorSetRegistered( - address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, bool isRegistered + address indexed caller, + address indexed avs, + uint32 indexed executorOperatorSetId, + bool isRegistered ); - /** - * @notice Emitted when an executor operator set task configuration is set - * @param caller Address that called the configuration function - * @param avs Address of the AVS being configured - * @param executorOperatorSetId ID of the executor operator set - * @param config The task configuration for the executor operator set - */ + /// @notice Emitted when an executor operator set task configuration is set + /// @param caller Address that called the configuration function + /// @param avs Address of the AVS being configured + /// @param executorOperatorSetId ID of the executor operator set + /// @param config The task configuration for the executor operator set event ExecutorOperatorSetTaskConfigSet( address indexed caller, address indexed avs, @@ -210,18 +190,16 @@ interface ITaskMailboxEvents is ITaskMailboxTypes { ExecutorOperatorSetTaskConfig config ); - /** - * @notice Emitted when a new task is created - * @param creator Address that created the task - * @param taskHash Unique identifier of the task - * @param avs Address of the AVS handling the task - * @param executorOperatorSetId ID of the executor operator set - * @param operatorTableReferenceTimestamp Reference timestamp of the operator table - * @param refundCollector Address to receive refunds - * @param avsFee Fee paid to the AVS - * @param taskDeadline Timestamp by which the task must be completed - * @param payload Task payload - */ + /// @notice Emitted when a new task is created + /// @param creator Address that created the task + /// @param taskHash Unique identifier of the task + /// @param avs Address of the AVS handling the task + /// @param executorOperatorSetId ID of the executor operator set + /// @param operatorTableReferenceTimestamp Reference timestamp of the operator table + /// @param refundCollector Address to receive refunds + /// @param avsFee Fee paid to the AVS + /// @param taskDeadline Timestamp by which the task must be completed + /// @param payload Task payload event TaskCreated( address indexed creator, bytes32 indexed taskHash, @@ -234,15 +212,13 @@ interface ITaskMailboxEvents is ITaskMailboxTypes { bytes payload ); - /** - * @notice Emitted when a task is verified - * @param aggregator Address that submitted the verification - * @param taskHash Unique identifier of the task - * @param avs Address of the AVS handling the task - * @param executorOperatorSetId ID of the executor operator set - * @param executorCert Executor certificate - * @param result Task execution result data - */ + /// @notice Emitted when a task is verified + /// @param aggregator Address that submitted the verification + /// @param taskHash Unique identifier of the task + /// @param avs Address of the AVS handling the task + /// @param executorOperatorSetId ID of the executor operator set + /// @param executorCert Executor certificate + /// @param result Task execution result data event TaskVerified( address indexed aggregator, bytes32 indexed taskHash, @@ -252,217 +228,176 @@ interface ITaskMailboxEvents is ITaskMailboxTypes { bytes result ); - /** - * @notice Emitted when a task fee is refunded - * @param refundCollector Address that received the refund - * @param taskHash Unique identifier of the task - * @param avsFee Amount of fee refunded - */ + /// @notice Emitted when a task fee is refunded + /// @param refundCollector Address that received the refund + /// @param taskHash Unique identifier of the task + /// @param avsFee Amount of fee refunded event FeeRefunded(address indexed refundCollector, bytes32 indexed taskHash, uint96 avsFee); - /** - * @notice Emitted when the fee split is updated - * @param feeSplit The new fee split value in basis points - */ + /// @notice Emitted when the fee split is updated + /// @param feeSplit The new fee split value in basis points event FeeSplitSet(uint16 feeSplit); - /** - * @notice Emitted when the fee split collector is updated - * @param feeSplitCollector The new fee split collector address - */ + /// @notice Emitted when the fee split collector is updated + /// @param feeSplitCollector The new fee split collector address event FeeSplitCollectorSet(address indexed feeSplitCollector); } -/** - * @title ITaskMailbox - * @author Layr Labs, Inc. - * @notice Interface for the TaskMailbox contract. - */ +/// @title ITaskMailbox +/// @author Layr Labs, Inc. +/// @notice Interface for the TaskMailbox contract. interface ITaskMailbox is ITaskMailboxErrors, ITaskMailboxEvents { - /** - * - * EXTERNAL FUNCTIONS - * - */ - - /** - * @notice Initializes the TaskMailbox - * @param owner The owner of the contract - * @param feeSplit The initial fee split in basis points - * @param feeSplitCollector The initial fee split collector address - */ - function initialize(address owner, uint16 feeSplit, address feeSplitCollector) external; - - /** - * @notice Sets the task configuration for an executor operator set - * @param operatorSet The operator set to configure - * @param config Task configuration for the operator set - * @dev Fees can be switched off by setting the fee token to the zero address. - */ + /// + /// EXTERNAL FUNCTIONS + /// + /// @notice Initializes the TaskMailbox + /// @param owner The owner of the contract + /// @param feeSplit The initial fee split in basis points + /// @param feeSplitCollector The initial fee split collector address + function initialize( + address owner, + uint16 feeSplit, + address feeSplitCollector + ) external; + + /// @notice Sets the task configuration for an executor operator set + /// @param operatorSet The operator set to configure + /// @param config Task configuration for the operator set + /// @dev Fees can be switched off by setting the fee token to the zero address. function setExecutorOperatorSetTaskConfig( OperatorSet memory operatorSet, ExecutorOperatorSetTaskConfig memory config ) external; - /** - * @notice Registers an executor operator set with the TaskMailbox - * @param operatorSet The operator set to register - * @param isRegistered Whether the operator set is going to be (de)registered - * @dev This function can be called to toggle the registration once the task config has been set. - */ - function registerExecutorOperatorSet(OperatorSet memory operatorSet, bool isRegistered) external; - - /** - * @notice Creates a new task - * @param taskParams Parameters for the task - * @return taskHash Unique identifier of the created task - * @dev If the operator set has its fee token set, call `IAVSTaskHook.calculateTaskFee()` to get - * the fee for the task and approve the TaskMailbox for the fee before calling this function. - */ + /// @notice Registers an executor operator set with the TaskMailbox + /// @param operatorSet The operator set to register + /// @param isRegistered Whether the operator set is going to be (de)registered + /// @dev This function can be called to toggle the registration once the task config has been set. + function registerExecutorOperatorSet( + OperatorSet memory operatorSet, + bool isRegistered + ) external; + + /// @notice Creates a new task + /// @param taskParams Parameters for the task + /// @return taskHash Unique identifier of the created task + /// @dev If the operator set has its fee token set, call `IAVSTaskHook.calculateTaskFee()` to get + /// the fee for the task and approve the TaskMailbox for the fee before calling this function. function createTask( TaskParams memory taskParams ) external returns (bytes32 taskHash); - /** - * @notice Submits the result of a task execution - * @param taskHash Unique identifier of the task - * @param executorCert Certificate proving the validity of the result - * @param result Task execution result data - */ - function submitResult(bytes32 taskHash, bytes memory executorCert, bytes memory result) external; - - /** - * @notice Refunds the fee for an expired task - * @param taskHash Unique identifier of the task - * @dev Can only be called by the refund collector for expired tasks - */ + /// @notice Submits the result of a task execution + /// @param taskHash Unique identifier of the task + /// @param executorCert Certificate proving the validity of the result + /// @param result Task execution result data + function submitResult( + bytes32 taskHash, + bytes memory executorCert, + bytes memory result + ) external; + + /// @notice Refunds the fee for an expired task + /// @param taskHash Unique identifier of the task + /// @dev Can only be called by the refund collector for expired tasks function refundFee( bytes32 taskHash ) external; - /** - * @notice Sets the fee split percentage - * @param feeSplit The fee split in basis points (0-10000) - * @dev Only callable by the owner - */ + /// @notice Sets the fee split percentage + /// @param feeSplit The fee split in basis points (0-10000) + /// @dev Only callable by the owner function setFeeSplit( uint16 feeSplit ) external; - /** - * @notice Sets the fee split collector address - * @param feeSplitCollector The address to receive fee splits - * @dev Only callable by the owner - */ + /// @notice Sets the fee split collector address + /// @param feeSplitCollector The address to receive fee splits + /// @dev Only callable by the owner function setFeeSplitCollector( address feeSplitCollector ) external; - /** - * - * VIEW FUNCTIONS - * - */ - - /** - * @notice Checks if an executor operator set is registered - * @param operatorSetKey Key of the operator set to check - * @return True if the executor operator set is registered, false otherwise - */ + /// + /// VIEW FUNCTIONS + /// + + /// @notice Checks if an executor operator set is registered + /// @param operatorSetKey Key of the operator set to check + /// @return True if the executor operator set is registered, false otherwise function isExecutorOperatorSetRegistered( bytes32 operatorSetKey ) external view returns (bool); - /** - * @notice Gets the task configuration for an executor operator set - * @param operatorSet The operator set to get configuration for - * @return Task configuration for the operator set - */ + /// @notice Gets the task configuration for an executor operator set + /// @param operatorSet The operator set to get configuration for + /// @return Task configuration for the operator set function getExecutorOperatorSetTaskConfig( OperatorSet memory operatorSet ) external view returns (ExecutorOperatorSetTaskConfig memory); - /** - * @notice Gets complete information about a task - * @param taskHash Unique identifier of the task - * @return Complete task information - */ + /// @notice Gets complete information about a task + /// @param taskHash Unique identifier of the task + /// @return Complete task information function getTaskInfo( bytes32 taskHash ) external view returns (Task memory); - /** - * @notice Gets the current status of a task - * @param taskHash Unique identifier of the task - * @return Current status of the task - */ + /// @notice Gets the current status of a task + /// @param taskHash Unique identifier of the task + /// @return Current status of the task function getTaskStatus( bytes32 taskHash ) external view returns (TaskStatus); - /** - * @notice Gets the result of a verified task - * @param taskHash Unique identifier of the task - * @return Result data of the task - */ + /// @notice Gets the result of a verified task + /// @param taskHash Unique identifier of the task + /// @return Result data of the task function getTaskResult( bytes32 taskHash ) external view returns (bytes memory); - /** - * @notice Gets the bytes of a BN254 certificate - * @param cert The certificate to get the bytes of - * @return The bytes of the certificate - */ + /// @notice Gets the bytes of a BN254 certificate + /// @param cert The certificate to get the bytes of + /// @return The bytes of the certificate function getBN254CertificateBytes( IBN254CertificateVerifierTypes.BN254Certificate memory cert ) external pure returns (bytes memory); - /** - * @notice Gets the bytes of a ECDSA certificate - * @param cert The certificate to get the bytes of - * @return The bytes of the certificate - */ + /// @notice Gets the bytes of a ECDSA certificate + /// @param cert The certificate to get the bytes of + /// @return The bytes of the certificate function getECDSACertificateBytes( IECDSACertificateVerifierTypes.ECDSACertificate memory cert ) external pure returns (bytes memory); - /** - * @notice Gets the message hash for a task that needs to be signed by operators - * @param taskHash Unique identifier of the task - * @param result Task execution result data - * @return The message hash for the task that needs to be signed by operators - */ - function getMessageHash(bytes32 taskHash, bytes memory result) external pure returns (bytes32); - - /** - * @notice Gets the current fee split percentage - * @return The fee split in basis points - */ + /// @notice Gets the message hash for a task that needs to be signed by operators + /// @param taskHash Unique identifier of the task + /// @param result Task execution result data + /// @return The message hash for the task that needs to be signed by operators + function getMessageHash( + bytes32 taskHash, + bytes memory result + ) external pure returns (bytes32); + + /// @notice Gets the current fee split percentage + /// @return The fee split in basis points function feeSplit() external view returns (uint16); - /** - * @notice Gets the current fee split collector address - * @return The address that receives fee splits - */ + /// @notice Gets the current fee split collector address + /// @return The address that receives fee splits function feeSplitCollector() external view returns (address); - /** - * @notice Gets the BN254 certificate verifier address - * @return The address of the BN254 certificate verifier - */ + /// @notice Gets the BN254 certificate verifier address + /// @return The address of the BN254 certificate verifier function BN254_CERTIFICATE_VERIFIER() external view returns (address); - /** - * @notice Gets the ECDSA certificate verifier address - * @return The address of the ECDSA certificate verifier - */ + /// @notice Gets the ECDSA certificate verifier address + /// @return The address of the ECDSA certificate verifier function ECDSA_CERTIFICATE_VERIFIER() external view returns (address); - /** - * @notice Gets the maximum task SLA allowed - * @dev This will be set to `DEALLOCATION_DELAY / 2` so that AVSs can still slash operators in case of stake deallocation during inflight tasks. - * @return The maximum task SLA in seconds - */ + /// @notice Gets the maximum task SLA allowed + /// @dev This will be set to `DEALLOCATION_DELAY / 2` so that AVSs can still slash operators in case of stake deallocation during inflight tasks. + /// @return The maximum task SLA in seconds function MAX_TASK_SLA() external view returns (uint96); } diff --git a/src/contracts/libraries/BN254.sol b/src/contracts/libraries/BN254.sol index 236bbef383..256be2e018 100644 --- a/src/contracts/libraries/BN254.sol +++ b/src/contracts/libraries/BN254.sol @@ -21,12 +21,10 @@ pragma solidity ^0.8.27; -/** - * @title Library for operations on the BN254 elliptic curve. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice Contains BN254 parameters, common operations (addition, scalar mul, pairing), and BLS signature functionality. - */ +/// @title Library for operations on the BN254 elliptic curve. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice Contains BN254 parameters, common operations (addition, scalar mul, pairing), and BLS signature functionality. library BN254 { // modulus for the underlying field F_p of the elliptic curve uint256 internal constant FP_MODULUS = @@ -96,12 +94,11 @@ library BN254 { return G2Point([nG2x1, nG2x0], [nG2y1, nG2y0]); } - bytes32 internal constant powersOfTauMerkleRoot = 0x22c998e49752bbb1918ba87d6d59dd0e83620a311ba91dd4b2cc84990b31b56f; + bytes32 internal constant powersOfTauMerkleRoot = + 0x22c998e49752bbb1918ba87d6d59dd0e83620a311ba91dd4b2cc84990b31b56f; - /** - * @param p Some point in G1. - * @return The negation of `p`, i.e. p.plus(p.negate()) should be zero. - */ + /// @param p Some point in G1. + /// @return The negation of `p`, i.e. p.plus(p.negate()) should be zero. function negate( G1Point memory p ) internal pure returns (G1Point memory) { @@ -113,10 +110,11 @@ library BN254 { } } - /** - * @return r the sum of two points of G1 - */ - function plus(G1Point memory p1, G1Point memory p2) internal view returns (G1Point memory r) { + /// @return r the sum of two points of G1 + function plus( + G1Point memory p1, + G1Point memory p2 + ) internal view returns (G1Point memory r) { uint256[4] memory input; input[0] = p1.X; input[1] = p1.Y; @@ -135,14 +133,15 @@ library BN254 { require(success, ECAddFailed()); } - /** - * @notice an optimized ecMul implementation that takes O(log_2(s)) ecAdds - * @param p the point to multiply - * @param s the scalar to multiply by - * @dev this function is only safe to use if the scalar is 9 bits or less - */ - function scalar_mul_tiny(BN254.G1Point memory p, uint16 s) internal view returns (BN254.G1Point memory) { - require(s < 2 ** 9, ScalarTooLarge()); + /// @notice an optimized ecMul implementation that takes O(log_2(s)) ecAdds + /// @param p the point to multiply + /// @param s the scalar to multiply by + /// @dev this function is only safe to use if the scalar is 9 bits or less + function scalar_mul_tiny( + BN254.G1Point memory p, + uint16 s + ) internal view returns (BN254.G1Point memory) { + require(s < 2**9, ScalarTooLarge()); // if s is 1 return p if (s == 1) { @@ -178,12 +177,13 @@ library BN254 { return acc; } - /** - * @return r the product of a point on G1 and a scalar, i.e. - * p == p.scalar_mul(1) and p.plus(p) == p.scalar_mul(2) for all - * points p. - */ - function scalar_mul(G1Point memory p, uint256 s) internal view returns (G1Point memory r) { + /// @return r the product of a point on G1 and a scalar, i.e. + /// p == p.scalar_mul(1) and p.plus(p) == p.scalar_mul(2) for all + /// points p. + function scalar_mul( + G1Point memory p, + uint256 s + ) internal view returns (G1Point memory r) { uint256[3] memory input; input[0] = p.X; input[1] = p.Y; @@ -199,12 +199,10 @@ library BN254 { require(success, ECMulFailed()); } - /** - * @return The result of computing the pairing check - * e(p1[0], p2[0]) * .... * e(p1[n], p2[n]) == 1 - * For example, - * pairing([P1(), P1().negate()], [P2(), P2()]) should return true. - */ + /// @return The result of computing the pairing check + /// e(p1[0], p2[0]) * .... * e(p1[n], p2[n]) == 1 + /// For example, + /// pairing([P1(), P1().negate()], [P2(), P2()]) should return true. function pairing( G1Point memory a1, G2Point memory a2, @@ -242,10 +240,8 @@ library BN254 { return out[0] != 0; } - /** - * @notice This function is functionally the same as pairing(), however it specifies a gas limit - * the user can set, as a precompile may use the entire gas budget if it reverts. - */ + /// @notice This function is functionally the same as pairing(), however it specifies a gas limit + /// the user can set, as a precompile may use the entire gas budget if it reverts. function safePairing( G1Point memory a1, G2Point memory a2, @@ -302,9 +298,7 @@ library BN254 { return keccak256(abi.encodePacked(pk.X[0], pk.X[1], pk.Y[0], pk.Y[1])); } - /** - * @notice adapted from https://github.com/HarryR/solcrypto/blob/master/contracts/altbn128.sol - */ + /// @notice adapted from https://github.com/HarryR/solcrypto/blob/master/contracts/altbn128.sol function hashToG1( bytes32 _x ) internal view returns (G1Point memory) { @@ -326,13 +320,11 @@ library BN254 { return G1Point(0, 0); } - /** - * Given X, find Y - * - * where y = sqrt(x^3 + b) - * - * Returns: (x^3 + b), y - */ + /// Given X, find Y + /// + /// where y = sqrt(x^3 + b) + /// + /// Returns: (x^3 + b), y function findYFromX( uint256 x ) internal view returns (uint256, uint256) { @@ -346,7 +338,11 @@ library BN254 { return (beta, y); } - function expMod(uint256 _base, uint256 _exponent, uint256 _modulus) internal view returns (uint256 retval) { + function expMod( + uint256 _base, + uint256 _exponent, + uint256 _modulus + ) internal view returns (uint256 retval) { bool success; uint256[1] memory output; uint256[6] memory input; diff --git a/src/contracts/libraries/BN254SignatureVerifier.sol b/src/contracts/libraries/BN254SignatureVerifier.sol index 6ca512d17d..80bef6d1ad 100644 --- a/src/contracts/libraries/BN254SignatureVerifier.sol +++ b/src/contracts/libraries/BN254SignatureVerifier.sol @@ -3,25 +3,21 @@ pragma solidity ^0.8.27; import {BN254} from "./BN254.sol"; -/** - * @title BN254SignatureVerifier - * @notice Library for BN254 signature verification - * @dev Provides unified signature verification with consistent gamma calculation and hash-to-G1 conversion - */ +/// @title BN254SignatureVerifier +/// @notice Library for BN254 signature verification +/// @dev Provides unified signature verification with consistent gamma calculation and hash-to-G1 conversion library BN254SignatureVerifier { using BN254 for BN254.G1Point; - /** - * @notice Core BN254 signature verification function with optional gas limiting - * @param msgHash The message hash that was signed - * @param signature The BLS signature to verify (G1 point) - * @param pubkeyG1 The G1 component of the public key - * @param pubkeyG2 The G2 component of the public key - * @param useGasLimit Whether to use gas-limited safe pairing - * @param pairingGas Gas limit for pairing (ignored if useGasLimit is false) - * @return success True if verification succeeded (always true if useGasLimit=false due to revert) - * @return pairingSuccessful True if pairing operation completed (only relevant when useGasLimit=true) - */ + /// @notice Core BN254 signature verification function with optional gas limiting + /// @param msgHash The message hash that was signed + /// @param signature The BLS signature to verify (G1 point) + /// @param pubkeyG1 The G1 component of the public key + /// @param pubkeyG2 The G2 component of the public key + /// @param useGasLimit Whether to use gas-limited safe pairing + /// @param pairingGas Gas limit for pairing (ignored if useGasLimit is false) + /// @return success True if verification succeeded (always true if useGasLimit=false due to revert) + /// @return pairingSuccessful True if pairing operation completed (only relevant when useGasLimit=true) function verifySignature( bytes32 msgHash, BN254.G1Point memory signature, @@ -49,14 +45,12 @@ library BN254SignatureVerifier { } } - /** - * @notice Internal function to calculate gamma value for signature verification - * @param msgHash The message hash - * @param pubkeyG1 The G1 component of the public key - * @param pubkeyG2 The G2 component of the public key - * @param signature The signature point - * @return gamma The calculated gamma value - */ + /// @notice Internal function to calculate gamma value for signature verification + /// @param msgHash The message hash + /// @param pubkeyG1 The G1 component of the public key + /// @param pubkeyG2 The G2 component of the public key + /// @param signature The signature point + /// @return gamma The calculated gamma value function _calculateGamma( bytes32 msgHash, BN254.G1Point memory pubkeyG1, diff --git a/src/contracts/libraries/BeaconChainProofs.sol b/src/contracts/libraries/BeaconChainProofs.sol index 5d7af5d8ad..acd6153918 100644 --- a/src/contracts/libraries/BeaconChainProofs.sol +++ b/src/contracts/libraries/BeaconChainProofs.sol @@ -103,16 +103,17 @@ library BeaconChainProofs { bytes proof; } - /** - * - * VALIDATOR FIELDS -> BEACON STATE ROOT -> BEACON BLOCK ROOT - * - */ + /// + /// VALIDATOR FIELDS -> BEACON STATE ROOT -> BEACON BLOCK ROOT + /// /// @notice Verify a merkle proof of the beacon state root against a beacon block root /// @param beaconBlockRoot merkle root of the beacon block /// @param proof the beacon state root and merkle proof of its inclusion under `beaconBlockRoot` - function verifyStateRoot(bytes32 beaconBlockRoot, StateRootProof calldata proof) internal view { + function verifyStateRoot( + bytes32 beaconBlockRoot, + StateRootProof calldata proof + ) internal view { require(proof.proof.length == 32 * (BEACON_BLOCK_HEADER_TREE_HEIGHT), InvalidProofLength()); /// This merkle proof verifies the `beaconStateRoot` under the `beaconBlockRoot` @@ -180,11 +181,9 @@ library BeaconChainProofs { ); } - /** - * - * VALIDATOR BALANCE -> BALANCE CONTAINER ROOT -> BEACON BLOCK ROOT - * - */ + /// + /// VALIDATOR BALANCE -> BALANCE CONTAINER ROOT -> BEACON BLOCK ROOT + /// /// @notice Verify a merkle proof of the beacon state's balances container against the beacon block root /// @dev This proof starts at the balance container root, proves through the beacon state root, and @@ -260,16 +259,17 @@ library BeaconChainProofs { return getBalanceAtIndex(proof.balanceRoot, validatorIndex); } - /** - * @notice Parses a balanceRoot to get the uint64 balance of a validator. - * @dev During merkleization of the beacon state balance tree, four uint64 values are treated as a single - * leaf in the merkle tree. We use validatorIndex % 4 to determine which of the four uint64 values to - * extract from the balanceRoot. - * @param balanceRoot is the combination of 4 validator balances being proven for - * @param validatorIndex is the index of the validator being proven for - * @return The validator's balance, in Gwei - */ - function getBalanceAtIndex(bytes32 balanceRoot, uint40 validatorIndex) internal pure returns (uint64) { + /// @notice Parses a balanceRoot to get the uint64 balance of a validator. + /// @dev During merkleization of the beacon state balance tree, four uint64 values are treated as a single + /// leaf in the merkle tree. We use validatorIndex % 4 to determine which of the four uint64 values to + /// extract from the balanceRoot. + /// @param balanceRoot is the combination of 4 validator balances being proven for + /// @param validatorIndex is the index of the validator being proven for + /// @return The validator's balance, in Gwei + function getBalanceAtIndex( + bytes32 balanceRoot, + uint40 validatorIndex + ) internal pure returns (uint64) { uint256 bitShiftAmount = (validatorIndex % 4) * 64; return Endian.fromLittleEndianUint64(bytes32((uint256(balanceRoot) << bitShiftAmount))); } diff --git a/src/contracts/libraries/Endian.sol b/src/contracts/libraries/Endian.sol index 56233cda20..f5b4169b4c 100644 --- a/src/contracts/libraries/Endian.sol +++ b/src/contracts/libraries/Endian.sol @@ -2,13 +2,11 @@ pragma solidity ^0.8.0; library Endian { - /** - * @notice Converts a little endian-formatted uint64 to a big endian-formatted uint64 - * @param lenum little endian-formatted uint64 input, provided as 'bytes32' type - * @return n The big endian-formatted uint64 - * @dev Note that the input is formatted as a 'bytes32' type (i.e. 256 bits), but it is immediately truncated to a uint64 (i.e. 64 bits) - * through a right-shift/shr operation. - */ + /// @notice Converts a little endian-formatted uint64 to a big endian-formatted uint64 + /// @param lenum little endian-formatted uint64 input, provided as 'bytes32' type + /// @return n The big endian-formatted uint64 + /// @dev Note that the input is formatted as a 'bytes32' type (i.e. 256 bits), but it is immediately truncated to a uint64 (i.e. 64 bits) + /// through a right-shift/shr operation. function fromLittleEndianUint64( bytes32 lenum ) internal pure returns (uint64 n) { diff --git a/src/contracts/libraries/Merkle.sol b/src/contracts/libraries/Merkle.sol index f12b53ebdf..94abbddcf4 100644 --- a/src/contracts/libraries/Merkle.sol +++ b/src/contracts/libraries/Merkle.sol @@ -3,15 +3,13 @@ pragma solidity ^0.8.0; -/** - * @dev These functions deal with verification of Merkle Tree proofs. - * - * WARNING: You should avoid using leaf values that are 64 bytes long prior to - * hashing, salt the leaves, or hash the leaves with a hash function other than - * what is used for the Merkle tree's internal nodes. This is because the - * concatenation of a sorted pair of internal nodes in the Merkle tree could - * be reinterpreted as a leaf value. - */ +/// @dev These functions deal with verification of Merkle Tree proofs. +/// +/// WARNING: You should avoid using leaf values that are 64 bytes long prior to +/// hashing, salt the leaves, or hash the leaves with a hash function other than +/// what is used for the Merkle tree's internal nodes. This is because the +/// concatenation of a sorted pair of internal nodes in the Merkle tree could +/// be reinterpreted as a leaf value. library Merkle { /// @notice Thrown when the provided proof was not a multiple of 32, or was empty for SHA256. /// @dev Error code: 0x4dc5f6a4 @@ -39,18 +37,16 @@ library Merkle { /// @dev Empty roots should never be valid. We prevent them to avoid issues like the Nomad bridge attack: error EmptyRoot(); - /** - * @notice Verifies that a given leaf is included in a Merkle tree - * @param proof The proof of inclusion for the leaf - * @param root The root of the Merkle tree - * @param leaf The leaf to verify - * @param index The index of the leaf in the Merkle tree - * @return True if the leaf is included in the Merkle tree, false otherwise - * @dev A `proof` is valid if and only if the rebuilt hash matches the root of the tree. - * @dev Reverts for: - * - InvalidProofLength: proof.length is not a multiple of 32. - * - InvalidIndex: index is not 0 at conclusion of computation (implying outside the max index for the tree). - */ + /// @notice Verifies that a given leaf is included in a Merkle tree + /// @param proof The proof of inclusion for the leaf + /// @param root The root of the Merkle tree + /// @param leaf The leaf to verify + /// @param index The index of the leaf in the Merkle tree + /// @return True if the leaf is included in the Merkle tree, false otherwise + /// @dev A `proof` is valid if and only if the rebuilt hash matches the root of the tree. + /// @dev Reverts for: + /// - InvalidProofLength: proof.length is not a multiple of 32. + /// - InvalidIndex: index is not 0 at conclusion of computation (implying outside the max index for the tree). function verifyInclusionKeccak( bytes memory proof, bytes32 root, @@ -61,18 +57,16 @@ library Merkle { return processInclusionProofKeccak(proof, leaf, index) == root; } - /** - * @notice Returns the rebuilt hash obtained by traversing a Merkle tree up - * from `leaf` using `proof`. - * @param proof The proof of inclusion for the leaf - * @param leaf The leaf to verify - * @param index The index of the leaf in the Merkle tree - * @return The rebuilt hash - * @dev Reverts for: - * - InvalidProofLength: proof.length is not a multiple of 32. - * - InvalidIndex: index is not 0 at conclusion of computation (implying outside the max index for the tree). - * @dev The tree is built assuming `leaf` is the 0 indexed `index`'th leaf from the bottom left of the tree. - */ + /// @notice Returns the rebuilt hash obtained by traversing a Merkle tree up + /// from `leaf` using `proof`. + /// @param proof The proof of inclusion for the leaf + /// @param leaf The leaf to verify + /// @param index The index of the leaf in the Merkle tree + /// @return The rebuilt hash + /// @dev Reverts for: + /// - InvalidProofLength: proof.length is not a multiple of 32. + /// - InvalidIndex: index is not 0 at conclusion of computation (implying outside the max index for the tree). + /// @dev The tree is built assuming `leaf` is the 0 indexed `index`'th leaf from the bottom left of the tree. function processInclusionProofKeccak( bytes memory proof, bytes32 leaf, @@ -111,18 +105,16 @@ library Merkle { return computedHash; } - /** - * @notice Verifies that a given leaf is included in a Merkle tree - * @param proof The proof of inclusion for the leaf - * @param root The root of the Merkle tree - * @param leaf The leaf to verify - * @param index The index of the leaf in the Merkle tree - * @return True if the leaf is included in the Merkle tree, false otherwise - * @dev A `proof` is valid if and only if the rebuilt hash matches the root of the tree. - * @dev Reverts for: - * - InvalidProofLength: proof.length is 0 or not a multiple of 32. - * - InvalidIndex: index is not 0 at conclusion of computation (implying outside the max index for the tree). - */ + /// @notice Verifies that a given leaf is included in a Merkle tree + /// @param proof The proof of inclusion for the leaf + /// @param root The root of the Merkle tree + /// @param leaf The leaf to verify + /// @param index The index of the leaf in the Merkle tree + /// @return True if the leaf is included in the Merkle tree, false otherwise + /// @dev A `proof` is valid if and only if the rebuilt hash matches the root of the tree. + /// @dev Reverts for: + /// - InvalidProofLength: proof.length is 0 or not a multiple of 32. + /// - InvalidIndex: index is not 0 at conclusion of computation (implying outside the max index for the tree). function verifyInclusionSha256( bytes memory proof, bytes32 root, @@ -133,18 +125,16 @@ library Merkle { return processInclusionProofSha256(proof, leaf, index) == root; } - /** - * @notice Returns the rebuilt hash obtained by traversing a Merkle tree up - * from `leaf` using `proof`. - * @param proof The proof of inclusion for the leaf - * @param leaf The leaf to verify - * @param index The index of the leaf in the Merkle tree - * @return The rebuilt hash - * @dev Reverts for: - * - InvalidProofLength: proof.length is 0 or not a multiple of 32. - * - InvalidIndex: index is not 0 at conclusion of computation (implying outside the max index for the tree). - * @dev The tree is built assuming `leaf` is the 0 indexed `index`'th leaf from the bottom left of the tree. - */ + /// @notice Returns the rebuilt hash obtained by traversing a Merkle tree up + /// from `leaf` using `proof`. + /// @param proof The proof of inclusion for the leaf + /// @param leaf The leaf to verify + /// @param index The index of the leaf in the Merkle tree + /// @return The rebuilt hash + /// @dev Reverts for: + /// - InvalidProofLength: proof.length is 0 or not a multiple of 32. + /// - InvalidIndex: index is not 0 at conclusion of computation (implying outside the max index for the tree). + /// @dev The tree is built assuming `leaf` is the 0 indexed `index`'th leaf from the bottom left of the tree. function processInclusionProofSha256( bytes memory proof, bytes32 leaf, @@ -158,7 +148,9 @@ library Merkle { assembly { mstore(0x00, mload(computedHash)) mstore(0x20, mload(add(proof, i))) - if iszero(staticcall(sub(gas(), 2000), 2, 0x00, 0x40, computedHash, 0x20)) { revert(0, 0) } + if iszero(staticcall(sub(gas(), 2000), 2, 0x00, 0x40, computedHash, 0x20)) { + revert(0, 0) + } index := div(index, 2) } } else { @@ -166,7 +158,9 @@ library Merkle { assembly { mstore(0x00, mload(add(proof, i))) mstore(0x20, mload(computedHash)) - if iszero(staticcall(sub(gas(), 2000), 2, 0x00, 0x40, computedHash, 0x20)) { revert(0, 0) } + if iszero(staticcall(sub(gas(), 2000), 2, 0x00, 0x40, computedHash, 0x20)) { + revert(0, 0) + } index := div(index, 2) } } @@ -178,15 +172,13 @@ library Merkle { return computedHash[0]; } - /** - * @notice Returns the Merkle root of a tree created from a set of leaves using SHA-256 as its hash function - * @param leaves the leaves of the Merkle tree - * @return The computed Merkle root of the tree. - * @dev Reverts for: - * - NotEnoughLeaves: leaves.length is less than 2. - * - LeavesNotPowerOfTwo: leaves.length is not a power of two. - * @dev Unlike the Keccak version, this function does not allow a single-leaf tree. - */ + /// @notice Returns the Merkle root of a tree created from a set of leaves using SHA-256 as its hash function + /// @param leaves the leaves of the Merkle tree + /// @return The computed Merkle root of the tree. + /// @dev Reverts for: + /// - NotEnoughLeaves: leaves.length is less than 2. + /// - LeavesNotPowerOfTwo: leaves.length is not a power of two. + /// @dev Unlike the Keccak version, this function does not allow a single-leaf tree. function merkleizeSha256( bytes32[] memory leaves ) internal pure returns (bytes32) { @@ -215,13 +207,11 @@ library Merkle { return layer[0]; } - /** - * @notice Returns the Merkle root of a tree created from a set of leaves using Keccak as its hash function - * @param leaves the leaves of the Merkle tree - * @return The computed Merkle root of the tree. - * @dev Reverts for: - * - NoLeaves: leaves.length is 0. - */ + /// @notice Returns the Merkle root of a tree created from a set of leaves using Keccak as its hash function + /// @param leaves the leaves of the Merkle tree + /// @return The computed Merkle root of the tree. + /// @dev Reverts for: + /// - NoLeaves: leaves.length is 0. function merkleizeKeccak( bytes32[] memory leaves ) internal pure returns (bytes32) { @@ -257,15 +247,16 @@ library Merkle { return layer[0]; } - /** - * @notice Returns the Merkle proof for a given index in a tree created from a set of leaves using Keccak as its hash function - * @param leaves the leaves of the Merkle tree - * @param index the index of the leaf to get the proof for - * @return proof The computed Merkle proof for the leaf at index. - * @dev Reverts for: - * - InvalidIndex: index is outside the max index for the tree. - */ - function getProofKeccak(bytes32[] memory leaves, uint256 index) internal pure returns (bytes memory proof) { + /// @notice Returns the Merkle proof for a given index in a tree created from a set of leaves using Keccak as its hash function + /// @param leaves the leaves of the Merkle tree + /// @param index the index of the leaf to get the proof for + /// @return proof The computed Merkle proof for the leaf at index. + /// @dev Reverts for: + /// - InvalidIndex: index is outside the max index for the tree. + function getProofKeccak( + bytes32[] memory leaves, + uint256 index + ) internal pure returns (bytes memory proof) { require(leaves.length > 0, NoLeaves()); // TODO: very inefficient, use ZERO_HASHES // pad to the next power of 2 @@ -297,16 +288,17 @@ library Merkle { } } - /** - * @notice Returns the Merkle proof for a given index in a tree created from a set of leaves using SHA-256 as its hash function - * @param leaves the leaves of the Merkle tree - * @param index the index of the leaf to get the proof for - * @return proof The computed Merkle proof for the leaf at index. - * @dev Reverts for: - * - NotEnoughLeaves: leaves.length is less than 2. - * @dev Unlike the Keccak version, this function does not allow a single-leaf proof. - */ - function getProofSha256(bytes32[] memory leaves, uint256 index) internal pure returns (bytes memory proof) { + /// @notice Returns the Merkle proof for a given index in a tree created from a set of leaves using SHA-256 as its hash function + /// @param leaves the leaves of the Merkle tree + /// @param index the index of the leaf to get the proof for + /// @return proof The computed Merkle proof for the leaf at index. + /// @dev Reverts for: + /// - NotEnoughLeaves: leaves.length is less than 2. + /// @dev Unlike the Keccak version, this function does not allow a single-leaf proof. + function getProofSha256( + bytes32[] memory leaves, + uint256 index + ) internal pure returns (bytes memory proof) { require(leaves.length > 1, NotEnoughLeaves()); // TODO: very inefficient, use ZERO_HASHES // pad to the next power of 2 @@ -338,11 +330,9 @@ library Merkle { } } - /** - * @notice Returns whether the input is a power of two - * @param value the value to check - * @return True if the input is a power of two, false otherwise - */ + /// @notice Returns whether the input is a power of two + /// @param value the value to check + /// @return True if the input is a power of two, false otherwise function isPowerOfTwo( uint256 value ) internal pure returns (bool) { diff --git a/src/contracts/libraries/OperatorSetLib.sol b/src/contracts/libraries/OperatorSetLib.sol index 0b1ae4808d..9a1d998f26 100644 --- a/src/contracts/libraries/OperatorSetLib.sol +++ b/src/contracts/libraries/OperatorSetLib.sol @@ -3,11 +3,9 @@ pragma solidity ^0.8.27; using OperatorSetLib for OperatorSet global; -/** - * @notice An operator set identified by the AVS address and an identifier - * @param avs The address of the AVS this operator set belongs to - * @param id The unique identifier for the operator set - */ +/// @notice An operator set identified by the AVS address and an identifier +/// @param avs The address of the AVS this operator set belongs to +/// @param id The unique identifier for the operator set struct OperatorSet { address avs; uint32 id; diff --git a/src/contracts/libraries/SlashingLib.sol b/src/contracts/libraries/SlashingLib.sol index b2754e8742..7e4ea1158d 100644 --- a/src/contracts/libraries/SlashingLib.sol +++ b/src/contracts/libraries/SlashingLib.sol @@ -41,20 +41,27 @@ library SlashingLib { // WAD MATH - function mulWad(uint256 x, uint256 y) internal pure returns (uint256) { + function mulWad( + uint256 x, + uint256 y + ) internal pure returns (uint256) { return x.mulDiv(y, WAD); } - function divWad(uint256 x, uint256 y) internal pure returns (uint256) { + function divWad( + uint256 x, + uint256 y + ) internal pure returns (uint256) { return x.mulDiv(WAD, y); } - /** - * @notice Used explicitly for calculating slashed magnitude, we want to ensure even in the - * situation where an operator is slashed several times and precision has been lost over time, - * an incoming slashing request isn't rounded down to 0 and an operator is able to avoid slashing penalties. - */ - function mulWadRoundUp(uint256 x, uint256 y) internal pure returns (uint256) { + /// @notice Used explicitly for calculating slashed magnitude, we want to ensure even in the + /// situation where an operator is slashed several times and precision has been lost over time, + /// an incoming slashing request isn't rounded down to 0 and an operator is able to avoid slashing penalties. + function mulWadRoundUp( + uint256 x, + uint256 y + ) internal pure returns (uint256) { return x.mulDiv(y, WAD, Math.Rounding.Up); } @@ -73,7 +80,10 @@ library SlashingLib { return depositSharesToWithdraw.mulWad(dsf.scalingFactor()); } - function scaleForCompleteWithdrawal(uint256 scaledShares, uint256 slashingFactor) internal pure returns (uint256) { + function scaleForCompleteWithdrawal( + uint256 scaledShares, + uint256 slashingFactor + ) internal pure returns (uint256) { return scaledShares.mulWad(slashingFactor); } @@ -91,25 +101,23 @@ library SlashingLib { return; } - /** - * Base Equations: - * (1) newShares = currentShares + addedShares - * (2) newDepositShares = prevDepositShares + addedShares - * (3) newShares = newDepositShares * newDepositScalingFactor * slashingFactor - * - * Plugging (1) into (3): - * (4) newDepositShares * newDepositScalingFactor * slashingFactor = currentShares + addedShares - * - * Solving for newDepositScalingFactor - * (5) newDepositScalingFactor = (currentShares + addedShares) / (newDepositShares * slashingFactor) - * - * Plugging in (2) into (5): - * (7) newDepositScalingFactor = (currentShares + addedShares) / ((prevDepositShares + addedShares) * slashingFactor) - * Note that magnitudes must be divided by WAD for precision. Thus, - * - * (8) newDepositScalingFactor = WAD * (currentShares + addedShares) / ((prevDepositShares + addedShares) * slashingFactor / WAD) - * (9) newDepositScalingFactor = (currentShares + addedShares) * WAD / (prevDepositShares + addedShares) * WAD / slashingFactor - */ + /// Base Equations: + /// (1) newShares = currentShares + addedShares + /// (2) newDepositShares = prevDepositShares + addedShares + /// (3) newShares = newDepositShares * newDepositScalingFactor * slashingFactor + /// + /// Plugging (1) into (3): + /// (4) newDepositShares * newDepositScalingFactor * slashingFactor = currentShares + addedShares + /// + /// Solving for newDepositScalingFactor + /// (5) newDepositScalingFactor = (currentShares + addedShares) / (newDepositShares * slashingFactor) + /// + /// Plugging in (2) into (5): + /// (7) newDepositScalingFactor = (currentShares + addedShares) / ((prevDepositShares + addedShares) * slashingFactor) + /// Note that magnitudes must be divided by WAD for precision. Thus, + /// + /// (8) newDepositScalingFactor = WAD * (currentShares + addedShares) / ((prevDepositShares + addedShares) * slashingFactor / WAD) + /// (9) newDepositScalingFactor = (currentShares + addedShares) * WAD / (prevDepositShares + addedShares) * WAD / slashingFactor // Step 1: Calculate Numerator uint256 currentShares = dsf.calcWithdrawable(prevDepositShares, slashingFactor); diff --git a/src/contracts/libraries/Snapshots.sol b/src/contracts/libraries/Snapshots.sol index 839aec0d48..65d69b70fb 100644 --- a/src/contracts/libraries/Snapshots.sol +++ b/src/contracts/libraries/Snapshots.sol @@ -6,22 +6,20 @@ import "@openzeppelin-upgrades/contracts/utils/math/MathUpgradeable.sol"; import "./SlashingLib.sol"; -/** - * @title Library for handling snapshots as part of allocating and slashing. - * @notice This library is using OpenZeppelin's CheckpointsUpgradeable library (v4.9.0) - * and removes structs and functions that are unessential. - * Interfaces and structs are renamed for clarity and usage. - * Some additional functions have also been added for convenience. - * @dev This library defines the `DefaultWadHistory` and `DefaultZeroHistory` struct, for snapshotting values as they change at different points in - * time, and later looking up past values by block number. See {Votes} as an example. - * - * To create a history of snapshots define a variable type `Snapshots.DefaultWadHistory` or `Snapshots.DefaultZeroHistory` in your contract, - * and store a new snapshot for the current transaction block using the {push} function. If there is no history yet, the value is either WAD or 0, - * depending on the type of History struct used. This is implemented because for the AllocationManager we want the - * the default value to be WAD(1e18) but when used in the DelegationManager we want the default value to be 0. - * - * _Available since v4.5._ - */ +/// @title Library for handling snapshots as part of allocating and slashing. +/// @notice This library is using OpenZeppelin's CheckpointsUpgradeable library (v4.9.0) +/// and removes structs and functions that are unessential. +/// Interfaces and structs are renamed for clarity and usage. +/// Some additional functions have also been added for convenience. +/// @dev This library defines the `DefaultWadHistory` and `DefaultZeroHistory` struct, for snapshotting values as they change at different points in +/// time, and later looking up past values by block number. See {Votes} as an example. +/// +/// To create a history of snapshots define a variable type `Snapshots.DefaultWadHistory` or `Snapshots.DefaultZeroHistory` in your contract, +/// and store a new snapshot for the current transaction block using the {push} function. If there is no history yet, the value is either WAD or 0, +/// depending on the type of History struct used. This is implemented because for the AllocationManager we want the +/// the default value to be WAD(1e18) but when used in the DelegationManager we want the default value to be 0. +/// +/// _Available since v4.5._ library Snapshots { struct DefaultWadHistory { Snapshot[] _snapshots; @@ -38,78 +36,78 @@ library Snapshots { error InvalidSnapshotOrdering(); - /** - * @dev Pushes a (`key`, `value`) pair into a DefaultWadHistory so that it is stored as the snapshot. - */ - function push(DefaultWadHistory storage self, uint32 key, uint64 value) internal { + /// @dev Pushes a (`key`, `value`) pair into a DefaultWadHistory so that it is stored as the snapshot. + function push( + DefaultWadHistory storage self, + uint32 key, + uint64 value + ) internal { _insert(self._snapshots, key, value); } - /** - * @dev Pushes a (`key`, `value`) pair into a DefaultZeroHistory so that it is stored as the snapshot. - * `value` is cast to uint224. Responsibility for the safety of this operation falls outside of this library. - */ - function push(DefaultZeroHistory storage self, uint32 key, uint256 value) internal { + /// @dev Pushes a (`key`, `value`) pair into a DefaultZeroHistory so that it is stored as the snapshot. + /// `value` is cast to uint224. Responsibility for the safety of this operation falls outside of this library. + function push( + DefaultZeroHistory storage self, + uint32 key, + uint256 value + ) internal { _insert(self._snapshots, key, uint224(value)); } - /** - * @dev Return default value of WAD if there are no snapshots for DefaultWadHistory. - * This is used for looking up maxMagnitudes in the AllocationManager. - */ - function upperLookup(DefaultWadHistory storage self, uint32 key) internal view returns (uint64) { + /// @dev Return default value of WAD if there are no snapshots for DefaultWadHistory. + /// This is used for looking up maxMagnitudes in the AllocationManager. + function upperLookup( + DefaultWadHistory storage self, + uint32 key + ) internal view returns (uint64) { return uint64(_upperLookup(self._snapshots, key, WAD)); } - /** - * @dev Return default value of 0 if there are no snapshots for DefaultZeroHistory. - * This is used for looking up cumulative scaled shares in the DelegationManager. - */ - function upperLookup(DefaultZeroHistory storage self, uint32 key) internal view returns (uint256) { + /// @dev Return default value of 0 if there are no snapshots for DefaultZeroHistory. + /// This is used for looking up cumulative scaled shares in the DelegationManager. + function upperLookup( + DefaultZeroHistory storage self, + uint32 key + ) internal view returns (uint256) { return _upperLookup(self._snapshots, key, 0); } - /** - * @dev Returns the value in the most recent snapshot, or WAD if there are no snapshots. - */ + /// @dev Returns the value in the most recent snapshot, or WAD if there are no snapshots. function latest( DefaultWadHistory storage self ) internal view returns (uint64) { return uint64(_latest(self._snapshots, WAD)); } - /** - * @dev Returns the value in the most recent snapshot, or 0 if there are no snapshots. - */ + /// @dev Returns the value in the most recent snapshot, or 0 if there are no snapshots. function latest( DefaultZeroHistory storage self ) internal view returns (uint256) { return uint256(_latest(self._snapshots, 0)); } - /** - * @dev Returns the number of snapshots. - */ + /// @dev Returns the number of snapshots. function length( DefaultWadHistory storage self ) internal view returns (uint256) { return self._snapshots.length; } - /** - * @dev Returns the number of snapshots. - */ + /// @dev Returns the number of snapshots. function length( DefaultZeroHistory storage self ) internal view returns (uint256) { return self._snapshots.length; } - /** - * @dev Pushes a (`key`, `value`) pair into an ordered list of snapshots, either by inserting a new snapshot, - * or by updating the last one. - */ - function _insert(Snapshot[] storage self, uint32 key, uint224 value) private { + /// @dev Pushes a (`key`, `value`) pair into an ordered list of snapshots, either by inserting a new snapshot, + /// or by updating the last one. + function _insert( + Snapshot[] storage self, + uint32 key, + uint224 value + ) private { uint256 pos = self.length; if (pos > 0) { @@ -128,9 +126,7 @@ library Snapshots { self.push(Snapshot({_key: key, _value: value})); } - /** - * @dev Returns the value in the last (most recent) snapshot with key lower or equal than the search key, or `defaultValue` if there is none. - */ + /// @dev Returns the value in the last (most recent) snapshot with key lower or equal than the search key, or `defaultValue` if there is none. function _upperLookup( Snapshot[] storage snapshots, uint32 key, @@ -141,20 +137,19 @@ library Snapshots { return pos == 0 ? defaultValue : _unsafeAccess(snapshots, pos - 1)._value; } - /** - * @dev Returns the value in the most recent snapshot, or `defaultValue` if there are no snapshots. - */ - function _latest(Snapshot[] storage snapshots, uint224 defaultValue) private view returns (uint224) { + /// @dev Returns the value in the most recent snapshot, or `defaultValue` if there are no snapshots. + function _latest( + Snapshot[] storage snapshots, + uint224 defaultValue + ) private view returns (uint224) { uint256 pos = snapshots.length; return pos == 0 ? defaultValue : _unsafeAccess(snapshots, pos - 1)._value; } - /** - * @dev Return the index of the last (most recent) snapshot with key lower or equal than the search key, or `high` if there is none. - * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. - * - * WARNING: `high` should not be greater than the array's length. - */ + /// @dev Return the index of the last (most recent) snapshot with key lower or equal than the search key, or `high` if there is none. + /// `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + /// + /// WARNING: `high` should not be greater than the array's length. function _upperBinaryLookup( Snapshot[] storage self, uint32 key, @@ -172,10 +167,11 @@ library Snapshots { return high; } - /** - * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. - */ - function _unsafeAccess(Snapshot[] storage self, uint256 pos) private pure returns (Snapshot storage result) { + /// @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. + function _unsafeAccess( + Snapshot[] storage self, + uint256 pos + ) private pure returns (Snapshot storage result) { assembly { mstore(0, self.slot) result.slot := add(keccak256(0, 0x20), pos) diff --git a/src/contracts/mixins/Deprecated_OwnableUpgradeable.sol b/src/contracts/mixins/Deprecated_OwnableUpgradeable.sol index 5846f4f61e..84b82f1117 100644 --- a/src/contracts/mixins/Deprecated_OwnableUpgradeable.sol +++ b/src/contracts/mixins/Deprecated_OwnableUpgradeable.sol @@ -4,26 +4,22 @@ pragma solidity ^0.8.0; import "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin-upgrades/contracts/utils/ContextUpgradeable.sol"; -/** - * @title Deprecated_OwnableUpgradeable - * @dev This contract can be inherited in place of OpenZeppelin's OwnableUpgradeable - * to maintain the same storage layout while effectively removing the Ownable functionality. - * - * This is useful in cases where a contract previously used OwnableUpgradeable but no longer - * needs ownership functionality, yet must maintain the same storage slots to ensure - * compatibility with existing deployed proxies. - * - * The contract preserves the same storage layout as OwnableUpgradeable: - * - It keeps the `_owner` storage variable in the same slot - * - It maintains the same storage gap for future upgrades - */ +/// @title Deprecated_OwnableUpgradeable +/// @dev This contract can be inherited in place of OpenZeppelin's OwnableUpgradeable +/// to maintain the same storage layout while effectively removing the Ownable functionality. +/// +/// This is useful in cases where a contract previously used OwnableUpgradeable but no longer +/// needs ownership functionality, yet must maintain the same storage slots to ensure +/// compatibility with existing deployed proxies. +/// +/// The contract preserves the same storage layout as OwnableUpgradeable: +/// - It keeps the `_owner` storage variable in the same slot +/// - It maintains the same storage gap for future upgrades abstract contract Deprecated_OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[49] private __gap; } diff --git a/src/contracts/mixins/LeafCalculatorMixin.sol b/src/contracts/mixins/LeafCalculatorMixin.sol index 2fe40da5ec..81887b21bc 100644 --- a/src/contracts/mixins/LeafCalculatorMixin.sol +++ b/src/contracts/mixins/LeafCalculatorMixin.sol @@ -3,13 +3,11 @@ pragma solidity ^0.8.27; import {IOperatorTableCalculatorTypes} from "../interfaces/IOperatorTableCalculator.sol"; -/** - * @title LeafCalculatorMixin - * @notice Reusable mixin for calculating operator info and operator table leaf hashes - * @dev Provides standardized leaf calculation functions for use across multiple contracts and repositories. - * This mixin centralizes the leaf hashing logic to ensure consistency across the EigenLayer ecosystem - * and maintains proper cryptographic security through salt-based domain separation. - */ +/// @title LeafCalculatorMixin +/// @notice Reusable mixin for calculating operator info and operator table leaf hashes +/// @dev Provides standardized leaf calculation functions for use across multiple contracts and repositories. +/// This mixin centralizes the leaf hashing logic to ensure consistency across the EigenLayer ecosystem +/// and maintains proper cryptographic security through salt-based domain separation. abstract contract LeafCalculatorMixin { /// @dev Salt for operator info leaf hash calculation /// @dev The salt is used to prevent against second preimage attacks: attacks where an @@ -31,46 +29,42 @@ abstract contract LeafCalculatorMixin { /// This ensures collision resistance and semantic meaning. uint8 public constant OPERATOR_TABLE_LEAF_SALT = 0x8e; - /** - * @notice Calculate the leaf hash for an operator info - * @param operatorInfo The BN254 operator info struct containing the operator's public key and stake weights - * @return The leaf hash (keccak256 of salt and encoded operator info) - * @dev The salt is used to prevent against second preimage attacks: attacks where an - * attacker can create a partial proof using an internal node rather than a leaf to - * validate a proof. The salt ensures that leaves cannot be concatenated together to - * form a valid proof, as well as reducing the likelihood of an internal node matching - * the salt prefix. - * - * This is a standard "domain separation" technique in Merkle tree implementations - * to ensure leaf nodes and internal nodes can never be confused with each other. - * See Section 2.1 of for more. - * - * Uses abi.encodePacked for the salt and abi.encode for the struct to handle complex types - * (structs with dynamic arrays) while maintaining gas efficiency where possible. - */ + /// @notice Calculate the leaf hash for an operator info + /// @param operatorInfo The BN254 operator info struct containing the operator's public key and stake weights + /// @return The leaf hash (keccak256 of salt and encoded operator info) + /// @dev The salt is used to prevent against second preimage attacks: attacks where an + /// attacker can create a partial proof using an internal node rather than a leaf to + /// validate a proof. The salt ensures that leaves cannot be concatenated together to + /// form a valid proof, as well as reducing the likelihood of an internal node matching + /// the salt prefix. + /// + /// This is a standard "domain separation" technique in Merkle tree implementations + /// to ensure leaf nodes and internal nodes can never be confused with each other. + /// See Section 2.1 of for more. + /// + /// Uses abi.encodePacked for the salt and abi.encode for the struct to handle complex types + /// (structs with dynamic arrays) while maintaining gas efficiency where possible. function calculateOperatorInfoLeaf( IOperatorTableCalculatorTypes.BN254OperatorInfo memory operatorInfo ) public pure returns (bytes32) { return keccak256(abi.encodePacked(OPERATOR_INFO_LEAF_SALT, abi.encode(operatorInfo))); } - /** - * @notice Calculate the leaf hash for an operator table - * @param operatorTableBytes The encoded operator table as bytes containing operator set data - * @return The leaf hash (keccak256 of salt and operator table bytes) - * @dev The salt is used to prevent against second preimage attacks: attacks where an - * attacker can create a partial proof using an internal node rather than a leaf to - * validate a proof. The salt ensures that leaves cannot be concatenated together to - * form a valid proof, as well as reducing the likelihood of an internal node matching - * the salt prefix. - * - * This is a standard "domain separation" technique in Merkle tree implementations - * to ensure leaf nodes and internal nodes can never be confused with each other. - * See Section 2.1 of for more. - * - * Uses abi.encodePacked for both salt and bytes for optimal gas efficiency since both - * are simple byte arrays without complex nested structures. - */ + /// @notice Calculate the leaf hash for an operator table + /// @param operatorTableBytes The encoded operator table as bytes containing operator set data + /// @return The leaf hash (keccak256 of salt and operator table bytes) + /// @dev The salt is used to prevent against second preimage attacks: attacks where an + /// attacker can create a partial proof using an internal node rather than a leaf to + /// validate a proof. The salt ensures that leaves cannot be concatenated together to + /// form a valid proof, as well as reducing the likelihood of an internal node matching + /// the salt prefix. + /// + /// This is a standard "domain separation" technique in Merkle tree implementations + /// to ensure leaf nodes and internal nodes can never be confused with each other. + /// See Section 2.1 of for more. + /// + /// Uses abi.encodePacked for both salt and bytes for optimal gas efficiency since both + /// are simple byte arrays without complex nested structures. function calculateOperatorTableLeaf( bytes calldata operatorTableBytes ) public pure returns (bytes32) { diff --git a/src/contracts/mixins/PermissionControllerMixin.sol b/src/contracts/mixins/PermissionControllerMixin.sol index d198a064ff..d63eb8c755 100644 --- a/src/contracts/mixins/PermissionControllerMixin.sol +++ b/src/contracts/mixins/PermissionControllerMixin.sol @@ -16,12 +16,10 @@ abstract contract PermissionControllerMixin { permissionController = _permissionController; } - /** - * @notice Modifier that checks if the caller can call on behalf of an account, reverts if not permitted. - * @param account The account on whose behalf the function is being called. - * @dev Use this modifier when the entire function requires authorization. - * @dev This is the most common pattern - prefer this over `_checkCanCall` when possible. - */ + /// @notice Modifier that checks if the caller can call on behalf of an account, reverts if not permitted. + /// @param account The account on whose behalf the function is being called. + /// @dev Use this modifier when the entire function requires authorization. + /// @dev This is the most common pattern - prefer this over `_checkCanCall` when possible. modifier checkCanCall( address account ) { @@ -29,32 +27,28 @@ abstract contract PermissionControllerMixin { _; } - /** - * @notice Checks if the caller is permitted to call the current function on behalf of the given account. - * @param account The account on whose behalf the function is being called. - * @dev Reverts with `InvalidPermissions()` if the caller is not permitted. - * @dev Use this function instead of the modifier when: - * - You need to avoid "stack too deep" errors (e.g., when combining multiple modifiers) - * - You need more control over when the check occurs in your function logic - */ + /// @notice Checks if the caller is permitted to call the current function on behalf of the given account. + /// @param account The account on whose behalf the function is being called. + /// @dev Reverts with `InvalidPermissions()` if the caller is not permitted. + /// @dev Use this function instead of the modifier when: + /// - You need to avoid "stack too deep" errors (e.g., when combining multiple modifiers) + /// - You need more control over when the check occurs in your function logic function _checkCanCall( address account ) internal view { require(_canCall(account), InvalidPermissions()); } - /** - * @notice Checks if the caller is permitted to call the current function on behalf of the given account. - * @param account The account on whose behalf the function is being called. - * @return allowed True if the caller is permitted, false otherwise. - * @dev Unlike `_checkCanCall`, this function returns a boolean instead of reverting. - * @dev Use this function when you need conditional logic based on permissions, such as: - * - OR conditions: `require(_canCall(operator) || _canCall(avs), InvalidCaller());` - * - If-else branches: `if (_canCall(account)) { ... } else { ... }` - * - Multiple authorization paths in the same function - * @dev This function queries the permissionController to determine if msg.sender is authorized - * to call the current function (identified by msg.sig) on behalf of `account`. - */ + /// @notice Checks if the caller is permitted to call the current function on behalf of the given account. + /// @param account The account on whose behalf the function is being called. + /// @return allowed True if the caller is permitted, false otherwise. + /// @dev Unlike `_checkCanCall`, this function returns a boolean instead of reverting. + /// @dev Use this function when you need conditional logic based on permissions, such as: + /// - OR conditions: `require(_canCall(operator) || _canCall(avs), InvalidCaller());` + /// - If-else branches: `if (_canCall(account)) { ... } else { ... }` + /// - Multiple authorization paths in the same function + /// @dev This function queries the permissionController to determine if msg.sender is authorized + /// to call the current function (identified by msg.sig) on behalf of `account`. function _canCall( address account ) internal view returns (bool allowed) { diff --git a/src/contracts/mixins/SplitContractMixin.sol b/src/contracts/mixins/SplitContractMixin.sol index 9fd94b5664..ad99732a0d 100644 --- a/src/contracts/mixins/SplitContractMixin.sol +++ b/src/contracts/mixins/SplitContractMixin.sol @@ -11,13 +11,11 @@ abstract contract SplitContractMixin { viewImplementation = _viewImplementation; } - /** - * @dev Delegates the current call to `implementation`. - * - * This function does not return to its internal call site, it will return directly to the external caller. - * - * Copied from OpenZeppelin Contracts v4.9.0 (proxy/Proxy.sol). - */ + /// @dev Delegates the current call to `implementation`. + /// + /// This function does not return to its internal call site, it will return directly to the external caller. + /// + /// Copied from OpenZeppelin Contracts v4.9.0 (proxy/Proxy.sol). function _delegate( address implementation ) internal virtual { @@ -41,18 +39,16 @@ abstract contract SplitContractMixin { } } - /** - * @dev Performs a delegate call to `implementation` in the context of a view function. - * - * This function typecasts the non-view `_delegate` function to a view function in order to - * allow its invocation from a view context. This is required because the EVM itself does not - * enforce view/pure mutability, and using inline assembly, it is possible to cast a function - * pointer to a view (read-only) signature. This pattern is sometimes used for readonly proxies, - * but it should be used cautiously since any state-modifying logic in the underlying delegate - * violates the spirit of a view call. - * - * @param implementation The address to which the call should be delegated. - */ + /// @dev Performs a delegate call to `implementation` in the context of a view function. + /// + /// This function typecasts the non-view `_delegate` function to a view function in order to + /// allow its invocation from a view context. This is required because the EVM itself does not + /// enforce view/pure mutability, and using inline assembly, it is possible to cast a function + /// pointer to a view (read-only) signature. This pattern is sometimes used for readonly proxies, + /// but it should be used cautiously since any state-modifying logic in the underlying delegate + /// violates the spirit of a view call. + /// + /// @param implementation The address to which the call should be delegated. function _delegateView( address implementation ) internal view virtual { diff --git a/src/contracts/multichain/BN254CertificateVerifier.sol b/src/contracts/multichain/BN254CertificateVerifier.sol index 6be8db7567..32ebe45aa3 100644 --- a/src/contracts/multichain/BN254CertificateVerifier.sol +++ b/src/contracts/multichain/BN254CertificateVerifier.sol @@ -10,19 +10,15 @@ import "../libraries/OperatorSetLib.sol"; import "../mixins/LeafCalculatorMixin.sol"; import "./BN254CertificateVerifierStorage.sol"; -/** - * @title BN254CertificateVerifier - * @notice Singleton verifier for BN254 certificates across multiple operator sets - * @dev This contract uses BN254 curves for signature verification and - * caches operator information for efficient verification - */ +/// @title BN254CertificateVerifier +/// @notice Singleton verifier for BN254 certificates across multiple operator sets +/// @dev This contract uses BN254 curves for signature verification and +/// caches operator information for efficient verification contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStorage, LeafCalculatorMixin { using Merkle for bytes; using BN254 for BN254.G1Point; - /** - * @notice Struct to hold verification context and reduce stack depth - */ + /// @notice Struct to hold verification context and reduce stack depth struct VerificationContext { bytes32 operatorSetKey; BN254OperatorSetInfo operatorSetInfo; @@ -30,30 +26,24 @@ contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStor BN254.G1Point nonSignerApk; } - /** - * @notice Restricts access to the operator table updater - */ + /// @notice Restricts access to the operator table updater modifier onlyTableUpdater() { require(msg.sender == address(operatorTableUpdater), OnlyTableUpdater()); _; } - /** - * @notice Constructor for the certificate verifier - * @dev Disables initializers to prevent implementation initialization - * @param _operatorTableUpdater Address authorized to update operator tables - */ + /// @notice Constructor for the certificate verifier + /// @dev Disables initializers to prevent implementation initialization + /// @param _operatorTableUpdater Address authorized to update operator tables constructor( IOperatorTableUpdater _operatorTableUpdater ) BN254CertificateVerifierStorage(_operatorTableUpdater) { _disableInitializers(); } - /** - * - * EXTERNAL FUNCTIONS - * - */ + /// + /// EXTERNAL FUNCTIONS + /// ///@inheritdoc IBN254CertificateVerifier function updateOperatorTable( @@ -131,18 +121,14 @@ contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStor return true; } - /** - * - * INTERNAL FUNCTIONS - * - */ - - /** - * @notice Internal function to verify a certificate - * @param operatorSet The operator set the certificate is for - * @param cert The certificate to verify - * @return totalSignedStakeWeights The amount of stake that signed the certificate for each stake type - */ + /// + /// INTERNAL FUNCTIONS + /// + + /// @notice Internal function to verify a certificate + /// @param operatorSet The operator set the certificate is for + /// @param cert The certificate to verify + /// @return totalSignedStakeWeights The amount of stake that signed the certificate for each stake type function _verifyCertificate( OperatorSet memory operatorSet, BN254Certificate memory cert @@ -166,12 +152,13 @@ contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStor return ctx.totalSignedStakeWeights; } - /** - * @notice Validates certificate timestamp against staleness requirements - * @param operatorSetKey The operator set key - * @param referenceTimestamp The reference timestamp to validate - */ - function _validateCertificateTimestamp(bytes32 operatorSetKey, uint32 referenceTimestamp) internal view { + /// @notice Validates certificate timestamp against staleness requirements + /// @param operatorSetKey The operator set key + /// @param referenceTimestamp The reference timestamp to validate + function _validateCertificateTimestamp( + bytes32 operatorSetKey, + uint32 referenceTimestamp + ) internal view { // Assert that the certificate is not stale uint32 maxStaleness = _maxStalenessPeriods[operatorSetKey]; require(maxStaleness == 0 || block.timestamp <= referenceTimestamp + maxStaleness, CertificateStale()); @@ -183,12 +170,10 @@ contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStor require(operatorTableUpdater.isRootValidByTimestamp(referenceTimestamp), RootDisabled()); } - /** - * @notice Processes non-signer witnesses and returns aggregate non-signer public key - * @param ctx The verification context - * @param cert The certificate being verified - * @return nonSignerApk The aggregate public key of non-signers - */ + /// @notice Processes non-signer witnesses and returns aggregate non-signer public key + /// @param ctx The verification context + /// @param cert The certificate being verified + /// @return nonSignerApk The aggregate public key of non-signers function _processNonSigners( VerificationContext memory ctx, BN254Certificate memory cert @@ -222,13 +207,11 @@ contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStor } } - /** - * @notice Gets operator info from cache or verifies and caches it - * @param operatorSetKey The operator set key - * @param referenceTimestamp The reference timestamp - * @param witness The operator info witness containing proof data - * @return operatorInfo The verified operator information - */ + /// @notice Gets operator info from cache or verifies and caches it + /// @param operatorSetKey The operator set key + /// @param referenceTimestamp The reference timestamp + /// @param witness The operator info witness containing proof data + /// @return operatorInfo The verified operator information function _getOrCacheNonsignerOperatorInfo( bytes32 operatorSetKey, uint32 referenceTimestamp, @@ -257,12 +240,13 @@ contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStor } } - /** - * @notice Verifies the BLS signature - * @param ctx The verification context - * @param cert The certificate containing the signature to verify - */ - function _verifySignature(VerificationContext memory ctx, BN254Certificate memory cert) internal view { + /// @notice Verifies the BLS signature + /// @param ctx The verification context + /// @param cert The certificate containing the signature to verify + function _verifySignature( + VerificationContext memory ctx, + BN254Certificate memory cert + ) internal view { // Calculate signer aggregate public key by subtracting non-signers from total BN254.G1Point memory signerApk = ctx.operatorSetInfo.aggregatePubkey.plus(ctx.nonSignerApk.negate()); @@ -275,15 +259,13 @@ contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStor require(pairingSuccessful && signatureValid, VerificationFailed()); } - /** - * @notice Verifies a merkle proof for an operator info - * @param operatorSetKey The operator set key - * @param referenceTimestamp The reference timestamp - * @param operatorIndex The index of the operator - * @param operatorInfo The operator info - * @param proof The merkle proof as bytes - * @return verified Whether the proof is valid - */ + /// @notice Verifies a merkle proof for an operator info + /// @param operatorSetKey The operator set key + /// @param referenceTimestamp The reference timestamp + /// @param operatorIndex The index of the operator + /// @param operatorInfo The operator info + /// @param proof The merkle proof as bytes + /// @return verified Whether the proof is valid function _verifyOperatorInfoMerkleProof( bytes32 operatorSetKey, uint32 referenceTimestamp, @@ -296,11 +278,9 @@ contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStor return proof.verifyInclusionKeccak(root, leaf, operatorIndex); } - /** - * - * VIEW FUNCTIONS - * - */ + /// + /// VIEW FUNCTIONS + /// ///@inheritdoc IBaseCertificateVerifier function getOperatorSetOwner( @@ -402,7 +382,10 @@ contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStor } /// @inheritdoc IBN254CertificateVerifier - function calculateCertificateDigest(uint32 referenceTimestamp, bytes32 messageHash) public pure returns (bytes32) { + function calculateCertificateDigest( + uint32 referenceTimestamp, + bytes32 messageHash + ) public pure returns (bytes32) { return keccak256(abi.encode(BN254_CERTIFICATE_TYPEHASH, referenceTimestamp, messageHash)); } } diff --git a/src/contracts/multichain/BN254CertificateVerifierStorage.sol b/src/contracts/multichain/BN254CertificateVerifierStorage.sol index baefadfce2..0e457fc6b6 100644 --- a/src/contracts/multichain/BN254CertificateVerifierStorage.sol +++ b/src/contracts/multichain/BN254CertificateVerifierStorage.sol @@ -54,10 +54,8 @@ abstract contract BN254CertificateVerifierStorage is IBN254CertificateVerifier { operatorTableUpdater = _operatorTableUpdater; } - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[44] private __gap; } diff --git a/src/contracts/multichain/CrossChainRegistry.sol b/src/contracts/multichain/CrossChainRegistry.sol index 88d4b173d8..4cf9d1022e 100644 --- a/src/contracts/multichain/CrossChainRegistry.sol +++ b/src/contracts/multichain/CrossChainRegistry.sol @@ -8,12 +8,10 @@ import "../permissions/Pausable.sol"; import "../interfaces/IKeyRegistrar.sol"; import "./CrossChainRegistryStorage.sol"; -/** - * @title CrossChainRegistry - * @author Layr Labs, Inc. - * @notice Implementation contract for managing cross-chain operator set configurations and generation reservations - * @dev Manages operator table calculations, transport destinations, and operator set configurations for cross-chain operations - */ +/// @title CrossChainRegistry +/// @author Layr Labs, Inc. +/// @notice Implementation contract for managing cross-chain operator set configurations and generation reservations +/// @dev Manages operator table calculations, transport destinations, and operator set configurations for cross-chain operations contract CrossChainRegistry is Initializable, OwnableUpgradeable, @@ -26,16 +24,12 @@ contract CrossChainRegistry is using EnumerableSet for EnumerableSet.UintSet; using OperatorSetLib for OperatorSet; - /** - * - * MODIFIERS - * - */ + /// + /// MODIFIERS + /// - /** - * @dev Validates that the operator set exists in the AllocationManager - * @param operatorSet The operator set to validate - */ + /// @dev Validates that the operator set exists in the AllocationManager + /// @param operatorSet The operator set to validate modifier isValidOperatorSet( OperatorSet calldata operatorSet ) { @@ -50,19 +44,15 @@ contract CrossChainRegistry is _; } - /** - * - * INITIALIZING FUNCTIONS - * - */ - - /** - * @dev Initializes the CrossChainRegistry with immutable dependencies - * @param _allocationManager The allocation manager for operator set validation - * @param _keyRegistrar The key registrar for operator set curve type validation - * @param _permissionController The permission controller for access control - * @param _pauserRegistry The pauser registry for pause functionality - */ + /// + /// INITIALIZING FUNCTIONS + /// + + /// @dev Initializes the CrossChainRegistry with immutable dependencies + /// @param _allocationManager The allocation manager for operator set validation + /// @param _keyRegistrar The key registrar for operator set curve type validation + /// @param _permissionController The permission controller for access control + /// @param _pauserRegistry The pauser registry for pause functionality constructor( IAllocationManager _allocationManager, IKeyRegistrar _keyRegistrar, @@ -76,12 +66,10 @@ contract CrossChainRegistry is _disableInitializers(); } - /** - * @notice Initializes the contract with the initial paused status and owner - * @param initialOwner The initial owner of the contract - * @param initialTableUpdateCadence The initial table update cadence - * @param initialPausedStatus The initial paused status bitmap - */ + /// @notice Initializes the contract with the initial paused status and owner + /// @param initialOwner The initial owner of the contract + /// @param initialTableUpdateCadence The initial table update cadence + /// @param initialPausedStatus The initial paused status bitmap function initialize( address initialOwner, uint32 initialTableUpdateCadence, @@ -92,11 +80,9 @@ contract CrossChainRegistry is _setPausedStatus(initialPausedStatus); } - /** - * - * EXTERNAL FUNCTIONS - * - */ + /// + /// EXTERNAL FUNCTIONS + /// /// @inheritdoc ICrossChainRegistry function createGenerationReservation( @@ -219,17 +205,13 @@ contract CrossChainRegistry is _setTableUpdateCadence(tableUpdateCadence); } - /** - * - * INTERNAL FUNCTIONS - * - */ - - /** - * @dev Internal function to set the operator table calculator for an operator set - * @param operatorSet The operator set to set the calculator for - * @param operatorTableCalculator The operator table calculator contract - */ + /// + /// INTERNAL FUNCTIONS + /// + + /// @dev Internal function to set the operator table calculator for an operator set + /// @param operatorSet The operator set to set the calculator for + /// @param operatorTableCalculator The operator table calculator contract function _setOperatorTableCalculator( OperatorSet memory operatorSet, IOperatorTableCalculator operatorTableCalculator @@ -238,13 +220,14 @@ contract CrossChainRegistry is emit OperatorTableCalculatorSet(operatorSet, operatorTableCalculator); } - /** - * @dev Internal function to set the operator set config for an operator set - * @param operatorSet The operator set to set the config for - * @param config The operator set config - * @dev The 0 staleness period is special case and is allowed, since it allows for certificates to ALWAYS be valid - */ - function _setOperatorSetConfig(OperatorSet memory operatorSet, OperatorSetConfig memory config) internal { + /// @dev Internal function to set the operator set config for an operator set + /// @param operatorSet The operator set to set the config for + /// @param config The operator set config + /// @dev The 0 staleness period is special case and is allowed, since it allows for certificates to ALWAYS be valid + function _setOperatorSetConfig( + OperatorSet memory operatorSet, + OperatorSetConfig memory config + ) internal { require( config.maxStalenessPeriod == 0 || config.maxStalenessPeriod >= _tableUpdateCadence, InvalidStalenessPeriod() ); @@ -252,11 +235,9 @@ contract CrossChainRegistry is emit OperatorSetConfigSet(operatorSet, config); } - /** - * @dev Internal function to set the table update cadence - * @param tableUpdateCadence the table update cadence - * @dev The table update cadence cannot be 0 as that is special-cased to allow for certificates to ALWAYS be valid - */ + /// @dev Internal function to set the table update cadence + /// @param tableUpdateCadence the table update cadence + /// @dev The table update cadence cannot be 0 as that is special-cased to allow for certificates to ALWAYS be valid function _setTableUpdateCadence( uint32 tableUpdateCadence ) internal { @@ -265,11 +246,9 @@ contract CrossChainRegistry is emit TableUpdateCadenceSet(tableUpdateCadence); } - /** - * - * VIEW FUNCTIONS - * - */ + /// + /// VIEW FUNCTIONS + /// /// @inheritdoc ICrossChainRegistry function getActiveGenerationReservations() external view returns (OperatorSet[] memory) { diff --git a/src/contracts/multichain/CrossChainRegistryStorage.sol b/src/contracts/multichain/CrossChainRegistryStorage.sol index c62d172b38..21314bacef 100644 --- a/src/contracts/multichain/CrossChainRegistryStorage.sol +++ b/src/contracts/multichain/CrossChainRegistryStorage.sol @@ -9,12 +9,10 @@ import "../interfaces/IAllocationManager.sol"; import "../interfaces/IKeyRegistrar.sol"; import "../libraries/OperatorSetLib.sol"; -/** - * @title CrossChainRegistryStorage - * @author Layr Labs, Inc. - * @notice Storage contract for the CrossChainRegistry, containing all storage variables and immutables - * @dev This abstract contract is designed to be inherited by the CrossChainRegistry implementation - */ +/// @title CrossChainRegistryStorage +/// @author Layr Labs, Inc. +/// @notice Storage contract for the CrossChainRegistry, containing all storage variables and immutables +/// @dev This abstract contract is designed to be inherited by the CrossChainRegistry implementation abstract contract CrossChainRegistryStorage is ICrossChainRegistry { using EnumerableMap for EnumerableMap.UintToAddressMap; using EnumerableSet for EnumerableSet.Bytes32Set; @@ -66,15 +64,16 @@ abstract contract CrossChainRegistryStorage is ICrossChainRegistry { // Construction - constructor(IAllocationManager _allocationManager, IKeyRegistrar _keyRegistrar) { + constructor( + IAllocationManager _allocationManager, + IKeyRegistrar _keyRegistrar + ) { allocationManager = _allocationManager; keyRegistrar = _keyRegistrar; } - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[42] private __gap; } diff --git a/src/contracts/multichain/ECDSACertificateVerifier.sol b/src/contracts/multichain/ECDSACertificateVerifier.sol index a9d718674c..00f4a97cfa 100644 --- a/src/contracts/multichain/ECDSACertificateVerifier.sol +++ b/src/contracts/multichain/ECDSACertificateVerifier.sol @@ -8,28 +8,22 @@ import {OperatorSet} from "../libraries/OperatorSetLib.sol"; import "../mixins/SignatureUtilsMixin.sol"; import "./ECDSACertificateVerifierStorage.sol"; -/** - * @title ECDSACertificateVerifier - * @notice Verifies ECDSA certificates across multiple operator sets - * @dev Implements ECDSA signature verification with operator information caching - */ +/// @title ECDSACertificateVerifier +/// @notice Verifies ECDSA certificates across multiple operator sets +/// @dev Implements ECDSA signature verification with operator information caching contract ECDSACertificateVerifier is Initializable, ECDSACertificateVerifierStorage, SignatureUtilsMixin { using ECDSA for bytes32; - /** - * @notice Restricts access to the operator table updater - */ + /// @notice Restricts access to the operator table updater modifier onlyTableUpdater() { require(msg.sender == address(operatorTableUpdater), OnlyTableUpdater()); _; } - /** - * @notice Constructor for the certificate verifier - * @dev Disables initializers to prevent implementation initialization - * @param _operatorTableUpdater Address authorized to update operator tables - * @param _version The version string for the SignatureUtilsMixin - */ + /// @notice Constructor for the certificate verifier + /// @dev Disables initializers to prevent implementation initialization + /// @param _operatorTableUpdater Address authorized to update operator tables + /// @param _version The version string for the SignatureUtilsMixin constructor( IOperatorTableUpdater _operatorTableUpdater, string memory _version @@ -37,11 +31,9 @@ contract ECDSACertificateVerifier is Initializable, ECDSACertificateVerifierStor _disableInitializers(); } - /** - * - * EXTERNAL FUNCTIONS - * - */ + /// + /// EXTERNAL FUNCTIONS + /// ///@inheritdoc IECDSACertificateVerifier function updateOperatorTable( @@ -71,18 +63,14 @@ contract ECDSACertificateVerifier is Initializable, ECDSACertificateVerifierStor emit TableUpdated(operatorSet, referenceTimestamp, operatorInfos); } - /** - * - * INTERNAL FUNCTIONS - * - */ - - /** - * @notice Internal function to verify a certificate - * @param cert The certificate to verify - * @return totalSignedStakeWeights The total amount of stake that signed the certificate for each stake type - * @return signers The addresses that signed the certificate - */ + /// + /// INTERNAL FUNCTIONS + /// + + /// @notice Internal function to verify a certificate + /// @param cert The certificate to verify + /// @return totalSignedStakeWeights The total amount of stake that signed the certificate for each stake type + /// @return signers The addresses that signed the certificate function _verifyECDSACertificate( OperatorSet calldata operatorSet, ECDSACertificate calldata cert @@ -116,14 +104,12 @@ contract ECDSACertificateVerifier is Initializable, ECDSACertificateVerifierStor return (totalSignedStakeWeights, signers); } - /** - * @notice Parse signatures from the concatenated signature bytes - * @param signableDigest The signable digest that was signed - * @param signatures The concatenated signatures - * @return signers Array of addresses that signed the message - * @dev Signatures must be ordered by signer address (ascending) - * @dev This does not support smart contract based signatures for multichain - */ + /// @notice Parse signatures from the concatenated signature bytes + /// @param signableDigest The signable digest that was signed + /// @param signatures The concatenated signatures + /// @return signers Array of addresses that signed the message + /// @dev Signatures must be ordered by signer address (ascending) + /// @dev This does not support smart contract based signatures for multichain function _parseSignatures( bytes32 signableDigest, bytes memory signatures @@ -153,14 +139,12 @@ contract ECDSACertificateVerifier is Initializable, ECDSACertificateVerifierStor return signers; } - /** - * @notice Process the signers and add their weights to the signed stakes - * @param operatorSetKey The key of the operator set - * @param referenceTimestamp The reference timestamp of the certificate - * @param signers The signers of the certificate - * @param numStakeTypes The number of stake types - * @return totalSignedStakeWeights The total stake weight that has been signed for each stake type - */ + /// @notice Process the signers and add their weights to the signed stakes + /// @param operatorSetKey The key of the operator set + /// @param referenceTimestamp The reference timestamp of the certificate + /// @param signers The signers of the certificate + /// @param numStakeTypes The number of stake types + /// @return totalSignedStakeWeights The total stake weight that has been signed for each stake type function _processSigners( bytes32 operatorSetKey, uint32 referenceTimestamp, @@ -200,11 +184,9 @@ contract ECDSACertificateVerifier is Initializable, ECDSACertificateVerifierStor } } - /** - * - * VIEW FUNCTIONS - * - */ + /// + /// VIEW FUNCTIONS + /// ///@inheritdoc IBaseCertificateVerifier function getOperatorSetOwner( @@ -372,7 +354,10 @@ contract ECDSACertificateVerifier is Initializable, ECDSACertificateVerifierStor } /// @inheritdoc IECDSACertificateVerifier - function calculateCertificateDigest(uint32 referenceTimestamp, bytes32 messageHash) public view returns (bytes32) { + function calculateCertificateDigest( + uint32 referenceTimestamp, + bytes32 messageHash + ) public view returns (bytes32) { return keccak256(calculateCertificateDigestBytes(referenceTimestamp, messageHash)); } } diff --git a/src/contracts/multichain/ECDSACertificateVerifierStorage.sol b/src/contracts/multichain/ECDSACertificateVerifierStorage.sol index 398c70e782..3ed98ba941 100644 --- a/src/contracts/multichain/ECDSACertificateVerifierStorage.sol +++ b/src/contracts/multichain/ECDSACertificateVerifierStorage.sol @@ -36,7 +36,8 @@ abstract contract ECDSACertificateVerifierStorage is IECDSACertificateVerifier { mapping(bytes32 => uint32) internal _latestReferenceTimestamps; /// @dev Mapping from referenceTimestamp to the number of operators - mapping(bytes32 operatorSetKey => mapping(uint32 referenceTimestamp => uint256 numOperators)) internal _numOperators; + mapping(bytes32 operatorSetKey => mapping(uint32 referenceTimestamp => uint256 numOperators)) internal + _numOperators; /// @dev Mapping from operatorSetKey to referenceTimestamp to operatorInfos mapping(bytes32 operatorSetKey => mapping(uint32 referenceTimestamp => mapping(uint256 => ECDSAOperatorInfo))) @@ -53,10 +54,8 @@ abstract contract ECDSACertificateVerifierStorage is IECDSACertificateVerifier { operatorTableUpdater = _operatorTableUpdater; } - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[44] private __gap; } diff --git a/src/contracts/multichain/OperatorTableUpdater.sol b/src/contracts/multichain/OperatorTableUpdater.sol index 5babf85596..c0be44bc66 100644 --- a/src/contracts/multichain/OperatorTableUpdater.sol +++ b/src/contracts/multichain/OperatorTableUpdater.sol @@ -18,11 +18,9 @@ contract OperatorTableUpdater is LeafCalculatorMixin, ReentrancyGuardUpgradeable { - /** - * - * INITIALIZING FUNCTIONS - * - */ + /// + /// INITIALIZING FUNCTIONS + /// constructor( IBN254CertificateVerifier _bn254CertificateVerifier, IECDSACertificateVerifier _ecdsaCertificateVerifier, @@ -31,16 +29,14 @@ contract OperatorTableUpdater is _disableInitializers(); } - /** - * @notice Initializes the OperatorTableUpdater - * @param _owner The owner of the OperatorTableUpdater - * @param initialPausedStatus The initial paused status of the OperatorTableUpdater - * @param _initialGenerator The operatorSet which certifies against global roots - * @param _globalRootConfirmationThreshold The threshold, in bps, for a global root to be signed off on and updated - * @param generatorInfo The operatorSetInfo for the Generator - * @dev We also update the operator table for the Generator, to begin signing off on global roots - * @dev We set the `_latestReferenceTimestamp` to the current timestamp, so that only *new* roots can be confirmed - */ + /// @notice Initializes the OperatorTableUpdater + /// @param _owner The owner of the OperatorTableUpdater + /// @param initialPausedStatus The initial paused status of the OperatorTableUpdater + /// @param _initialGenerator The operatorSet which certifies against global roots + /// @param _globalRootConfirmationThreshold The threshold, in bps, for a global root to be signed off on and updated + /// @param generatorInfo The operatorSetInfo for the Generator + /// @dev We also update the operator table for the Generator, to begin signing off on global roots + /// @dev We set the `_latestReferenceTimestamp` to the current timestamp, so that only *new* roots can be confirmed function initialize( address _owner, uint256 initialPausedStatus, @@ -67,11 +63,9 @@ contract OperatorTableUpdater is _latestReferenceTimestamp = uint32(block.timestamp); } - /** - * - * ACTIONS - * - */ + /// + /// ACTIONS + /// /// @inheritdoc IOperatorTableUpdater function confirmGlobalTableRoot( @@ -131,11 +125,8 @@ contract OperatorTableUpdater is // Silently return if the `referenceTimestamp` has already been updated for the `operatorSet` // We do this to avoid race conditions with the offchain transport of the operator table - if ( - IBaseCertificateVerifier(getCertificateVerifier(curveType)).isReferenceTimestampSet( - operatorSet, referenceTimestamp - ) - ) { + if (IBaseCertificateVerifier(getCertificateVerifier(curveType)) + .isReferenceTimestampSet(operatorSet, referenceTimestamp)) { return; } @@ -171,11 +162,9 @@ contract OperatorTableUpdater is } } - /** - * - * SETTERS - * - */ + /// + /// SETTERS + /// /// @inheritdoc IOperatorTableUpdater function setGlobalRootConfirmationThreshold( @@ -206,11 +195,9 @@ contract OperatorTableUpdater is _updateGenerator(generator, generatorInfo); } - /** - * - * GETTERS - * - */ + /// + /// GETTERS + /// /// @inheritdoc IOperatorTableUpdater function getGlobalTableRootByTimestamp( @@ -311,20 +298,16 @@ contract OperatorTableUpdater is return bn254CertificateVerifier.calculateCertificateDigest(GENERATOR_REFERENCE_TIMESTAMP, messageHash); } - /** - * - * INTERNAL HELPERS - * - */ - - /** - * @notice Verifies that the operator table update is valid by checking the `proof` against a `globalTableRoot` - * @param globalTableRoot The global table root of the operator table update - * @param operatorSetIndex The index of the operator set in the operator table - * @param proof The proof of the operator table update - * @param operatorSetLeafHash The leaf hash of the operator set - * @dev Reverts if there does not exist a `globalTableRoot` for the given `referenceTimestamp` - */ + /// + /// INTERNAL HELPERS + /// + + /// @notice Verifies that the operator table update is valid by checking the `proof` against a `globalTableRoot` + /// @param globalTableRoot The global table root of the operator table update + /// @param operatorSetIndex The index of the operator set in the operator table + /// @param proof The proof of the operator table update + /// @param operatorSetLeafHash The leaf hash of the operator set + /// @dev Reverts if there does not exist a `globalTableRoot` for the given `referenceTimestamp` function _verifyMerkleInclusion( bytes32 globalTableRoot, uint32 operatorSetIndex, @@ -343,10 +326,8 @@ contract OperatorTableUpdater is ); } - /** - * @notice Sets the global root confirmation threshold - * @param bps The threshold, in bps, for a global root to be signed off on and updated - */ + /// @notice Sets the global root confirmation threshold + /// @param bps The threshold, in bps, for a global root to be signed off on and updated function _setGlobalRootConfirmationThreshold( uint16 bps ) internal { @@ -355,19 +336,20 @@ contract OperatorTableUpdater is emit GlobalRootConfirmationThresholdUpdated(bps); } - /** - * @notice Updates the `Generator` to a new operatorSet - * @param generator The operatorSet which certifies against global roots - * @param generatorInfo The operatorSetInfo for the generator - * @dev We have a separate function for updating this operatorSet since it's not transported and updated - * in the same way as the other operatorSets - * @dev Only callable by the owner of the contract - * @dev Uses GENERATOR_GLOBAL_TABLE_ROOT constant to break circular dependency for certificate verification - * @dev We ensure that there are no collisions with other reference timestamps because we expect the generator to have an initial reference timestamp of 0 - * @dev The `_latestReferenceTimestamp` is not updated since this root is ONLY used for the `Generator` - * @dev The `_referenceBlockNumber` and `_referenceTimestamps` mappings are not updated since they are only used for introspection for official operatorSets - */ - function _updateGenerator(OperatorSet calldata generator, BN254OperatorSetInfo calldata generatorInfo) internal { + /// @notice Updates the `Generator` to a new operatorSet + /// @param generator The operatorSet which certifies against global roots + /// @param generatorInfo The operatorSetInfo for the generator + /// @dev We have a separate function for updating this operatorSet since it's not transported and updated + /// in the same way as the other operatorSets + /// @dev Only callable by the owner of the contract + /// @dev Uses GENERATOR_GLOBAL_TABLE_ROOT constant to break circular dependency for certificate verification + /// @dev We ensure that there are no collisions with other reference timestamps because we expect the generator to have an initial reference timestamp of 0 + /// @dev The `_latestReferenceTimestamp` is not updated since this root is ONLY used for the `Generator` + /// @dev The `_referenceBlockNumber` and `_referenceTimestamps` mappings are not updated since they are only used for introspection for official operatorSets + function _updateGenerator( + OperatorSet calldata generator, + BN254OperatorSetInfo calldata generatorInfo + ) internal { // Set the generator _generator = generator; @@ -383,14 +365,12 @@ contract OperatorTableUpdater is emit GeneratorUpdated(generator); } - /** - * @notice Gets the operator table info from a bytes array - * @param operatorTable The bytes containing the operator table - * @return operatorSet The operator set - * @return curveType The curve type - * @return operatorSetInfo The operator set info - * @return operatorTableInfo The operator table info. This is encoded as a bytes array, and its value is dependent on the curve type, see `_getBN254OperatorInfo` and `_getECDSAOperatorInfo` - */ + /// @notice Gets the operator table info from a bytes array + /// @param operatorTable The bytes containing the operator table + /// @return operatorSet The operator set + /// @return curveType The curve type + /// @return operatorSetInfo The operator set info + /// @return operatorTableInfo The operator table info. This is encoded as a bytes array, and its value is dependent on the curve type, see `_getBN254OperatorInfo` and `_getECDSAOperatorInfo` function _decodeOperatorTableBytes( bytes calldata operatorTable ) @@ -407,22 +387,18 @@ contract OperatorTableUpdater is abi.decode(operatorTable, (OperatorSet, CurveType, OperatorSetConfig, bytes)); } - /** - * @notice Gets the BN254 operator set info from a bytes array - * @param BN254OperatorSetInfoBytes The bytes containing the operator set info - * @return operatorSetInfo The BN254 operator set info - */ + /// @notice Gets the BN254 operator set info from a bytes array + /// @param BN254OperatorSetInfoBytes The bytes containing the operator set info + /// @return operatorSetInfo The BN254 operator set info function _getBN254OperatorInfo( bytes memory BN254OperatorSetInfoBytes ) internal pure returns (BN254OperatorSetInfo memory) { return abi.decode(BN254OperatorSetInfoBytes, (BN254OperatorSetInfo)); } - /** - * @notice Gets the ECDSA operator set info from a bytes array - * @param ECDSAOperatorInfoBytes The bytes containing the operator table info - * @return operatorSetInfo The ECDSA operator set info - */ + /// @notice Gets the ECDSA operator set info from a bytes array + /// @param ECDSAOperatorInfoBytes The bytes containing the operator table info + /// @return operatorSetInfo The ECDSA operator set info function _getECDSAOperatorInfo( bytes memory ECDSAOperatorInfoBytes ) internal pure returns (ECDSAOperatorInfo[] memory) { diff --git a/src/contracts/multichain/OperatorTableUpdaterStorage.sol b/src/contracts/multichain/OperatorTableUpdaterStorage.sol index 1904d488f5..9879358dc8 100644 --- a/src/contracts/multichain/OperatorTableUpdaterStorage.sol +++ b/src/contracts/multichain/OperatorTableUpdaterStorage.sol @@ -77,10 +77,8 @@ abstract contract OperatorTableUpdaterStorage is IOperatorTableUpdater { ecdsaCertificateVerifier = _ecdsaCertificateVerifier; } - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[43] private __gap; } diff --git a/src/contracts/permissions/KeyRegistrar.sol b/src/contracts/permissions/KeyRegistrar.sol index b0ea22c409..f7d11bca66 100644 --- a/src/contracts/permissions/KeyRegistrar.sol +++ b/src/contracts/permissions/KeyRegistrar.sol @@ -12,14 +12,12 @@ import "../interfaces/IKeyRegistrar.sol"; import "../libraries/OperatorSetLib.sol"; import "./KeyRegistrarStorage.sol"; -/** - * @title KeyRegistrar - * @notice A core singleton contract that manages operator keys for different AVSs with global key uniqueness - * @dev Provides registration and deregistration of keys with support for aggregate keys - * Keys must be unique globally across all AVSs and operator sets - * Operators call functions directly to manage their own keys - * Aggregate keys are updated via callback from AVSRegistrar on registration and deregistration - */ +/// @title KeyRegistrar +/// @notice A core singleton contract that manages operator keys for different AVSs with global key uniqueness +/// @dev Provides registration and deregistration of keys with support for aggregate keys +/// Keys must be unique globally across all AVSs and operator sets +/// Operators call functions directly to manage their own keys +/// Aggregate keys are updated via callback from AVSRegistrar on registration and deregistration contract KeyRegistrar is KeyRegistrarStorage, PermissionControllerMixin, SignatureUtilsMixin { using BN254 for BN254.G1Point; @@ -30,12 +28,10 @@ contract KeyRegistrar is KeyRegistrarStorage, PermissionControllerMixin, Signatu bytes32 public constant BN254_KEY_REGISTRATION_TYPEHASH = keccak256("BN254KeyRegistration(address operator,address avs,uint32 operatorSetId,bytes keyData)"); - /** - * @dev Constructor for the KeyRegistrar contract - * @param _permissionController The permission controller contract - * @param _allocationManager The allocation manager contract - * @param _version The version string for the contract - */ + /// @dev Constructor for the KeyRegistrar contract + /// @param _permissionController The permission controller contract + /// @param _allocationManager The allocation manager contract + /// @param _version The version string for the contract constructor( IPermissionController _permissionController, IAllocationManager _allocationManager, @@ -101,7 +97,10 @@ contract KeyRegistrar is KeyRegistrarStorage, PermissionControllerMixin, Signatu } /// @inheritdoc IKeyRegistrar - function deregisterKey(address operator, OperatorSet memory operatorSet) external checkCanCall(operator) { + function deregisterKey( + address operator, + OperatorSet memory operatorSet + ) external checkCanCall(operator) { // Operators can only deregister if they are not slashable for this operator set require( !allocationManager.isOperatorSlashable(operator, operatorSet), OperatorStillSlashable(operatorSet, operator) @@ -171,25 +170,21 @@ contract KeyRegistrar is KeyRegistrarStorage, PermissionControllerMixin, Signatu _setMinRotationDelay(operatorSet, minDelaySeconds); } - /** - * - * INTERNAL FUNCTIONS - * - */ - - /** - * @notice Validate a key + signature and atomically reserve the canonical key hash. - * @dev For ECDSA, enforces 20-byte address format and verifies an EIP-712 signature - * from the key address. For BN254, enforces the 192-byte encoding and verifies a - * pairing-based signature over the EIP-712 digest. Then enforces global uniqueness - * by marking the key hash as used and mapping it to the operator. - * @param operatorSet Operator set context bound into the signed message - * @param operator Operator address bound into the signed message - * @param keyData Raw key bytes (20 bytes for ECDSA or 192 bytes for BN254) - * @param signature Signature proving control of the key - * @param curveType The curve to use for validation - * @return keyHash Canonical key hash that is now reserved globally - */ + /// + /// INTERNAL FUNCTIONS + /// + + /// @notice Validate a key + signature and atomically reserve the canonical key hash. + /// @dev For ECDSA, enforces 20-byte address format and verifies an EIP-712 signature + /// from the key address. For BN254, enforces the 192-byte encoding and verifies a + /// pairing-based signature over the EIP-712 digest. Then enforces global uniqueness + /// by marking the key hash as used and mapping it to the operator. + /// @param operatorSet Operator set context bound into the signed message + /// @param operator Operator address bound into the signed message + /// @param keyData Raw key bytes (20 bytes for ECDSA or 192 bytes for BN254) + /// @param signature Signature proving control of the key + /// @param curveType The curve to use for validation + /// @return keyHash Canonical key hash that is now reserved globally function _validateAndReserveKey( OperatorSet memory operatorSet, address operator, @@ -213,7 +208,10 @@ contract KeyRegistrar is KeyRegistrarStorage, PermissionControllerMixin, Signatu } /// @notice If a scheduled rotation has passed activation, collapse storage to the new current key - function _finalizeRotationIfActive(OperatorSet memory operatorSet, address operator) internal returns (bool) { + function _finalizeRotationIfActive( + OperatorSet memory operatorSet, + address operator + ) internal returns (bool) { KeyInfo storage keyInfoStorage = _operatorKeyInfo[operatorSet.key()][operator]; if (!keyInfoStorage.isRegistered) return false; if (keyInfoStorage.pendingActivateAt != 0 && block.timestamp >= keyInfoStorage.pendingActivateAt) { @@ -225,17 +223,15 @@ contract KeyRegistrar is KeyRegistrarStorage, PermissionControllerMixin, Signatu return false; } - /** - * @notice Validate an ECDSA key and signature and return its key hash. - * @dev Ensures `keyData` is a 20-byte non-zero address, derives the EIP-712 - * digest with `operatorSet` and `operator`, and verifies the signature - * from the key address. View-only; does not mutate state. - * @param operatorSet Operator set context bound into the signed message - * @param operator Operator address bound into the signed message - * @param keyData Raw ECDSA key bytes (20-byte address encoded as bytes) - * @param signature Signature produced by the key address over the EIP-712 digest - * @return keyHash Key hash for global uniqueness tracking - */ + /// @notice Validate an ECDSA key and signature and return its key hash. + /// @dev Ensures `keyData` is a 20-byte non-zero address, derives the EIP-712 + /// digest with `operatorSet` and `operator`, and verifies the signature + /// from the key address. View-only; does not mutate state. + /// @param operatorSet Operator set context bound into the signed message + /// @param operator Operator address bound into the signed message + /// @param keyData Raw ECDSA key bytes (20-byte address encoded as bytes) + /// @param signature Signature produced by the key address over the EIP-712 digest + /// @return keyHash Key hash for global uniqueness tracking function _validateECDSAKey( OperatorSet memory operatorSet, address operator, @@ -254,18 +250,16 @@ contract KeyRegistrar is KeyRegistrarStorage, PermissionControllerMixin, Signatu return keyHash; } - /** - * @notice Validate a BN254 key and signature and return its key hash. - * @dev Ensures `keyData` encodes (g1X,g1Y,g2X[2],g2Y[2]) totaling 192 bytes and - * `signature` is 64 bytes encoding a G1 point, checks non-zero G1, computes - * the EIP-712 digest with `operatorSet` and `operator`, and verifies the - * pairing. View-only; does not mutate state. - * @param operatorSet Operator set context bound into the signed message - * @param operator Operator address bound into the signed message - * @param keyData Raw BN254 key bytes (G1 and G2 components) - * @param signature BN254 signature over the EIP-712 digest (G1 point: (sigX, sigY)) - * @return keyHash Key hash for global uniqueness tracking - */ + /// @notice Validate a BN254 key and signature and return its key hash. + /// @dev Ensures `keyData` encodes (g1X,g1Y,g2X[2],g2Y[2]) totaling 192 bytes and + /// `signature` is 64 bytes encoding a G1 point, checks non-zero G1, computes + /// the EIP-712 digest with `operatorSet` and `operator`, and verifies the + /// pairing. View-only; does not mutate state. + /// @param operatorSet Operator set context bound into the signed message + /// @param operator Operator address bound into the signed message + /// @param keyData Raw BN254 key bytes (G1 and G2 components) + /// @param signature BN254 signature over the EIP-712 digest (G1 point: (sigX, sigY)) + /// @return keyHash Key hash for global uniqueness tracking function _validateBN254Key( OperatorSet memory operatorSet, address operator, @@ -296,13 +290,14 @@ contract KeyRegistrar is KeyRegistrarStorage, PermissionControllerMixin, Signatu return _getKeyHashForKeyData(keyData, CurveType.BN254); } - /** - * @notice Gets the key hash for pubkey data using consistent hashing - * @param pubkey The public key data - * @param curveType The curve type (ECDSA or BN254) - * @return keyHash The key hash - */ - function _getKeyHashForKeyData(bytes memory pubkey, CurveType curveType) internal pure returns (bytes32) { + /// @notice Gets the key hash for pubkey data using consistent hashing + /// @param pubkey The public key data + /// @param curveType The curve type (ECDSA or BN254) + /// @return keyHash The key hash + function _getKeyHashForKeyData( + bytes memory pubkey, + CurveType curveType + ) internal pure returns (bytes32) { if (curveType == CurveType.ECDSA) { return keccak256(pubkey); } else if (curveType == CurveType.BN254) { @@ -316,19 +311,23 @@ contract KeyRegistrar is KeyRegistrarStorage, PermissionControllerMixin, Signatu /// @dev Internal helper to set and emit the minimum key rotation delay for an operator set /// @param operatorSet The operator set being configured /// @param minDelaySeconds The minimum rotation delay in seconds - function _setMinRotationDelay(OperatorSet memory operatorSet, uint64 minDelaySeconds) internal { + function _setMinRotationDelay( + OperatorSet memory operatorSet, + uint64 minDelaySeconds + ) internal { _minRotationDelayByOperatorSet[operatorSet.key()] = minDelaySeconds; emit MinKeyRotationDelaySet(operatorSet, minDelaySeconds); } - /** - * - * VIEW FUNCTIONS - * - */ + /// + /// VIEW FUNCTIONS + /// /// @inheritdoc IKeyRegistrar - function isRegistered(OperatorSet memory operatorSet, address operator) public view returns (bool) { + function isRegistered( + OperatorSet memory operatorSet, + address operator + ) public view returns (bool) { return _operatorKeyInfo[operatorSet.key()][operator].isRegistered; } @@ -364,7 +363,10 @@ contract KeyRegistrar is KeyRegistrarStorage, PermissionControllerMixin, Signatu } /// @inheritdoc IKeyRegistrar - function getECDSAKey(OperatorSet memory operatorSet, address operator) public view returns (bytes memory) { + function getECDSAKey( + OperatorSet memory operatorSet, + address operator + ) public view returns (bytes memory) { // Validate operator set curve type CurveType curveType = _operatorSetCurveTypes[operatorSet.key()]; require(curveType == CurveType.ECDSA, InvalidCurveType()); @@ -377,7 +379,10 @@ contract KeyRegistrar is KeyRegistrarStorage, PermissionControllerMixin, Signatu } /// @inheritdoc IKeyRegistrar - function getECDSAAddress(OperatorSet memory operatorSet, address operator) external view returns (address) { + function getECDSAAddress( + OperatorSet memory operatorSet, + address operator + ) external view returns (address) { return address(bytes20(getECDSAKey(operatorSet, operator))); } @@ -389,7 +394,10 @@ contract KeyRegistrar is KeyRegistrarStorage, PermissionControllerMixin, Signatu } /// @inheritdoc IKeyRegistrar - function getKeyHash(OperatorSet memory operatorSet, address operator) external view returns (bytes32) { + function getKeyHash( + OperatorSet memory operatorSet, + address operator + ) external view returns (bytes32) { KeyInfo memory keyInfo = _operatorKeyInfo[operatorSet.key()][operator]; CurveType curveType = _operatorSetCurveTypes[operatorSet.key()]; @@ -424,13 +432,11 @@ contract KeyRegistrar is KeyRegistrarStorage, PermissionControllerMixin, Signatu return (operator, isRegistered(operatorSet, operator)); } - /** - * @notice Returns the active key based on current timestamp - * @dev Returns `pendingKey` if a rotation is scheduled and the activation time has passed. - * Otherwise returns `currentKey`. - * @param keyInfo The key information to check - * @return The active key bytes - */ + /// @notice Returns the active key based on current timestamp + /// @dev Returns `pendingKey` if a rotation is scheduled and the activation time has passed. + /// Otherwise returns `currentKey`. + /// @param keyInfo The key information to check + /// @return The active key bytes function _getActiveKey( KeyInfo memory keyInfo ) internal view returns (bytes memory) { diff --git a/src/contracts/permissions/KeyRegistrarStorage.sol b/src/contracts/permissions/KeyRegistrarStorage.sol index 6ac0bfa1a2..0f867b3a4d 100644 --- a/src/contracts/permissions/KeyRegistrarStorage.sol +++ b/src/contracts/permissions/KeyRegistrarStorage.sol @@ -35,10 +35,8 @@ abstract contract KeyRegistrarStorage is IKeyRegistrar { allocationManager = _allocationManager; } - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[45] private __gap; } diff --git a/src/contracts/permissions/Pausable.sol b/src/contracts/permissions/Pausable.sol index 1701cd3d64..98436c1c27 100644 --- a/src/contracts/permissions/Pausable.sol +++ b/src/contracts/permissions/Pausable.sol @@ -3,25 +3,22 @@ pragma solidity ^0.8.27; import "../interfaces/IPausable.sol"; -/** - * @title Adds pausability to a contract, with pausing & unpausing controlled by the `pauser` and `unpauser` of a PauserRegistry contract. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice Contracts that inherit from this contract may define their own `pause` and `unpause` (and/or related) functions. - * These functions should be permissioned as "onlyPauser" which defers to a `PauserRegistry` for determining access control. - * @dev Pausability is implemented using a uint256, which allows up to 256 different single bit-flags; each bit can potentially pause different functionality. - * Inspiration for this was taken from the NearBridge design here https://etherscan.io/address/0x3FEFc5A4B1c02f21cBc8D3613643ba0635b9a873#code. - * For the `pause` and `unpause` functions we've implemented, if you pause, you can only flip (any number of) switches to on/1 (aka "paused"), and if you unpause, - * you can only flip (any number of) switches to off/0 (aka "paused"). - * If you want a pauseXYZ function that just flips a single bit / "pausing flag", it will: - * 1) 'bit-wise and' (aka `&`) a flag with the current paused state (as a uint256) - * 2) update the paused state to this new value - * @dev We note as well that we have chosen to identify flags by their *bit index* as opposed to their numerical value, so, e.g. defining `DEPOSITS_PAUSED = 3` - * indicates specifically that if the *third bit* of `_paused` is flipped -- i.e. it is a '1' -- then deposits should be paused - */ +/// @title Adds pausability to a contract, with pausing & unpausing controlled by the `pauser` and `unpauser` of a PauserRegistry contract. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice Contracts that inherit from this contract may define their own `pause` and `unpause` (and/or related) functions. +/// These functions should be permissioned as "onlyPauser" which defers to a `PauserRegistry` for determining access control. +/// @dev Pausability is implemented using a uint256, which allows up to 256 different single bit-flags; each bit can potentially pause different functionality. +/// Inspiration for this was taken from the NearBridge design here https://etherscan.io/address/0x3FEFc5A4B1c02f21cBc8D3613643ba0635b9a873#code. +/// For the `pause` and `unpause` functions we've implemented, if you pause, you can only flip (any number of) switches to on/1 (aka "paused"), and if you unpause, +/// you can only flip (any number of) switches to off/0 (aka "paused"). +/// If you want a pauseXYZ function that just flips a single bit / "pausing flag", it will: +/// 1) 'bit-wise and' (aka `&`) a flag with the current paused state (as a uint256) +/// 2) update the paused state to this new value +/// @dev We note as well that we have chosen to identify flags by their *bit index* as opposed to their numerical value, so, e.g. defining `DEPOSITS_PAUSED = 3` +/// indicates specifically that if the *third bit* of `_paused` is flipped -- i.e. it is a '1' -- then deposits should be paused abstract contract Pausable is IPausable { /// Constants - uint256 internal constant _UNPAUSE_ALL = 0; uint256 internal constant _PAUSE_ALL = type(uint256).max; @@ -139,10 +136,8 @@ abstract contract Pausable is IPausable { emit Paused(msg.sender, pausedStatus); } - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[48] private __gap; } diff --git a/src/contracts/permissions/PauserRegistry.sol b/src/contracts/permissions/PauserRegistry.sol index cc86944aff..2d60c133f1 100644 --- a/src/contracts/permissions/PauserRegistry.sol +++ b/src/contracts/permissions/PauserRegistry.sol @@ -3,11 +3,9 @@ pragma solidity ^0.8.27; import "../interfaces/IPauserRegistry.sol"; -/** - * @title Defines pauser & unpauser roles + modifiers to be used elsewhere. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - */ +/// @title Defines pauser & unpauser roles + modifiers to be used elsewhere. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service contract PauserRegistry is IPauserRegistry { /// @notice Mapping of addresses to whether they hold the pauser role. mapping(address => bool) public isPauser; @@ -20,7 +18,10 @@ contract PauserRegistry is IPauserRegistry { _; } - constructor(address[] memory _pausers, address _unpauser) { + constructor( + address[] memory _pausers, + address _unpauser + ) { for (uint256 i = 0; i < _pausers.length; i++) { _setIsPauser(_pausers[i], true); } @@ -30,7 +31,10 @@ contract PauserRegistry is IPauserRegistry { /// @notice Sets new pauser - only callable by unpauser, as the unpauser is expected to be kept more secure, e.g. being a multisig with a higher threshold /// @param newPauser Address to be added/removed as pauser /// @param canPause Whether the address should be added or removed as pauser - function setIsPauser(address newPauser, bool canPause) external onlyUnpauser { + function setIsPauser( + address newPauser, + bool canPause + ) external onlyUnpauser { _setIsPauser(newPauser, canPause); } @@ -41,7 +45,10 @@ contract PauserRegistry is IPauserRegistry { _setUnpauser(newUnpauser); } - function _setIsPauser(address pauser, bool canPause) internal { + function _setIsPauser( + address pauser, + bool canPause + ) internal { require(pauser != address(0), InputAddressZero()); isPauser[pauser] = canPause; emit PauserStatusChanged(pauser, canPause); diff --git a/src/contracts/permissions/PermissionController.sol b/src/contracts/permissions/PermissionController.sol index 46bdea5bde..bfc81fe624 100644 --- a/src/contracts/permissions/PermissionController.sol +++ b/src/contracts/permissions/PermissionController.sol @@ -14,23 +14,22 @@ contract PermissionController is Initializable, PermissionControllerStorage { _; } - /** - * - * INITIALIZING FUNCTIONS - * - */ + /// + /// INITIALIZING FUNCTIONS + /// constructor() { _disableInitializers(); } - /** - * - * EXTERNAL FUNCTIONS - * - */ + /// + /// EXTERNAL FUNCTIONS + /// /// @inheritdoc IPermissionController - function addPendingAdmin(address account, address admin) external onlyAdmin(account) { + function addPendingAdmin( + address account, + address admin + ) external onlyAdmin(account) { AccountPermissions storage permissions = _permissions[account]; // Revert if the admin is already set @@ -44,7 +43,10 @@ contract PermissionController is Initializable, PermissionControllerStorage { } /// @inheritdoc IPermissionController - function removePendingAdmin(address account, address admin) external onlyAdmin(account) { + function removePendingAdmin( + address account, + address admin + ) external onlyAdmin(account) { EnumerableSet.AddressSet storage pendingAdmins = _permissions[account].pendingAdmins; // Remove the admin from the account's pending admins @@ -72,7 +74,10 @@ contract PermissionController is Initializable, PermissionControllerStorage { } /// @inheritdoc IPermissionController - function removeAdmin(address account, address admin) external onlyAdmin(account) { + function removeAdmin( + address account, + address admin + ) external onlyAdmin(account) { EnumerableSet.AddressSet storage admins = _permissions[account].admins; require(admins.length() > 1, CannotHaveZeroAdmins()); @@ -122,15 +127,16 @@ contract PermissionController is Initializable, PermissionControllerStorage { emit AppointeeRemoved(account, appointee, target, selector); } - /** - * - * INTERNAL FUNCTIONS - * - */ + /// + /// INTERNAL FUNCTIONS + /// /// @dev Encodes the target and selector into a single bytes32 values /// @dev Encoded Format: [160 bits target][32 bits selector][64 bits padding], - function _encodeTargetSelector(address target, bytes4 selector) internal pure returns (bytes32) { + function _encodeTargetSelector( + address target, + bytes4 selector + ) internal pure returns (bytes32) { // Reserve 96 bits for the target uint256 shiftedTarget = uint256(uint160(target)) << 96; // Reserve 32 bits for the selector @@ -152,14 +158,15 @@ contract PermissionController is Initializable, PermissionControllerStorage { return (target, selector); } - /** - * - * VIEW FUNCTIONS - * - */ + /// + /// VIEW FUNCTIONS + /// /// @inheritdoc IPermissionController - function isAdmin(address account, address caller) public view returns (bool) { + function isAdmin( + address account, + address caller + ) public view returns (bool) { if (_permissions[account].admins.length() == 0) { // If the account does not have an admin, the caller must be the account return account == caller; @@ -170,7 +177,10 @@ contract PermissionController is Initializable, PermissionControllerStorage { } /// @inheritdoc IPermissionController - function isPendingAdmin(address account, address pendingAdmin) external view returns (bool) { + function isPendingAdmin( + address account, + address pendingAdmin + ) external view returns (bool) { return _permissions[account].pendingAdmins.contains(pendingAdmin); } @@ -195,7 +205,12 @@ contract PermissionController is Initializable, PermissionControllerStorage { } /// @inheritdoc IPermissionController - function canCall(address account, address caller, address target, bytes4 selector) external view returns (bool) { + function canCall( + address account, + address caller, + address target, + bytes4 selector + ) external view returns (bool) { return isAdmin(account, caller) || _permissions[account].appointeePermissions[caller].contains(_encodeTargetSelector(target, selector)); } @@ -220,7 +235,11 @@ contract PermissionController is Initializable, PermissionControllerStorage { } /// @inheritdoc IPermissionController - function getAppointees(address account, address target, bytes4 selector) external view returns (address[] memory) { + function getAppointees( + address account, + address target, + bytes4 selector + ) external view returns (address[] memory) { bytes32 targetSelector = _encodeTargetSelector(target, selector); return _permissions[account].permissionAppointees[targetSelector].values(); } diff --git a/src/contracts/permissions/PermissionControllerStorage.sol b/src/contracts/permissions/PermissionControllerStorage.sol index 771987c785..a96750205d 100644 --- a/src/contracts/permissions/PermissionControllerStorage.sol +++ b/src/contracts/permissions/PermissionControllerStorage.sol @@ -23,10 +23,8 @@ abstract contract PermissionControllerStorage is IPermissionController { /// @notice Mapping from an account to its permission mapping(address account => AccountPermissions) internal _permissions; - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[49] private __gap; } diff --git a/src/contracts/pods/EigenPod.sol b/src/contracts/pods/EigenPod.sol index 626342ddf9..6178c3ce15 100644 --- a/src/contracts/pods/EigenPod.sol +++ b/src/contracts/pods/EigenPod.sol @@ -14,23 +14,19 @@ import "../interfaces/IPausable.sol"; import "./EigenPodPausingConstants.sol"; import "./EigenPodStorage.sol"; -/** - * @title The implementation contract used for restaking beacon chain ETH on EigenLayer - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice This EigenPod Beacon Proxy implementation adheres to the current Deneb consensus specs - * @dev Note that all beacon chain balances are stored as gwei within the beacon chain datastructures. We choose - * to account balances in terms of gwei in the EigenPod contract and convert to wei when making calls to other contracts - */ +/// @title The implementation contract used for restaking beacon chain ETH on EigenLayer +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice This EigenPod Beacon Proxy implementation adheres to the current Deneb consensus specs +/// @dev Note that all beacon chain balances are stored as gwei within the beacon chain datastructures. We choose +/// to account balances in terms of gwei in the EigenPod contract and convert to wei when making calls to other contracts contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingConstants, EigenPodStorage { using SafeERC20 for IERC20; using BeaconChainProofs for *; - /** - * - * CONSTANTS / IMMUTABLES - * - */ + /// + /// CONSTANTS / IMMUTABLES + /// /// @notice The beacon chain stores balances in Gwei, rather than wei. This value is used to convert between the two uint256 internal constant GWEI_TO_WEI = 1e9; @@ -56,11 +52,9 @@ contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingC /// @notice The single EigenPodManager for EigenLayer IEigenPodManager public immutable eigenPodManager; - /** - * - * MODIFIERS - * - */ + /// + /// MODIFIERS + /// /// @notice Callable only by the EigenPodManager modifier onlyEigenPodManager() { @@ -80,11 +74,9 @@ contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingC _; } - /** - * @notice Based on 'Pausable' code, but uses the storage of the EigenPodManager instead of this contract. This construction - * is necessary for enabling pausing all EigenPods at the same time (due to EigenPods being Beacon Proxies). - * Modifier throws if the `indexed`th bit of `_paused` in the EigenPodManager is 1, i.e. if the `index`th pause switch is flipped. - */ + /// @notice Based on 'Pausable' code, but uses the storage of the EigenPodManager instead of this contract. This construction + /// is necessary for enabling pausing all EigenPods at the same time (due to EigenPods being Beacon Proxies). + /// Modifier throws if the `indexed`th bit of `_paused` in the EigenPodManager is 1, i.e. if the `index`th pause switch is flipped. modifier onlyWhenNotPaused( uint8 index ) { @@ -92,12 +84,13 @@ contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingC _; } - /** - * - * CONSTRUCTOR / INIT - * - */ - constructor(IETHPOSDeposit _ethPOS, IEigenPodManager _eigenPodManager) { + /// + /// CONSTRUCTOR / INIT + /// + constructor( + IETHPOSDeposit _ethPOS, + IEigenPodManager _eigenPodManager + ) { ethPOS = _ethPOS; eigenPodManager = _eigenPodManager; _disableInitializers(); @@ -111,11 +104,9 @@ contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingC podOwner = _podOwner; } - /** - * - * EXTERNAL METHODS - * - */ + /// + /// EXTERNAL METHODS + /// /// @notice payable fallback function used to receive ETH sent directly to the pod receive() external payable { @@ -396,7 +387,10 @@ contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingC } /// @inheritdoc IEigenPod - function withdrawRestakedBeaconChainETH(address recipient, uint256 amountWei) external onlyEigenPodManager { + function withdrawRestakedBeaconChainETH( + address recipient, + uint256 amountWei + ) external onlyEigenPodManager { uint64 amountGwei = uint64(amountWei / GWEI_TO_WEI); amountWei = amountGwei * GWEI_TO_WEI; require(amountGwei <= restakedExecutionLayerGwei, InsufficientWithdrawableBalance()); @@ -406,18 +400,14 @@ contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingC Address.sendValue(payable(recipient), amountWei); } - /** - * - * INTERNAL FUNCTIONS - * - */ + /// + /// INTERNAL FUNCTIONS + /// - /** - * @notice internal function that proves an individual validator's withdrawal credentials - * @param validatorIndex is the index of the validator being proven - * @param validatorFieldsProof is the bytes that prove the ETH validator's withdrawal credentials against a beacon chain state root - * @param validatorFields are the fields of the "Validator Container", refer to consensus specs - */ + /// @notice internal function that proves an individual validator's withdrawal credentials + /// @param validatorIndex is the index of the validator being proven + /// @param validatorFieldsProof is the bytes that prove the ETH validator's withdrawal credentials against a beacon chain state root + /// @param validatorFields are the fields of the "Validator Container", refer to consensus specs function _verifyWithdrawalCredentials( uint64 beaconTimestamp, bytes32 beaconStateRoot, @@ -556,19 +546,17 @@ contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingC return (prevBalanceGwei, balanceDeltaGwei, exitedBalanceGwei); } - /** - * @dev Initiate a checkpoint proof by snapshotting both the pod's ETH balance and the - * current block's parent block root. After providing a checkpoint proof for each of the - * pod's ACTIVE validators, the pod's ETH balance is awarded shares and can be withdrawn. - * @dev ACTIVE validators are validators with verified withdrawal credentials (See - * `verifyWithdrawalCredentials` for details) - * @dev If the pod does not have any ACTIVE validators, the checkpoint is automatically - * finalized. - * @dev Once started, a checkpoint MUST be completed! It is not possible to start a - * checkpoint if the existing one is incomplete. - * @param revertIfNoBalance If the available ETH balance for checkpointing is 0 and this is - * true, this method will revert - */ + /// @dev Initiate a checkpoint proof by snapshotting both the pod's ETH balance and the + /// current block's parent block root. After providing a checkpoint proof for each of the + /// pod's ACTIVE validators, the pod's ETH balance is awarded shares and can be withdrawn. + /// @dev ACTIVE validators are validators with verified withdrawal credentials (See + /// `verifyWithdrawalCredentials` for details) + /// @dev If the pod does not have any ACTIVE validators, the checkpoint is automatically + /// finalized. + /// @dev Once started, a checkpoint MUST be completed! It is not possible to start a + /// checkpoint if the existing one is incomplete. + /// @param revertIfNoBalance If the available ETH balance for checkpointing is 0 and this is + /// true, this method will revert function _startCheckpoint( bool revertIfNoBalance ) internal { @@ -616,14 +604,12 @@ contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingC emit CheckpointCreated(uint64(block.timestamp), checkpoint.beaconBlockRoot, checkpoint.proofsRemaining); } - /** - * @dev Finish progress on a checkpoint and store it in state. - * @dev If the checkpoint has no proofs remaining, it is finalized: - * - a share delta is calculated and sent to the `EigenPodManager` - * - the checkpointed `podBalanceGwei` is added to `restakedExecutionLayerGwei` - * - `lastCheckpointTimestamp` is updated - * - `currentCheckpointTimestamp` is set to zero - */ + /// @dev Finish progress on a checkpoint and store it in state. + /// @dev If the checkpoint has no proofs remaining, it is finalized: + /// - a share delta is calculated and sent to the `EigenPodManager` + /// - the checkpointed `podBalanceGwei` is added to `restakedExecutionLayerGwei` + /// - `lastCheckpointTimestamp` is updated + /// - `currentCheckpointTimestamp` is set to zero function _updateCheckpoint( Checkpoint memory checkpoint ) internal { @@ -697,16 +683,15 @@ contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingC /// We check if the proofTimestamp is <= pectraForkTimestamp because a `proofTimestamp` at the `pectraForkTimestamp` /// is considered to be Pre-Pectra given the EIP-4788 oracle returns the parent block. - return proofTimestamp <= forkTimestamp - ? BeaconChainProofs.ProofVersion.DENEB - : BeaconChainProofs.ProofVersion.PECTRA; + return + proofTimestamp <= forkTimestamp + ? BeaconChainProofs.ProofVersion.DENEB + : BeaconChainProofs.ProofVersion.PECTRA; } - /** - * - * VIEW FUNCTIONS - * - */ + /// + /// VIEW FUNCTIONS + /// /// @inheritdoc IEigenPod function withdrawableRestakedExecutionLayerGwei() external view returns (uint64) { diff --git a/src/contracts/pods/EigenPodManager.sol b/src/contracts/pods/EigenPodManager.sol index a021a06073..94d5892e5b 100644 --- a/src/contracts/pods/EigenPodManager.sol +++ b/src/contracts/pods/EigenPodManager.sol @@ -12,16 +12,14 @@ import "../permissions/Pausable.sol"; import "./EigenPodPausingConstants.sol"; import "./EigenPodManagerStorage.sol"; -/** - * @title The contract used for creating and managing EigenPods - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice The main functionalities are: - * - creating EigenPods - * - staking for new validators on EigenPods - * - keeping track of the restaked balances of all EigenPod owners - * - withdrawing eth when withdrawals are completed - */ +/// @title The contract used for creating and managing EigenPods +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice The main functionalities are: +/// - creating EigenPods +/// - staking for new validators on EigenPods +/// - keeping track of the restaked balances of all EigenPod owners +/// - withdrawing eth when withdrawals are completed contract EigenPodManager is Initializable, OwnableUpgradeable, @@ -60,7 +58,10 @@ contract EigenPodManager is _disableInitializers(); } - function initialize(address initialOwner, uint256 _initPausedStatus) external initializer { + function initialize( + address initialOwner, + uint256 _initPausedStatus + ) external initializer { _transferOwnership(initialOwner); _setPausedStatus(_initPausedStatus); } @@ -135,15 +136,13 @@ contract EigenPodManager is } } - /** - * @notice Used by the DelegationManager to remove a pod owner's deposit shares when they enter the withdrawal queue. - * Simply decreases the `podOwner`'s shares by `shares`, down to a minimum of zero. - * @dev This function reverts if it would result in `podOwnerDepositShares[podOwner]` being less than zero, i.e. it is forbidden for this function to - * result in the `podOwner` incurring a "share deficit". This behavior prevents a Staker from queuing a withdrawal which improperly removes excessive - * shares from the operator to whom the staker is delegated. - * @dev The delegation manager validates that the podOwner is not address(0) - * @return updatedShares the staker's deposit shares after decrement - */ + /// @notice Used by the DelegationManager to remove a pod owner's deposit shares when they enter the withdrawal queue. + /// Simply decreases the `podOwner`'s shares by `shares`, down to a minimum of zero. + /// @dev This function reverts if it would result in `podOwnerDepositShares[podOwner]` being less than zero, i.e. it is forbidden for this function to + /// result in the `podOwner` incurring a "share deficit". This behavior prevents a Staker from queuing a withdrawal which improperly removes excessive + /// shares from the operator to whom the staker is delegated. + /// @dev The delegation manager validates that the podOwner is not address(0) + /// @return updatedShares the staker's deposit shares after decrement function removeDepositShares( address staker, IStrategy strategy, @@ -158,13 +157,11 @@ contract EigenPodManager is return uint256(updatedShares); } - /** - * @notice Increases the `podOwner`'s shares by `shares`, paying off negative shares if needed. - * Used by the DelegationManager to award a pod owner shares on exiting the withdrawal queue - * @return existingDepositShares the pod owner's shares prior to any additions. Returns 0 if negative - * @return addedShares the number of shares added to the staker's balance above 0. This means that if, - * after shares are added, the staker's balance is non-positive, this will return 0. - */ + /// @notice Increases the `podOwner`'s shares by `shares`, paying off negative shares if needed. + /// Used by the DelegationManager to award a pod owner shares on exiting the withdrawal queue + /// @return existingDepositShares the pod owner's shares prior to any additions. Returns 0 if negative + /// @return addedShares the number of shares added to the staker's balance above 0. This means that if, + /// after shares are added, the staker's balance is non-positive, this will return 0. function addShares( address staker, IStrategy strategy, @@ -174,12 +171,10 @@ contract EigenPodManager is return _addShares(staker, shares); } - /** - * @notice Used by the DelegationManager to complete a withdrawal, sending tokens to the pod owner - * @dev Prioritizes decreasing the podOwner's share deficit, if they have one - * @dev This function assumes that `removeShares` has already been called by the delegationManager, hence why - * we do not need to update the podOwnerDepositShares if `currentpodOwnerDepositShares` is positive - */ + /// @notice Used by the DelegationManager to complete a withdrawal, sending tokens to the pod owner + /// @dev Prioritizes decreasing the podOwner's share deficit, if they have one + /// @dev This function assumes that `removeShares` has already been called by the delegationManager, hence why + /// we do not need to update the podOwnerDepositShares if `currentpodOwnerDepositShares` is positive function withdrawSharesAsTokens( address staker, IStrategy strategy, @@ -276,7 +271,10 @@ contract EigenPodManager is /// NOTE: if the staker ends with a non-positive balance, this returns (0, 0) /// @return prevDepositShares the shares the staker had before any were added /// @return addedShares the shares added to the staker's balance - function _addShares(address staker, uint256 shares) internal returns (uint256, uint256) { + function _addShares( + address staker, + uint256 shares + ) internal returns (uint256, uint256) { require(staker != address(0), InputAddressZero()); require(int256(shares) >= 0, SharesNegative()); @@ -352,7 +350,10 @@ contract EigenPodManager is /// @notice Returns the current shares of `user` in `strategy` /// @dev strategy must be beaconChainETHStrategy /// @dev returns 0 if the user has negative shares - function stakerDepositShares(address user, IStrategy strategy) public view returns (uint256 depositShares) { + function stakerDepositShares( + address user, + IStrategy strategy + ) public view returns (uint256 depositShares) { require(strategy == beaconChainETHStrategy, InvalidStrategy()); return podOwnerDepositShares[user] < 0 ? 0 : uint256(podOwnerDepositShares[user]); } diff --git a/src/contracts/pods/EigenPodManagerStorage.sol b/src/contracts/pods/EigenPodManagerStorage.sol index edfaeb9726..22106be6dc 100644 --- a/src/contracts/pods/EigenPodManagerStorage.sol +++ b/src/contracts/pods/EigenPodManagerStorage.sol @@ -11,12 +11,9 @@ import "../interfaces/IETHPOSDeposit.sol"; import "../interfaces/IEigenPod.sol"; abstract contract EigenPodManagerStorage is IEigenPodManager { - /** - * - * CONSTANTS / IMMUTABLES - * - */ - + /// + /// CONSTANTS / IMMUTABLES + /// /// @notice The ETH2 Deposit Contract IETHPOSDeposit public immutable ethPOS; @@ -26,11 +23,9 @@ abstract contract EigenPodManagerStorage is IEigenPodManager { /// @notice EigenLayer's DelegationManager contract IDelegationManager public immutable delegationManager; - /** - * @notice Stored code of type(BeaconProxy).creationCode - * @dev Maintained as a constant to solve an edge case - changes to OpenZeppelin's BeaconProxy code should not cause - * addresses of EigenPods that are pre-computed with Create2 to change, even upon upgrading this contract, changing compiler version, etc. - */ + /// @notice Stored code of type(BeaconProxy).creationCode + /// @dev Maintained as a constant to solve an edge case - changes to OpenZeppelin's BeaconProxy code should not cause + /// addresses of EigenPods that are pre-computed with Create2 to change, even upon upgrading this contract, changing compiler version, etc. bytes internal constant beaconProxyBytecode = hex"608060405260405161090e38038061090e83398101604081905261002291610460565b61002e82826000610035565b505061058a565b61003e83610100565b6040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a260008251118061007f5750805b156100fb576100f9836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e99190610520565b836102a360201b6100291760201c565b505b505050565b610113816102cf60201b6100551760201c565b6101725760405162461bcd60e51b815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e6044820152641d1c9858dd60da1b60648201526084015b60405180910390fd5b6101e6816001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d79190610520565b6102cf60201b6100551760201c565b61024b5760405162461bcd60e51b815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201526f1cc81b9bdd08184818dbdb9d1c9858dd60821b6064820152608401610169565b806102827fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5060001b6102de60201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606102c883836040518060600160405280602781526020016108e7602791396102e1565b9392505050565b6001600160a01b03163b151590565b90565b6060600080856001600160a01b0316856040516102fe919061053b565b600060405180830381855af49150503d8060008114610339576040519150601f19603f3d011682016040523d82523d6000602084013e61033e565b606091505b5090925090506103508683838761035a565b9695505050505050565b606083156103c65782516103bf576001600160a01b0385163b6103bf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610169565b50816103d0565b6103d083836103d8565b949350505050565b8151156103e85781518083602001fd5b8060405162461bcd60e51b81526004016101699190610557565b80516001600160a01b038116811461041957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561044f578181015183820152602001610437565b838111156100f95750506000910152565b6000806040838503121561047357600080fd5b61047c83610402565b60208401519092506001600160401b038082111561049957600080fd5b818501915085601f8301126104ad57600080fd5b8151818111156104bf576104bf61041e565b604051601f8201601f19908116603f011681019083821181831017156104e7576104e761041e565b8160405282815288602084870101111561050057600080fd5b610511836020830160208801610434565b80955050505050509250929050565b60006020828403121561053257600080fd5b6102c882610402565b6000825161054d818460208701610434565b9190910192915050565b6020815260008251806020840152610576816040850160208701610434565b601f01601f19169190910160400192915050565b61034e806105996000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b610100565b565b606061004e83836040518060600160405280602781526020016102f260279139610124565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546001600160a01b031690565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fb9190610249565b905090565b3660008037600080366000845af43d6000803e80801561011f573d6000f35b3d6000fd5b6060600080856001600160a01b03168560405161014191906102a2565b600060405180830381855af49150503d806000811461017c576040519150601f19603f3d011682016040523d82523d6000602084013e610181565b606091505b50915091506101928683838761019c565b9695505050505050565b6060831561020d578251610206576001600160a01b0385163b6102065760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b5081610217565b610217838361021f565b949350505050565b81511561022f5781518083602001fd5b8060405162461bcd60e51b81526004016101fd91906102be565b60006020828403121561025b57600080fd5b81516001600160a01b038116811461004e57600080fd5b60005b8381101561028d578181015183820152602001610275565b8381111561029c576000848401525b50505050565b600082516102b4818460208701610272565b9190910192915050565b60208152600082518060208401526102dd816040850160208701610272565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d51e81d3bc5ed20a26aeb05dce7e825c503b2061aa78628027300c8d65b9d89a64736f6c634300080c0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564"; @@ -40,11 +35,9 @@ abstract contract EigenPodManagerStorage is IEigenPodManager { /// @notice Canonical, virtual beacon chain ETH strategy IStrategy public constant beaconChainETHStrategy = IStrategy(0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0); - /** - * - * STATE VARIABLES - * - */ + /// + /// STATE VARIABLES + /// /// @notice [DEPRECATED] Previously used to query beacon block roots. We now use eip-4788 directly address internal __deprecated_beaconChainOracle; @@ -61,24 +54,22 @@ abstract contract EigenPodManagerStorage is IEigenPodManager { uint256 private __deprecated_maxPods; // BEGIN STORAGE VARIABLES ADDED AFTER MAINNET DEPLOYMENT -- DO NOT SUGGEST REORDERING TO CONVENTIONAL ORDER - /** - * @notice mapping from pod owner to the deposit shares they have in the virtual beacon chain ETH strategy - * - * @dev When an EigenPod registers a balance increase, deposit shares are increased. When registering a balance - * decrease, however, deposit shares are NOT decreased. Instead, the pod owner's beacon chain slashing factor - * is decreased proportional to the balance decrease. This impacts the number of shares that will be withdrawn - * when the deposit shares are queued for withdrawal in the DelegationManager. - * - * Note that prior to the slashing release, deposit shares were decreased when balance decreases occurred. - * In certain cases, a combination of queueing a withdrawal plus registering a balance decrease could result - * in a staker having negative deposit shares in this mapping. This negative value would be corrected when the - * staker completes a withdrawal (as tokens or as shares). - * - * With the slashing release, negative shares are no longer possible. However, a staker can still have negative - * shares if they met the conditions for them before the slashing release. If this is the case, that staker - * should complete any outstanding queued withdrawal in the DelegationManager ("as shares"). This will correct - * the negative share count and allow the staker to continue using their pod as normal. - */ + /// @notice mapping from pod owner to the deposit shares they have in the virtual beacon chain ETH strategy + /// + /// @dev When an EigenPod registers a balance increase, deposit shares are increased. When registering a balance + /// decrease, however, deposit shares are NOT decreased. Instead, the pod owner's beacon chain slashing factor + /// is decreased proportional to the balance decrease. This impacts the number of shares that will be withdrawn + /// when the deposit shares are queued for withdrawal in the DelegationManager. + /// + /// Note that prior to the slashing release, deposit shares were decreased when balance decreases occurred. + /// In certain cases, a combination of queueing a withdrawal plus registering a balance decrease could result + /// in a staker having negative deposit shares in this mapping. This negative value would be corrected when the + /// staker completes a withdrawal (as tokens or as shares). + /// + /// With the slashing release, negative shares are no longer possible. However, a staker can still have negative + /// shares if they met the conditions for them before the slashing release. If this is the case, that staker + /// should complete any outstanding queued withdrawal in the DelegationManager ("as shares"). This will correct + /// the negative share count and allow the staker to continue using their pod as normal. mapping(address podOwner => int256 shares) public podOwnerDepositShares; uint64 internal __deprecated_denebForkTimestamp; @@ -97,16 +88,18 @@ abstract contract EigenPodManagerStorage is IEigenPodManager { /// @notice The timestamp of the Pectra proof uint64 public pectraForkTimestamp; - constructor(IETHPOSDeposit _ethPOS, IBeacon _eigenPodBeacon, IDelegationManager _delegationManager) { + constructor( + IETHPOSDeposit _ethPOS, + IBeacon _eigenPodBeacon, + IDelegationManager _delegationManager + ) { ethPOS = _ethPOS; eigenPodBeacon = _eigenPodBeacon; delegationManager = _delegationManager; } - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[41] private __gap; } diff --git a/src/contracts/pods/EigenPodPausingConstants.sol b/src/contracts/pods/EigenPodPausingConstants.sol index afec0903a4..6d2bb2900c 100644 --- a/src/contracts/pods/EigenPodPausingConstants.sol +++ b/src/contracts/pods/EigenPodPausingConstants.sol @@ -1,11 +1,9 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; -/** - * @title Constants shared between 'EigenPod' and 'EigenPodManager' contracts. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - */ +/// @title Constants shared between 'EigenPod' and 'EigenPodManager' contracts. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service abstract contract EigenPodPausingConstants { /// @notice Index for flag that pauses creation of new EigenPods when set. See EigenPodManager code for details. uint8 internal constant PAUSED_NEW_EIGENPODS = 0; diff --git a/src/contracts/pods/EigenPodStorage.sol b/src/contracts/pods/EigenPodStorage.sol index 139e5197e8..6a768965c8 100644 --- a/src/contracts/pods/EigenPodStorage.sol +++ b/src/contracts/pods/EigenPodStorage.sol @@ -86,10 +86,8 @@ abstract contract EigenPodStorage is IEigenPod { /// @dev If this address is NOT set, only the podOwner can call `startCheckpoint` and `verifyWithdrawalCredentials` address public proofSubmitter; - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[35] private __gap; } diff --git a/src/contracts/strategies/EigenStrategy.sol b/src/contracts/strategies/EigenStrategy.sol index e8d47ac910..161ac39f55 100644 --- a/src/contracts/strategies/EigenStrategy.sol +++ b/src/contracts/strategies/EigenStrategy.sol @@ -8,31 +8,27 @@ import "../interfaces/IStrategyManager.sol"; import "../strategies/StrategyBase.sol"; import "../interfaces/IEigen.sol"; -/** - * @title Eigen Strategy implementation of `IStrategy` interface, designed to be inherited from by more complex strategies. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @dev Note that this EigenStrategy contract is designed to be compatible with both bEIGEN and EIGEN tokens. It functions exactly the same - * as the `StrategyBase` contract if bEIGEN were the underlying token, but also allows for depositing and withdrawing EIGEN tokens. This is - * achieved by unwrapping EIGEN into bEIGEN upon deposit, and wrapping bEIGEN into EIGEN upon withdrawal. Deposits and withdrawals with bEIGEN - * does not perform and wrapping or unwrapping. - * @notice This contract functions similarly to an ERC4626 vault, only without issuing a token. - * To mitigate against the common "inflation attack" vector, we have chosen to use the 'virtual shares' mitigation route, - * similar to [OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/ERC4626.sol). - * We acknowledge that this mitigation has the known downside of the virtual shares causing some losses to users, which are pronounced - * particularly in the case of the share exchange rate changing significantly, either positively or negatively. - * For a fairly thorough discussion of this issue and our chosen mitigation strategy, we recommend reading through - * [this thread](https://github.com/OpenZeppelin/openzeppelin-contracts/issues/3706) on the OpenZeppelin repo. - * We specifically use a share offset of `SHARES_OFFSET` and a balance offset of `BALANCE_OFFSET`. - */ +/// @title Eigen Strategy implementation of `IStrategy` interface, designed to be inherited from by more complex strategies. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @dev Note that this EigenStrategy contract is designed to be compatible with both bEIGEN and EIGEN tokens. It functions exactly the same +/// as the `StrategyBase` contract if bEIGEN were the underlying token, but also allows for depositing and withdrawing EIGEN tokens. This is +/// achieved by unwrapping EIGEN into bEIGEN upon deposit, and wrapping bEIGEN into EIGEN upon withdrawal. Deposits and withdrawals with bEIGEN +/// does not perform and wrapping or unwrapping. +/// @notice This contract functions similarly to an ERC4626 vault, only without issuing a token. +/// To mitigate against the common "inflation attack" vector, we have chosen to use the 'virtual shares' mitigation route, +/// similar to [OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/ERC4626.sol). +/// We acknowledge that this mitigation has the known downside of the virtual shares causing some losses to users, which are pronounced +/// particularly in the case of the share exchange rate changing significantly, either positively or negatively. +/// For a fairly thorough discussion of this issue and our chosen mitigation strategy, we recommend reading through +/// [this thread](https://github.com/OpenZeppelin/openzeppelin-contracts/issues/3706) on the OpenZeppelin repo. +/// We specifically use a share offset of `SHARES_OFFSET` and a balance offset of `BALANCE_OFFSET`. contract EigenStrategy is StrategyBase { using SafeERC20 for IERC20; - /** - * @notice EIGEN can be deposited into this strategy, where it is unwrapped into bEIGEN and staked in - * this strategy contract. EIGEN can also be withdrawn by withdrawing bEIGEN from this strategy, and - * then wrapping it back into EIGEN. - */ + /// @notice EIGEN can be deposited into this strategy, where it is unwrapped into bEIGEN and staked in + /// this strategy contract. EIGEN can also be withdrawn by withdrawing bEIGEN from this strategy, and + /// then wrapping it back into EIGEN. IEigen public EIGEN; /// @notice Since this contract is designed to be initializable, the constructor simply sets `strategyManager`, the only immutable variable. @@ -41,20 +37,24 @@ contract EigenStrategy is StrategyBase { IPauserRegistry _pauserRegistry ) StrategyBase(_strategyManager, _pauserRegistry) {} - function initialize(IEigen _EIGEN, IERC20 _bEIGEN) public virtual initializer { + function initialize( + IEigen _EIGEN, + IERC20 _bEIGEN + ) public virtual initializer { EIGEN = _EIGEN; _initializeStrategyBase(_bEIGEN); } - /** - * @notice This function hook is called in EigenStrategy.deposit() and is overridden here to - * allow for depositing of either EIGEN or bEIGEN tokens. If token is bEIGEN aka the underlyingToken, - * then the contract functions exactly the same as the StrategyBase contract and the deposit is calculated into shares. - * If token is EIGEN, then the EIGEN is first 1-1 unwrapped into bEIGEN and the deposit shares are calculated as normal. - * @param token token to be deposited, can be either EIGEN or bEIGEN. If EIGEN, then is unwrapped into bEIGEN - * @param amount deposit amount - */ - function _beforeDeposit(IERC20 token, uint256 amount) internal virtual override { + /// @notice This function hook is called in EigenStrategy.deposit() and is overridden here to + /// allow for depositing of either EIGEN or bEIGEN tokens. If token is bEIGEN aka the underlyingToken, + /// then the contract functions exactly the same as the StrategyBase contract and the deposit is calculated into shares. + /// If token is EIGEN, then the EIGEN is first 1-1 unwrapped into bEIGEN and the deposit shares are calculated as normal. + /// @param token token to be deposited, can be either EIGEN or bEIGEN. If EIGEN, then is unwrapped into bEIGEN + /// @param amount deposit amount + function _beforeDeposit( + IERC20 token, + uint256 amount + ) internal virtual override { require(token == underlyingToken || token == EIGEN, OnlyUnderlyingToken()); if (token == EIGEN) { @@ -64,12 +64,10 @@ contract EigenStrategy is StrategyBase { } } - /** - * @notice This function hook is called in EigenStrategy.withdraw() before withdrawn shares are calculated and is - * overridden here to allow for withdrawing shares either into EIGEN or bEIGEN tokens. If wrapping bEIGEN into EIGEN is needed, - * it is performed in _afterWithdrawal(). This hook just checks the token parameter is either EIGEN or bEIGEN. - * @param token token to be withdrawn, can be either EIGEN or bEIGEN. If EIGEN, then bEIGEN is wrapped into EIGEN - */ + /// @notice This function hook is called in EigenStrategy.withdraw() before withdrawn shares are calculated and is + /// overridden here to allow for withdrawing shares either into EIGEN or bEIGEN tokens. If wrapping bEIGEN into EIGEN is needed, + /// it is performed in _afterWithdrawal(). This hook just checks the token parameter is either EIGEN or bEIGEN. + /// @param token token to be withdrawn, can be either EIGEN or bEIGEN. If EIGEN, then bEIGEN is wrapped into EIGEN function _beforeWithdrawal( address, /*recipient*/ IERC20 token, @@ -78,16 +76,18 @@ contract EigenStrategy is StrategyBase { require(token == underlyingToken || token == EIGEN, OnlyUnderlyingToken()); } - /** - * @notice This function hook is called in EigenStrategy.withdraw() after withdrawn shares are calculated and is - * overridden here to allow for withdrawing shares either into EIGEN or bEIGEN tokens. If token is bEIGEN aka the underlyingToken, - * then the contract functions exactly the same as the StrategyBase contract and transfers out bEIGEN to the recipient. - * If token is EIGEN, then bEIGEN is first 1-1 wrapped into EIGEN and the strategy transfers out the EIGEN to the recipient. - * @param recipient recipient of the withdrawal - * @param token token to be withdrawn, can be either EIGEN or bEIGEN. If EIGEN, then bEIGEN is wrapped into EIGEN - * @param amountToSend amount of tokens to transfer - */ - function _afterWithdrawal(address recipient, IERC20 token, uint256 amountToSend) internal virtual override { + /// @notice This function hook is called in EigenStrategy.withdraw() after withdrawn shares are calculated and is + /// overridden here to allow for withdrawing shares either into EIGEN or bEIGEN tokens. If token is bEIGEN aka the underlyingToken, + /// then the contract functions exactly the same as the StrategyBase contract and transfers out bEIGEN to the recipient. + /// If token is EIGEN, then bEIGEN is first 1-1 wrapped into EIGEN and the strategy transfers out the EIGEN to the recipient. + /// @param recipient recipient of the withdrawal + /// @param token token to be withdrawn, can be either EIGEN or bEIGEN. If EIGEN, then bEIGEN is wrapped into EIGEN + /// @param amountToSend amount of tokens to transfer + function _afterWithdrawal( + address recipient, + IERC20 token, + uint256 amountToSend + ) internal virtual override { if (token == EIGEN) { // wrap bEIGEN into EIGEN assuming a 1-1 wrapping amount // the strategy will then hold `amountToSend` of EIGEN @@ -100,10 +100,8 @@ contract EigenStrategy is StrategyBase { token.safeTransfer(recipient, amountToSend); } - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[49] private __gap; } diff --git a/src/contracts/strategies/StrategyBase.sol b/src/contracts/strategies/StrategyBase.sol index 09d8c3b55f..170ce0ec98 100644 --- a/src/contracts/strategies/StrategyBase.sol +++ b/src/contracts/strategies/StrategyBase.sol @@ -8,49 +8,41 @@ import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol"; -/** - * @title Base implementation of `IStrategy` interface, designed to be inherited from by more complex strategies. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice Simple, basic, "do-nothing" Strategy that holds a single underlying token and returns it on withdrawals. - * Implements minimal versions of the IStrategy functions, this contract is designed to be inherited by - * more complex strategies, which can then override its functions as necessary. - * @dev Note that some functions have their mutability restricted; developers inheriting from this contract cannot broaden - * the mutability without modifying this contract itself. - * @dev This contract is expressly *not* intended for use with 'fee-on-transfer'-type tokens. - * Setting the `underlyingToken` to be a fee-on-transfer token may result in improper accounting. - * @notice This contract functions similarly to an ERC4626 vault, only without issuing a token. - * To mitigate against the common "inflation attack" vector, we have chosen to use the 'virtual shares' mitigation route, - * similar to [OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/ERC4626.sol). - * We acknowledge that this mitigation has the known downside of the virtual shares causing some losses to users, which are pronounced - * particularly in the case of the share exchange rate changing significantly, either positively or negatively. - * For a fairly thorough discussion of this issue and our chosen mitigation strategy, we recommend reading through - * [this thread](https://github.com/OpenZeppelin/openzeppelin-contracts/issues/3706) on the OpenZeppelin repo. - * We specifically use a share offset of `SHARES_OFFSET` and a balance offset of `BALANCE_OFFSET`. - */ +/// @title Base implementation of `IStrategy` interface, designed to be inherited from by more complex strategies. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice Simple, basic, "do-nothing" Strategy that holds a single underlying token and returns it on withdrawals. +/// Implements minimal versions of the IStrategy functions, this contract is designed to be inherited by +/// more complex strategies, which can then override its functions as necessary. +/// @dev Note that some functions have their mutability restricted; developers inheriting from this contract cannot broaden +/// the mutability without modifying this contract itself. +/// @dev This contract is expressly *not* intended for use with 'fee-on-transfer'-type tokens. +/// Setting the `underlyingToken` to be a fee-on-transfer token may result in improper accounting. +/// @notice This contract functions similarly to an ERC4626 vault, only without issuing a token. +/// To mitigate against the common "inflation attack" vector, we have chosen to use the 'virtual shares' mitigation route, +/// similar to [OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/ERC4626.sol). +/// We acknowledge that this mitigation has the known downside of the virtual shares causing some losses to users, which are pronounced +/// particularly in the case of the share exchange rate changing significantly, either positively or negatively. +/// For a fairly thorough discussion of this issue and our chosen mitigation strategy, we recommend reading through +/// [this thread](https://github.com/OpenZeppelin/openzeppelin-contracts/issues/3706) on the OpenZeppelin repo. +/// We specifically use a share offset of `SHARES_OFFSET` and a balance offset of `BALANCE_OFFSET`. contract StrategyBase is Initializable, Pausable, IStrategy { using SafeERC20 for IERC20; uint8 internal constant PAUSED_DEPOSITS = 0; uint8 internal constant PAUSED_WITHDRAWALS = 1; - /** - * @notice virtual shares used as part of the mitigation of the common 'share inflation' attack vector. - * Constant value chosen to reasonably reduce attempted share inflation by the first depositor, while still - * incurring reasonably small losses to depositors - */ + /// @notice virtual shares used as part of the mitigation of the common 'share inflation' attack vector. + /// Constant value chosen to reasonably reduce attempted share inflation by the first depositor, while still + /// incurring reasonably small losses to depositors uint256 internal constant SHARES_OFFSET = 1e3; - /** - * @notice virtual balance used as part of the mitigation of the common 'share inflation' attack vector - * Constant value chosen to reasonably reduce attempted share inflation by the first depositor, while still - * incurring reasonably small losses to depositors - */ + /// @notice virtual balance used as part of the mitigation of the common 'share inflation' attack vector + /// Constant value chosen to reasonably reduce attempted share inflation by the first depositor, while still + /// incurring reasonably small losses to depositors uint256 internal constant BALANCE_OFFSET = 1e3; - /** - * @notice The maximum total shares for a given strategy - * @dev This constant prevents overflow in offchain services for rewards - */ + /// @notice The maximum total shares for a given strategy + /// @dev This constant prevents overflow in offchain services for rewards uint256 internal constant MAX_TOTAL_SHARES = 1e38 - 1; /// @notice EigenLayer's StrategyManager contract @@ -69,7 +61,10 @@ contract StrategyBase is Initializable, Pausable, IStrategy { } /// @notice Since this contract is designed to be initializable, the constructor simply sets `strategyManager`, the only immutable variable. - constructor(IStrategyManager _strategyManager, IPauserRegistry _pauserRegistry) Pausable(_pauserRegistry) { + constructor( + IStrategyManager _strategyManager, + IPauserRegistry _pauserRegistry + ) Pausable(_pauserRegistry) { strategyManager = _strategyManager; _disableInitializers(); } @@ -89,19 +84,17 @@ contract StrategyBase is Initializable, Pausable, IStrategy { emit StrategyTokenSet(underlyingToken, IERC20Metadata(address(_underlyingToken)).decimals()); } - /** - * @notice Used to deposit tokens into this Strategy - * @param token is the ERC20 token being deposited - * @param amount is the amount of token being deposited - * @dev This function is only callable by the strategyManager contract. It is invoked inside of the strategyManager's - * `depositIntoStrategy` function, and individual share balances are recorded in the strategyManager as well. - * @dev Note that the assumption is made that `amount` of `token` has already been transferred directly to this contract - * (as performed in the StrategyManager's deposit functions). In particular, setting the `underlyingToken` of this contract - * to be a fee-on-transfer token will break the assumption that the amount this contract *received* of the token is equal to - * the amount that was input when the transfer was performed (i.e. the amount transferred 'out' of the depositor's balance). - * @dev Note that any validation of `token` is done inside `_beforeDeposit`. This can be overridden if needed. - * @return newShares is the number of new shares issued at the current exchange ratio. - */ + /// @notice Used to deposit tokens into this Strategy + /// @param token is the ERC20 token being deposited + /// @param amount is the amount of token being deposited + /// @dev This function is only callable by the strategyManager contract. It is invoked inside of the strategyManager's + /// `depositIntoStrategy` function, and individual share balances are recorded in the strategyManager as well. + /// @dev Note that the assumption is made that `amount` of `token` has already been transferred directly to this contract + /// (as performed in the StrategyManager's deposit functions). In particular, setting the `underlyingToken` of this contract + /// to be a fee-on-transfer token will break the assumption that the amount this contract *received* of the token is equal to + /// the amount that was input when the transfer was performed (i.e. the amount transferred 'out' of the depositor's balance). + /// @dev Note that any validation of `token` is done inside `_beforeDeposit`. This can be overridden if needed. + /// @return newShares is the number of new shares issued at the current exchange ratio. function deposit( IERC20 token, uint256 amount @@ -112,10 +105,8 @@ contract StrategyBase is Initializable, Pausable, IStrategy { // copy `totalShares` value to memory, prior to any change uint256 priorTotalShares = totalShares; - /** - * @notice calculation of newShares *mirrors* `underlyingToShares(amount)`, but is different since the balance of `underlyingToken` - * has already been increased due to the `strategyManager` transferring tokens to this strategy prior to calling this function - */ + /// @notice calculation of newShares *mirrors* `underlyingToShares(amount)`, but is different since the balance of `underlyingToken` + /// has already been increased due to the `strategyManager` transferring tokens to this strategy prior to calling this function // account for virtual shares and balance uint256 virtualShareAmount = priorTotalShares + SHARES_OFFSET; uint256 virtualTokenBalance = _tokenBalance() + BALANCE_OFFSET; @@ -136,15 +127,13 @@ contract StrategyBase is Initializable, Pausable, IStrategy { return newShares; } - /** - * @notice Used to withdraw tokens from this Strategy, to the `recipient`'s address - * @param recipient is the address to receive the withdrawn funds - * @param token is the ERC20 token being transferred out - * @param amountShares is the amount of shares being withdrawn - * @dev This function is only callable by the strategyManager contract. It is invoked inside of the strategyManager's - * other functions, and individual share balances are recorded in the strategyManager as well. - * @dev Note that any validation of `token` is done inside `_beforeWithdrawal`. This can be overridden if needed. - */ + /// @notice Used to withdraw tokens from this Strategy, to the `recipient`'s address + /// @param recipient is the address to receive the withdrawn funds + /// @param token is the ERC20 token being transferred out + /// @param amountShares is the amount of shares being withdrawn + /// @dev This function is only callable by the strategyManager contract. It is invoked inside of the strategyManager's + /// other functions, and individual share balances are recorded in the strategyManager as well. + /// @dev Note that any validation of `token` is done inside `_beforeWithdrawal`. This can be overridden if needed. function withdraw( address recipient, IERC20 token, @@ -157,10 +146,8 @@ contract StrategyBase is Initializable, Pausable, IStrategy { uint256 priorTotalShares = totalShares; require(amountShares <= priorTotalShares, WithdrawalAmountExceedsTotalDeposits()); - /** - * @notice calculation of amountOut *mirrors* `sharesToUnderlying(amountShares)`, but is different since the `totalShares` has already - * been decremented. Specifically, notice how we use `priorTotalShares` here instead of `totalShares`. - */ + /// @notice calculation of amountOut *mirrors* `sharesToUnderlying(amountShares)`, but is different since the `totalShares` has already + /// been decremented. Specifically, notice how we use `priorTotalShares` here instead of `totalShares`. // account for virtual shares and balance uint256 virtualPriorTotalShares = priorTotalShares + SHARES_OFFSET; uint256 virtualTokenBalance = _tokenBalance() + BALANCE_OFFSET; @@ -178,10 +165,8 @@ contract StrategyBase is Initializable, Pausable, IStrategy { return amountOut; } - /** - * @notice Called in the external `deposit` function, before any logic is executed. Expected to be overridden if strategies want such logic. - * @param token The token being deposited - */ + /// @notice Called in the external `deposit` function, before any logic is executed. Expected to be overridden if strategies want such logic. + /// @param token The token being deposited function _beforeDeposit( IERC20 token, uint256 // amount @@ -189,10 +174,8 @@ contract StrategyBase is Initializable, Pausable, IStrategy { require(token == underlyingToken, OnlyUnderlyingToken()); } - /** - * @notice Called in the external `withdraw` function, before any logic is executed. Expected to be overridden if strategies want such logic. - * @param token The token being withdrawn - */ + /// @notice Called in the external `withdraw` function, before any logic is executed. Expected to be overridden if strategies want such logic. + /// @param token The token being withdrawn function _beforeWithdrawal( address, // recipient IERC20 token, @@ -201,14 +184,16 @@ contract StrategyBase is Initializable, Pausable, IStrategy { require(token == underlyingToken, OnlyUnderlyingToken()); } - /** - * @notice Transfers tokens to the recipient after a withdrawal is processed - * @dev Called in the external `withdraw` function after all logic is executed - * @param recipient The destination of the tokens - * @param token The ERC20 being transferred - * @param amountToSend The amount of `token` to transfer - */ - function _afterWithdrawal(address recipient, IERC20 token, uint256 amountToSend) internal virtual { + /// @notice Transfers tokens to the recipient after a withdrawal is processed + /// @dev Called in the external `withdraw` function after all logic is executed + /// @param recipient The destination of the tokens + /// @param token The ERC20 being transferred + /// @param amountToSend The amount of `token` to transfer + function _afterWithdrawal( + address recipient, + IERC20 token, + uint256 amountToSend + ) internal virtual { token.safeTransfer(recipient, amountToSend); } @@ -282,15 +267,16 @@ contract StrategyBase is Initializable, Pausable, IStrategy { /// @notice Internal function used to emit the exchange rate of the strategy in wad (18 decimals) /// @dev Tokens that do not have 18 decimals must have offchain services scale the exchange rate down to proper magnitude - function _emitExchangeRate(uint256 virtualTokenBalance, uint256 virtualTotalShares) internal { + function _emitExchangeRate( + uint256 virtualTokenBalance, + uint256 virtualTotalShares + ) internal { // Emit asset over shares ratio. emit ExchangeRateEmitted((1e18 * virtualTokenBalance) / virtualTotalShares); } - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[48] private __gap; } diff --git a/src/contracts/strategies/StrategyBaseTVLLimits.sol b/src/contracts/strategies/StrategyBaseTVLLimits.sol index ac972822e8..73c9b9e727 100644 --- a/src/contracts/strategies/StrategyBaseTVLLimits.sol +++ b/src/contracts/strategies/StrategyBaseTVLLimits.sol @@ -3,13 +3,11 @@ pragma solidity ^0.8.27; import "./StrategyBase.sol"; -/** - * @title A Strategy implementation inheriting from `StrategyBase` that limits the total amount of deposits it will accept. - * @dev Note that this implementation still converts between any amount of shares or underlying tokens in its view functions; - * these functions purposefully do not take the TVL limit into account. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - */ +/// @title A Strategy implementation inheriting from `StrategyBase` that limits the total amount of deposits it will accept. +/// @dev Note that this implementation still converts between any amount of shares or underlying tokens in its view functions; +/// these functions purposefully do not take the TVL limit into account. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service contract StrategyBaseTVLLimits is StrategyBase { /// The maximum deposit (in underlyingToken) that this strategy will accept per deposit uint256 public maxPerDeposit; @@ -38,14 +36,15 @@ contract StrategyBaseTVLLimits is StrategyBase { _initializeStrategyBase(_underlyingToken); } - /** - * @notice Sets the maximum deposits (in underlyingToken) that this strategy will hold and accept per deposit - * @param newMaxTotalDeposits The new maximum deposits - * @dev Callable only by the unpauser of this contract - * @dev We note that there is a potential race condition between a call to this function that lowers either or both of these limits and call(s) - * to `deposit`, that may result in some calls to `deposit` reverting. - */ - function setTVLLimits(uint256 newMaxPerDeposit, uint256 newMaxTotalDeposits) external onlyUnpauser { + /// @notice Sets the maximum deposits (in underlyingToken) that this strategy will hold and accept per deposit + /// @param newMaxTotalDeposits The new maximum deposits + /// @dev Callable only by the unpauser of this contract + /// @dev We note that there is a potential race condition between a call to this function that lowers either or both of these limits and call(s) + /// to `deposit`, that may result in some calls to `deposit` reverting. + function setTVLLimits( + uint256 newMaxPerDeposit, + uint256 newMaxTotalDeposits + ) external onlyUnpauser { _setTVLLimits(newMaxPerDeposit, newMaxTotalDeposits); } @@ -55,7 +54,10 @@ contract StrategyBaseTVLLimits is StrategyBase { } /// @notice Internal setter for TVL limits - function _setTVLLimits(uint256 newMaxPerDeposit, uint256 newMaxTotalDeposits) internal { + function _setTVLLimits( + uint256 newMaxPerDeposit, + uint256 newMaxTotalDeposits + ) internal { emit MaxPerDepositUpdated(maxPerDeposit, newMaxPerDeposit); emit MaxTotalDepositsUpdated(maxTotalDeposits, newMaxTotalDeposits); require(newMaxPerDeposit <= newMaxTotalDeposits, MaxPerDepositExceedsMax()); @@ -63,29 +65,28 @@ contract StrategyBaseTVLLimits is StrategyBase { maxTotalDeposits = newMaxTotalDeposits; } - /** - * @notice Called in the external `deposit` function, before any logic is executed. Makes sure that deposits don't exceed configured maximum. - * @dev Unused token param is the token being deposited. This is already checked in the `deposit` function. - * @dev Note that the `maxTotalDeposits` is purely checked against the current `_tokenBalance()`, since by this point in the deposit flow, the - * tokens should have already been transferred to this Strategy by the StrategyManager - * @dev We note as well that this makes it possible for various race conditions to occur: - * a) multiple simultaneous calls to `deposit` may result in some of these calls reverting due to `maxTotalDeposits` being reached. - * b) transferring funds directly to this Strategy (although not generally in someone's economic self interest) in order to reach `maxTotalDeposits` - * is a route by which someone can cause calls to `deposit` to revert. - * c) increases in the token balance of this contract through other effects – including token rebasing – may cause similar issues to (a) and (b). - * @param amount The amount of `token` being deposited - */ - function _beforeDeposit(IERC20 token, uint256 amount) internal virtual override { + /// @notice Called in the external `deposit` function, before any logic is executed. Makes sure that deposits don't exceed configured maximum. + /// @dev Unused token param is the token being deposited. This is already checked in the `deposit` function. + /// @dev Note that the `maxTotalDeposits` is purely checked against the current `_tokenBalance()`, since by this point in the deposit flow, the + /// tokens should have already been transferred to this Strategy by the StrategyManager + /// @dev We note as well that this makes it possible for various race conditions to occur: + /// a) multiple simultaneous calls to `deposit` may result in some of these calls reverting due to `maxTotalDeposits` being reached. + /// b) transferring funds directly to this Strategy (although not generally in someone's economic self interest) in order to reach `maxTotalDeposits` + /// is a route by which someone can cause calls to `deposit` to revert. + /// c) increases in the token balance of this contract through other effects – including token rebasing – may cause similar issues to (a) and (b). + /// @param amount The amount of `token` being deposited + function _beforeDeposit( + IERC20 token, + uint256 amount + ) internal virtual override { require(amount <= maxPerDeposit, MaxPerDepositExceedsMax()); require(_tokenBalance() <= maxTotalDeposits, BalanceExceedsMaxTotalDeposits()); super._beforeDeposit(token, amount); } - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[48] private __gap; } diff --git a/src/contracts/strategies/StrategyFactory.sol b/src/contracts/strategies/StrategyFactory.sol index 20ded2db2e..43f80ca237 100644 --- a/src/contracts/strategies/StrategyFactory.sol +++ b/src/contracts/strategies/StrategyFactory.sol @@ -7,13 +7,11 @@ import "./StrategyFactoryStorage.sol"; import "./StrategyBase.sol"; import "../permissions/Pausable.sol"; -/** - * @title Factory contract for deploying BeaconProxies of a Strategy contract implementation for arbitrary ERC20 tokens - * and automatically adding them to the StrategyWhitelist in EigenLayer. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @dev This may not be compatible with non-standard ERC20 tokens. Caution is warranted. - */ +/// @title Factory contract for deploying BeaconProxies of a Strategy contract implementation for arbitrary ERC20 tokens +/// and automatically adding them to the StrategyWhitelist in EigenLayer. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @dev This may not be compatible with non-standard ERC20 tokens. Caution is warranted. contract StrategyFactory is StrategyFactoryStorage, OwnableUpgradeable, Pausable { uint8 internal constant PAUSED_NEW_STRATEGIES = 0; @@ -21,7 +19,10 @@ contract StrategyFactory is StrategyFactoryStorage, OwnableUpgradeable, Pausable IStrategyManager public immutable strategyManager; /// @notice Since this contract is designed to be initializable, the constructor simply sets the immutable variables. - constructor(IStrategyManager _strategyManager, IPauserRegistry _pauserRegistry) Pausable(_pauserRegistry) { + constructor( + IStrategyManager _strategyManager, + IPauserRegistry _pauserRegistry + ) Pausable(_pauserRegistry) { strategyManager = _strategyManager; _disableInitializers(); } @@ -36,12 +37,10 @@ contract StrategyFactory is StrategyFactoryStorage, OwnableUpgradeable, Pausable _setStrategyBeacon(_strategyBeacon); } - /** - * @notice Deploy a new StrategyBase contract for the ERC20 token, using a beacon proxy - * @dev A strategy contract must not yet exist for the token. - * @dev Immense caution is warranted for non-standard ERC20 tokens, particularly "reentrant" tokens - * like those that conform to ERC777. - */ + /// @notice Deploy a new StrategyBase contract for the ERC20 token, using a beacon proxy + /// @dev A strategy contract must not yet exist for the token. + /// @dev Immense caution is warranted for non-standard ERC20 tokens, particularly "reentrant" tokens + /// like those that conform to ERC777. function deployNewStrategy( IERC20 token ) external onlyWhenNotPaused(PAUSED_NEW_STRATEGIES) returns (IStrategy newStrategy) { @@ -61,10 +60,8 @@ contract StrategyFactory is StrategyFactoryStorage, OwnableUpgradeable, Pausable return strategy; } - /** - * @notice Owner-only function to prevent strategies from being created for given tokens. - * @param tokens An array of token addresses to blacklist. - */ + /// @notice Owner-only function to prevent strategies from being created for given tokens. + /// @param tokens An array of token addresses to blacklist. function blacklistTokens( IERC20[] calldata tokens ) external onlyOwner { @@ -96,25 +93,24 @@ contract StrategyFactory is StrategyFactoryStorage, OwnableUpgradeable, Pausable } } - /** - * @notice Owner-only function to pass through a call to `StrategyManager.addStrategiesToDepositWhitelist` - */ + /// @notice Owner-only function to pass through a call to `StrategyManager.addStrategiesToDepositWhitelist` function whitelistStrategies( IStrategy[] calldata strategiesToWhitelist ) external onlyOwner { strategyManager.addStrategiesToDepositWhitelist(strategiesToWhitelist); } - /** - * @notice Owner-only function to pass through a call to `StrategyManager.removeStrategiesFromDepositWhitelist` - */ + /// @notice Owner-only function to pass through a call to `StrategyManager.removeStrategiesFromDepositWhitelist` function removeStrategiesFromWhitelist( IStrategy[] calldata strategiesToRemoveFromWhitelist ) external onlyOwner { strategyManager.removeStrategiesFromDepositWhitelist(strategiesToRemoveFromWhitelist); } - function _setStrategyForToken(IERC20 token, IStrategy strategy) internal { + function _setStrategyForToken( + IERC20 token, + IStrategy strategy + ) internal { deployedStrategies[token] = strategy; emit StrategySetForToken(token, strategy); } diff --git a/src/contracts/strategies/StrategyFactoryStorage.sol b/src/contracts/strategies/StrategyFactoryStorage.sol index c74cf7eb23..943b820e38 100644 --- a/src/contracts/strategies/StrategyFactoryStorage.sol +++ b/src/contracts/strategies/StrategyFactoryStorage.sol @@ -3,11 +3,9 @@ pragma solidity ^0.8.27; import "../interfaces/IStrategyFactory.sol"; -/** - * @title Storage for the StrategyFactory contract. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - */ +/// @title Storage for the StrategyFactory contract. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service abstract contract StrategyFactoryStorage is IStrategyFactory { /// @notice Upgradeable beacon which new Strategies deployed by this contract point to IBeacon public strategyBeacon; @@ -24,10 +22,8 @@ abstract contract StrategyFactoryStorage is IStrategyFactory { /// @notice Mapping token => Whether or not a strategy can be deployed for the token mapping(IERC20 => bool) public isBlacklisted; - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + /// @dev This empty reserved space is put in place to allow future versions to add new + /// variables without shifting down storage in the inheritance chain. + /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[48] private __gap; } diff --git a/src/contracts/token/BackingEigen.sol b/src/contracts/token/BackingEigen.sol index a9fbc9f136..ec3f2c88d6 100644 --- a/src/contracts/token/BackingEigen.sol +++ b/src/contracts/token/BackingEigen.sol @@ -39,34 +39,34 @@ contract BackingEigen is OwnableUpgradeable, ERC20VotesUpgradeable { } // @notice Allows the contract owner to modify an entry in the `isMinter` mapping. - function setIsMinter(address minterAddress, bool newStatus) external onlyOwner { + function setIsMinter( + address minterAddress, + bool newStatus + ) external onlyOwner { emit IsMinterModified(minterAddress, newStatus); isMinter[minterAddress] = newStatus; } - /** - * @notice Allows any privileged address to mint `amount` new tokens to the address `to`. - * @dev Callable only by an address that has `isMinter` set to true. - */ - function mint(address to, uint256 amount) external { + /// @notice Allows any privileged address to mint `amount` new tokens to the address `to`. + /// @dev Callable only by an address that has `isMinter` set to true. + function mint( + address to, + uint256 amount + ) external { require(isMinter[msg.sender], "BackingEigen.mint: caller is not a minter"); _mint(to, amount); } - /** - * @dev Destroys `amount` tokens from the caller. - * - * See {ERC20-_burn}. - */ + /// @dev Destroys `amount` tokens from the caller. + /// + /// See {ERC20-_burn}. function burn( uint256 amount ) public virtual { _burn(_msgSender(), amount); } - /** - * @notice An initializer function that sets initial values for the contract's state variables. - */ + /// @notice An initializer function that sets initial values for the contract's state variables. function initialize( address initialOwner ) public initializer { @@ -91,27 +91,27 @@ contract BackingEigen is OwnableUpgradeable, ERC20VotesUpgradeable { /// EXTERNAL FUNCTIONS - /** - * @notice This function allows the owner to set the allowedFrom status of an address - * @param from the address whose allowedFrom status is being set - * @param isAllowedFrom the new allowedFrom status - */ - function setAllowedFrom(address from, bool isAllowedFrom) external onlyOwner { + /// @notice This function allows the owner to set the allowedFrom status of an address + /// @param from the address whose allowedFrom status is being set + /// @param isAllowedFrom the new allowedFrom status + function setAllowedFrom( + address from, + bool isAllowedFrom + ) external onlyOwner { _setAllowedFrom(from, isAllowedFrom); } - /** - * @notice This function allows the owner to set the allowedTo status of an address - * @param to the address whose allowedTo status is being set - * @param isAllowedTo the new allowedTo status - */ - function setAllowedTo(address to, bool isAllowedTo) external onlyOwner { + /// @notice This function allows the owner to set the allowedTo status of an address + /// @param to the address whose allowedTo status is being set + /// @param isAllowedTo the new allowedTo status + function setAllowedTo( + address to, + bool isAllowedTo + ) external onlyOwner { _setAllowedTo(to, isAllowedTo); } - /** - * @notice Allows the owner to disable transfer restrictions - */ + /// @notice Allows the owner to disable transfer restrictions function disableTransferRestrictions() external onlyOwner { require( transferRestrictionsDisabledAfter == type(uint256).max, @@ -123,18 +123,14 @@ contract BackingEigen is OwnableUpgradeable, ERC20VotesUpgradeable { /// VIEW FUNCTIONS - /** - * @dev Clock used for flagging checkpoints. Has been overridden to implement timestamp based - * checkpoints (and voting). - */ + /// @dev Clock used for flagging checkpoints. Has been overridden to implement timestamp based + /// checkpoints (and voting). function clock() public view override returns (uint48) { return SafeCastUpgradeable.toUint48(block.timestamp); } - /** - * @dev Machine-readable description of the clock as specified in EIP-6372. - * Has been overridden to inform callers that this contract uses timestamps instead of block numbers, to match `clock()` - */ + /// @dev Machine-readable description of the clock as specified in EIP-6372. + /// Has been overridden to inform callers that this contract uses timestamps instead of block numbers, to match `clock()` // solhint-disable-next-line func-name-mixedcase function CLOCK_MODE() public pure override returns (string memory) { return "mode=timestamp"; @@ -142,23 +138,31 @@ contract BackingEigen is OwnableUpgradeable, ERC20VotesUpgradeable { /// INTERNAL FUNCTIONS - function _setAllowedFrom(address from, bool isAllowedFrom) internal { + function _setAllowedFrom( + address from, + bool isAllowedFrom + ) internal { allowedFrom[from] = isAllowedFrom; emit SetAllowedFrom(from, isAllowedFrom); } - function _setAllowedTo(address to, bool isAllowedTo) internal { + function _setAllowedTo( + address to, + bool isAllowedTo + ) internal { allowedTo[to] = isAllowedTo; emit SetAllowedTo(to, isAllowedTo); } - /** - * @notice Overrides the beforeTokenTransfer function to enforce transfer restrictions - * @param from the address tokens are being transferred from - * @param to the address tokens are being transferred to - * @param amount the amount of tokens being transferred - */ - function _beforeTokenTransfer(address from, address to, uint256 amount) internal override { + /// @notice Overrides the beforeTokenTransfer function to enforce transfer restrictions + /// @param from the address tokens are being transferred from + /// @param to the address tokens are being transferred to + /// @param amount the amount of tokens being transferred + function _beforeTokenTransfer( + address from, + address to, + uint256 amount + ) internal override { // if transfer restrictions are enabled if (block.timestamp <= transferRestrictionsDisabledAfter) { // if both from and to are not whitelisted diff --git a/src/contracts/token/Eigen.sol b/src/contracts/token/Eigen.sol index b53b9790b0..5ae61f54c6 100644 --- a/src/contracts/token/Eigen.sol +++ b/src/contracts/token/Eigen.sol @@ -40,16 +40,17 @@ contract Eigen is OwnableUpgradeable, ERC20VotesUpgradeable, SemVerMixin { /// @notice Emitted when EIGEN tokens are unwrapped into bEIGEN event TokenUnwrapped(address indexed account, uint256 amount); - constructor(IERC20 _bEIGEN, string memory _version) SemVerMixin(_version) { + constructor( + IERC20 _bEIGEN, + string memory _version + ) SemVerMixin(_version) { bEIGEN = _bEIGEN; _disableInitializers(); } - /** - * @notice An initializer function that sets initial values for the contract's state variables. - * @param minters the addresses that are allowed to mint - * @param mintingAllowances the amount of tokens that each minter is allowed to mint - */ + /// @notice An initializer function that sets initial values for the contract's state variables. + /// @param minters the addresses that are allowed to mint + /// @param mintingAllowances the amount of tokens that each minter is allowed to mint function initialize( address initialOwner, address[] memory minters, @@ -82,29 +83,29 @@ contract Eigen is OwnableUpgradeable, ERC20VotesUpgradeable, SemVerMixin { transferRestrictionsDisabledAfter = type(uint256).max; } - /** - * @notice This function allows the owner to set the allowedFrom status of an address - * @param from the address whose allowedFrom status is being set - * @param isAllowedFrom the new allowedFrom status - */ - function setAllowedFrom(address from, bool isAllowedFrom) external onlyOwner { + /// @notice This function allows the owner to set the allowedFrom status of an address + /// @param from the address whose allowedFrom status is being set + /// @param isAllowedFrom the new allowedFrom status + function setAllowedFrom( + address from, + bool isAllowedFrom + ) external onlyOwner { allowedFrom[from] = isAllowedFrom; emit SetAllowedFrom(from, isAllowedFrom); } - /** - * @notice This function allows the owner to set the allowedTo status of an address - * @param to the address whose allowedTo status is being set - * @param isAllowedTo the new allowedTo status - */ - function setAllowedTo(address to, bool isAllowedTo) external onlyOwner { + /// @notice This function allows the owner to set the allowedTo status of an address + /// @param to the address whose allowedTo status is being set + /// @param isAllowedTo the new allowedTo status + function setAllowedTo( + address to, + bool isAllowedTo + ) external onlyOwner { allowedTo[to] = isAllowedTo; emit SetAllowedTo(to, isAllowedTo); } - /** - * @notice Allows the owner to disable transfer restrictions - */ + /// @notice Allows the owner to disable transfer restrictions function disableTransferRestrictions() external onlyOwner { require( transferRestrictionsDisabledAfter == type(uint256).max, @@ -114,9 +115,7 @@ contract Eigen is OwnableUpgradeable, ERC20VotesUpgradeable, SemVerMixin { emit TransferRestrictionsDisabled(); } - /** - * @notice This function allows minter to mint tokens - */ + /// @notice This function allows minter to mint tokens function mint() external { require(mintingAllowance[msg.sender] > 0, "Eigen.mint: msg.sender has no minting allowance"); require(block.timestamp > mintAllowedAfter[msg.sender], "Eigen.mint: msg.sender is not allowed to mint yet"); @@ -126,9 +125,7 @@ contract Eigen is OwnableUpgradeable, ERC20VotesUpgradeable, SemVerMixin { emit Mint(msg.sender, amount); } - /** - * @notice This function allows bEIGEN holders to wrap their tokens into Eigen - */ + /// @notice This function allows bEIGEN holders to wrap their tokens into Eigen function wrap( uint256 amount ) external { @@ -137,9 +134,7 @@ contract Eigen is OwnableUpgradeable, ERC20VotesUpgradeable, SemVerMixin { emit TokenWrapped(msg.sender, amount); } - /** - * @notice This function allows Eigen holders to unwrap their tokens into bEIGEN - */ + /// @notice This function allows Eigen holders to unwrap their tokens into bEIGEN function unwrap( uint256 amount ) external { @@ -148,23 +143,26 @@ contract Eigen is OwnableUpgradeable, ERC20VotesUpgradeable, SemVerMixin { emit TokenUnwrapped(msg.sender, amount); } - /** - * @notice Allows the sender to transfer tokens to multiple addresses in a single transaction - */ - function multisend(address[] calldata receivers, uint256[] calldata amounts) public { + /// @notice Allows the sender to transfer tokens to multiple addresses in a single transaction + function multisend( + address[] calldata receivers, + uint256[] calldata amounts + ) public { require(receivers.length == amounts.length, "Eigen.multisend: receivers and amounts must be the same length"); for (uint256 i = 0; i < receivers.length; i++) { _transfer(msg.sender, receivers[i], amounts[i]); } } - /** - * @notice Overrides the beforeTokenTransfer function to enforce transfer restrictions - * @param from the address tokens are being transferred from - * @param to the address tokens are being transferred to - * @param amount the amount of tokens being transferred - */ - function _beforeTokenTransfer(address from, address to, uint256 amount) internal override { + /// @notice Overrides the beforeTokenTransfer function to enforce transfer restrictions + /// @param from the address tokens are being transferred from + /// @param to the address tokens are being transferred to + /// @param amount the amount of tokens being transferred + function _beforeTokenTransfer( + address from, + address to, + uint256 amount + ) internal override { // if transfer restrictions are enabled if (block.timestamp <= transferRestrictionsDisabledAfter) { // if both from and to are not whitelisted @@ -176,27 +174,21 @@ contract Eigen is OwnableUpgradeable, ERC20VotesUpgradeable, SemVerMixin { super._beforeTokenTransfer(from, to, amount); } - /** - * @notice Overridden to return the total bEIGEN supply instead. - * @dev The issued supply of EIGEN should match the bEIGEN balance of this contract, - * less any bEIGEN tokens that were sent directly to the contract (rather than being wrapped) - */ + /// @notice Overridden to return the total bEIGEN supply instead. + /// @dev The issued supply of EIGEN should match the bEIGEN balance of this contract, + /// less any bEIGEN tokens that were sent directly to the contract (rather than being wrapped) function totalSupply() public view override returns (uint256) { return bEIGEN.totalSupply(); } - /** - * @dev Clock used for flagging checkpoints. Has been overridden to implement timestamp based - * checkpoints (and voting). - */ + /// @dev Clock used for flagging checkpoints. Has been overridden to implement timestamp based + /// checkpoints (and voting). function clock() public view override returns (uint48) { return SafeCastUpgradeable.toUint48(block.timestamp); } - /** - * @dev Machine-readable description of the clock as specified in EIP-6372. - * Has been overridden to inform callers that this contract uses timestamps instead of block numbers, to match `clock()` - */ + /// @dev Machine-readable description of the clock as specified in EIP-6372. + /// Has been overridden to inform callers that this contract uses timestamps instead of block numbers, to match `clock()` // solhint-disable-next-line func-name-mixedcase function CLOCK_MODE() public pure override returns (string memory) { return "mode=timestamp"; diff --git a/src/test/harnesses/EigenHarness.sol b/src/test/harnesses/EigenHarness.sol index 2252921965..9836f36ed2 100644 --- a/src/test/harnesses/EigenHarness.sol +++ b/src/test/harnesses/EigenHarness.sol @@ -12,12 +12,10 @@ contract EigenHarness is Eigen { _mint(to, amount); } - /** - * @notice This function allows the owner to set the allowedFrom status of an address - * @param from the address whose allowedFrom status is being set - * @param isAllowedFrom the new allowedFrom status - * @dev this function is callable by anoyone in the harness - */ + /// @notice This function allows the owner to set the allowedFrom status of an address + /// @param from the address whose allowedFrom status is being set + /// @param isAllowedFrom the new allowedFrom status + /// @dev this function is callable by anoyone in the harness function setAllowedFromPermissionless(address from, bool isAllowedFrom) external { allowedFrom[from] = isAllowedFrom; emit SetAllowedFrom(from, isAllowedFrom); diff --git a/src/test/integration/IntegrationBase.t.sol b/src/test/integration/IntegrationBase.t.sol index 3d53c570b4..6e92ed0bab 100644 --- a/src/test/integration/IntegrationBase.t.sol +++ b/src/test/integration/IntegrationBase.t.sol @@ -35,14 +35,10 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { User[] operatorsToMigrate; User[] stakersToMigrate; - /** - * Gen/Init methods: - */ - - /** - * @dev Create a new user according to configured random variants. - * This user is ready to deposit into some strategies and has some underlying token balances - */ + /// Gen/Init methods: + + /// @dev Create a new user according to configured random variants. + /// This user is ready to deposit into some strategies and has some underlying token balances function _newRandomStaker() internal returns (User, IStrategy[] memory, uint[] memory) { (User staker, IStrategy[] memory strategies, uint[] memory tokenBalances) = _randUser(_getStakerName()); @@ -71,10 +67,8 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { return staker; } - /** - * @dev Create a new operator according to configured random variants. - * This user will immediately deposit their randomized assets into eigenlayer. - */ + /// @dev Create a new operator according to configured random variants. + /// This user will immediately deposit their randomized assets into eigenlayer. function _newRandomOperator() internal returns (User, IStrategy[] memory, uint[] memory) { /// TODO: Allow operators to have ETH (User operator, IStrategy[] memory strategies, uint[] memory tokenBalances) = _randUser_NoETH(_getOperatorName()); @@ -186,7 +180,7 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { /// @dev Choose a random subset of validators (selects AT LEAST ONE) function _choose(uint40[] memory validators) internal returns (uint40[] memory) { - uint _rand = _randUint({min: 1, max: (2 ** validators.length) - 1}); + uint _rand = _randUint({min: 1, max: (2**validators.length) - 1}); uint40[] memory result = new uint40[](validators.length); uint newLen; @@ -210,11 +204,9 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { if (token == NATIVE_ETH) return "Native ETH"; return IERC20Metadata(address(token)).name(); } - /** - * - * COMMON ASSERTIONS - * - */ + /// + /// COMMON ASSERTIONS + /// function assert_HasNoDelegatableShares(User user, string memory err) internal view { (IStrategy[] memory strategies, uint[] memory shares) = delegationManager.getDepositedShares(address(user)); @@ -575,18 +567,14 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { assertEq(_getWithdrawableShares(staker, strategy), 0, err); } - /** - * - * SNAPSHOT ASSERTIONS - * TIME TRAVELERS ONLY BEYOND THIS POINT - * - */ + /// + /// SNAPSHOT ASSERTIONS + /// TIME TRAVELERS ONLY BEYOND THIS POINT + /// - /** - * - * SNAPSHOT ASSERTIONS: ALLOCATIONS - * - */ + /// + /// SNAPSHOT ASSERTIONS: ALLOCATIONS + /// function assert_Snap_Became_Registered(User operator, OperatorSet memory operatorSet, string memory err) internal { bool curIsMemberOfSet = _getIsMemberOfSet(operator, operatorSet); bool prevIsMemberOfSet = _getPrevIsMemberOfSet(operator, operatorSet); @@ -1216,11 +1204,9 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { } } - /** - * - * SNAPSHOT ASSERTIONS: BEACON CHAIN AND AVS SLASHING - * - */ + /// + /// SNAPSHOT ASSERTIONS: BEACON CHAIN AND AVS SLASHING + /// /// @dev Same as `assert_Snap_StakerWithdrawableShares_AfterSlash` /// @dev but when a BC slash occurs before an AVS slash @@ -1268,11 +1254,9 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { assertEq(prevSlashingFactor.mulWad(_getBeaconChainSlashingFactor(staker)), slashingFactor, err); assertApproxEqAbs(prevShares.mulWad(_getBeaconChainSlashingFactor(staker)), curShares, 1e2, err); - /** - * 2. The delta in shares is given by: - * (depositShares * operatorMag) - (depositShares * operatorMag * BCSF) - * = depositShares * operatorMag * (1 - BCSF) - */ + /// 2. The delta in shares is given by: + /// (depositShares * operatorMag) - (depositShares * operatorMag * BCSF) + /// = depositShares * operatorMag * (1 - BCSF) uint beaconChainSlashingFactor = _getBeaconChainSlashingFactor(staker); uint wadToSlash = slashingParams.wadsToSlash[0]; uint originalAVSSlashedShares = depositShares.mulWadRoundUp(allocateParams.newMagnitudes[0].mulWadRoundUp(wadToSlash)); @@ -1282,21 +1266,17 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { assertApproxEqAbs(prevShares - expectedDelta, curShares, 1e2, err); } - /** - * 3. The attributable avs slashed shares should decrease by a factor of the BCSF - * Attributable avs slashed shares = originalWithdrawableShares - bcSlashedShares - curShares - * Where bcSlashedShares = originalWithdrawableShares * (1 - BCSF) - */ + /// 3. The attributable avs slashed shares should decrease by a factor of the BCSF + /// Attributable avs slashed shares = originalWithdrawableShares - bcSlashedShares - curShares + /// Where bcSlashedShares = originalWithdrawableShares * (1 - BCSF) uint bcSlashedShares = depositShares.mulWad(WAD - beaconChainSlashingFactor); uint attributableAVSSlashedShares = depositShares - bcSlashedShares - curShares; assertApproxEqAbs(originalAVSSlashedShares.mulWad(beaconChainSlashingFactor), attributableAVSSlashedShares, 1e2, err); } - /** - * @dev Validates behavior of "restaking", i.e. that the funds can be slashed twice. Also validates - * the edge case where a validator is proven prior to the BC slash. - * @dev These bounds are based off of rounding when avs and bc slashing occur together - */ + /// @dev Validates behavior of "restaking", i.e. that the funds can be slashed twice. Also validates + /// the edge case where a validator is proven prior to the BC slash. + /// @dev These bounds are based off of rounding when avs and bc slashing occur together function assert_Snap_StakerWithdrawableShares_AVSSlash_ValidatorProven_BCSlash( User staker, uint originalWithdrawableShares, @@ -1315,10 +1295,8 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { // 1. The withdrawable shares should decrease by a factor of the BCSF assertApproxEqAbs(prevShares.mulWad(_getBeaconChainSlashingFactor(staker)), curShares, 1e5, err); - /** - * 2. The delta in shares is given by: - * (originalWithdrawableShares * operatorMag) + extraValidatorShares - (depositShares * operatorMag * BCSF * dsf) - */ + /// 2. The delta in shares is given by: + /// (originalWithdrawableShares * operatorMag) + extraValidatorShares - (depositShares * operatorMag * BCSF * dsf) uint beaconChainSlashingFactor = _getBeaconChainSlashingFactor(staker); uint wadToSlash = slashingParams.wadsToSlash[0]; uint originalAVSSlashedShares = originalWithdrawableShares.mulWadRoundUp(allocateParams.newMagnitudes[0].mulWadRoundUp(wadToSlash)); @@ -1326,11 +1304,9 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { uint expectedDelta = withdrawableSharesAfterValidatorProven.mulWad(WAD - beaconChainSlashingFactor); assertApproxEqAbs(prevShares - expectedDelta, curShares, 1e5, err); - /** - * 3. The attributable avs slashed shares should decrease by a factor of the BCSF - * Attributable avs slashed shares = depositShares - bcSlashedShares - curShars - * Where bcSlashedShares = depositShares * (1 - BCSF) - */ + /// 3. The attributable avs slashed shares should decrease by a factor of the BCSF + /// Attributable avs slashed shares = depositShares - bcSlashedShares - curShars + /// Where bcSlashedShares = depositShares * (1 - BCSF) uint depositShares = _getStakerDepositShares(staker, allocateParams.strategies)[0]; uint bcSlashedShares = depositShares.mulWad(WAD - beaconChainSlashingFactor); uint attributableAVSSlashedShares = depositShares - bcSlashedShares - curShares; @@ -1339,11 +1315,9 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { // TODO: slashable stake - /** - * - * SNAPSHOT ASSERTIONS: OPERATOR SHARES - * - */ + /// + /// SNAPSHOT ASSERTIONS: OPERATOR SHARES + /// /// @dev Check that the operator has `addedShares` additional operator shares // for each strategy since the last snapshot @@ -1450,11 +1424,9 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { } } - /** - * - * SNAPSHOT ASSERTIONS: STAKER SHARES - * - */ + /// + /// SNAPSHOT ASSERTIONS: STAKER SHARES + /// /// @dev Check that the staker has `addedShares` additional deposit shares /// for each strategy since the last snapshot @@ -1617,9 +1589,8 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { } else { uint[] memory prevDepositShares = _getPrevStakerDepositShares(staker, strategies); assertEq( - (prevDepositShares[i] + depositSharesAdded[i]).mulWad(_getDepositScalingFactor(staker, strategies[i])).mulWad( - _getSlashingFactor(staker, strategies[i]) - ), + (prevDepositShares[i] + depositSharesAdded[i]).mulWad(_getDepositScalingFactor(staker, strategies[i])) + .mulWad(_getSlashingFactor(staker, strategies[i])), curShares[i], err ); @@ -1806,11 +1777,9 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { } } - /** - * - * SNAPSHOT ASSERTIONS: STRATEGY SHARES - * - */ + /// + /// SNAPSHOT ASSERTIONS: STRATEGY SHARES + /// function assert_Snap_Removed_StrategyShares(IStrategy[] memory strategies, uint[] memory removedShares, string memory err) internal { uint[] memory curShares = _getTotalStrategyShares(strategies); @@ -1858,11 +1827,9 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { } } - /** - * - * SNAPSHOT ASSERTIONS: UNDERLYING TOKEN - * - */ + /// + /// SNAPSHOT ASSERTIONS: UNDERLYING TOKEN + /// /// @dev Check that the staker has `addedTokens` additional underlying tokens // since the last snapshot @@ -1912,11 +1879,9 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { } } - /** - * - * SNAPSHOT ASSERTIONS: QUEUED WITHDRAWALS - * - */ + /// + /// SNAPSHOT ASSERTIONS: QUEUED WITHDRAWALS + /// function assert_Snap_Added_QueuedWithdrawals(User staker, Withdrawal[] memory withdrawals, string memory err) internal { uint curQueuedWithdrawals = _getCumulativeWithdrawals(staker); // Use timewarp to get previous cumulative withdrawals @@ -1925,7 +1890,14 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { assertEq(prevQueuedWithdrawals + withdrawals.length, curQueuedWithdrawals, err); } - function assert_Snap_Added_QueuedWithdrawal(User staker, Withdrawal memory, /*withdrawal*/ string memory err) internal { + function assert_Snap_Added_QueuedWithdrawal( + User staker, + Withdrawal memory, + /*withdrawal*/ + string memory err + ) + internal + { uint curQueuedWithdrawal = _getCumulativeWithdrawals(staker); // Use timewarp to get previous cumulative withdrawals uint prevQueuedWithdrawal = _getPrevCumulativeWithdrawals(staker); @@ -1933,11 +1905,9 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { assertEq(prevQueuedWithdrawal + 1, curQueuedWithdrawal, err); } - /** - * - * SNAPSHOT ASSERTIONS: EIGENPODS - * - */ + /// + /// SNAPSHOT ASSERTIONS: EIGENPODS + /// function assert_Snap_Added_ActiveValidatorCount(User staker, uint addedValidators, string memory err) internal { uint curActiveValidatorCount = _getActiveValidatorCount(staker); uint prevActiveValidatorCount = _getPrevActiveValidatorCount(staker); @@ -2078,11 +2048,9 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { assertEq(curBCSF, prevBCSF, err); } - /** - * - * UTILITY METHODS - * - */ + /// + /// UTILITY METHODS + /// /// @dev Fetches the opreator's allocation delay; asserts that it is set function _getExistingAllocationDelay(User operator) internal view returns (uint32) { @@ -2396,9 +2364,7 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter { return (withdrawStrats, withdrawShares); } - /** - * Helpful getters: - */ + /// Helpful getters: function _randSlashType() internal returns (BeaconChainMock.SlashType) { return BeaconChainMock.SlashType(_randUint({min: 0, max: 2})); } diff --git a/src/test/integration/IntegrationChecks.t.sol b/src/test/integration/IntegrationChecks.t.sol index c9ed0b08b1..d3197b3611 100644 --- a/src/test/integration/IntegrationChecks.t.sol +++ b/src/test/integration/IntegrationChecks.t.sol @@ -10,11 +10,9 @@ contract IntegrationCheckUtils is IntegrationBase { using SlashingLib for *; using StdStyle for *; - /** - * - * EIGENPOD CHECKS - * - */ + /// + /// EIGENPOD CHECKS + /// function check_VerifyWC_State(User staker, uint40[] memory validators, uint64 beaconBalanceGwei) internal { uint beaconBalanceWei = beaconBalanceGwei * GWEI_TO_WEI; assert_DepositShares_GTE_WithdrawableShares( @@ -202,11 +200,9 @@ contract IntegrationCheckUtils is IntegrationBase { assert_Snap_Unchanged_DSF(staker, BEACONCHAIN_ETH_STRAT.toArray(), "staker DSF should not have changed"); } - /** - * - * LST/DELEGATION CHECKS - * - */ + /// + /// LST/DELEGATION CHECKS + /// function check_Deposit_State(User staker, IStrategy[] memory strategies, uint[] memory shares) internal { /// Deposit into strategies: // For each of the assets held by the staker (either StrategyManager or EigenPodManager), @@ -461,16 +457,14 @@ contract IntegrationCheckUtils is IntegrationBase { assert_DSF_WAD(staker, strategies, "check_Redelegate_State: staker dsfs should be reset to wad"); } - /** - * @notice Overloaded function to check the state after a withdrawal as tokens, accepting a non-user type for the operator. - * @param staker The staker who completed the withdrawal. - * @param operator The operator address, which can be a non-user type like address(0). - * @param withdrawal The details of the withdrawal that was completed. - * @param strategies The strategies from which the withdrawal was made. - * @param shares The number of shares involved in the withdrawal. - * @param tokens The tokens received after the withdrawal. - * @param expectedTokens The expected tokens to be received after the withdrawal. - */ + /// @notice Overloaded function to check the state after a withdrawal as tokens, accepting a non-user type for the operator. + /// @param staker The staker who completed the withdrawal. + /// @param operator The operator address, which can be a non-user type like address(0). + /// @param withdrawal The details of the withdrawal that was completed. + /// @param strategies The strategies from which the withdrawal was made. + /// @param shares The number of shares involved in the withdrawal. + /// @param tokens The tokens received after the withdrawal. + /// @param expectedTokens The expected tokens to be received after the withdrawal. function check_Withdrawal_AsTokens_State( User staker, User operator, @@ -591,11 +585,9 @@ contract IntegrationCheckUtils is IntegrationBase { assert_Snap_DSF_State_WithdrawalAsShares(staker, strategies, "staker's DSF not updated correctly"); } - /** - * - * ALM - BASIC INVARIANTS - * - */ + /// + /// ALM - BASIC INVARIANTS + /// /// @dev Run a method as if the user's allocation delay had passed /// When done, reset block number so other tests are not affected @@ -653,11 +645,9 @@ contract IntegrationCheckUtils is IntegrationBase { assert_NoSlashableStake(operator, operatorSet, "operator should not have any slashable stake"); } - /** - * - * ALM - REGISTRATION - * - */ + /// + /// ALM - REGISTRATION + /// /// @dev Basic invariants that should hold after EVERY call to `registerForOperatorSets` /// NOTE: These are only slightly modified from check_Base_Deregistration_State @@ -685,9 +675,7 @@ contract IntegrationCheckUtils is IntegrationBase { /// @dev Check invariants for registerForOperatorSets given a set of strategies /// for which NO allocation exists (currentMag/pendingDiff are 0) /// @param unallocated For the given operatorSet, a list of strategies for which NO allocation exists - function check_Registration_State_NoAllocation(User operator, OperatorSet memory operatorSet, IStrategy[] memory unallocated) - internal - { + function check_Registration_State_NoAllocation(User operator, OperatorSet memory operatorSet, IStrategy[] memory unallocated) internal { check_Base_Registration_State(operator, operatorSet); /// The operator is NOT allocated, ensure their slashable stake and magnitudes are unchanged @@ -741,11 +729,9 @@ contract IntegrationCheckUtils is IntegrationBase { assert_Snap_Unchanged_SlashableStake(operator, operatorSet, allStrats, "operator should not have increased slashable stake"); } - /** - * - * ALM - DEREGISTRATION - * - */ + /// + /// ALM - DEREGISTRATION + /// /// @dev Basic invariants that should hold after EVERY call to `deregisterFromOperatorSets` /// NOTE: These are only slightly modified from check_Base_Registration_State @@ -802,11 +788,9 @@ contract IntegrationCheckUtils is IntegrationBase { ); } - /** - * - * ALM - INCREASE ALLOCATION - * - */ + /// + /// ALM - INCREASE ALLOCATION + /// /// @dev Basic invariants that should hold after all calls to `modifyAllocations` /// where the input `params` represent an _increase_ in magnitude @@ -955,11 +939,9 @@ contract IntegrationCheckUtils is IntegrationBase { assert_HasSlashableStake(operator, params, "operator should have expected slashable stake for each strategy"); } - /** - * - * ALM - DECREASE ALLOCATION - * - */ + /// + /// ALM - DECREASE ALLOCATION + /// /// @dev Basic invariants that should hold after all calls to `modifyAllocations` /// where the input `params` represent a decrease in magnitude @@ -1055,11 +1037,9 @@ contract IntegrationCheckUtils is IntegrationBase { check_ActiveModification_State(operator, deallocateParams); } - /** - * - * ALM - SLASHING - * - */ + /// + /// ALM - SLASHING + /// function check_Base_Slashing_State(User operator, AllocateParams memory allocateParams, SlashingParams memory slashParams, uint slashId) internal { @@ -1108,11 +1088,9 @@ contract IntegrationCheckUtils is IntegrationBase { ); } - /** - * - * DUAL SLASHING CHECKS - * - */ + /// + /// DUAL SLASHING CHECKS + /// function check_CompleteCheckpoint_AfterAVSSlash_BCSlash( User staker, uint40[] memory slashedValidators, diff --git a/src/test/integration/IntegrationDeployer.t.sol b/src/test/integration/IntegrationDeployer.t.sol index c03da8f5b6..e50b6325df 100644 --- a/src/test/integration/IntegrationDeployer.t.sol +++ b/src/test/integration/IntegrationDeployer.t.sol @@ -119,13 +119,11 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { return "Integration Deployer"; } - /** - * @dev Anyone who wants to test using this contract in a separate repo via submodules may have to - * override this function to set the correct paths for the deployment info files. - * - * This setUp function will account for specific --fork-url flags and deploy/upgrade contracts accordingly. - * Note that forkIds are also created so you can make explicit fork tests using cheats.selectFork(forkId) - */ + /// @dev Anyone who wants to test using this contract in a separate repo via submodules may have to + /// override this function to set the correct paths for the deployment info files. + /// + /// This setUp function will account for specific --fork-url flags and deploy/upgrade contracts accordingly. + /// Note that forkIds are also created so you can make explicit fork tests using cheats.selectFork(forkId) function setUp() public virtual { bool forkMainnet = isForktest(); @@ -145,12 +143,10 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { return; } - /** - * env FOUNDRY_PROFILE=forktest forge t --mc Integration - * - * Running foundry like this will trigger the fork test profile, - * lowering fuzz runs and using a remote RPC to test against mainnet state - */ + /// env FOUNDRY_PROFILE=forktest forge t --mc Integration + /// + /// Running foundry like this will trigger the fork test profile, + /// lowering fuzz runs and using a remote RPC to test against mainnet state function isForktest() public view returns (bool) { return _hash("forktest") == _hash(cheats.envOr(string("FOUNDRY_PROFILE"), string("default"))); } @@ -526,11 +522,9 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { assertTrue(userTypes.length != 0, "_configRand: no user types selected"); } - /** - * @dev Create a new User with a random config using the range defined in `_configRand` - * - * Assets are pulled from `strategies` based on a random staker/operator `assetType` - */ + /// @dev Create a new User with a random config using the range defined in `_configRand` + /// + /// Assets are pulled from `strategies` based on a random staker/operator `assetType` function _randUser(string memory name) internal noTracing returns (User, IStrategy[] memory, uint[] memory) { // Deploy new User contract uint userType = _randUserType(); @@ -756,10 +750,8 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { } } - /** - * @dev Converts a bitmap into an array of bytes - * @dev Each byte in the input is processed as indicating a single bit to flip in the bitmap - */ + /// @dev Converts a bitmap into an array of bytes + /// @dev Each byte in the input is processed as indicating a single bit to flip in the bitmap function _bitmapToBytes(uint bitmap) internal pure returns (bytes memory bytesArray) { for (uint i = 0; i < 256; ++i) { // Mask for i-th bit diff --git a/src/test/integration/MultichainIntegrationBase.t.sol b/src/test/integration/MultichainIntegrationBase.t.sol index 62476f6cea..a740bac01b 100644 --- a/src/test/integration/MultichainIntegrationBase.t.sol +++ b/src/test/integration/MultichainIntegrationBase.t.sol @@ -19,11 +19,9 @@ import "src/contracts/interfaces/IAllocationManager.sol"; import "src/contracts/interfaces/IOperatorTableUpdater.sol"; import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; -/** - * @title MultichainIntegrationBase - * @notice Base contract for multichain integration tests - * @dev Provides deployment, setup, and utility methods for multichain contracts - */ +/// @title MultichainIntegrationBase +/// @notice Base contract for multichain integration tests +/// @dev Provides deployment, setup, and utility methods for multichain contracts abstract contract MultichainIntegrationBase is IntegrationBase { using StdStyle for *; using BN254 for BN254.G1Point; @@ -55,22 +53,16 @@ abstract contract MultichainIntegrationBase is IntegrationBase { uint constant ECDSA_PRIVATE_KEY_2 = 0x22; uint constant ECDSA_PRIVATE_KEY_3 = 0x33; - /** - * Deployment and Setup Methods - */ + /// Deployment and Setup Methods - /** - * @notice Deploy all multichain contracts - */ + /// @notice Deploy all multichain contracts function _deployContracts() internal { // The base contracts are already deployed by IntegrationDeployer // We just need to deploy the multichain-specific contracts _deployMultichainContracts(); } - /** - * @notice Deploy multichain-specific contracts - */ + /// @notice Deploy multichain-specific contracts function _deployMultichainContracts() internal { // Deploy OperatorTableCalculatorMock operatorTableCalculatorMock = new OperatorTableCalculatorMock(); @@ -149,8 +141,7 @@ abstract contract MultichainIntegrationBase is IntegrationBase { uint[] memory totalWeights = new uint[](1); totalWeights[0] = operatorWeights[0]; - IOperatorTableCalculatorTypes.BN254OperatorSetInfo memory initialOperatorSetInfo = IOperatorTableCalculatorTypes - .BN254OperatorSetInfo({ + IOperatorTableCalculatorTypes.BN254OperatorSetInfo memory initialOperatorSetInfo = IOperatorTableCalculatorTypes.BN254OperatorSetInfo({ operatorInfoTreeRoot: operatorInfoTreeRoot, numOperators: 1, aggregatePubkey: aggregatePubkey, @@ -193,9 +184,7 @@ abstract contract MultichainIntegrationBase is IntegrationBase { console.log("Multichain contracts setup completed"); } - /** - * User and Operator Helper Methods - */ + /// User and Operator Helper Methods // Operator set IDs for different curve types (each operator set supports only one curve type) uint32 constant BN254_OPERATOR_SET_ID = 1; @@ -243,8 +232,9 @@ abstract contract MultichainIntegrationBase is IntegrationBase { // Configure the operator set for BN254 curve type (only once) try keyRegistrar.configureOperatorSet(operatorSet, IKeyRegistrarTypes.CurveType.BN254) { - // Configuration successful - } catch { + // Configuration successful + } + catch { // Already configured, which is fine } @@ -287,8 +277,9 @@ abstract contract MultichainIntegrationBase is IntegrationBase { // Configure the operator set for ECDSA curve type (only once) try keyRegistrar.configureOperatorSet(operatorSet, IKeyRegistrarTypes.CurveType.ECDSA) { - // Configuration successful - } catch { + // Configuration successful + } + catch { // Already configured, which is fine } @@ -305,13 +296,9 @@ abstract contract MultichainIntegrationBase is IntegrationBase { keyRegistrar.registerKey(address(operator), operatorSet, keyData, signatureBytes); } - /** - * Table Generation and Transport Simulation - */ + /// Table Generation and Transport Simulation - /** - * @notice Generate BN254 operator table for testing - */ + /// @notice Generate BN254 operator table for testing function _generateBN254OperatorTable(OperatorSet memory operatorSet, User[] memory operators) internal view @@ -361,9 +348,7 @@ abstract contract MultichainIntegrationBase is IntegrationBase { }); } - /** - * @notice Generate ECDSA operator table for testing - */ + /// @notice Generate ECDSA operator table for testing function _generateECDSAOperatorTable(OperatorSet memory operatorSet, User[] memory operators) internal view @@ -396,13 +381,9 @@ abstract contract MultichainIntegrationBase is IntegrationBase { // For testing, we just log the simulation } - /** - * Certificate Generation and Verification Helpers - */ + /// Certificate Generation and Verification Helpers - /** - * @notice Generate BN254 certificate for testing - */ + /// @notice Generate BN254 certificate for testing function _generateBN254Certificate( OperatorSet memory operatorSet, uint32 referenceTimestamp, @@ -455,9 +436,7 @@ abstract contract MultichainIntegrationBase is IntegrationBase { }); } - /** - * @notice Generate ECDSA certificate for testing - */ + /// @notice Generate ECDSA certificate for testing function _generateECDSACertificate( OperatorSet memory operatorSet, uint32 referenceTimestamp, @@ -511,9 +490,7 @@ abstract contract MultichainIntegrationBase is IntegrationBase { }); } - /** - * Cross-Chain Registry Helpers - */ + /// Cross-Chain Registry Helpers /// @dev Create a generation reservation using the real CrossChainRegistry function _createGenerationReservation(uint chainId, uint generationId, User operator, uint32 operatorSetId) internal { @@ -610,9 +587,7 @@ abstract contract MultichainIntegrationBase is IntegrationBase { ecdsaCertificateVerifier.updateOperatorTable(operatorSet, uint32(block.timestamp), operatorInfos, config); } - /** - * Utility Methods - */ + /// Utility Methods /// @dev Calculate hash of BN254 operator table function _hashBN254Table(IOperatorTableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo) internal pure returns (bytes32) { @@ -639,9 +614,7 @@ abstract contract MultichainIntegrationBase is IntegrationBase { cheats.warp(block.timestamp + seconds_); } - /** - * HELPER FUNCTIONS FOR MULTICHAIN TESTS - */ + /// HELPER FUNCTIONS FOR MULTICHAIN TESTS /// @dev Create and configure test operator set function _createTestOperatorSet(uint32 operatorSetId) internal { @@ -871,9 +844,7 @@ abstract contract MultichainIntegrationBase is IntegrationBase { }); } - /** - * PRIVATE KEY HELPERS - */ + /// PRIVATE KEY HELPERS function _getBN254PrivateKeys() internal pure returns (uint[] memory) { uint[] memory keys = new uint[](1); keys[0] = 123; // Main test operator key @@ -912,9 +883,7 @@ abstract contract MultichainIntegrationBase is IntegrationBase { } } - /** - * Initialization Override - */ + /// Initialization Override function setUp() public virtual override { super.setUp(); diff --git a/src/test/integration/MultichainIntegrationChecks.t.sol b/src/test/integration/MultichainIntegrationChecks.t.sol index 32989da545..31cc7c4990 100644 --- a/src/test/integration/MultichainIntegrationChecks.t.sol +++ b/src/test/integration/MultichainIntegrationChecks.t.sol @@ -16,11 +16,9 @@ contract MultichainIntegrationCheckUtils is MultichainIntegrationBase { using ArrayLib for *; using StdStyle for *; - /** - * - * CERTIFICATE VERIFICATION CHECKS - * - */ + /// + /// CERTIFICATE VERIFICATION CHECKS + /// function check_BN254Certificate_Basic_State( OperatorSet memory operatorSet, IBN254CertificateVerifierTypes.BN254Certificate memory certificate @@ -129,11 +127,9 @@ contract MultichainIntegrationCheckUtils is MultichainIntegrationBase { } } - /** - * - * GENERATION RESERVATION CHECKS - * - */ + /// + /// GENERATION RESERVATION CHECKS + /// function check_GenerationReservation_Exists_State(OperatorSet memory operatorSet) internal { OperatorSet[] memory activeReservations = crossChainRegistry.getActiveGenerationReservations(); bool reservationFound = false; @@ -177,11 +173,9 @@ contract MultichainIntegrationCheckUtils is MultichainIntegrationBase { assertEq(config.maxStalenessPeriod, 0, "Max staleness period should be cleared"); } - /** - * - * TIMESTAMP AND TIMING CHECKS - * - */ + /// + /// TIMESTAMP AND TIMING CHECKS + /// function check_LatestReferenceTimestamp_Updated_State(uint32 expectedTimestamp) internal { uint32 latestReferenceTimestamp = operatorTableUpdater.getLatestReferenceTimestamp(); assertEq(latestReferenceTimestamp, expectedTimestamp, "Latest reference timestamp should match expected value"); @@ -197,11 +191,9 @@ contract MultichainIntegrationCheckUtils is MultichainIntegrationBase { assertEq(operatorSetLatestTimestamp, expectedTimestamp, "ECDSA operator set latest timestamp should match expected value"); } - /** - * - * GLOBAL TABLE ROOT CHECKS - * - */ + /// + /// GLOBAL TABLE ROOT CHECKS + /// function check_GlobalTableRoot_PostSameTimestamp_Reverts( bytes32 globalTableRoot, uint32 referenceTimestamp, @@ -237,11 +229,9 @@ contract MultichainIntegrationCheckUtils is MultichainIntegrationBase { operatorTableUpdater.updateOperatorTable(staleTimestamp, validGlobalTableRoot, operatorSetIndex, proof, operatorTable); } - /** - * - * COMPLETE FLOW CHECKS - * - */ + /// + /// COMPLETE FLOW CHECKS + /// function check_BN254MultichainFlow_Complete_State( OperatorSet memory operatorSet, IBN254CertificateVerifierTypes.BN254Certificate memory certificate, @@ -315,11 +305,9 @@ contract MultichainIntegrationCheckUtils is MultichainIntegrationBase { check_ECDSAOperatorSetLatestTimestamp_State(operatorSet, referenceTimestamp); } - /** - * - * CERTIFICATE GENERATION HELPERS - * - */ + /// + /// CERTIFICATE GENERATION HELPERS + /// function check_CertificateGeneration_BN254_State( OperatorSet memory operatorSet, uint32 referenceTimestamp, @@ -367,11 +355,9 @@ contract MultichainIntegrationCheckUtils is MultichainIntegrationBase { assertEq(certificate.sig.length, expectedSigLength, "Certificate should have expected signature length"); } - /** - * - * GRANULAR VALIDATION HELPERS - * - */ + /// + /// GRANULAR VALIDATION HELPERS + /// function check_SignedStakes_MinimumThresholds(uint[] memory signedStakes, uint[] memory minimumThresholds, string memory context) internal pure @@ -387,10 +373,7 @@ contract MultichainIntegrationCheckUtils is MultichainIntegrationBase { } } - function check_SignedStakes_ExactValues(uint[] memory signedStakes, uint[] memory expectedValues, string memory context) - internal - pure - { + function check_SignedStakes_ExactValues(uint[] memory signedStakes, uint[] memory expectedValues, string memory context) internal pure { require(signedStakes.length == expectedValues.length, "SignedStakes and expected values length mismatch"); for (uint i = 0; i < signedStakes.length; i++) { @@ -449,11 +432,9 @@ contract MultichainIntegrationCheckUtils is MultichainIntegrationBase { assertGe(signers.length, minimumCount, string.concat(context, ": Should have at least ", vm.toString(minimumCount), " signers")); } - /** - * - * TRANSPORT AND UPDATE CHECKS - * - */ + /// + /// TRANSPORT AND UPDATE CHECKS + /// function check_TableTransport_Success_State(OperatorSet memory operatorSet, uint32 referenceTimestamp, bytes32 expectedGlobalTableRoot) internal { @@ -473,11 +454,9 @@ contract MultichainIntegrationCheckUtils is MultichainIntegrationBase { assertTrue(actualCurveType == expectedCurveType, "Operator set should be configured for expected curve type"); } - /** - * - * KEY REGISTRATION CHECKS - * - */ + /// + /// KEY REGISTRATION CHECKS + /// function check_BN254KeyRegistration_State(User operator, OperatorSet memory operatorSet, BN254.G1Point memory expectedPubkey) internal view @@ -494,11 +473,9 @@ contract MultichainIntegrationCheckUtils is MultichainIntegrationBase { assertEq(registeredPubkey, expectedPubkey, "Registered ECDSA pubkey should match expected"); } - /** - * - * STALENESS PERIOD CHECKS - * - */ + /// + /// STALENESS PERIOD CHECKS + /// function check_BN254Certificate_PostStaleness_Reverts( OperatorSet memory operatorSet, IBN254CertificateVerifierTypes.BN254Certificate memory certificate @@ -564,11 +541,9 @@ contract MultichainIntegrationCheckUtils is MultichainIntegrationBase { assertTrue(newStalenessPeriod != initialStalenessPeriod, "New staleness period should be different from initial"); } - /** - * - * TIME MANIPULATION HELPERS - * - */ + /// + /// TIME MANIPULATION HELPERS + /// function check_TimeAdvance_PostStaleness_State(uint32 referenceTimestamp, uint32 stalenessPeriod, uint expectedBlockTimestamp) internal view @@ -583,11 +558,9 @@ contract MultichainIntegrationCheckUtils is MultichainIntegrationBase { assertEq(block.timestamp, expectedBoundaryTimestamp, "Should be exactly at staleness boundary"); } - /** - * - * COMBINED VALIDATION HELPERS - * - */ + /// + /// COMBINED VALIDATION HELPERS + /// function check_StalenessScenario_Complete_State( OperatorSet memory operatorSet, uint32 referenceTimestamp, diff --git a/src/test/integration/deprecatedInterfaces/mainnet/BeaconChainProofs.sol b/src/test/integration/deprecatedInterfaces/mainnet/BeaconChainProofs.sol index d909147cc1..8772827248 100644 --- a/src/test/integration/deprecatedInterfaces/mainnet/BeaconChainProofs.sol +++ b/src/test/integration/deprecatedInterfaces/mainnet/BeaconChainProofs.sol @@ -123,15 +123,13 @@ library BeaconChainProofs_DeprecatedM1 { uint40 validatorIndex; } - /** - * - * @notice This function is parses the balanceRoot to get the uint64 balance of a validator. During merkleization of the - * beacon state balance tree, four uint64 values (making 32 bytes) are grouped together and treated as a single leaf in the merkle tree. Thus the - * validatorIndex mod 4 is used to determine which of the four uint64 values to extract from the balanceRoot. - * @param validatorIndex is the index of the validator being proven for. - * @param balanceRoot is the combination of 4 validator balances being proven for. - * @return The validator's balance, in Gwei - */ + /// + /// @notice This function is parses the balanceRoot to get the uint64 balance of a validator. During merkleization of the + /// beacon state balance tree, four uint64 values (making 32 bytes) are grouped together and treated as a single leaf in the merkle tree. Thus the + /// validatorIndex mod 4 is used to determine which of the four uint64 values to extract from the balanceRoot. + /// @param validatorIndex is the index of the validator being proven for. + /// @param balanceRoot is the combination of 4 validator balances being proven for. + /// @return The validator's balance, in Gwei function getBalanceFromBalanceRoot(uint40 validatorIndex, bytes32 balanceRoot) internal pure returns (uint64) { uint bitShiftAmount = (validatorIndex % 4) * 64; bytes32 validatorBalanceLittleEndian = bytes32((uint(balanceRoot) << bitShiftAmount)); @@ -139,26 +137,22 @@ library BeaconChainProofs_DeprecatedM1 { return validatorBalance; } - /** - * @notice This function verifies merkle proofs of the fields of a certain validator against a beacon chain state root - * @param validatorIndex the index of the proven validator - * @param beaconStateRoot is the beacon chain state root to be proven against. - * @param proof is the data used in proving the validator's fields - * @param validatorFields the claimed fields of the validator - */ + /// @notice This function verifies merkle proofs of the fields of a certain validator against a beacon chain state root + /// @param validatorIndex the index of the proven validator + /// @param beaconStateRoot is the beacon chain state root to be proven against. + /// @param proof is the data used in proving the validator's fields + /// @param validatorFields the claimed fields of the validator function verifyValidatorFields(uint40 validatorIndex, bytes32 beaconStateRoot, bytes calldata proof, bytes32[] calldata validatorFields) internal view { require( - validatorFields.length == 2 ** VALIDATOR_FIELD_TREE_HEIGHT, + validatorFields.length == 2**VALIDATOR_FIELD_TREE_HEIGHT, "BeaconChainProofs.verifyValidatorFields: Validator fields has incorrect length" ); - /** - * Note: the length of the validator merkle proof is BeaconChainProofs.VALIDATOR_TREE_HEIGHT + 1. - * There is an additional layer added by hashing the root with the length of the validator list - */ + /// Note: the length of the validator merkle proof is BeaconChainProofs.VALIDATOR_TREE_HEIGHT + 1. + /// There is an additional layer added by hashing the root with the length of the validator list require( proof.length == 32 * ((VALIDATOR_TREE_HEIGHT + 1) + BEACON_STATE_FIELD_TREE_HEIGHT), "BeaconChainProofs.verifyValidatorFields: Proof has incorrect length" @@ -174,13 +168,11 @@ library BeaconChainProofs_DeprecatedM1 { ); } - /** - * @notice This function verifies merkle proofs of the balance of a certain validator against a beacon chain state root - * @param validatorIndex the index of the proven validator - * @param beaconStateRoot is the beacon chain state root to be proven against. - * @param proof is the proof of the balance against the beacon chain state root - * @param balanceRoot is the serialized balance used to prove the balance of the validator (refer to `getBalanceFromBalanceRoot` above for detailed explanation) - */ + /// @notice This function verifies merkle proofs of the balance of a certain validator against a beacon chain state root + /// @param validatorIndex the index of the proven validator + /// @param beaconStateRoot is the beacon chain state root to be proven against. + /// @param proof is the proof of the balance against the beacon chain state root + /// @param balanceRoot is the serialized balance used to prove the balance of the validator (refer to `getBalanceFromBalanceRoot` above for detailed explanation) function verifyValidatorBalance(uint40 validatorIndex, bytes32 beaconStateRoot, bytes calldata proof, bytes32 balanceRoot) internal view @@ -190,10 +182,8 @@ library BeaconChainProofs_DeprecatedM1 { "BeaconChainProofs.verifyValidatorBalance: Proof has incorrect length" ); - /** - * the beacon state's balance list is a list of uint64 values, and these are grouped together in 4s when merkleized. - * Therefore, the index of the balance of a validator is validatorIndex/4 - */ + /// the beacon state's balance list is a list of uint64 values, and these are grouped together in 4s when merkleized. + /// Therefore, the index of the balance of a validator is validatorIndex/4 uint balanceIndex = uint(validatorIndex / 4); balanceIndex = (BALANCE_INDEX << (BALANCE_TREE_HEIGHT + 1)) | balanceIndex; @@ -203,27 +193,25 @@ library BeaconChainProofs_DeprecatedM1 { ); } - /** - * @notice This function verifies the slot and the withdrawal fields for a given withdrawal - * @param beaconStateRoot is the beacon chain state root to be proven against. - * @param proofs is the provided set of merkle proofs - * @param withdrawalFields is the serialized withdrawal container to be proven - */ + /// @notice This function verifies the slot and the withdrawal fields for a given withdrawal + /// @param beaconStateRoot is the beacon chain state root to be proven against. + /// @param proofs is the provided set of merkle proofs + /// @param withdrawalFields is the serialized withdrawal container to be proven function verifyWithdrawalProofs(bytes32 beaconStateRoot, WithdrawalProofs calldata proofs, bytes32[] calldata withdrawalFields) internal view { require( - withdrawalFields.length == 2 ** WITHDRAWAL_FIELD_TREE_HEIGHT, + withdrawalFields.length == 2**WITHDRAWAL_FIELD_TREE_HEIGHT, "BeaconChainProofs.verifyWithdrawalProofs: withdrawalFields has incorrect length" ); require( - proofs.blockHeaderRootIndex < 2 ** BLOCK_ROOTS_TREE_HEIGHT, + proofs.blockHeaderRootIndex < 2**BLOCK_ROOTS_TREE_HEIGHT, "BeaconChainProofs.verifyWithdrawalProofs: blockRootIndex is too large" ); require( - proofs.withdrawalIndex < 2 ** WITHDRAWALS_TREE_HEIGHT, "BeaconChainProofs.verifyWithdrawalProofs: withdrawalIndex is too large" + proofs.withdrawalIndex < 2**WITHDRAWALS_TREE_HEIGHT, "BeaconChainProofs.verifyWithdrawalProofs: withdrawalIndex is too large" ); // verify the block header proof length @@ -248,10 +236,8 @@ library BeaconChainProofs_DeprecatedM1 { "BeaconChainProofs.verifyWithdrawalProofs: blockNumberProof has incorrect length" ); - /** - * Computes the block_header_index relative to the beaconStateRoot. It concatenates the indexes of all the - * intermediate root indexes from the bottom of the sub trees (the block header container) to the top of the tree - */ + /// Computes the block_header_index relative to the beaconStateRoot. It concatenates the indexes of all the + /// intermediate root indexes from the bottom of the sub trees (the block header container) to the top of the tree uint blockHeaderIndex = BLOCK_ROOTS_INDEX << (BLOCK_ROOTS_TREE_HEIGHT) | uint(proofs.blockHeaderRootIndex); // Verify the blockHeaderRoot against the beaconStateRoot require( @@ -280,13 +266,11 @@ library BeaconChainProofs_DeprecatedM1 { "BeaconChainProofs.verifyWithdrawalProofs: Invalid blockNumber merkle proof" ); - /** - * Next we verify the withdrawal fields against the blockHeaderRoot: - * First we compute the withdrawal_index relative to the blockHeaderRoot by concatenating the indexes of all the - * intermediate root indexes from the bottom of the sub trees (the withdrawal container) to the top, the blockHeaderRoot. - * Then we calculate merkleize the withdrawalFields container to calculate the the withdrawalRoot. - * Finally we verify the withdrawalRoot against the executionPayloadRoot. - */ + /// Next we verify the withdrawal fields against the blockHeaderRoot: + /// First we compute the withdrawal_index relative to the blockHeaderRoot by concatenating the indexes of all the + /// intermediate root indexes from the bottom of the sub trees (the withdrawal container) to the top, the blockHeaderRoot. + /// Then we calculate merkleize the withdrawalFields container to calculate the the withdrawalRoot. + /// Finally we verify the withdrawalRoot against the executionPayloadRoot. uint withdrawalIndex = WITHDRAWALS_INDEX << (WITHDRAWALS_TREE_HEIGHT + 1) | uint(proofs.withdrawalIndex); bytes32 withdrawalRoot = Merkle.merkleizeSha256(withdrawalFields); require( diff --git a/src/test/integration/deprecatedInterfaces/mainnet/IAllocationManager.sol b/src/test/integration/deprecatedInterfaces/mainnet/IAllocationManager.sol index 16a091041c..c9e3ad065e 100644 --- a/src/test/integration/deprecatedInterfaces/mainnet/IAllocationManager.sol +++ b/src/test/integration/deprecatedInterfaces/mainnet/IAllocationManager.sol @@ -3,21 +3,17 @@ pragma solidity ^0.8.27; import "src/contracts/interfaces/IStrategy.sol"; -/** - * @notice Interface of the allocationManager prior to redistribution. - * @dev The interface remains the exact same, except `SlashOperator` does not return the slashID or shares - * @dev This interface is the minimal possibl interface needed for the redistribution upgrade test - */ +/// @notice Interface of the allocationManager prior to redistribution. +/// @dev The interface remains the exact same, except `SlashOperator` does not return the slashID or shares +/// @dev This interface is the minimal possibl interface needed for the redistribution upgrade test interface IAllocationManager_PreRedistribution { - /** - * @notice Struct containing parameters to slashing - * @param operator the address to slash - * @param operatorSetId the ID of the operatorSet the operator is being slashed on behalf of - * @param strategies the set of strategies to slash - * @param wadsToSlash the parts in 1e18 to slash, this will be proportional to the operator's - * slashable stake allocation for the operatorSet - * @param description the description of the slashing provided by the AVS for legibility - */ + /// @notice Struct containing parameters to slashing + /// @param operator the address to slash + /// @param operatorSetId the ID of the operatorSet the operator is being slashed on behalf of + /// @param strategies the set of strategies to slash + /// @param wadsToSlash the parts in 1e18 to slash, this will be proportional to the operator's + /// slashable stake allocation for the operatorSet + /// @param description the description of the slashing provided by the AVS for legibility struct SlashingParams { address operator; uint32 operatorSetId; @@ -26,27 +22,25 @@ interface IAllocationManager_PreRedistribution { string description; } - /** - * @notice Called by an AVS to slash an operator in a given operator set. The operator must be registered - * and have slashable stake allocated to the operator set. - * - * @param avs The AVS address initiating the slash. - * @param params The slashing parameters, containing: - * - operator: The operator to slash. - * - operatorSetId: The ID of the operator set the operator is being slashed from. - * - strategies: Array of strategies to slash allocations from (must be in ascending order). - * - wadsToSlash: Array of proportions to slash from each strategy (must be between 0 and 1e18). - * - description: Description of why the operator was slashed. - * - * @dev For each strategy: - * 1. Reduces the operator's current allocation magnitude by wadToSlash proportion. - * 2. Reduces the strategy's max and encumbered magnitudes proportionally. - * 3. If there is a pending deallocation, reduces it proportionally. - * 4. Updates the operator's shares in the DelegationManager. - * - * @dev Small slashing amounts may not result in actual token burns due to - * rounding, which will result in small amounts of tokens locked in the contract - * rather than fully burning through the burn mechanism. - */ + /// @notice Called by an AVS to slash an operator in a given operator set. The operator must be registered + /// and have slashable stake allocated to the operator set. + /// + /// @param avs The AVS address initiating the slash. + /// @param params The slashing parameters, containing: + /// - operator: The operator to slash. + /// - operatorSetId: The ID of the operator set the operator is being slashed from. + /// - strategies: Array of strategies to slash allocations from (must be in ascending order). + /// - wadsToSlash: Array of proportions to slash from each strategy (must be between 0 and 1e18). + /// - description: Description of why the operator was slashed. + /// + /// @dev For each strategy: + /// 1. Reduces the operator's current allocation magnitude by wadToSlash proportion. + /// 2. Reduces the strategy's max and encumbered magnitudes proportionally. + /// 3. If there is a pending deallocation, reduces it proportionally. + /// 4. Updates the operator's shares in the DelegationManager. + /// + /// @dev Small slashing amounts may not result in actual token burns due to + /// rounding, which will result in small amounts of tokens locked in the contract + /// rather than fully burning through the burn mechanism. function slashOperator(address avs, SlashingParams calldata params) external; } diff --git a/src/test/integration/deprecatedInterfaces/mainnet/IBeaconChainOracle.sol b/src/test/integration/deprecatedInterfaces/mainnet/IBeaconChainOracle.sol index f19a73be69..e80409ba47 100644 --- a/src/test/integration/deprecatedInterfaces/mainnet/IBeaconChainOracle.sol +++ b/src/test/integration/deprecatedInterfaces/mainnet/IBeaconChainOracle.sol @@ -1,12 +1,10 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; -/** - * @notice DEPRECATED INTERFACE at commit hash https://github.com/Layr-Labs/eigenlayer-contracts/tree/0139d6213927c0a7812578899ddd3dda58051928 - * @title Interface for the BeaconStateOracle contract. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - */ +/// @notice DEPRECATED INTERFACE at commit hash https://github.com/Layr-Labs/eigenlayer-contracts/tree/0139d6213927c0a7812578899ddd3dda58051928 +/// @title Interface for the BeaconStateOracle contract. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service interface IBeaconChainOracle_DeprecatedM1 { /// @notice Largest blockNumber that has been confirmed by the oracle. function latestConfirmedOracleBlockNumber() external view returns (uint64); @@ -26,39 +24,29 @@ interface IBeaconChainOracle_DeprecatedM1 { /// @notice Total number of members of the set of oracle signers. function totalOracleSigners() external view returns (uint); - /** - * @notice Number of oracle signers that must vote for a state root in order for the state root to be confirmed. - * Adjustable by this contract's owner through use of the `setThreshold` function. - * @dev We note that there is an edge case -- when the threshold is adjusted downward, if a state root already has enough votes to meet the *new* threshold, - * the state root must still receive one additional vote from an oracle signer to be confirmed. This behavior is intended, to minimize unexpected root confirmations. - */ + /// @notice Number of oracle signers that must vote for a state root in order for the state root to be confirmed. + /// Adjustable by this contract's owner through use of the `setThreshold` function. + /// @dev We note that there is an edge case -- when the threshold is adjusted downward, if a state root already has enough votes to meet the *new* threshold, + /// the state root must still receive one additional vote from an oracle signer to be confirmed. This behavior is intended, to minimize unexpected root confirmations. function threshold() external view returns (uint); - /** - * @notice Owner-only function used to modify the value of the `threshold` variable. - * @param _threshold Desired new value for the `threshold` variable. Function will revert if this is set to zero. - */ + /// @notice Owner-only function used to modify the value of the `threshold` variable. + /// @param _threshold Desired new value for the `threshold` variable. Function will revert if this is set to zero. function setThreshold(uint _threshold) external; - /** - * @notice Owner-only function used to add a signer to the set of oracle signers. - * @param _oracleSigners Array of address to be added to the set. - * @dev Function will have no effect on the i-th input address if `_oracleSigners[i]`is already in the set of oracle signers. - */ + /// @notice Owner-only function used to add a signer to the set of oracle signers. + /// @param _oracleSigners Array of address to be added to the set. + /// @dev Function will have no effect on the i-th input address if `_oracleSigners[i]`is already in the set of oracle signers. function addOracleSigners(address[] memory _oracleSigners) external; - /** - * @notice Owner-only function used to remove a signer from the set of oracle signers. - * @param _oracleSigners Array of address to be removed from the set. - * @dev Function will have no effect on the i-th input address if `_oracleSigners[i]`is already not in the set of oracle signers. - */ + /// @notice Owner-only function used to remove a signer from the set of oracle signers. + /// @param _oracleSigners Array of address to be removed from the set. + /// @dev Function will have no effect on the i-th input address if `_oracleSigners[i]`is already not in the set of oracle signers. function removeOracleSigners(address[] memory _oracleSigners) external; - /** - * @notice Called by a member of the set of oracle signers to assert that the Beacon Chain state root is `stateRoot` at `blockNumber`. - * @dev The state root will be finalized once the total number of votes *for this exact state root at this exact blockNumber* meets the `threshold` value. - * @param blockNumber The Beacon Chain blockNumber of interest. - * @param stateRoot The Beacon Chain state root that the caller asserts was the correct root, at the specified `blockNumber`. - */ + /// @notice Called by a member of the set of oracle signers to assert that the Beacon Chain state root is `stateRoot` at `blockNumber`. + /// @dev The state root will be finalized once the total number of votes *for this exact state root at this exact blockNumber* meets the `threshold` value. + /// @param blockNumber The Beacon Chain blockNumber of interest. + /// @param stateRoot The Beacon Chain state root that the caller asserts was the correct root, at the specified `blockNumber`. function voteForBeaconChainStateRoot(uint64 blockNumber, bytes32 stateRoot) external; } diff --git a/src/test/integration/deprecatedInterfaces/mainnet/IDelayedWithdrawalRouter.sol b/src/test/integration/deprecatedInterfaces/mainnet/IDelayedWithdrawalRouter.sol index 82f9b552d8..7e40ccb1a7 100644 --- a/src/test/integration/deprecatedInterfaces/mainnet/IDelayedWithdrawalRouter.sol +++ b/src/test/integration/deprecatedInterfaces/mainnet/IDelayedWithdrawalRouter.sol @@ -15,23 +15,17 @@ interface IDelayedWithdrawalRouter_DeprecatedM1 { DelayedWithdrawal[] delayedWithdrawals; } - /** - * @notice Creates an delayed withdrawal for `msg.value` to the `recipient`. - * @dev Only callable by the `podOwner`'s EigenPod contract. - */ + /// @notice Creates an delayed withdrawal for `msg.value` to the `recipient`. + /// @dev Only callable by the `podOwner`'s EigenPod contract. function createDelayedWithdrawal(address podOwner, address recipient) external payable; - /** - * @notice Called in order to withdraw delayed withdrawals made to the `recipient` that have passed the `withdrawalDelayBlocks` period. - * @param recipient The address to claim delayedWithdrawals for. - * @param maxNumberOfWithdrawalsToClaim Used to limit the maximum number of withdrawals to loop through claiming. - */ + /// @notice Called in order to withdraw delayed withdrawals made to the `recipient` that have passed the `withdrawalDelayBlocks` period. + /// @param recipient The address to claim delayedWithdrawals for. + /// @param maxNumberOfWithdrawalsToClaim Used to limit the maximum number of withdrawals to loop through claiming. function claimDelayedWithdrawals(address recipient, uint maxNumberOfWithdrawalsToClaim) external; - /** - * @notice Called in order to withdraw delayed withdrawals made to the caller that have passed the `withdrawalDelayBlocks` period. - * @param maxNumberOfWithdrawalsToClaim Used to limit the maximum number of withdrawals to loop through claiming. - */ + /// @notice Called in order to withdraw delayed withdrawals made to the caller that have passed the `withdrawalDelayBlocks` period. + /// @param maxNumberOfWithdrawalsToClaim Used to limit the maximum number of withdrawals to loop through claiming. function claimDelayedWithdrawals(uint maxNumberOfWithdrawalsToClaim) external; /// @notice Owner-only function for modifying the value of the `withdrawalDelayBlocks` variable. @@ -55,9 +49,7 @@ interface IDelayedWithdrawalRouter_DeprecatedM1 { /// @notice Convenience function for checking whether or not the delayedWithdrawal at the `index`th entry from the `_userWithdrawals[user].delayedWithdrawals` array is currently claimable function canClaimDelayedWithdrawal(address user, uint index) external view returns (bool); - /** - * @notice Delay enforced by this contract for completing any delayedWithdrawal. Measured in blocks, and adjustable by this contract's owner, - * up to a maximum of `MAX_WITHDRAWAL_DELAY_BLOCKS`. Minimum value is 0 (i.e. no delay enforced). - */ + /// @notice Delay enforced by this contract for completing any delayedWithdrawal. Measured in blocks, and adjustable by this contract's owner, + /// up to a maximum of `MAX_WITHDRAWAL_DELAY_BLOCKS`. Minimum value is 0 (i.e. no delay enforced). function withdrawalDelayBlocks() external view returns (uint); } diff --git a/src/test/integration/deprecatedInterfaces/mainnet/IDelegationManager.sol b/src/test/integration/deprecatedInterfaces/mainnet/IDelegationManager.sol index c191d3373c..2c52826f30 100644 --- a/src/test/integration/deprecatedInterfaces/mainnet/IDelegationManager.sol +++ b/src/test/integration/deprecatedInterfaces/mainnet/IDelegationManager.sol @@ -5,40 +5,32 @@ import "src/contracts/interfaces/IStrategy.sol"; import "src/contracts/interfaces/IPausable.sol"; import "src/contracts/interfaces/ISignatureUtilsMixin.sol"; -/** - * @notice M2 DEPRECATED INTERFACE at commit hash https://github.com/Layr-Labs/eigenlayer-contracts/tree/426f461c59b4f0e16f8becdffd747075edcaded8 - * @title Interface for delegation & withdrawal of funds in EigenLayer. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - */ +/// @notice M2 DEPRECATED INTERFACE at commit hash https://github.com/Layr-Labs/eigenlayer-contracts/tree/426f461c59b4f0e16f8becdffd747075edcaded8 +/// @title Interface for delegation & withdrawal of funds in EigenLayer. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service interface IDelegationManager_DeprecatedM2 is IPausable, ISignatureUtilsMixin { // @notice Struct used for storing information about a single operator who has registered with EigenLayer struct OperatorDetails { /// @notice DEPRECATED -- this field is no longer used, payments are handled in PaymentCoordinator.sol address __deprecated_earningsReceiver; - /** - * @notice Address to verify signatures when a staker wishes to delegate to the operator, as well as controlling "forced undelegations". - * @dev Signature verification follows these rules: - * 1) If this address is left as address(0), then any staker will be free to delegate to the operator, i.e. no signature verification will be performed. - * 2) If this address is an EOA (i.e. it has no code), then we follow standard ECDSA signature verification for delegations to the operator. - * 3) If this address is a contract (i.e. it has code) then we forward a call to the contract and verify that it returns the correct EIP-1271 "magic value". - */ + /// @notice Address to verify signatures when a staker wishes to delegate to the operator, as well as controlling "forced undelegations". + /// @dev Signature verification follows these rules: + /// 1) If this address is left as address(0), then any staker will be free to delegate to the operator, i.e. no signature verification will be performed. + /// 2) If this address is an EOA (i.e. it has no code), then we follow standard ECDSA signature verification for delegations to the operator. + /// 3) If this address is a contract (i.e. it has code) then we forward a call to the contract and verify that it returns the correct EIP-1271 "magic value". address delegationApprover; - /** - * @notice A minimum delay -- measured in blocks -- enforced between: - * 1) the operator signalling their intent to register for a service, via calling `Slasher.optIntoSlashing` - * and - * 2) the operator completing registration for the service, via the service ultimately calling `Slasher.recordFirstStakeUpdate` - * @dev note that for a specific operator, this value *cannot decrease*, i.e. if the operator wishes to modify their OperatorDetails, - * then they are only allowed to either increase this value or keep it the same. - */ + /// @notice A minimum delay -- measured in blocks -- enforced between: + /// 1) the operator signalling their intent to register for a service, via calling `Slasher.optIntoSlashing` + /// and + /// 2) the operator completing registration for the service, via the service ultimately calling `Slasher.recordFirstStakeUpdate` + /// @dev note that for a specific operator, this value *cannot decrease*, i.e. if the operator wishes to modify their OperatorDetails, + /// then they are only allowed to either increase this value or keep it the same. uint32 stakerOptOutWindowBlocks; } - /** - * @notice Abstract struct used in calculating an EIP712 signature for a staker to approve that they (the staker themselves) delegate to a specific operator. - * @dev Used in computing the `STAKER_DELEGATION_TYPEHASH` and as a reference in the computation of the stakerDigestHash in the `delegateToBySignature` function. - */ + /// @notice Abstract struct used in calculating an EIP712 signature for a staker to approve that they (the staker themselves) delegate to a specific operator. + /// @dev Used in computing the `STAKER_DELEGATION_TYPEHASH` and as a reference in the computation of the stakerDigestHash in the `delegateToBySignature` function. struct StakerDelegation { // the staker who is delegating address staker; @@ -50,10 +42,8 @@ interface IDelegationManager_DeprecatedM2 is IPausable, ISignatureUtilsMixin { uint expiry; } - /** - * @notice Abstract struct used in calculating an EIP712 signature for an operator's delegationApprover to approve that a specific staker delegate to the operator. - * @dev Used in computing the `DELEGATION_APPROVAL_TYPEHASH` and as a reference in the computation of the approverDigestHash in the `_delegate` function. - */ + /// @notice Abstract struct used in calculating an EIP712 signature for an operator's delegationApprover to approve that a specific staker delegate to the operator. + /// @dev Used in computing the `DELEGATION_APPROVAL_TYPEHASH` and as a reference in the computation of the approverDigestHash in the `_delegate` function. struct DelegationApproval { // the staker who is delegating address staker; @@ -65,11 +55,9 @@ interface IDelegationManager_DeprecatedM2 is IPausable, ISignatureUtilsMixin { uint expiry; } - /** - * Struct type used to specify an existing queued withdrawal. Rather than storing the entire struct, only a hash is stored. - * In functions that operate on existing queued withdrawals -- e.g. completeQueuedWithdrawal`, the data is resubmitted and the hash of the submitted - * data is computed by `calculateWithdrawalRoot` and checked against the stored hash in order to confirm the integrity of the submitted data. - */ + /// Struct type used to specify an existing queued withdrawal. Rather than storing the entire struct, only a hash is stored. + /// In functions that operate on existing queued withdrawals -- e.g. completeQueuedWithdrawal`, the data is resubmitted and the hash of the submitted + /// data is computed by `calculateWithdrawalRoot` and checked against the stored hash in order to confirm the integrity of the submitted data. struct Withdrawal { // The address that originated the Withdrawal address staker; @@ -96,64 +84,54 @@ interface IDelegationManager_DeprecatedM2 is IPausable, ISignatureUtilsMixin { address withdrawer; } - /** - * @notice Registers the caller as an operator in EigenLayer. - * @param registeringOperatorDetails is the `OperatorDetails` for the operator. - * @param metadataURI is a URI for the operator's metadata, i.e. a link providing more details on the operator. - * - * @dev Once an operator is registered, they cannot 'deregister' as an operator, and they will forever be considered "delegated to themself". - * @dev This function will revert if the caller is already delegated to an operator. - * @dev Note that the `metadataURI` is *never stored * and is only emitted in the `OperatorMetadataURIUpdated` event - */ + /// @notice Registers the caller as an operator in EigenLayer. + /// @param registeringOperatorDetails is the `OperatorDetails` for the operator. + /// @param metadataURI is a URI for the operator's metadata, i.e. a link providing more details on the operator. + /// + /// @dev Once an operator is registered, they cannot 'deregister' as an operator, and they will forever be considered "delegated to themself". + /// @dev This function will revert if the caller is already delegated to an operator. + /// @dev Note that the `metadataURI` is *never stored * and is only emitted in the `OperatorMetadataURIUpdated` event function registerAsOperator(OperatorDetails calldata registeringOperatorDetails, string calldata metadataURI) external; - /** - * @notice Updates an operator's stored `OperatorDetails`. - * @param newOperatorDetails is the updated `OperatorDetails` for the operator, to replace their current OperatorDetails`. - * - * @dev The caller must have previously registered as an operator in EigenLayer. - */ + /// @notice Updates an operator's stored `OperatorDetails`. + /// @param newOperatorDetails is the updated `OperatorDetails` for the operator, to replace their current OperatorDetails`. + /// + /// @dev The caller must have previously registered as an operator in EigenLayer. function modifyOperatorDetails(OperatorDetails calldata newOperatorDetails) external; - /** - * @notice Called by an operator to emit an `OperatorMetadataURIUpdated` event indicating the information has updated. - * @param metadataURI The URI for metadata associated with an operator - * @dev Note that the `metadataURI` is *never stored * and is only emitted in the `OperatorMetadataURIUpdated` event - */ + /// @notice Called by an operator to emit an `OperatorMetadataURIUpdated` event indicating the information has updated. + /// @param metadataURI The URI for metadata associated with an operator + /// @dev Note that the `metadataURI` is *never stored * and is only emitted in the `OperatorMetadataURIUpdated` event function updateOperatorMetadataURI(string calldata metadataURI) external; - /** - * @notice Caller delegates their stake to an operator. - * @param operator The account (`msg.sender`) is delegating its assets to for use in serving applications built on EigenLayer. - * @param approverSignatureAndExpiry Verifies the operator approves of this delegation - * @param approverSalt A unique single use value tied to an individual signature. - * @dev The approverSignatureAndExpiry is used in the event that: - * 1) the operator's `delegationApprover` address is set to a non-zero value. - * AND - * 2) neither the operator nor their `delegationApprover` is the `msg.sender`, since in the event that the operator - * or their delegationApprover is the `msg.sender`, then approval is assumed. - * @dev In the event that `approverSignatureAndExpiry` is not checked, its content is ignored entirely; it's recommended to use an empty input - * in this case to save on complexity + gas costs - */ + /// @notice Caller delegates their stake to an operator. + /// @param operator The account (`msg.sender`) is delegating its assets to for use in serving applications built on EigenLayer. + /// @param approverSignatureAndExpiry Verifies the operator approves of this delegation + /// @param approverSalt A unique single use value tied to an individual signature. + /// @dev The approverSignatureAndExpiry is used in the event that: + /// 1) the operator's `delegationApprover` address is set to a non-zero value. + /// AND + /// 2) neither the operator nor their `delegationApprover` is the `msg.sender`, since in the event that the operator + /// or their delegationApprover is the `msg.sender`, then approval is assumed. + /// @dev In the event that `approverSignatureAndExpiry` is not checked, its content is ignored entirely; it's recommended to use an empty input + /// in this case to save on complexity + gas costs function delegateTo(address operator, SignatureWithExpiry memory approverSignatureAndExpiry, bytes32 approverSalt) external; - /** - * @notice Caller delegates a staker's stake to an operator with valid signatures from both parties. - * @param staker The account delegating stake to an `operator` account - * @param operator The account (`staker`) is delegating its assets to for use in serving applications built on EigenLayer. - * @param stakerSignatureAndExpiry Signed data from the staker authorizing delegating stake to an operator - * @param approverSignatureAndExpiry is a parameter that will be used for verifying that the operator approves of this delegation action in the event that: - * @param approverSalt Is a salt used to help guarantee signature uniqueness. Each salt can only be used once by a given approver. - * - * @dev If `staker` is an EOA, then `stakerSignature` is verified to be a valid ECDSA stakerSignature from `staker`, indicating their intention for this action. - * @dev If `staker` is a contract, then `stakerSignature` will be checked according to EIP-1271. - * @dev the operator's `delegationApprover` address is set to a non-zero value. - * @dev neither the operator nor their `delegationApprover` is the `msg.sender`, since in the event that the operator or their delegationApprover - * is the `msg.sender`, then approval is assumed. - * @dev This function will revert if the current `block.timestamp` is equal to or exceeds the expiry - * @dev In the case that `approverSignatureAndExpiry` is not checked, its content is ignored entirely; it's recommended to use an empty input - * in this case to save on complexity + gas costs - */ + /// @notice Caller delegates a staker's stake to an operator with valid signatures from both parties. + /// @param staker The account delegating stake to an `operator` account + /// @param operator The account (`staker`) is delegating its assets to for use in serving applications built on EigenLayer. + /// @param stakerSignatureAndExpiry Signed data from the staker authorizing delegating stake to an operator + /// @param approverSignatureAndExpiry is a parameter that will be used for verifying that the operator approves of this delegation action in the event that: + /// @param approverSalt Is a salt used to help guarantee signature uniqueness. Each salt can only be used once by a given approver. + /// + /// @dev If `staker` is an EOA, then `stakerSignature` is verified to be a valid ECDSA stakerSignature from `staker`, indicating their intention for this action. + /// @dev If `staker` is a contract, then `stakerSignature` will be checked according to EIP-1271. + /// @dev the operator's `delegationApprover` address is set to a non-zero value. + /// @dev neither the operator nor their `delegationApprover` is the `msg.sender`, since in the event that the operator or their delegationApprover + /// is the `msg.sender`, then approval is assumed. + /// @dev This function will revert if the current `block.timestamp` is equal to or exceeds the expiry + /// @dev In the case that `approverSignatureAndExpiry` is not checked, its content is ignored entirely; it's recommended to use an empty input + /// in this case to save on complexity + gas costs function delegateToBySignature( address staker, address operator, @@ -162,41 +140,35 @@ interface IDelegationManager_DeprecatedM2 is IPausable, ISignatureUtilsMixin { bytes32 approverSalt ) external; - /** - * @notice Undelegates the staker from the operator who they are delegated to. Puts the staker into the "undelegation limbo" mode of the EigenPodManager - * and queues a withdrawal of all of the staker's shares in the StrategyManager (to the staker), if necessary. - * @param staker The account to be undelegated. - * @return withdrawalRoot The root of the newly queued withdrawal, if a withdrawal was queued. Otherwise just bytes32(0). - * - * @dev Reverts if the `staker` is also an operator, since operators are not allowed to undelegate from themselves. - * @dev Reverts if the caller is not the staker, nor the operator who the staker is delegated to, nor the operator's specified "delegationApprover" - * @dev Reverts if the `staker` is already undelegated. - */ + /// @notice Undelegates the staker from the operator who they are delegated to. Puts the staker into the "undelegation limbo" mode of the EigenPodManager + /// and queues a withdrawal of all of the staker's shares in the StrategyManager (to the staker), if necessary. + /// @param staker The account to be undelegated. + /// @return withdrawalRoot The root of the newly queued withdrawal, if a withdrawal was queued. Otherwise just bytes32(0). + /// + /// @dev Reverts if the `staker` is also an operator, since operators are not allowed to undelegate from themselves. + /// @dev Reverts if the caller is not the staker, nor the operator who the staker is delegated to, nor the operator's specified "delegationApprover" + /// @dev Reverts if the `staker` is already undelegated. function undelegate(address staker) external returns (bytes32[] memory withdrawalRoot); - /** - * Allows a staker to withdraw some shares. Withdrawn shares/strategies are immediately removed - * from the staker. If the staker is delegated, withdrawn shares/strategies are also removed from - * their operator. - * - * All withdrawn shares/strategies are placed in a queue and can be fully withdrawn after a delay. - */ + /// Allows a staker to withdraw some shares. Withdrawn shares/strategies are immediately removed + /// from the staker. If the staker is delegated, withdrawn shares/strategies are also removed from + /// their operator. + /// + /// All withdrawn shares/strategies are placed in a queue and can be fully withdrawn after a delay. function queueWithdrawals(QueuedWithdrawalParams[] calldata queuedWithdrawalParams) external returns (bytes32[] memory); - /** - * @notice Used to complete the specified `withdrawal`. The caller must match `withdrawal.withdrawer` - * @param withdrawal The Withdrawal to complete. - * @param tokens Array in which the i-th entry specifies the `token` input to the 'withdraw' function of the i-th Strategy in the `withdrawal.strategies` array. - * This input can be provided with zero length if `receiveAsTokens` is set to 'false' (since in that case, this input will be unused) - * @param middlewareTimesIndex is the index in the operator that the staker who triggered the withdrawal was delegated to's middleware times array - * @param receiveAsTokens If true, the shares specified in the withdrawal will be withdrawn from the specified strategies themselves - * and sent to the caller, through calls to `withdrawal.strategies[i].withdraw`. If false, then the shares in the specified strategies - * will simply be transferred to the caller directly. - * @dev middlewareTimesIndex is unused, but will be used in the Slasher eventually - * @dev beaconChainETHStrategy shares are non-transferrable, so if `receiveAsTokens = false` and `withdrawal.withdrawer != withdrawal.staker`, note that - * any beaconChainETHStrategy shares in the `withdrawal` will be _returned to the staker_, rather than transferred to the withdrawer, unlike shares in - * any other strategies, which will be transferred to the withdrawer. - */ + /// @notice Used to complete the specified `withdrawal`. The caller must match `withdrawal.withdrawer` + /// @param withdrawal The Withdrawal to complete. + /// @param tokens Array in which the i-th entry specifies the `token` input to the 'withdraw' function of the i-th Strategy in the `withdrawal.strategies` array. + /// This input can be provided with zero length if `receiveAsTokens` is set to 'false' (since in that case, this input will be unused) + /// @param middlewareTimesIndex is the index in the operator that the staker who triggered the withdrawal was delegated to's middleware times array + /// @param receiveAsTokens If true, the shares specified in the withdrawal will be withdrawn from the specified strategies themselves + /// and sent to the caller, through calls to `withdrawal.strategies[i].withdraw`. If false, then the shares in the specified strategies + /// will simply be transferred to the caller directly. + /// @dev middlewareTimesIndex is unused, but will be used in the Slasher eventually + /// @dev beaconChainETHStrategy shares are non-transferrable, so if `receiveAsTokens = false` and `withdrawal.withdrawer != withdrawal.staker`, note that + /// any beaconChainETHStrategy shares in the `withdrawal` will be _returned to the staker_, rather than transferred to the withdrawer, unlike shares in + /// any other strategies, which will be transferred to the withdrawer. function completeQueuedWithdrawal( Withdrawal calldata withdrawal, IERC20[] calldata tokens, @@ -204,15 +176,13 @@ interface IDelegationManager_DeprecatedM2 is IPausable, ISignatureUtilsMixin { bool receiveAsTokens ) external; - /** - * @notice Array-ified version of `completeQueuedWithdrawal`. - * Used to complete the specified `withdrawals`. The function caller must match `withdrawals[...].withdrawer` - * @param withdrawals The Withdrawals to complete. - * @param tokens Array of tokens for each Withdrawal. See `completeQueuedWithdrawal` for the usage of a single array. - * @param middlewareTimesIndexes One index to reference per Withdrawal. See `completeQueuedWithdrawal` for the usage of a single index. - * @param receiveAsTokens Whether or not to complete each withdrawal as tokens. See `completeQueuedWithdrawal` for the usage of a single boolean. - * @dev See `completeQueuedWithdrawal` for relevant dev tags - */ + /// @notice Array-ified version of `completeQueuedWithdrawal`. + /// Used to complete the specified `withdrawals`. The function caller must match `withdrawals[...].withdrawer` + /// @param withdrawals The Withdrawals to complete. + /// @param tokens Array of tokens for each Withdrawal. See `completeQueuedWithdrawal` for the usage of a single array. + /// @param middlewareTimesIndexes One index to reference per Withdrawal. See `completeQueuedWithdrawal` for the usage of a single index. + /// @param receiveAsTokens Whether or not to complete each withdrawal as tokens. See `completeQueuedWithdrawal` for the usage of a single boolean. + /// @dev See `completeQueuedWithdrawal` for relevant dev tags function completeQueuedWithdrawals( Withdrawal[] calldata withdrawals, IERC20[][] calldata tokens, @@ -220,157 +190,117 @@ interface IDelegationManager_DeprecatedM2 is IPausable, ISignatureUtilsMixin { bool[] calldata receiveAsTokens ) external; - /** - * @notice Increases a staker's delegated share balance in a strategy. - * @param staker The address to increase the delegated shares for their operator. - * @param strategy The strategy in which to increase the delegated shares. - * @param shares The number of shares to increase. - * - * @dev *If the staker is actively delegated*, then increases the `staker`'s delegated shares in `strategy` by `shares`. Otherwise does nothing. - * @dev Callable only by the StrategyManager or EigenPodManager. - */ + /// @notice Increases a staker's delegated share balance in a strategy. + /// @param staker The address to increase the delegated shares for their operator. + /// @param strategy The strategy in which to increase the delegated shares. + /// @param shares The number of shares to increase. + /// + /// @dev *If the staker is actively delegated*, then increases the `staker`'s delegated shares in `strategy` by `shares`. Otherwise does nothing. + /// @dev Callable only by the StrategyManager or EigenPodManager. function increaseDelegatedShares(address staker, IStrategy strategy, uint shares) external; - /** - * @notice Decreases a staker's delegated share balance in a strategy. - * @param staker The address to increase the delegated shares for their operator. - * @param strategy The strategy in which to decrease the delegated shares. - * @param shares The number of shares to decrease. - * - * @dev *If the staker is actively delegated*, then decreases the `staker`'s delegated shares in `strategy` by `shares`. Otherwise does nothing. - * @dev Callable only by the StrategyManager or EigenPodManager. - */ + /// @notice Decreases a staker's delegated share balance in a strategy. + /// @param staker The address to increase the delegated shares for their operator. + /// @param strategy The strategy in which to decrease the delegated shares. + /// @param shares The number of shares to decrease. + /// + /// @dev *If the staker is actively delegated*, then decreases the `staker`'s delegated shares in `strategy` by `shares`. Otherwise does nothing. + /// @dev Callable only by the StrategyManager or EigenPodManager. function decreaseDelegatedShares(address staker, IStrategy strategy, uint shares) external; - /** - * @notice Owner-only function for modifying the value of the `minWithdrawalDelayBlocks` variable. - * @param newMinWithdrawalDelayBlocks new value of `minWithdrawalDelayBlocks`. - */ + /// @notice Owner-only function for modifying the value of the `minWithdrawalDelayBlocks` variable. + /// @param newMinWithdrawalDelayBlocks new value of `minWithdrawalDelayBlocks`. function setMinWithdrawalDelayBlocks(uint newMinWithdrawalDelayBlocks) external; - /** - * @notice Called by owner to set the minimum withdrawal delay blocks for each passed in strategy - * Note that the min number of blocks to complete a withdrawal of a strategy is - * MAX(minWithdrawalDelayBlocks, strategyWithdrawalDelayBlocks[strategy]) - * @param strategies The strategies to set the minimum withdrawal delay blocks for - * @param withdrawalDelayBlocks The minimum withdrawal delay blocks to set for each strategy - */ + /// @notice Called by owner to set the minimum withdrawal delay blocks for each passed in strategy + /// Note that the min number of blocks to complete a withdrawal of a strategy is + /// MAX(minWithdrawalDelayBlocks, strategyWithdrawalDelayBlocks[strategy]) + /// @param strategies The strategies to set the minimum withdrawal delay blocks for + /// @param withdrawalDelayBlocks The minimum withdrawal delay blocks to set for each strategy function setStrategyWithdrawalDelayBlocks(IStrategy[] calldata strategies, uint[] calldata withdrawalDelayBlocks) external; - /** - * @notice returns the address of the operator that `staker` is delegated to. - * @notice Mapping: staker => operator whom the staker is currently delegated to. - * @dev Note that returning address(0) indicates that the staker is not actively delegated to any operator. - */ + /// @notice returns the address of the operator that `staker` is delegated to. + /// @notice Mapping: staker => operator whom the staker is currently delegated to. + /// @dev Note that returning address(0) indicates that the staker is not actively delegated to any operator. function delegatedTo(address staker) external view returns (address); - /** - * @notice Returns the OperatorDetails struct associated with an `operator`. - */ + /// @notice Returns the OperatorDetails struct associated with an `operator`. function operatorDetails(address operator) external view returns (OperatorDetails memory); - /** - * @notice Returns the delegationApprover account for an operator - */ + /// @notice Returns the delegationApprover account for an operator function delegationApprover(address operator) external view returns (address); - /** - * @notice Returns the stakerOptOutWindowBlocks for an operator - */ + /// @notice Returns the stakerOptOutWindowBlocks for an operator function stakerOptOutWindowBlocks(address operator) external view returns (uint); - /** - * @notice Given array of strategies, returns array of shares for the operator - */ + /// @notice Given array of strategies, returns array of shares for the operator function getOperatorShares(address operator, IStrategy[] memory strategies) external view returns (uint[] memory); - /** - * @notice Given a list of strategies, return the minimum number of blocks that must pass to withdraw - * from all the inputted strategies. Return value is >= minWithdrawalDelayBlocks as this is the global min withdrawal delay. - * @param strategies The strategies to check withdrawal delays for - */ + /// @notice Given a list of strategies, return the minimum number of blocks that must pass to withdraw + /// from all the inputted strategies. Return value is >= minWithdrawalDelayBlocks as this is the global min withdrawal delay. + /// @param strategies The strategies to check withdrawal delays for function getWithdrawalDelay(IStrategy[] calldata strategies) external view returns (uint); - /** - * @notice returns the total number of shares in `strategy` that are delegated to `operator`. - * @notice Mapping: operator => strategy => total number of shares in the strategy delegated to the operator. - * @dev By design, the following invariant should hold for each Strategy: - * (operator's shares in delegation manager) = sum (shares above zero of all stakers delegated to operator) - * = sum (delegateable shares of all stakers delegated to the operator) - */ + /// @notice returns the total number of shares in `strategy` that are delegated to `operator`. + /// @notice Mapping: operator => strategy => total number of shares in the strategy delegated to the operator. + /// @dev By design, the following invariant should hold for each Strategy: + /// (operator's shares in delegation manager) = sum (shares above zero of all stakers delegated to operator) + /// = sum (delegateable shares of all stakers delegated to the operator) function operatorShares(address operator, IStrategy strategy) external view returns (uint); - /** - * @notice Returns the number of actively-delegatable shares a staker has across all strategies. - * @dev Returns two empty arrays in the case that the Staker has no actively-delegateable shares. - */ + /// @notice Returns the number of actively-delegatable shares a staker has across all strategies. + /// @dev Returns two empty arrays in the case that the Staker has no actively-delegateable shares. function getDelegatableShares(address staker) external view returns (IStrategy[] memory, uint[] memory); - /** - * @notice Returns 'true' if `staker` *is* actively delegated, and 'false' otherwise. - */ + /// @notice Returns 'true' if `staker` *is* actively delegated, and 'false' otherwise. function isDelegated(address staker) external view returns (bool); - /** - * @notice Returns true is an operator has previously registered for delegation. - */ + /// @notice Returns true is an operator has previously registered for delegation. function isOperator(address operator) external view returns (bool); /// @notice Mapping: staker => number of signed delegation nonces (used in `delegateToBySignature`) from the staker that the contract has already checked function stakerNonce(address staker) external view returns (uint); - /** - * @notice Mapping: delegationApprover => 32-byte salt => whether or not the salt has already been used by the delegationApprover. - * @dev Salts are used in the `delegateTo` and `delegateToBySignature` functions. Note that these functions only process the delegationApprover's - * signature + the provided salt if the operator being delegated to has specified a nonzero address as their `delegationApprover`. - */ + /// @notice Mapping: delegationApprover => 32-byte salt => whether or not the salt has already been used by the delegationApprover. + /// @dev Salts are used in the `delegateTo` and `delegateToBySignature` functions. Note that these functions only process the delegationApprover's + /// signature + the provided salt if the operator being delegated to has specified a nonzero address as their `delegationApprover`. function delegationApproverSaltIsSpent(address _delegationApprover, bytes32 salt) external view returns (bool); - /** - * @notice Minimum delay enforced by this contract for completing queued withdrawals. Measured in blocks, and adjustable by this contract's owner, - * up to a maximum of `MAX_WITHDRAWAL_DELAY_BLOCKS`. Minimum value is 0 (i.e. no delay enforced). - * Note that strategies each have a separate withdrawal delay, which can be greater than this value. So the minimum number of blocks that must pass - * to withdraw a strategy is MAX(minWithdrawalDelayBlocks, strategyWithdrawalDelayBlocks[strategy]) - */ + /// @notice Minimum delay enforced by this contract for completing queued withdrawals. Measured in blocks, and adjustable by this contract's owner, + /// up to a maximum of `MAX_WITHDRAWAL_DELAY_BLOCKS`. Minimum value is 0 (i.e. no delay enforced). + /// Note that strategies each have a separate withdrawal delay, which can be greater than this value. So the minimum number of blocks that must pass + /// to withdraw a strategy is MAX(minWithdrawalDelayBlocks, strategyWithdrawalDelayBlocks[strategy]) function minWithdrawalDelayBlocks() external view returns (uint); - /** - * @notice Minimum delay enforced by this contract per Strategy for completing queued withdrawals. Measured in blocks, and adjustable by this contract's owner, - * up to a maximum of `MAX_WITHDRAWAL_DELAY_BLOCKS`. Minimum value is 0 (i.e. no delay enforced). - */ + /// @notice Minimum delay enforced by this contract per Strategy for completing queued withdrawals. Measured in blocks, and adjustable by this contract's owner, + /// up to a maximum of `MAX_WITHDRAWAL_DELAY_BLOCKS`. Minimum value is 0 (i.e. no delay enforced). function strategyWithdrawalDelayBlocks(IStrategy strategy) external view returns (uint); /// @notice return address of the beaconChainETHStrategy function beaconChainETHStrategy() external view returns (IStrategy); - /** - * @notice Calculates the digestHash for a `staker` to sign to delegate to an `operator` - * @param staker The signing staker - * @param operator The operator who is being delegated to - * @param expiry The desired expiry time of the staker's signature - */ + /// @notice Calculates the digestHash for a `staker` to sign to delegate to an `operator` + /// @param staker The signing staker + /// @param operator The operator who is being delegated to + /// @param expiry The desired expiry time of the staker's signature function calculateCurrentStakerDelegationDigestHash(address staker, address operator, uint expiry) external view returns (bytes32); - /** - * @notice Calculates the digest hash to be signed and used in the `delegateToBySignature` function - * @param staker The signing staker - * @param _stakerNonce The nonce of the staker. In practice we use the staker's current nonce, stored at `stakerNonce[staker]` - * @param operator The operator who is being delegated to - * @param expiry The desired expiry time of the staker's signature - */ + /// @notice Calculates the digest hash to be signed and used in the `delegateToBySignature` function + /// @param staker The signing staker + /// @param _stakerNonce The nonce of the staker. In practice we use the staker's current nonce, stored at `stakerNonce[staker]` + /// @param operator The operator who is being delegated to + /// @param expiry The desired expiry time of the staker's signature function calculateStakerDelegationDigestHash(address staker, uint _stakerNonce, address operator, uint expiry) external view returns (bytes32); - /** - * @notice Calculates the digest hash to be signed by the operator's delegationApprove and used in the `delegateTo` and `delegateToBySignature` functions. - * @param staker The account delegating their stake - * @param operator The account receiving delegated stake - * @param _delegationApprover the operator's `delegationApprover` who will be signing the delegationHash (in general) - * @param approverSalt A unique and single use value associated with the approver signature. - * @param expiry Time after which the approver's signature becomes invalid - */ + /// @notice Calculates the digest hash to be signed by the operator's delegationApprove and used in the `delegateTo` and `delegateToBySignature` functions. + /// @param staker The account delegating their stake + /// @param operator The account receiving delegated stake + /// @param _delegationApprover the operator's `delegationApprover` who will be signing the delegationHash (in general) + /// @param approverSalt A unique and single use value associated with the approver signature. + /// @param expiry Time after which the approver's signature becomes invalid function calculateDelegationApprovalDigestHash( address staker, address operator, @@ -388,13 +318,11 @@ interface IDelegationManager_DeprecatedM2 is IPausable, ISignatureUtilsMixin { /// @notice The EIP-712 typehash for the DelegationApproval struct used by the contract function DELEGATION_APPROVAL_TYPEHASH() external view returns (bytes32); - /** - * @notice Getter function for the current EIP-712 domain separator for this contract. - * - * @dev The domain separator will change in the event of a fork that changes the ChainID. - * @dev By introducing a domain separator the DApp developers are guaranteed that there can be no signature collision. - * for more detailed information please read EIP-712. - */ + /// @notice Getter function for the current EIP-712 domain separator for this contract. + /// + /// @dev The domain separator will change in the event of a fork that changes the ChainID. + /// @dev By introducing a domain separator the DApp developers are guaranteed that there can be no signature collision. + /// for more detailed information please read EIP-712. function domainSeparator() external view returns (bytes32); /// @notice Mapping: staker => cumulative number of queued withdrawals they have ever initiated. diff --git a/src/test/integration/deprecatedInterfaces/mainnet/IEigenPod.sol b/src/test/integration/deprecatedInterfaces/mainnet/IEigenPod.sol index de591074ba..ae40d19ff1 100644 --- a/src/test/integration/deprecatedInterfaces/mainnet/IEigenPod.sol +++ b/src/test/integration/deprecatedInterfaces/mainnet/IEigenPod.sol @@ -4,23 +4,18 @@ pragma solidity ^0.8.27; import "./BeaconChainProofs.sol"; import "./IEigenPodManager.sol"; -/** - * @notice M2 DEPRECATED INTERFACE at commit hash https://github.com/Layr-Labs/eigenlayer-contracts/tree/426f461c59b4f0e16f8becdffd747075edcaded8 - * @title The implementation contract used for restaking beacon chain ETH on EigenLayer - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - */ +/// @notice M2 DEPRECATED INTERFACE at commit hash https://github.com/Layr-Labs/eigenlayer-contracts/tree/426f461c59b4f0e16f8becdffd747075edcaded8 +/// @title The implementation contract used for restaking beacon chain ETH on EigenLayer +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service interface IEigenPod_DeprecatedM2 { - /** - * - * STRUCTS / ENUMS - * - */ + /// + /// STRUCTS / ENUMS + /// enum VALIDATOR_STATUS { INACTIVE, // doesnt exist ACTIVE, // staked on ethpos and withdrawal credentials are pointed to the EigenPod WITHDRAWN // withdrawn from the Beacon Chain - } struct ValidatorInfo { @@ -41,11 +36,9 @@ interface IEigenPod_DeprecatedM2 { int128 balanceDeltasGwei; } - /** - * - * EXTERNAL STATE-CHANGING METHODS - * - */ + /// + /// EXTERNAL STATE-CHANGING METHODS + /// /// @notice Used to initialize the pointers to contracts crucial to the pod's functionality, in beacon proxy construction from EigenPodManager function initialize(address owner) external; @@ -53,58 +46,50 @@ interface IEigenPod_DeprecatedM2 { /// @notice Called by EigenPodManager when the owner wants to create another ETH validator. function stake(bytes calldata pubkey, bytes calldata signature, bytes32 depositDataRoot) external payable; - /** - * @notice Transfers `amountWei` in ether from this contract to the specified `recipient` address - * @notice Called by EigenPodManager to withdrawBeaconChainETH that has been added to the EigenPod's balance due to a withdrawal from the beacon chain. - * @dev The podOwner must have already proved sufficient withdrawals, so that this pod's `withdrawableRestakedExecutionLayerGwei` exceeds the - * `amountWei` input (when converted to GWEI). - * @dev Reverts if `amountWei` is not a whole Gwei amount - */ + /// @notice Transfers `amountWei` in ether from this contract to the specified `recipient` address + /// @notice Called by EigenPodManager to withdrawBeaconChainETH that has been added to the EigenPod's balance due to a withdrawal from the beacon chain. + /// @dev The podOwner must have already proved sufficient withdrawals, so that this pod's `withdrawableRestakedExecutionLayerGwei` exceeds the + /// `amountWei` input (when converted to GWEI). + /// @dev Reverts if `amountWei` is not a whole Gwei amount function withdrawRestakedBeaconChainETH(address recipient, uint amount) external; - /** - * @dev Create a checkpoint used to prove this pod's active validator set. Checkpoints are completed - * by submitting one checkpoint proof per ACTIVE validator. During the checkpoint process, the total - * change in ACTIVE validator balance is tracked, and any validators with 0 balance are marked `WITHDRAWN`. - * @dev Once finalized, the pod owner is awarded shares corresponding to: - * - the total change in their ACTIVE validator balances - * - any ETH in the pod not already awarded shares - * @dev A checkpoint cannot be created if the pod already has an outstanding checkpoint. If - * this is the case, the pod owner MUST complete the existing checkpoint before starting a new one. - * @param revertIfNoBalance Forces a revert if the pod ETH balance is 0. This allows the pod owner - * to prevent accidentally starting a checkpoint that will not increase their shares - */ + /// @dev Create a checkpoint used to prove this pod's active validator set. Checkpoints are completed + /// by submitting one checkpoint proof per ACTIVE validator. During the checkpoint process, the total + /// change in ACTIVE validator balance is tracked, and any validators with 0 balance are marked `WITHDRAWN`. + /// @dev Once finalized, the pod owner is awarded shares corresponding to: + /// - the total change in their ACTIVE validator balances + /// - any ETH in the pod not already awarded shares + /// @dev A checkpoint cannot be created if the pod already has an outstanding checkpoint. If + /// this is the case, the pod owner MUST complete the existing checkpoint before starting a new one. + /// @param revertIfNoBalance Forces a revert if the pod ETH balance is 0. This allows the pod owner + /// to prevent accidentally starting a checkpoint that will not increase their shares function startCheckpoint(bool revertIfNoBalance) external; - /** - * @dev Progress the current checkpoint towards completion by submitting one or more validator - * checkpoint proofs. Anyone can call this method to submit proofs towards the current checkpoint. - * For each validator proven, the current checkpoint's `proofsRemaining` decreases. - * @dev If the checkpoint's `proofsRemaining` reaches 0, the checkpoint is finalized. - * (see `_updateCheckpoint` for more details) - * @dev This method can only be called when there is a currently-active checkpoint. - * @param balanceContainerProof proves the beacon's current balance container root against a checkpoint's `beaconBlockRoot` - * @param proofs Proofs for one or more validator current balances against the `balanceContainerRoot` - */ + /// @dev Progress the current checkpoint towards completion by submitting one or more validator + /// checkpoint proofs. Anyone can call this method to submit proofs towards the current checkpoint. + /// For each validator proven, the current checkpoint's `proofsRemaining` decreases. + /// @dev If the checkpoint's `proofsRemaining` reaches 0, the checkpoint is finalized. + /// (see `_updateCheckpoint` for more details) + /// @dev This method can only be called when there is a currently-active checkpoint. + /// @param balanceContainerProof proves the beacon's current balance container root against a checkpoint's `beaconBlockRoot` + /// @param proofs Proofs for one or more validator current balances against the `balanceContainerRoot` function verifyCheckpointProofs( BeaconChainProofs.BalanceContainerProof calldata balanceContainerProof, BeaconChainProofs.BalanceProof[] calldata proofs ) external; - /** - * @dev Verify one or more validators have their withdrawal credentials pointed at this EigenPod, and award - * shares based on their effective balance. Proven validators are marked `ACTIVE` within the EigenPod, and - * future checkpoint proofs will need to include them. - * @dev Withdrawal credential proofs MUST NOT be older than `currentCheckpointTimestamp`. - * @dev Validators proven via this method MUST NOT have an exit epoch set already. - * @param beaconTimestamp the beacon chain timestamp sent to the 4788 oracle contract. Corresponds - * to the parent beacon block root against which the proof is verified. - * @param stateRootProof proves a beacon state root against a beacon block root - * @param validatorIndices a list of validator indices being proven - * @param validatorFieldsProofs proofs of each validator's `validatorFields` against the beacon state root - * @param validatorFields the fields of the beacon chain "Validator" container. See consensus specs for - * details: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator - */ + /// @dev Verify one or more validators have their withdrawal credentials pointed at this EigenPod, and award + /// shares based on their effective balance. Proven validators are marked `ACTIVE` within the EigenPod, and + /// future checkpoint proofs will need to include them. + /// @dev Withdrawal credential proofs MUST NOT be older than `currentCheckpointTimestamp`. + /// @dev Validators proven via this method MUST NOT have an exit epoch set already. + /// @param beaconTimestamp the beacon chain timestamp sent to the 4788 oracle contract. Corresponds + /// to the parent beacon block root against which the proof is verified. + /// @param stateRootProof proves a beacon state root against a beacon block root + /// @param validatorIndices a list of validator indices being proven + /// @param validatorFieldsProofs proofs of each validator's `validatorFields` against the beacon state root + /// @param validatorFields the fields of the beacon chain "Validator" container. See consensus specs for + /// details: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator function verifyWithdrawalCredentials( uint64 beaconTimestamp, BeaconChainProofs.StateRootProof calldata stateRootProof, @@ -113,36 +98,34 @@ interface IEigenPod_DeprecatedM2 { bytes32[][] calldata validatorFields ) external; - /** - * @dev Prove that one of this pod's active validators was slashed on the beacon chain. A successful - * staleness proof allows the caller to start a checkpoint. - * - * @dev Note that in order to start a checkpoint, any existing checkpoint must already be completed! - * (See `_startCheckpoint` for details) - * - * @dev Note that this method allows anyone to start a checkpoint as soon as a slashing occurs on the beacon - * chain. This is intended to make it easier to external watchers to keep a pod's balance up to date. - * - * @dev Note too that beacon chain slashings are not instant. There is a delay between the initial slashing event - * and the validator's final exit back to the execution layer. During this time, the validator's balance may or - * may not drop further due to a correlation penalty. This method allows proof of a slashed validator - * to initiate a checkpoint for as long as the validator remains on the beacon chain. Once the validator - * has exited and been checkpointed at 0 balance, they are no longer "checkpoint-able" and cannot be proven - * "stale" via this method. - * See https://eth2book.info/capella/part3/transition/epoch/#slashings for more info. - * - * @param beaconTimestamp the beacon chain timestamp sent to the 4788 oracle contract. Corresponds - * to the parent beacon block root against which the proof is verified. - * @param stateRootProof proves a beacon state root against a beacon block root - * @param proof the fields of the beacon chain "Validator" container, along with a merkle proof against - * the beacon state root. See the consensus specs for more details: - * https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator - * - * @dev Staleness conditions: - * - Validator's last checkpoint is older than `beaconTimestamp` - * - Validator MUST be in `ACTIVE` status in the pod - * - Validator MUST be slashed on the beacon chain - */ + /// @dev Prove that one of this pod's active validators was slashed on the beacon chain. A successful + /// staleness proof allows the caller to start a checkpoint. + /// + /// @dev Note that in order to start a checkpoint, any existing checkpoint must already be completed! + /// (See `_startCheckpoint` for details) + /// + /// @dev Note that this method allows anyone to start a checkpoint as soon as a slashing occurs on the beacon + /// chain. This is intended to make it easier to external watchers to keep a pod's balance up to date. + /// + /// @dev Note too that beacon chain slashings are not instant. There is a delay between the initial slashing event + /// and the validator's final exit back to the execution layer. During this time, the validator's balance may or + /// may not drop further due to a correlation penalty. This method allows proof of a slashed validator + /// to initiate a checkpoint for as long as the validator remains on the beacon chain. Once the validator + /// has exited and been checkpointed at 0 balance, they are no longer "checkpoint-able" and cannot be proven + /// "stale" via this method. + /// See https://eth2book.info/capella/part3/transition/epoch/#slashings for more info. + /// + /// @param beaconTimestamp the beacon chain timestamp sent to the 4788 oracle contract. Corresponds + /// to the parent beacon block root against which the proof is verified. + /// @param stateRootProof proves a beacon state root against a beacon block root + /// @param proof the fields of the beacon chain "Validator" container, along with a merkle proof against + /// the beacon state root. See the consensus specs for more details: + /// https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator + /// + /// @dev Staleness conditions: + /// - Validator's last checkpoint is older than `beaconTimestamp` + /// - Validator MUST be in `ACTIVE` status in the pod + /// - Validator MUST be slashed on the beacon chain function verifyStaleBalance( uint64 beaconTimestamp, BeaconChainProofs.StateRootProof calldata stateRootProof, @@ -161,11 +144,9 @@ interface IEigenPod_DeprecatedM2 { /// pod owner will be able to call `startCheckpoint` and `verifyWithdrawalCredentials` function setProofSubmitter(address newProofSubmitter) external; - /** - * - * VIEW METHODS - * - */ + /// + /// VIEW METHODS + /// /// @notice An address with permissions to call `startCheckpoint` and `verifyWithdrawalCredentials`, set /// by the podOwner. This role exists to allow a podOwner to designate a hot wallet that can call @@ -242,21 +223,19 @@ interface IEigenPod_DeprecatedM2 { /// will revert. function getParentBlockRoot(uint64 timestamp) external view returns (bytes32); } -/** - * @notice DEPRECATED INTERFACE at commit hash https://github.com/Layr-Labs/eigenlayer-contracts/tree/0139d6213927c0a7812578899ddd3dda58051928 - * @title The implementation contract used for restaking beacon chain ETH on EigenLayer - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice The main functionalities are: - * - creating new ETH validators with their withdrawal credentials pointed to this contract - * - proving from beacon chain state roots that withdrawal credentials are pointed to this contract - * - proving from beacon chain state roots the balances of ETH validators with their withdrawal credentials - * pointed to this contract - * - updating aggregate balances in the EigenPodManager - * - withdrawing eth when withdrawals are initiated - * @dev Note that all beacon chain balances are stored as gwei within the beacon chain datastructures. We choose - * to account balances in terms of gwei in the EigenPod contract and convert to wei when making calls to other contracts - */ +/// @notice DEPRECATED INTERFACE at commit hash https://github.com/Layr-Labs/eigenlayer-contracts/tree/0139d6213927c0a7812578899ddd3dda58051928 +/// @title The implementation contract used for restaking beacon chain ETH on EigenLayer +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice The main functionalities are: +/// - creating new ETH validators with their withdrawal credentials pointed to this contract +/// - proving from beacon chain state roots that withdrawal credentials are pointed to this contract +/// - proving from beacon chain state roots the balances of ETH validators with their withdrawal credentials +/// pointed to this contract +/// - updating aggregate balances in the EigenPodManager +/// - withdrawing eth when withdrawals are initiated +/// @dev Note that all beacon chain balances are stored as gwei within the beacon chain datastructures. We choose +/// to account balances in terms of gwei in the EigenPod contract and convert to wei when making calls to other contracts interface IEigenPod_DeprecatedM1 { enum VALIDATOR_STATUS { @@ -264,7 +243,6 @@ interface IEigenPod_DeprecatedM1 { ACTIVE, // staked on ethpos and withdrawal credentials are pointed to the EigenPod OVERCOMMITTED, // proven to be overcommitted to EigenLayer WITHDRAWN // withdrawn from the Beacon Chain - } // this struct keeps track of PartialWithdrawalClaims @@ -302,12 +280,10 @@ interface IEigenPod_DeprecatedM1 { /// @notice Called by EigenPodManager when the owner wants to create another ETH validator. function stake(bytes calldata pubkey, bytes calldata signature, bytes32 depositDataRoot) external payable; - /** - * @notice Transfers `amountWei` in ether from this contract to the specified `recipient` address - * @notice Called by EigenPodManager to withdrawBeaconChainETH that has been added to the EigenPod's balance due to a withdrawal from the beacon chain. - * @dev Called during withdrawal or slashing. - * @dev Note that this function is marked as non-reentrant to prevent the recipient calling back into it - */ + /// @notice Transfers `amountWei` in ether from this contract to the specified `recipient` address + /// @notice Called by EigenPodManager to withdrawBeaconChainETH that has been added to the EigenPod's balance due to a withdrawal from the beacon chain. + /// @dev Called during withdrawal or slashing. + /// @dev Note that this function is marked as non-reentrant to prevent the recipient calling back into it function withdrawRestakedBeaconChainETH(address recipient, uint amount) external; /// @notice The single EigenPodManager for EigenLayer @@ -325,16 +301,14 @@ interface IEigenPod_DeprecatedM1 { ///@notice mapping that tracks proven partial withdrawals function provenPartialWithdrawal(uint40 validatorIndex, uint64 slot) external view returns (bool); - /** - * @notice This function verifies that the withdrawal credentials of the podOwner are pointed to - * this contract. It also verifies the current (not effective) balance of the validator. It verifies the provided proof of the ETH validator against the beacon chain state - * root, marks the validator as 'active' in EigenLayer, and credits the restaked ETH in Eigenlayer. - * @param oracleBlockNumber is the Beacon Chain blockNumber whose state root the `proof` will be proven against. - * @param validatorIndex is the index of the validator being proven, refer to consensus specs - * @param proofs is the bytes that prove the ETH validator's balance and withdrawal credentials against a beacon chain state root - * @param validatorFields are the fields of the "Validator Container", refer to consensus specs - * for details: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator - */ + /// @notice This function verifies that the withdrawal credentials of the podOwner are pointed to + /// this contract. It also verifies the current (not effective) balance of the validator. It verifies the provided proof of the ETH validator against the beacon chain state + /// root, marks the validator as 'active' in EigenLayer, and credits the restaked ETH in Eigenlayer. + /// @param oracleBlockNumber is the Beacon Chain blockNumber whose state root the `proof` will be proven against. + /// @param validatorIndex is the index of the validator being proven, refer to consensus specs + /// @param proofs is the bytes that prove the ETH validator's balance and withdrawal credentials against a beacon chain state root + /// @param validatorFields are the fields of the "Validator Container", refer to consensus specs + /// for details: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator function verifyWithdrawalCredentialsAndBalance( uint64 oracleBlockNumber, uint40 validatorIndex, @@ -342,19 +316,17 @@ interface IEigenPod_DeprecatedM1 { bytes32[] calldata validatorFields ) external; - /** - * @notice This function records an overcommitment of stake to EigenLayer on behalf of a certain ETH validator. - * If successful, the overcommitted balance is penalized (available for withdrawal whenever the pod's balance allows). - * The ETH validator's shares in the enshrined beaconChainETH strategy are also removed from the StrategyManager and undelegated. - * @param oracleBlockNumber The oracleBlockNumber whose state root the `proof` will be proven against. - * Must be within `VERIFY_OVERCOMMITTED_WINDOW_BLOCKS` of the current block. - * @param validatorIndex is the index of the validator being proven, refer to consensus specs - * @param proofs is the proof of the validator's balance and validatorFields in the balance tree and the balanceRoot to prove for - * @param beaconChainETHStrategyIndex is the index of the beaconChainETHStrategy for the pod owner for the callback to - * the StrategyManager in case it must be removed from the list of the podOwners strategies - * @param validatorFields are the fields of the "Validator Container", refer to consensus specs - * @dev For more details on the Beacon Chain spec, see: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator - */ + /// @notice This function records an overcommitment of stake to EigenLayer on behalf of a certain ETH validator. + /// If successful, the overcommitted balance is penalized (available for withdrawal whenever the pod's balance allows). + /// The ETH validator's shares in the enshrined beaconChainETH strategy are also removed from the StrategyManager and undelegated. + /// @param oracleBlockNumber The oracleBlockNumber whose state root the `proof` will be proven against. + /// Must be within `VERIFY_OVERCOMMITTED_WINDOW_BLOCKS` of the current block. + /// @param validatorIndex is the index of the validator being proven, refer to consensus specs + /// @param proofs is the proof of the validator's balance and validatorFields in the balance tree and the balanceRoot to prove for + /// @param beaconChainETHStrategyIndex is the index of the beaconChainETHStrategy for the pod owner for the callback to + /// the StrategyManager in case it must be removed from the list of the podOwners strategies + /// @param validatorFields are the fields of the "Validator Container", refer to consensus specs + /// @dev For more details on the Beacon Chain spec, see: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator function verifyOvercommittedStake( uint40 validatorIndex, BeaconChainProofs_DeprecatedM1.ValidatorFieldsAndBalanceProofs calldata proofs, @@ -363,15 +335,13 @@ interface IEigenPod_DeprecatedM1 { uint64 oracleBlockNumber ) external; - /** - * @notice This function records a full withdrawal on behalf of one of the Ethereum validators for this EigenPod - * @param withdrawalProofs is the information needed to check the veracity of the block number and withdrawal being proven - * @param validatorFieldsProof is the proof of the validator's fields in the validator tree - * @param withdrawalFields are the fields of the withdrawal being proven - * @param validatorFields are the fields of the validator being proven - * @param beaconChainETHStrategyIndex is the index of the beaconChainETHStrategy for the pod owner for the callback to - * the EigenPodManager to the StrategyManager in case it must be removed from the podOwner's list of strategies - */ + /// @notice This function records a full withdrawal on behalf of one of the Ethereum validators for this EigenPod + /// @param withdrawalProofs is the information needed to check the veracity of the block number and withdrawal being proven + /// @param validatorFieldsProof is the proof of the validator's fields in the validator tree + /// @param withdrawalFields are the fields of the withdrawal being proven + /// @param validatorFields are the fields of the validator being proven + /// @param beaconChainETHStrategyIndex is the index of the beaconChainETHStrategy for the pod owner for the callback to + /// the EigenPodManager to the StrategyManager in case it must be removed from the podOwner's list of strategies function verifyAndProcessWithdrawal( BeaconChainProofs_DeprecatedM1.WithdrawalProofs calldata withdrawalProofs, bytes calldata validatorFieldsProof, diff --git a/src/test/integration/deprecatedInterfaces/mainnet/IEigenPodManager.sol b/src/test/integration/deprecatedInterfaces/mainnet/IEigenPodManager.sol index b559212f22..b2ecab0a7f 100644 --- a/src/test/integration/deprecatedInterfaces/mainnet/IEigenPodManager.sol +++ b/src/test/integration/deprecatedInterfaces/mainnet/IEigenPodManager.sol @@ -6,37 +6,29 @@ import "./IEigenPod.sol"; import "./IBeaconChainOracle.sol"; import "src/contracts/interfaces/IPausable.sol"; -/** - * @notice M2 DEPRECATED INTERFACE at commit hash https://github.com/Layr-Labs/eigenlayer-contracts/tree/426f461c59b4f0e16f8becdffd747075edcaded8 - * @title Interface for factory that creates and manages solo staking pods that have their withdrawal credentials pointed to EigenLayer. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - */ +/// @notice M2 DEPRECATED INTERFACE at commit hash https://github.com/Layr-Labs/eigenlayer-contracts/tree/426f461c59b4f0e16f8becdffd747075edcaded8 +/// @title Interface for factory that creates and manages solo staking pods that have their withdrawal credentials pointed to EigenLayer. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service interface IEigenPodManager_DeprecatedM2 is IPausable { - /** - * @notice Creates an EigenPod for the sender. - * @dev Function will revert if the `msg.sender` already has an EigenPod. - * @dev Returns EigenPod address - */ + /// @notice Creates an EigenPod for the sender. + /// @dev Function will revert if the `msg.sender` already has an EigenPod. + /// @dev Returns EigenPod address function createPod() external returns (address); - /** - * @notice Stakes for a new beacon chain validator on the sender's EigenPod. - * Also creates an EigenPod for the sender if they don't have one already. - * @param pubkey The 48 bytes public key of the beacon chain validator. - * @param signature The validator's signature of the deposit data. - * @param depositDataRoot The root/hash of the deposit data for the validator's deposit. - */ + /// @notice Stakes for a new beacon chain validator on the sender's EigenPod. + /// Also creates an EigenPod for the sender if they don't have one already. + /// @param pubkey The 48 bytes public key of the beacon chain validator. + /// @param signature The validator's signature of the deposit data. + /// @param depositDataRoot The root/hash of the deposit data for the validator's deposit. function stake(bytes calldata pubkey, bytes calldata signature, bytes32 depositDataRoot) external payable; - /** - * @notice Changes the `podOwner`'s shares by `sharesDelta` and performs a call to the DelegationManager - * to ensure that delegated shares are also tracked correctly - * @param podOwner is the pod owner whose balance is being updated. - * @param sharesDelta is the change in podOwner's beaconChainETHStrategy shares - * @dev Callable only by the podOwner's EigenPod contract. - * @dev Reverts if `sharesDelta` is not a whole Gwei amount - */ + /// @notice Changes the `podOwner`'s shares by `sharesDelta` and performs a call to the DelegationManager + /// to ensure that delegated shares are also tracked correctly + /// @param podOwner is the pod owner whose balance is being updated. + /// @param sharesDelta is the change in podOwner's beaconChainETHStrategy shares + /// @dev Callable only by the podOwner's EigenPod contract. + /// @dev Reverts if `sharesDelta` is not a whole Gwei amount function recordBeaconChainETHBalanceUpdate(address podOwner, int sharesDelta) external; /// @notice Returns the address of the `podOwner`'s EigenPod if it has been deployed. @@ -60,101 +52,79 @@ interface IEigenPodManager_DeprecatedM2 is IPausable { /// @notice Returns the number of EigenPods that have been created function numPods() external view returns (uint); - /** - * @notice Mapping from Pod owner owner to the number of shares they have in the virtual beacon chain ETH strategy. - * @dev The share amount can become negative. This is necessary to accommodate the fact that a pod owner's virtual beacon chain ETH shares can - * decrease between the pod owner queuing and completing a withdrawal. - * When the pod owner's shares would otherwise increase, this "deficit" is decreased first _instead_. - * Likewise, when a withdrawal is completed, this "deficit" is decreased and the withdrawal amount is decreased; We can think of this - * as the withdrawal "paying off the deficit". - */ + /// @notice Mapping from Pod owner owner to the number of shares they have in the virtual beacon chain ETH strategy. + /// @dev The share amount can become negative. This is necessary to accommodate the fact that a pod owner's virtual beacon chain ETH shares can + /// decrease between the pod owner queuing and completing a withdrawal. + /// When the pod owner's shares would otherwise increase, this "deficit" is decreased first _instead_. + /// Likewise, when a withdrawal is completed, this "deficit" is decreased and the withdrawal amount is decreased; We can think of this + /// as the withdrawal "paying off the deficit". function podOwnerShares(address podOwner) external view returns (int); /// @notice returns canonical, virtual beaconChainETH strategy function beaconChainETHStrategy() external view returns (IStrategy); - /** - * @notice Used by the DelegationManager to remove a pod owner's shares while they're in the withdrawal queue. - * Simply decreases the `podOwner`'s shares by `shares`, down to a minimum of zero. - * @dev This function reverts if it would result in `podOwnerShares[podOwner]` being less than zero, i.e. it is forbidden for this function to - * result in the `podOwner` incurring a "share deficit". This behavior prevents a Staker from queuing a withdrawal which improperly removes excessive - * shares from the operator to whom the staker is delegated. - * @dev Reverts if `shares` is not a whole Gwei amount - */ + /// @notice Used by the DelegationManager to remove a pod owner's shares while they're in the withdrawal queue. + /// Simply decreases the `podOwner`'s shares by `shares`, down to a minimum of zero. + /// @dev This function reverts if it would result in `podOwnerShares[podOwner]` being less than zero, i.e. it is forbidden for this function to + /// result in the `podOwner` incurring a "share deficit". This behavior prevents a Staker from queuing a withdrawal which improperly removes excessive + /// shares from the operator to whom the staker is delegated. + /// @dev Reverts if `shares` is not a whole Gwei amount function removeShares(address podOwner, uint shares) external; - /** - * @notice Increases the `podOwner`'s shares by `shares`, paying off deficit if possible. - * Used by the DelegationManager to award a pod owner shares on exiting the withdrawal queue - * @dev Returns the number of shares added to `podOwnerShares[podOwner]` above zero, which will be less than the `shares` input - * in the event that the podOwner has an existing shares deficit (i.e. `podOwnerShares[podOwner]` starts below zero) - * @dev Reverts if `shares` is not a whole Gwei amount - */ + /// @notice Increases the `podOwner`'s shares by `shares`, paying off deficit if possible. + /// Used by the DelegationManager to award a pod owner shares on exiting the withdrawal queue + /// @dev Returns the number of shares added to `podOwnerShares[podOwner]` above zero, which will be less than the `shares` input + /// in the event that the podOwner has an existing shares deficit (i.e. `podOwnerShares[podOwner]` starts below zero) + /// @dev Reverts if `shares` is not a whole Gwei amount function addShares(address podOwner, uint shares) external returns (uint); - /** - * @notice Used by the DelegationManager to complete a withdrawal, sending tokens to some destination address - * @dev Prioritizes decreasing the podOwner's share deficit, if they have one - * @dev Reverts if `shares` is not a whole Gwei amount - */ + /// @notice Used by the DelegationManager to complete a withdrawal, sending tokens to some destination address + /// @dev Prioritizes decreasing the podOwner's share deficit, if they have one + /// @dev Reverts if `shares` is not a whole Gwei amount function withdrawSharesAsTokens(address podOwner, address destination, uint shares) external; } -/** - * @notice DEPRECATED INTERFACE at commit hash https://github.com/Layr-Labs/eigenlayer-contracts/tree/0139d6213927c0a7812578899ddd3dda58051928 - * @title Interface for factory that creates and manages solo staking pods that have their withdrawal credentials pointed to EigenLayer. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - */ +/// @notice DEPRECATED INTERFACE at commit hash https://github.com/Layr-Labs/eigenlayer-contracts/tree/0139d6213927c0a7812578899ddd3dda58051928 +/// @title Interface for factory that creates and manages solo staking pods that have their withdrawal credentials pointed to EigenLayer. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service interface IEigenPodManager_DeprecatedM1 is IPausable { - /** - * @notice Creates an EigenPod for the sender. - * @dev Function will revert if the `msg.sender` already has an EigenPod. - */ + /// @notice Creates an EigenPod for the sender. + /// @dev Function will revert if the `msg.sender` already has an EigenPod. function createPod() external; - /** - * @notice Stakes for a new beacon chain validator on the sender's EigenPod. - * Also creates an EigenPod for the sender if they don't have one already. - * @param pubkey The 48 bytes public key of the beacon chain validator. - * @param signature The validator's signature of the deposit data. - * @param depositDataRoot The root/hash of the deposit data for the validator's deposit. - */ + /// @notice Stakes for a new beacon chain validator on the sender's EigenPod. + /// Also creates an EigenPod for the sender if they don't have one already. + /// @param pubkey The 48 bytes public key of the beacon chain validator. + /// @param signature The validator's signature of the deposit data. + /// @param depositDataRoot The root/hash of the deposit data for the validator's deposit. function stake(bytes calldata pubkey, bytes calldata signature, bytes32 depositDataRoot) external payable; - /** - * @notice Deposits/Restakes beacon chain ETH in EigenLayer on behalf of the owner of an EigenPod. - * @param podOwner The owner of the pod whose balance must be deposited. - * @param amount The amount of ETH to 'deposit' (i.e. be credited to the podOwner). - * @dev Callable only by the podOwner's EigenPod contract. - */ + /// @notice Deposits/Restakes beacon chain ETH in EigenLayer on behalf of the owner of an EigenPod. + /// @param podOwner The owner of the pod whose balance must be deposited. + /// @param amount The amount of ETH to 'deposit' (i.e. be credited to the podOwner). + /// @dev Callable only by the podOwner's EigenPod contract. function restakeBeaconChainETH(address podOwner, uint amount) external; - /** - * @notice Removes beacon chain ETH from EigenLayer on behalf of the owner of an EigenPod, when the - * balance of a validator is lower than how much stake they have committed to EigenLayer - * @param podOwner The owner of the pod whose balance must be removed. - * @param beaconChainETHStrategyIndex is the index of the beaconChainETHStrategy for the pod owner for the callback to - * the StrategyManager in case it must be removed from the list of the podOwner's strategies - * @param amount The amount of ETH to remove. - * @dev Callable only by the podOwner's EigenPod contract. - */ + /// @notice Removes beacon chain ETH from EigenLayer on behalf of the owner of an EigenPod, when the + /// balance of a validator is lower than how much stake they have committed to EigenLayer + /// @param podOwner The owner of the pod whose balance must be removed. + /// @param beaconChainETHStrategyIndex is the index of the beaconChainETHStrategy for the pod owner for the callback to + /// the StrategyManager in case it must be removed from the list of the podOwner's strategies + /// @param amount The amount of ETH to remove. + /// @dev Callable only by the podOwner's EigenPod contract. function recordOvercommittedBeaconChainETH(address podOwner, uint beaconChainETHStrategyIndex, uint amount) external; - /** - * @notice Withdraws ETH from an EigenPod. The ETH must have first been withdrawn from the beacon chain. - * @param podOwner The owner of the pod whose balance must be withdrawn. - * @param recipient The recipient of the withdrawn ETH. - * @param amount The amount of ETH to withdraw. - * @dev Callable only by the StrategyManager contract. - */ + /// @notice Withdraws ETH from an EigenPod. The ETH must have first been withdrawn from the beacon chain. + /// @param podOwner The owner of the pod whose balance must be withdrawn. + /// @param recipient The recipient of the withdrawn ETH. + /// @param amount The amount of ETH to withdraw. + /// @dev Callable only by the StrategyManager contract. function withdrawRestakedBeaconChainETH(address podOwner, address recipient, uint amount) external; - /** - * @notice Updates the oracle contract that provides the beacon chain state root - * @param newBeaconChainOracle is the new oracle contract being pointed to - * @dev Callable only by the owner of this contract (i.e. governance) - */ + /// @notice Updates the oracle contract that provides the beacon chain state root + /// @param newBeaconChainOracle is the new oracle contract being pointed to + /// @dev Callable only by the owner of this contract (i.e. governance) function updateBeaconChainOracle(IBeaconChainOracle_DeprecatedM1 newBeaconChainOracle) external; /// @notice Returns the address of the `podOwner`'s EigenPod if it has been deployed. diff --git a/src/test/integration/deprecatedInterfaces/mainnet/IStrategyManager.sol b/src/test/integration/deprecatedInterfaces/mainnet/IStrategyManager.sol index fd21de490b..2f66015f08 100644 --- a/src/test/integration/deprecatedInterfaces/mainnet/IStrategyManager.sol +++ b/src/test/integration/deprecatedInterfaces/mainnet/IStrategyManager.sol @@ -5,49 +5,43 @@ import "src/contracts/interfaces/IStrategy.sol"; import "src/contracts/interfaces/IDelegationManager.sol"; import "src/contracts/interfaces/IEigenPodManager.sol"; -/** - * @notice M2 DEPRECATED INTERFACE at commit hash https://github.com/Layr-Labs/eigenlayer-contracts/tree/426f461c59b4f0e16f8becdffd747075edcaded8 - * @title Interface for the primary entrypoint for funds into EigenLayer. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice See the `StrategyManager` contract itself for implementation details. - */ +/// @notice M2 DEPRECATED INTERFACE at commit hash https://github.com/Layr-Labs/eigenlayer-contracts/tree/426f461c59b4f0e16f8becdffd747075edcaded8 +/// @title Interface for the primary entrypoint for funds into EigenLayer. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice See the `StrategyManager` contract itself for implementation details. interface IStrategyManager_DeprecatedM2 { - /** - * @notice Deposits `amount` of `token` into the specified `strategy`, with the resultant shares credited to `msg.sender` - * @param strategy is the specified strategy where deposit is to be made, - * @param token is the denomination in which the deposit is to be made, - * @param amount is the amount of token to be deposited in the strategy by the staker - * @return shares The amount of new shares in the `strategy` created as part of the action. - * @dev The `msg.sender` must have previously approved this contract to transfer at least `amount` of `token` on their behalf. - * @dev Cannot be called by an address that is 'frozen' (this function will revert if the `msg.sender` is frozen). - * - * WARNING: Depositing tokens that allow reentrancy (eg. ERC-777) into a strategy is not recommended. This can lead to attack vectors - * where the token balance and corresponding strategy shares are not in sync upon reentrancy. - */ + /// @notice Deposits `amount` of `token` into the specified `strategy`, with the resultant shares credited to `msg.sender` + /// @param strategy is the specified strategy where deposit is to be made, + /// @param token is the denomination in which the deposit is to be made, + /// @param amount is the amount of token to be deposited in the strategy by the staker + /// @return shares The amount of new shares in the `strategy` created as part of the action. + /// @dev The `msg.sender` must have previously approved this contract to transfer at least `amount` of `token` on their behalf. + /// @dev Cannot be called by an address that is 'frozen' (this function will revert if the `msg.sender` is frozen). + /// + /// WARNING: Depositing tokens that allow reentrancy (eg. ERC-777) into a strategy is not recommended. This can lead to attack vectors + /// where the token balance and corresponding strategy shares are not in sync upon reentrancy. function depositIntoStrategy(IStrategy strategy, IERC20 token, uint amount) external returns (uint shares); - /** - * @notice Used for depositing an asset into the specified strategy with the resultant shares credited to `staker`, - * who must sign off on the action. - * Note that the assets are transferred out/from the `msg.sender`, not from the `staker`; this function is explicitly designed - * purely to help one address deposit 'for' another. - * @param strategy is the specified strategy where deposit is to be made, - * @param token is the denomination in which the deposit is to be made, - * @param amount is the amount of token to be deposited in the strategy by the staker - * @param staker the staker that the deposited assets will be credited to - * @param expiry the timestamp at which the signature expires - * @param signature is a valid signature from the `staker`. either an ECDSA signature if the `staker` is an EOA, or data to forward - * following EIP-1271 if the `staker` is a contract - * @return shares The amount of new shares in the `strategy` created as part of the action. - * @dev The `msg.sender` must have previously approved this contract to transfer at least `amount` of `token` on their behalf. - * @dev A signature is required for this function to eliminate the possibility of griefing attacks, specifically those - * targeting stakers who may be attempting to undelegate. - * @dev Cannot be called if thirdPartyTransfersForbidden is set to true for this strategy - * - * WARNING: Depositing tokens that allow reentrancy (eg. ERC-777) into a strategy is not recommended. This can lead to attack vectors - * where the token balance and corresponding strategy shares are not in sync upon reentrancy - */ + /// @notice Used for depositing an asset into the specified strategy with the resultant shares credited to `staker`, + /// who must sign off on the action. + /// Note that the assets are transferred out/from the `msg.sender`, not from the `staker`; this function is explicitly designed + /// purely to help one address deposit 'for' another. + /// @param strategy is the specified strategy where deposit is to be made, + /// @param token is the denomination in which the deposit is to be made, + /// @param amount is the amount of token to be deposited in the strategy by the staker + /// @param staker the staker that the deposited assets will be credited to + /// @param expiry the timestamp at which the signature expires + /// @param signature is a valid signature from the `staker`. either an ECDSA signature if the `staker` is an EOA, or data to forward + /// following EIP-1271 if the `staker` is a contract + /// @return shares The amount of new shares in the `strategy` created as part of the action. + /// @dev The `msg.sender` must have previously approved this contract to transfer at least `amount` of `token` on their behalf. + /// @dev A signature is required for this function to eliminate the possibility of griefing attacks, specifically those + /// targeting stakers who may be attempting to undelegate. + /// @dev Cannot be called if thirdPartyTransfersForbidden is set to true for this strategy + /// + /// WARNING: Depositing tokens that allow reentrancy (eg. ERC-777) into a strategy is not recommended. This can lead to attack vectors + /// where the token balance and corresponding strategy shares are not in sync upon reentrancy function depositIntoStrategyWithSignature( IStrategy strategy, IERC20 token, @@ -69,37 +63,29 @@ interface IStrategyManager_DeprecatedM2 { /// @notice Returns the current shares of `user` in `strategy` function stakerStrategyShares(address user, IStrategy strategy) external view returns (uint shares); - /** - * @notice Get all details on the staker's deposits and corresponding shares - * @param staker The staker of interest, whose deposits this function will fetch - * @return (staker's strategies, shares in these strategies) - */ + /// @notice Get all details on the staker's deposits and corresponding shares + /// @param staker The staker of interest, whose deposits this function will fetch + /// @return (staker's strategies, shares in these strategies) function getDeposits(address staker) external view returns (IStrategy[] memory, uint[] memory); /// @notice Simple getter function that returns `stakerStrategyList[staker].length`. function stakerStrategyListLength(address staker) external view returns (uint); - /** - * @notice Owner-only function that adds the provided Strategies to the 'whitelist' of strategies that stakers can deposit into - * @param strategiesToWhitelist Strategies that will be added to the `strategyIsWhitelistedForDeposit` mapping (if they aren't in it already) - * @param thirdPartyTransfersForbiddenValues bool values to set `thirdPartyTransfersForbidden` to for each strategy - */ + /// @notice Owner-only function that adds the provided Strategies to the 'whitelist' of strategies that stakers can deposit into + /// @param strategiesToWhitelist Strategies that will be added to the `strategyIsWhitelistedForDeposit` mapping (if they aren't in it already) + /// @param thirdPartyTransfersForbiddenValues bool values to set `thirdPartyTransfersForbidden` to for each strategy function addStrategiesToDepositWhitelist(IStrategy[] calldata strategiesToWhitelist, bool[] calldata thirdPartyTransfersForbiddenValues) external; - /** - * @notice Owner-only function that removes the provided Strategies from the 'whitelist' of strategies that stakers can deposit into - * @param strategiesToRemoveFromWhitelist Strategies that will be removed to the `strategyIsWhitelistedForDeposit` mapping (if they are in it) - */ + /// @notice Owner-only function that removes the provided Strategies from the 'whitelist' of strategies that stakers can deposit into + /// @param strategiesToRemoveFromWhitelist Strategies that will be removed to the `strategyIsWhitelistedForDeposit` mapping (if they are in it) function removeStrategiesFromDepositWhitelist(IStrategy[] calldata strategiesToRemoveFromWhitelist) external; - /** - * If true for a strategy, a user cannot depositIntoStrategyWithSignature into that strategy for another staker - * and also when performing DelegationManager.queueWithdrawals, a staker can only withdraw to themselves. - * Defaulted to false for all existing strategies. - * @param strategy The strategy to set `thirdPartyTransfersForbidden` value to - * @param value bool value to set `thirdPartyTransfersForbidden` to - */ + /// If true for a strategy, a user cannot depositIntoStrategyWithSignature into that strategy for another staker + /// and also when performing DelegationManager.queueWithdrawals, a staker can only withdraw to themselves. + /// Defaulted to false for all existing strategies. + /// @param strategy The strategy to set `thirdPartyTransfersForbidden` value to + /// @param value bool value to set `thirdPartyTransfersForbidden` to function setThirdPartyTransfersForbidden(IStrategy strategy, bool value) external; /// @notice Returns the single, central Delegation contract of EigenLayer @@ -114,22 +100,16 @@ interface IStrategyManager_DeprecatedM2 { /// @notice Returns bool for whether or not `strategy` is whitelisted for deposit function strategyIsWhitelistedForDeposit(IStrategy strategy) external view returns (bool); - /** - * @notice Owner-only function to change the `strategyWhitelister` address. - * @param newStrategyWhitelister new address for the `strategyWhitelister`. - */ + /// @notice Owner-only function to change the `strategyWhitelister` address. + /// @param newStrategyWhitelister new address for the `strategyWhitelister`. function setStrategyWhitelister(address newStrategyWhitelister) external; - /** - * @notice Returns bool for whether or not `strategy` enables credit transfers. i.e enabling - * depositIntoStrategyWithSignature calls or queueing withdrawals to a different address than the staker. - */ + /// @notice Returns bool for whether or not `strategy` enables credit transfers. i.e enabling + /// depositIntoStrategyWithSignature calls or queueing withdrawals to a different address than the staker. function thirdPartyTransfersForbidden(IStrategy strategy) external view returns (bool); - /** - * @notice Getter function for the current EIP-712 domain separator for this contract. - * @dev The domain separator will change in the event of a fork that changes the ChainID. - */ + /// @notice Getter function for the current EIP-712 domain separator for this contract. + /// @dev The domain separator will change in the event of a fork that changes the ChainID. function domainSeparator() external view returns (bytes32); /// VIEW FUNCTIONS FOR PUBLIC VARIABLES, NOT IN ORIGINAL INTERFACE @@ -138,13 +118,11 @@ interface IStrategyManager_DeprecatedM2 { function DEPOSIT_TYPEHASH() external view returns (bytes32); } -/** - * @notice M1 DEPRECATED INTERFACE at commit hash https://github.com/Layr-Labs/eigenlayer-contracts/tree/0139d6213927c0a7812578899ddd3dda58051928 - * @title Interface for the primary entrypoint for funds into EigenLayer. - * @author Layr Labs, Inc. - * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service - * @notice See the `StrategyManager` contract itself for implementation details. - */ +/// @notice M1 DEPRECATED INTERFACE at commit hash https://github.com/Layr-Labs/eigenlayer-contracts/tree/0139d6213927c0a7812578899ddd3dda58051928 +/// @title Interface for the primary entrypoint for funds into EigenLayer. +/// @author Layr Labs, Inc. +/// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service +/// @notice See the `StrategyManager` contract itself for implementation details. interface IStrategyManager_DeprecatedM1 { // packed struct for queued withdrawals; helps deal with stack-too-deep errors struct WithdrawerAndNonce { @@ -152,12 +130,10 @@ interface IStrategyManager_DeprecatedM1 { uint96 nonce; } - /** - * Struct type used to specify an existing queued withdrawal. Rather than storing the entire struct, only a hash is stored. - * In functions that operate on existing queued withdrawals -- e.g. `startQueuedWithdrawalWaitingPeriod` or `completeQueuedWithdrawal`, - * the data is resubmitted and the hash of the submitted data is computed by `calculateWithdrawalRoot` and checked against the - * stored hash in order to confirm the integrity of the submitted data. - */ + /// Struct type used to specify an existing queued withdrawal. Rather than storing the entire struct, only a hash is stored. + /// In functions that operate on existing queued withdrawals -- e.g. `startQueuedWithdrawalWaitingPeriod` or `completeQueuedWithdrawal`, + /// the data is resubmitted and the hash of the submitted data is computed by `calculateWithdrawalRoot` and checked against the + /// stored hash in order to confirm the integrity of the submitted data. struct QueuedWithdrawal { IStrategy[] strategies; uint[] shares; @@ -167,58 +143,50 @@ interface IStrategyManager_DeprecatedM1 { address delegatedAddress; } - /** - * @notice Deposits `amount` of `token` into the specified `strategy`, with the resultant shares credited to `msg.sender` - * @param strategy is the specified strategy where deposit is to be made, - * @param token is the denomination in which the deposit is to be made, - * @param amount is the amount of token to be deposited in the strategy by the depositor - * @return shares The amount of new shares in the `strategy` created as part of the action. - * @dev The `msg.sender` must have previously approved this contract to transfer at least `amount` of `token` on their behalf. - * @dev Cannot be called by an address that is 'frozen' (this function will revert if the `msg.sender` is frozen). - * - * WARNING: Depositing tokens that allow reentrancy (eg. ERC-777) into a strategy is not recommended. This can lead to attack vectors - * where the token balance and corresponding strategy shares are not in sync upon reentrancy. - */ + /// @notice Deposits `amount` of `token` into the specified `strategy`, with the resultant shares credited to `msg.sender` + /// @param strategy is the specified strategy where deposit is to be made, + /// @param token is the denomination in which the deposit is to be made, + /// @param amount is the amount of token to be deposited in the strategy by the depositor + /// @return shares The amount of new shares in the `strategy` created as part of the action. + /// @dev The `msg.sender` must have previously approved this contract to transfer at least `amount` of `token` on their behalf. + /// @dev Cannot be called by an address that is 'frozen' (this function will revert if the `msg.sender` is frozen). + /// + /// WARNING: Depositing tokens that allow reentrancy (eg. ERC-777) into a strategy is not recommended. This can lead to attack vectors + /// where the token balance and corresponding strategy shares are not in sync upon reentrancy. function depositIntoStrategy(IStrategy strategy, IERC20 token, uint amount) external returns (uint shares); - /** - * @notice Deposits `amount` of beaconchain ETH into this contract on behalf of `staker` - * @param staker is the entity that is restaking in eigenlayer, - * @param amount is the amount of beaconchain ETH being restaked, - * @dev Only callable by EigenPodManager. - */ + /// @notice Deposits `amount` of beaconchain ETH into this contract on behalf of `staker` + /// @param staker is the entity that is restaking in eigenlayer, + /// @param amount is the amount of beaconchain ETH being restaked, + /// @dev Only callable by EigenPodManager. function depositBeaconChainETH(address staker, uint amount) external; - /** - * @notice Records an overcommitment event on behalf of a staker. The staker's beaconChainETH shares are decremented by `amount`. - * @param overcommittedPodOwner is the pod owner to be slashed - * @param beaconChainETHStrategyIndex is the index of the beaconChainETHStrategy in case it must be removed, - * @param amount is the amount to decrement the slashedAddress's beaconChainETHStrategy shares - * @dev Only callable by EigenPodManager. - */ + /// @notice Records an overcommitment event on behalf of a staker. The staker's beaconChainETH shares are decremented by `amount`. + /// @param overcommittedPodOwner is the pod owner to be slashed + /// @param beaconChainETHStrategyIndex is the index of the beaconChainETHStrategy in case it must be removed, + /// @param amount is the amount to decrement the slashedAddress's beaconChainETHStrategy shares + /// @dev Only callable by EigenPodManager. function recordOvercommittedBeaconChainETH(address overcommittedPodOwner, uint beaconChainETHStrategyIndex, uint amount) external; - /** - * @notice Used for depositing an asset into the specified strategy with the resultant shares credited to `staker`, - * who must sign off on the action. - * Note that the assets are transferred out/from the `msg.sender`, not from the `staker`; this function is explicitly designed - * purely to help one address deposit 'for' another. - * @param strategy is the specified strategy where deposit is to be made, - * @param token is the denomination in which the deposit is to be made, - * @param amount is the amount of token to be deposited in the strategy by the depositor - * @param staker the staker that the deposited assets will be credited to - * @param expiry the timestamp at which the signature expires - * @param signature is a valid signature from the `staker`. either an ECDSA signature if the `staker` is an EOA, or data to forward - * following EIP-1271 if the `staker` is a contract - * @return shares The amount of new shares in the `strategy` created as part of the action. - * @dev The `msg.sender` must have previously approved this contract to transfer at least `amount` of `token` on their behalf. - * @dev A signature is required for this function to eliminate the possibility of griefing attacks, specifically those - * targeting stakers who may be attempting to undelegate. - * @dev Cannot be called on behalf of a staker that is 'frozen' (this function will revert if the `staker` is frozen). - * - * WARNING: Depositing tokens that allow reentrancy (eg. ERC-777) into a strategy is not recommended. This can lead to attack vectors - * where the token balance and corresponding strategy shares are not in sync upon reentrancy - */ + /// @notice Used for depositing an asset into the specified strategy with the resultant shares credited to `staker`, + /// who must sign off on the action. + /// Note that the assets are transferred out/from the `msg.sender`, not from the `staker`; this function is explicitly designed + /// purely to help one address deposit 'for' another. + /// @param strategy is the specified strategy where deposit is to be made, + /// @param token is the denomination in which the deposit is to be made, + /// @param amount is the amount of token to be deposited in the strategy by the depositor + /// @param staker the staker that the deposited assets will be credited to + /// @param expiry the timestamp at which the signature expires + /// @param signature is a valid signature from the `staker`. either an ECDSA signature if the `staker` is an EOA, or data to forward + /// following EIP-1271 if the `staker` is a contract + /// @return shares The amount of new shares in the `strategy` created as part of the action. + /// @dev The `msg.sender` must have previously approved this contract to transfer at least `amount` of `token` on their behalf. + /// @dev A signature is required for this function to eliminate the possibility of griefing attacks, specifically those + /// targeting stakers who may be attempting to undelegate. + /// @dev Cannot be called on behalf of a staker that is 'frozen' (this function will revert if the `staker` is frozen). + /// + /// WARNING: Depositing tokens that allow reentrancy (eg. ERC-777) into a strategy is not recommended. This can lead to attack vectors + /// where the token balance and corresponding strategy shares are not in sync upon reentrancy function depositIntoStrategyWithSignature( IStrategy strategy, IERC20 token, @@ -231,40 +199,36 @@ interface IStrategyManager_DeprecatedM1 { /// @notice Returns the current shares of `user` in `strategy` function stakerDepositShares(address user, IStrategy strategy) external view returns (uint shares); - /** - * @notice Get all details on the depositor's deposits and corresponding shares - * @return (depositor's strategies, shares in these strategies) - */ + /// @notice Get all details on the depositor's deposits and corresponding shares + /// @return (depositor's strategies, shares in these strategies) function getDeposits(address depositor) external view returns (IStrategy[] memory, uint[] memory); /// @notice Simple getter function that returns `stakerStrategyList[staker].length`. function stakerStrategyListLength(address staker) external view returns (uint); - /** - * @notice Called by a staker to queue a withdrawal of the given amount of `shares` from each of the respective given `strategies`. - * @dev Stakers will complete their withdrawal by calling the 'completeQueuedWithdrawal' function. - * User shares are decreased in this function, but the total number of shares in each strategy remains the same. - * The total number of shares is decremented in the 'completeQueuedWithdrawal' function instead, which is where - * the funds are actually sent to the user through use of the strategies' 'withdrawal' function. This ensures - * that the value per share reported by each strategy will remain consistent, and that the shares will continue - * to accrue gains during the enforced withdrawal waiting period. - * @param strategyIndexes is a list of the indices in `stakerStrategyList[msg.sender]` that correspond to the strategies - * for which `msg.sender` is withdrawing 100% of their shares - * @param strategies The Strategies to withdraw from - * @param shares The amount of shares to withdraw from each of the respective Strategies in the `strategies` array - * @param withdrawer The address that can complete the withdrawal and will receive any withdrawn funds or shares upon completing the withdrawal - * @param undelegateIfPossible If this param is marked as 'true' *and the withdrawal will result in `msg.sender` having no shares in any Strategy,* - * then this function will also make an internal call to `undelegate(msg.sender)` to undelegate the `msg.sender`. - * @return The 'withdrawalRoot' of the newly created Queued Withdrawal - * @dev Strategies are removed from `stakerStrategyList` by swapping the last entry with the entry to be removed, then - * popping off the last entry in `stakerStrategyList`. The simplest way to calculate the correct `strategyIndexes` to input - * is to order the strategies *for which `msg.sender` is withdrawing 100% of their shares* from highest index in - * `stakerStrategyList` to lowest index - * @dev Note that if the withdrawal includes shares in the enshrined 'beaconChainETH' strategy, then it must *only* include shares in this strategy, and - * `withdrawer` must match the caller's address. The first condition is because slashing of queued withdrawals cannot be guaranteed - * for Beacon Chain ETH (since we cannot trigger a withdrawal from the beacon chain through a smart contract) and the second condition is because shares in - * the enshrined 'beaconChainETH' strategy technically represent non-fungible positions (deposits to the Beacon Chain, each pointed at a specific EigenPod). - */ + /// @notice Called by a staker to queue a withdrawal of the given amount of `shares` from each of the respective given `strategies`. + /// @dev Stakers will complete their withdrawal by calling the 'completeQueuedWithdrawal' function. + /// User shares are decreased in this function, but the total number of shares in each strategy remains the same. + /// The total number of shares is decremented in the 'completeQueuedWithdrawal' function instead, which is where + /// the funds are actually sent to the user through use of the strategies' 'withdrawal' function. This ensures + /// that the value per share reported by each strategy will remain consistent, and that the shares will continue + /// to accrue gains during the enforced withdrawal waiting period. + /// @param strategyIndexes is a list of the indices in `stakerStrategyList[msg.sender]` that correspond to the strategies + /// for which `msg.sender` is withdrawing 100% of their shares + /// @param strategies The Strategies to withdraw from + /// @param shares The amount of shares to withdraw from each of the respective Strategies in the `strategies` array + /// @param withdrawer The address that can complete the withdrawal and will receive any withdrawn funds or shares upon completing the withdrawal + /// @param undelegateIfPossible If this param is marked as 'true' *and the withdrawal will result in `msg.sender` having no shares in any Strategy,* + /// then this function will also make an internal call to `undelegate(msg.sender)` to undelegate the `msg.sender`. + /// @return The 'withdrawalRoot' of the newly created Queued Withdrawal + /// @dev Strategies are removed from `stakerStrategyList` by swapping the last entry with the entry to be removed, then + /// popping off the last entry in `stakerStrategyList`. The simplest way to calculate the correct `strategyIndexes` to input + /// is to order the strategies *for which `msg.sender` is withdrawing 100% of their shares* from highest index in + /// `stakerStrategyList` to lowest index + /// @dev Note that if the withdrawal includes shares in the enshrined 'beaconChainETH' strategy, then it must *only* include shares in this strategy, and + /// `withdrawer` must match the caller's address. The first condition is because slashing of queued withdrawals cannot be guaranteed + /// for Beacon Chain ETH (since we cannot trigger a withdrawal from the beacon chain through a smart contract) and the second condition is because shares in + /// the enshrined 'beaconChainETH' strategy technically represent non-fungible positions (deposits to the Beacon Chain, each pointed at a specific EigenPod). function queueWithdrawal( uint[] calldata strategyIndexes, IStrategy[] calldata strategies, @@ -273,17 +237,15 @@ interface IStrategyManager_DeprecatedM1 { bool undelegateIfPossible ) external returns (bytes32); - /** - * @notice Used to complete the specified `queuedWithdrawal`. The function caller must match `queuedWithdrawal.withdrawer` - * @param queuedWithdrawal The QueuedWithdrawal to complete. - * @param tokens Array in which the i-th entry specifies the `token` input to the 'withdraw' function of the i-th Strategy in the `strategies` array - * of the `queuedWithdrawal`. This input can be provided with zero length if `receiveAsTokens` is set to 'false' (since in that case, this input will be unused) - * @param middlewareTimesIndex is the index in the operator that the staker who triggered the withdrawal was delegated to's middleware times array - * @param receiveAsTokens If true, the shares specified in the queued withdrawal will be withdrawn from the specified strategies themselves - * and sent to the caller, through calls to `queuedWithdrawal.strategies[i].withdraw`. If false, then the shares in the specified strategies - * will simply be transferred to the caller directly. - * @dev middlewareTimesIndex should be calculated off chain before calling this function by finding the first index that satisfies `slasher.canWithdraw` - */ + /// @notice Used to complete the specified `queuedWithdrawal`. The function caller must match `queuedWithdrawal.withdrawer` + /// @param queuedWithdrawal The QueuedWithdrawal to complete. + /// @param tokens Array in which the i-th entry specifies the `token` input to the 'withdraw' function of the i-th Strategy in the `strategies` array + /// of the `queuedWithdrawal`. This input can be provided with zero length if `receiveAsTokens` is set to 'false' (since in that case, this input will be unused) + /// @param middlewareTimesIndex is the index in the operator that the staker who triggered the withdrawal was delegated to's middleware times array + /// @param receiveAsTokens If true, the shares specified in the queued withdrawal will be withdrawn from the specified strategies themselves + /// and sent to the caller, through calls to `queuedWithdrawal.strategies[i].withdraw`. If false, then the shares in the specified strategies + /// will simply be transferred to the caller directly. + /// @dev middlewareTimesIndex should be calculated off chain before calling this function by finding the first index that satisfies `slasher.canWithdraw` function completeQueuedWithdrawal( QueuedWithdrawal calldata queuedWithdrawal, IERC20[] calldata tokens, @@ -291,17 +253,15 @@ interface IStrategyManager_DeprecatedM1 { bool receiveAsTokens ) external; - /** - * @notice Used to complete the specified `queuedWithdrawals`. The function caller must match `queuedWithdrawals[...].withdrawer` - * @param queuedWithdrawals The QueuedWithdrawals to complete. - * @param tokens Array of tokens for each QueuedWithdrawal. See `completeQueuedWithdrawal` for the usage of a single array. - * @param middlewareTimesIndexes One index to reference per QueuedWithdrawal. See `completeQueuedWithdrawal` for the usage of a single index. - * @param receiveAsTokens If true, the shares specified in the queued withdrawal will be withdrawn from the specified strategies themselves - * and sent to the caller, through calls to `queuedWithdrawal.strategies[i].withdraw`. If false, then the shares in the specified strategies - * will simply be transferred to the caller directly. - * @dev Array-ified version of `completeQueuedWithdrawal` - * @dev middlewareTimesIndex should be calculated off chain before calling this function by finding the first index that satisfies `slasher.canWithdraw` - */ + /// @notice Used to complete the specified `queuedWithdrawals`. The function caller must match `queuedWithdrawals[...].withdrawer` + /// @param queuedWithdrawals The QueuedWithdrawals to complete. + /// @param tokens Array of tokens for each QueuedWithdrawal. See `completeQueuedWithdrawal` for the usage of a single array. + /// @param middlewareTimesIndexes One index to reference per QueuedWithdrawal. See `completeQueuedWithdrawal` for the usage of a single index. + /// @param receiveAsTokens If true, the shares specified in the queued withdrawal will be withdrawn from the specified strategies themselves + /// and sent to the caller, through calls to `queuedWithdrawal.strategies[i].withdraw`. If false, then the shares in the specified strategies + /// will simply be transferred to the caller directly. + /// @dev Array-ified version of `completeQueuedWithdrawal` + /// @dev middlewareTimesIndex should be calculated off chain before calling this function by finding the first index that satisfies `slasher.canWithdraw` function completeQueuedWithdrawals( QueuedWithdrawal[] calldata queuedWithdrawals, IERC20[][] calldata tokens, @@ -309,22 +269,20 @@ interface IStrategyManager_DeprecatedM1 { bool[] calldata receiveAsTokens ) external; - /** - * @notice Slashes the shares of a 'frozen' operator (or a staker delegated to one) - * @param slashedAddress is the frozen address that is having its shares slashed - * @param recipient is the address that will receive the slashed funds, which could e.g. be a harmed party themself, - * or a MerkleDistributor-type contract that further sub-divides the slashed funds. - * @param strategies Strategies to slash - * @param shareAmounts The amount of shares to slash in each of the provided `strategies` - * @param tokens The tokens to use as input to the `withdraw` function of each of the provided `strategies` - * @param strategyIndexes is a list of the indices in `stakerStrategyList[msg.sender]` that correspond to the strategies - * for which `msg.sender` is withdrawing 100% of their shares - * @param recipient The slashed funds are withdrawn as tokens to this address. - * @dev strategies are removed from `stakerStrategyList` by swapping the last entry with the entry to be removed, then - * popping off the last entry in `stakerStrategyList`. The simplest way to calculate the correct `strategyIndexes` to input - * is to order the strategies *for which `msg.sender` is withdrawing 100% of their shares* from highest index in - * `stakerStrategyList` to lowest index - */ + /// @notice Slashes the shares of a 'frozen' operator (or a staker delegated to one) + /// @param slashedAddress is the frozen address that is having its shares slashed + /// @param recipient is the address that will receive the slashed funds, which could e.g. be a harmed party themself, + /// or a MerkleDistributor-type contract that further sub-divides the slashed funds. + /// @param strategies Strategies to slash + /// @param shareAmounts The amount of shares to slash in each of the provided `strategies` + /// @param tokens The tokens to use as input to the `withdraw` function of each of the provided `strategies` + /// @param strategyIndexes is a list of the indices in `stakerStrategyList[msg.sender]` that correspond to the strategies + /// for which `msg.sender` is withdrawing 100% of their shares + /// @param recipient The slashed funds are withdrawn as tokens to this address. + /// @dev strategies are removed from `stakerStrategyList` by swapping the last entry with the entry to be removed, then + /// popping off the last entry in `stakerStrategyList`. The simplest way to calculate the correct `strategyIndexes` to input + /// is to order the strategies *for which `msg.sender` is withdrawing 100% of their shares* from highest index in + /// `stakerStrategyList` to lowest index function slashShares( address slashedAddress, address recipient, @@ -334,16 +292,14 @@ interface IStrategyManager_DeprecatedM1 { uint[] calldata shareAmounts ) external; - /** - * @notice Slashes an existing queued withdrawal that was created by a 'frozen' operator (or a staker delegated to one) - * @param recipient The funds in the slashed withdrawal are withdrawn as tokens to this address. - * @param queuedWithdrawal The previously queued withdrawal to be slashed - * @param tokens Array in which the i-th entry specifies the `token` input to the 'withdraw' function of the i-th Strategy in the `strategies` - * array of the `queuedWithdrawal`. - * @param indicesToSkip Optional input parameter -- indices in the `strategies` array to skip (i.e. not call the 'withdraw' function on). This input exists - * so that, e.g., if the slashed QueuedWithdrawal contains a malicious strategy in the `strategies` array which always reverts on calls to its 'withdraw' function, - * then the malicious strategy can be skipped (with the shares in effect "burned"), while the non-malicious strategies are still called as normal. - */ + /// @notice Slashes an existing queued withdrawal that was created by a 'frozen' operator (or a staker delegated to one) + /// @param recipient The funds in the slashed withdrawal are withdrawn as tokens to this address. + /// @param queuedWithdrawal The previously queued withdrawal to be slashed + /// @param tokens Array in which the i-th entry specifies the `token` input to the 'withdraw' function of the i-th Strategy in the `strategies` + /// array of the `queuedWithdrawal`. + /// @param indicesToSkip Optional input parameter -- indices in the `strategies` array to skip (i.e. not call the 'withdraw' function on). This input exists + /// so that, e.g., if the slashed QueuedWithdrawal contains a malicious strategy in the `strategies` array which always reverts on calls to its 'withdraw' function, + /// then the malicious strategy can be skipped (with the shares in effect "burned"), while the non-malicious strategies are still called as normal. function slashQueuedWithdrawal( address recipient, QueuedWithdrawal calldata queuedWithdrawal, @@ -354,16 +310,12 @@ interface IStrategyManager_DeprecatedM1 { /// @notice Returns the keccak256 hash of `queuedWithdrawal`. function calculateWithdrawalRoot(QueuedWithdrawal memory queuedWithdrawal) external pure returns (bytes32); - /** - * @notice Owner-only function that adds the provided Strategies to the 'whitelist' of strategies that stakers can deposit into - * @param strategiesToWhitelist Strategies that will be added to the `strategyIsWhitelistedForDeposit` mapping (if they aren't in it already) - */ + /// @notice Owner-only function that adds the provided Strategies to the 'whitelist' of strategies that stakers can deposit into + /// @param strategiesToWhitelist Strategies that will be added to the `strategyIsWhitelistedForDeposit` mapping (if they aren't in it already) function addStrategiesToDepositWhitelist(IStrategy[] calldata strategiesToWhitelist) external; - /** - * @notice Owner-only function that removes the provided Strategies from the 'whitelist' of strategies that stakers can deposit into - * @param strategiesToRemoveFromWhitelist Strategies that will be removed to the `strategyIsWhitelistedForDeposit` mapping (if they are in it) - */ + /// @notice Owner-only function that removes the provided Strategies from the 'whitelist' of strategies that stakers can deposit into + /// @param strategiesToRemoveFromWhitelist Strategies that will be removed to the `strategyIsWhitelistedForDeposit` mapping (if they are in it) function removeStrategiesFromDepositWhitelist(IStrategy[] calldata strategiesToRemoveFromWhitelist) external; /// @notice Returns the single, central Delegation contract of EigenLayer diff --git a/src/test/integration/mocks/BeaconChainMock.t.sol b/src/test/integration/mocks/BeaconChainMock.t.sol index 6b8872cfda..c63a1c3ba3 100644 --- a/src/test/integration/mocks/BeaconChainMock.t.sol +++ b/src/test/integration/mocks/BeaconChainMock.t.sol @@ -42,12 +42,10 @@ uint64 constant MIN_ACTIVATION_BALANCE_GWEI = 32 gwei; /// @notice A Pectra Beacon Chain Mock Contract. For testing upgrades, use BeaconChainMock_Upgradeable /// @notice This mock assumed the following -/** - * @notice A Semi-Compatible Pectra Beacon Chain Mock Contract. For Testing Upgrades to Pectra use BeaconChainMock_Upgradeable - * @dev This mock assumes the following: - * - Ceiling is Max EB, at which sweeps will be triggered - * - No support for consolidations or any execution layer triggerable actions (exits, partial withdrawals) - */ +/// @notice A Semi-Compatible Pectra Beacon Chain Mock Contract. For Testing Upgrades to Pectra use BeaconChainMock_Upgradeable +/// @dev This mock assumes the following: +/// - Ceiling is Max EB, at which sweeps will be triggered +/// - No support for consolidations or any execution layer triggerable actions (exits, partial withdrawals) contract BeaconChainMock is Logger { using StdStyle for *; using print for *; @@ -59,7 +57,6 @@ contract BeaconChainMock is Logger { Minor, // `MINOR_SLASH_AMOUNT_GWEI` Half, // Half of the validator's balance Full // The validator's entire balance - } // Rewards given to each validator during epoch processing @@ -80,10 +77,8 @@ contract BeaconChainMock is Logger { EIP_7002_Mock constant WITHDRAWAL_PREDEPLOY = EIP_7002_Mock(payable(0x00000961Ef480Eb55e80D19ad83579A64c007002)); EIP_7251_Mock constant CONSOLIDATION_PREDEPLOY = EIP_7251_Mock(payable(0x0000BBdDc7CE488642fb579F8B00f3a590007251)); - /** - * BeaconState containers, used for proofgen: - * https://eth2book.info/capella/part3/containers/state/#beaconstate - */ + /// BeaconState containers, used for proofgen: + /// https://eth2book.info/capella/part3/containers/state/#beaconstate // Validator container, references every validator created so far Validator[] validators; @@ -95,9 +90,7 @@ contract BeaconChainMock is Logger { // length would be validators.length / 4; mapping(uint40 => bytes32) balances; - /** - * Generated proofs for each block timestamp: - */ + /// Generated proofs for each block timestamp: // Maps block.timestamp -> calculated beacon block roots mapping(uint64 => bytes32) beaconBlockRoots; @@ -123,11 +116,9 @@ contract BeaconChainMock is Logger { return "BeaconChain"; } - /** - * - * EXTERNAL METHODS - * - */ + /// + /// EXTERNAL METHODS + /// /// @dev Creates a new validator by: /// - Creating the validator container @@ -592,11 +583,9 @@ contract BeaconChainMock is Logger { cheats.resumeTracing(); } - /** - * - * INTERNAL FUNCTIONS - * - */ + /// + /// INTERNAL FUNCTIONS + /// function _createValidator(bytes memory withdrawalCreds, uint64 balanceGwei) internal returns (uint40) { cheats.pauseTracing(); uint40 validatorIndex = uint40(validators.length); @@ -733,11 +722,9 @@ contract BeaconChainMock is Logger { return bytes32(clearedRoot | shiftedBalance); } - /** - * - * VIEW METHODS - * - */ + /// + /// VIEW METHODS + /// function getCredentialProofs(uint40[] memory _validators) public view returns (CredentialProofs memory) { // If we have not advanced an epoch since a validator was created, no proofs have been // generated for that validator. We check this here and revert early so we don't return @@ -816,7 +803,10 @@ contract BeaconChainMock is Logger { return StaleBalanceProofs({ beaconTimestamp: curTimestamp, stateRootProof: p.stateRootProof, - validatorProof: BeaconChainProofs.ValidatorProof({validatorFields: vfProof.validatorFields, proof: vfProof.validatorFieldsProof}) + validatorProof: BeaconChainProofs.ValidatorProof({ + validatorFields: vfProof.validatorFields, + proof: vfProof.validatorFieldsProof + }) }); } diff --git a/src/test/integration/mocks/EIP_7002_Mock.t.sol b/src/test/integration/mocks/EIP_7002_Mock.t.sol index 07ef93bd8b..092fd4935b 100644 --- a/src/test/integration/mocks/EIP_7002_Mock.t.sol +++ b/src/test/integration/mocks/EIP_7002_Mock.t.sol @@ -30,11 +30,9 @@ contract EIP_7002_Mock { else revert("EIP_7002_Mock: unknown function"); } - /** - * - * "PUBLIC" METHODS - * - */ + /// + /// "PUBLIC" METHODS + /// function _doAddRequest() internal { uint fee = _getFee(); require(msg.value >= fee, "EIP_7002_Mock: insufficient value for fee"); @@ -77,11 +75,9 @@ contract EIP_7002_Mock { } } - /** - * - * PRIVATE METHODS - * - */ + /// + /// PRIVATE METHODS + /// function _dequeueWithdrawalRequests() internal returns (WithdrawalReq[] memory reqs) { uint numInQueue = queueTail - queueHead; // The actual spec caps this to MAX_WITHDRAWAL_REQUESTS_PER_BLOCK, but that's not super useful for tests diff --git a/src/test/integration/mocks/EIP_7251_Mock.t.sol b/src/test/integration/mocks/EIP_7251_Mock.t.sol index 995516f4b7..69137338e3 100644 --- a/src/test/integration/mocks/EIP_7251_Mock.t.sol +++ b/src/test/integration/mocks/EIP_7251_Mock.t.sol @@ -30,11 +30,9 @@ contract EIP_7251_Mock { else revert("EIP_7251_Mock: unknown function"); } - /** - * - * "PUBLIC" METHODS - * - */ + /// + /// "PUBLIC" METHODS + /// function _doAddRequest() internal { uint fee = _getFee(); require(msg.value >= fee, "EIP_7251_Mock: insufficient value for fee"); @@ -73,11 +71,9 @@ contract EIP_7251_Mock { } } - /** - * - * PRIVATE METHODS - * - */ + /// + /// PRIVATE METHODS + /// function _dequeueConsolidationRequests() internal returns (ConsolidationReq[] memory reqs) { uint numInQueue = queueTail - queueHead; // The actual spec caps this to MAX_CONSOLIDATION_REQUESTS_PER_BLOCK, but that's not super useful for tests diff --git a/src/test/integration/mocks/LibProofGen.t.sol b/src/test/integration/mocks/LibProofGen.t.sol index ffaa7648c5..5d143b40b6 100644 --- a/src/test/integration/mocks/LibProofGen.t.sol +++ b/src/test/integration/mocks/LibProofGen.t.sol @@ -52,11 +52,9 @@ library LibProofGen { using LibProofGen for *; using LibValidator for *; - /** - * - * CONSTANTS AND CONFIG - * - */ + /// + /// CONSTANTS AND CONFIG + /// bytes32 constant CONFIG_SLOT = keccak256("LibProofGen.config"); function config() internal view returns (Config storage) { @@ -99,11 +97,9 @@ library LibProofGen { cfg.BALANCE_PROOF_LEN = 32 * (BeaconChainProofs.BALANCE_TREE_HEIGHT + 1); } - /** - * - * PROOFGEN: MAIN METHOD - * - */ + /// + /// PROOFGEN: MAIN METHOD + /// /// @dev This method is how our mock beacon chain provides EigenPods with valid proofs of beacon state. /// @@ -147,16 +143,12 @@ library LibProofGen { bytes32 balanceContainerRoot = trees.balancesTree.build({leaves: balanceLeaves, height: BeaconChainProofs.BALANCE_TREE_HEIGHT + 1}); // Build merkle tree for BeaconState - bytes32 beaconStateRoot = trees.stateTree.build({ - leaves: _getBeaconStateLeaves(validatorsRoot, balanceContainerRoot), - height: config().BEACON_STATE_TREE_HEIGHT - }); + bytes32 beaconStateRoot = trees.stateTree + .build({leaves: _getBeaconStateLeaves(validatorsRoot, balanceContainerRoot), height: config().BEACON_STATE_TREE_HEIGHT}); // Build merkle tree for BeaconBlock - beaconBlockRoot = trees.blockTree.build({ - leaves: _getBeaconBlockLeaves(beaconStateRoot), - height: BeaconChainProofs.BEACON_BLOCK_HEADER_TREE_HEIGHT - }); + beaconBlockRoot = trees.blockTree + .build({leaves: _getBeaconBlockLeaves(beaconStateRoot), height: BeaconChainProofs.BEACON_BLOCK_HEADER_TREE_HEIGHT}); // Pre-generate proofs for EigenPod methods p.genStateRootProof(beaconStateRoot); @@ -167,11 +159,9 @@ library LibProofGen { return beaconBlockRoot; } - /** - * - * MERKLE TREE BUILDER - * - */ + /// + /// MERKLE TREE BUILDER + /// /// @dev Builds a merkle tree in storage using the given leaves and height /// -- if the leaves given are not complete (i.e. the depth should have more leaves), @@ -236,11 +226,9 @@ library LibProofGen { return curNode; } - /** - * - * PROOF GENERATION - * - */ + /// + /// PROOF GENERATION + /// /// @dev Generate global proof of beaconStateRoot -> beaconBlockRoot /// Used in verifyWithdrawalCredentials and verifyStaleBalance @@ -374,11 +362,9 @@ library LibProofGen { } } - /** - * - * MERKLE LEAVES GETTERS - * - */ + /// + /// MERKLE LEAVES GETTERS + /// /// @dev Get the leaves of the beacon block tree function _getBeaconBlockLeaves(bytes32 beaconStateRoot) internal view returns (bytes32[] memory) { diff --git a/src/test/integration/tests/Deposit_Delegate_Queue_Complete.t.sol b/src/test/integration/tests/Deposit_Delegate_Queue_Complete.t.sol index 7af3ac45bc..510fe1d1c9 100644 --- a/src/test/integration/tests/Deposit_Delegate_Queue_Complete.t.sol +++ b/src/test/integration/tests/Deposit_Delegate_Queue_Complete.t.sol @@ -5,12 +5,9 @@ import "src/test/integration/IntegrationChecks.t.sol"; import "src/test/integration/users/User.t.sol"; contract Integration_Deposit_Delegate_Queue_Complete is IntegrationCheckUtils { - /** - * - * FULL WITHDRAWALS - * - */ - + /// + /// FULL WITHDRAWALS + /// // TODO: fix test /// Generates a random staker and operator. The staker: /// 1. deposits all assets into strategies @@ -111,11 +108,9 @@ contract Integration_Deposit_Delegate_Queue_Complete is IntegrationCheckUtils { assert_NoWithdrawalsPending(withdrawalRoots, "all withdrawals should be removed from pending"); } - /** - * - * RANDOM WITHDRAWALS - * - */ + /// + /// RANDOM WITHDRAWALS + /// /// Generates a random staker and operator. The staker: /// 1. deposits all assets into strategies @@ -217,11 +212,9 @@ contract Integration_Deposit_Delegate_Queue_Complete is IntegrationCheckUtils { assert_NoWithdrawalsPending(withdrawalRoots, "all withdrawals should be removed from pending"); } - /** - * - * UNHAPPY PATH TESTS - * - */ + /// + /// UNHAPPY PATH TESTS + /// /// Generates a random staker and operator. The staker: /// 1. deposits all assets into strategies diff --git a/src/test/integration/tests/Deposit_Delegate_UpdateBalance.t.sol b/src/test/integration/tests/Deposit_Delegate_UpdateBalance.t.sol index 07caad29df..81a1ac1852 100644 --- a/src/test/integration/tests/Deposit_Delegate_UpdateBalance.t.sol +++ b/src/test/integration/tests/Deposit_Delegate_UpdateBalance.t.sol @@ -5,72 +5,62 @@ import "src/test/integration/IntegrationChecks.t.sol"; import "src/test/integration/users/User.t.sol"; contract Integration_Deposit_Delegate_UpdateBalance is IntegrationCheckUtils { -// TODO: fix for slashing -/// Generates a random stake and operator. The staker: -/// 1. deposits all assets into strategies -/// 2. delegates to an operator -/// 3. queues a withdrawal for a ALL shares -/// 4. updates their balance randomly -/// 5. completes the queued withdrawal as tokens -// function testFuzz_deposit_delegate_updateBalance_completeAsTokens(uint24 _random) public { -// _configRand({ -// _randomSeed: _random, -// _assetTypes: HOLDS_ETH, // HOLDS_LST | HOLDS_ETH | HOLDS_ALL, -// _userTypes: DEFAULT //| ALT_METHODS -// }); + // TODO: fix for slashing + /// Generates a random stake and operator. The staker: + /// 1. deposits all assets into strategies + /// 2. delegates to an operator + /// 3. queues a withdrawal for a ALL shares + /// 4. updates their balance randomly + /// 5. completes the queued withdrawal as tokens + // function testFuzz_deposit_delegate_updateBalance_completeAsTokens(uint24 _random) public { + // _configRand({ + // _randomSeed: _random, + // _assetTypes: HOLDS_ETH, // HOLDS_LST | HOLDS_ETH | HOLDS_ALL, + // _userTypes: DEFAULT //| ALT_METHODS + // }); + // /// 0. Create an operator and staker with some underlying assets + // ( + // User staker, + // IStrategy[] memory strategies, + // uint[] memory tokenBalances + // ) = _newRandomStaker(); + // (User operator, ,) = _newRandomOperator(); + // // Upgrade contracts if forkType is not local + // _upgradeEigenLayerContracts(); + // uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); + // assert_HasNoDelegatableShares(staker, "staker should not have delegatable shares before depositing"); + // assertFalse(delegationManager.isDelegated(address(staker)), "staker should not be delegated"); + // /// 1. Deposit into strategies + // staker.depositIntoEigenlayer(strategies, tokenBalances); + // check_Deposit_State(staker, strategies, shares); + // /// 2. Delegate to an operator + // staker.delegateTo(operator); + // check_Delegation_State(staker, operator, strategies, shares); + // /// 3. Queue withdrawals for ALL shares + // Withdrawal[] memory withdrawals = staker.queueWithdrawals(strategies, shares); + // bytes32[] memory withdrawalRoots = _getWithdrawalHashes(withdrawals); + // check_QueuedWithdrawal_State(staker, operator, strategies, shares, withdrawals, withdrawalRoots); + // // Generate a random balance update: + // // - For LSTs, the tokenDelta is positive tokens minted to the staker + // // - For ETH, the tokenDelta is a positive or negative change in beacon chain balance + // ( + // int[] memory tokenDeltas, + // int[] memory stakerShareDeltas, + // int[] memory operatorShareDeltas + // ) = _randBalanceUpdate(staker, strategies); + // // 4. Update LST balance by depositing, and beacon balance by submitting a proof + // staker.updateBalances(strategies, tokenDeltas); + // assert_Snap_Delta_StakerShares(staker, strategies, stakerShareDeltas, "staker should have applied deltas correctly"); + // assert_Snap_Delta_OperatorShares(operator, strategies, operatorShareDeltas, "operator should have applied deltas correctly"); + // console.log("withdrawble: ", staker.pod().withdrawableRestakedExecutionLayerGwei()); + // // Fast forward to when we can complete the withdrawal + // _rollBlocksForCompleteWithdrawals(withdrawals); + // // 5. Complete queued withdrawals as tokens + // staker.completeWithdrawalsAsTokens(withdrawals); + // assertEq(address(operator), delegationManager.delegatedTo(address(staker)), "staker should still be delegated to operator"); + // assert_NoWithdrawalsPending(withdrawalRoots, "all withdrawals should be removed from pending"); + // assert_Snap_Unchanged_TokenBalances(operator, "operator token balances should not have changed"); + // assert_Snap_Unchanged_OperatorShares(operator, "operator shares should not have changed"); + // } -// /// 0. Create an operator and staker with some underlying assets -// ( -// User staker, -// IStrategy[] memory strategies, -// uint[] memory tokenBalances -// ) = _newRandomStaker(); -// (User operator, ,) = _newRandomOperator(); -// // Upgrade contracts if forkType is not local -// _upgradeEigenLayerContracts(); - -// uint[] memory shares = _calculateExpectedShares(strategies, tokenBalances); - -// assert_HasNoDelegatableShares(staker, "staker should not have delegatable shares before depositing"); -// assertFalse(delegationManager.isDelegated(address(staker)), "staker should not be delegated"); - -// /// 1. Deposit into strategies -// staker.depositIntoEigenlayer(strategies, tokenBalances); -// check_Deposit_State(staker, strategies, shares); - -// /// 2. Delegate to an operator -// staker.delegateTo(operator); -// check_Delegation_State(staker, operator, strategies, shares); - -// /// 3. Queue withdrawals for ALL shares -// Withdrawal[] memory withdrawals = staker.queueWithdrawals(strategies, shares); -// bytes32[] memory withdrawalRoots = _getWithdrawalHashes(withdrawals); -// check_QueuedWithdrawal_State(staker, operator, strategies, shares, withdrawals, withdrawalRoots); - -// // Generate a random balance update: -// // - For LSTs, the tokenDelta is positive tokens minted to the staker -// // - For ETH, the tokenDelta is a positive or negative change in beacon chain balance -// ( -// int[] memory tokenDeltas, -// int[] memory stakerShareDeltas, -// int[] memory operatorShareDeltas -// ) = _randBalanceUpdate(staker, strategies); - -// // 4. Update LST balance by depositing, and beacon balance by submitting a proof -// staker.updateBalances(strategies, tokenDeltas); -// assert_Snap_Delta_StakerShares(staker, strategies, stakerShareDeltas, "staker should have applied deltas correctly"); -// assert_Snap_Delta_OperatorShares(operator, strategies, operatorShareDeltas, "operator should have applied deltas correctly"); - -// console.log("withdrawble: ", staker.pod().withdrawableRestakedExecutionLayerGwei()); - -// // Fast forward to when we can complete the withdrawal -// _rollBlocksForCompleteWithdrawals(withdrawals); - -// // 5. Complete queued withdrawals as tokens -// staker.completeWithdrawalsAsTokens(withdrawals); -// assertEq(address(operator), delegationManager.delegatedTo(address(staker)), "staker should still be delegated to operator"); -// assert_NoWithdrawalsPending(withdrawalRoots, "all withdrawals should be removed from pending"); -// assert_Snap_Unchanged_TokenBalances(operator, "operator token balances should not have changed"); -// assert_Snap_Unchanged_OperatorShares(operator, "operator shares should not have changed"); -// } -} + } diff --git a/src/test/integration/tests/HighDSF_Multiple_Deposits.t.sol b/src/test/integration/tests/HighDSF_Multiple_Deposits.t.sol index 810ce1efc1..58aa32b12e 100644 --- a/src/test/integration/tests/HighDSF_Multiple_Deposits.t.sol +++ b/src/test/integration/tests/HighDSF_Multiple_Deposits.t.sol @@ -22,13 +22,11 @@ contract Integration_HighDSF_Multiple_Deposits is IntegrationCheckUtils { uint slashId; - /** - * Shared setup: - * 1. create a new staker, operator, and avs - * 2. create an operator set and register an operator, allocate all magnitude to the operator set - * 3. slash operator to 1 magnitude remaining - * 4. delegate to operator - */ + /// Shared setup: + /// 1. create a new staker, operator, and avs + /// 2. create an operator set and register an operator, allocate all magnitude to the operator set + /// 3. slash operator to 1 magnitude remaining + /// 4. delegate to operator function _init() internal override { // 1. create a new staker, operator, and avs _configAssetTypes(HOLDS_LST); diff --git a/src/test/integration/tests/Multichain_Full_Flow.t.sol b/src/test/integration/tests/Multichain_Full_Flow.t.sol index d89a7764a4..7677c36094 100644 --- a/src/test/integration/tests/Multichain_Full_Flow.t.sol +++ b/src/test/integration/tests/Multichain_Full_Flow.t.sol @@ -3,12 +3,10 @@ pragma solidity ^0.8.27; import "../MultichainIntegrationChecks.t.sol"; -/** - * @title Multichain_Full_Flow - * @notice Integration tests for multichain functionality - * @dev Tests the complete flow: key registration -> table calculation -> - * transport simulation -> table update -> certificate verification - */ +/// @title Multichain_Full_Flow +/// @notice Integration tests for multichain functionality +/// @dev Tests the complete flow: key registration -> table calculation -> +/// transport simulation -> table update -> certificate verification contract Integration_Multichain_Full_Flow_BN254 is MultichainIntegrationCheckUtils { using StdStyle for *; using BN254 for BN254.G1Point; @@ -37,11 +35,9 @@ contract Integration_Multichain_Full_Flow_BN254 is MultichainIntegrationCheckUti _createGenerationReservation(operatorSet); } - /** - * @notice Test complete BN254 multichain happy path flow - * @dev Covers key registration, table generation, cross-chain transport simulation, - * table updates, and certificate verification - */ + /// @notice Test complete BN254 multichain happy path flow + /// @dev Covers key registration, table generation, cross-chain transport simulation, + /// table updates, and certificate verification function test_BN254_MultichainStandard() external { console.log("Testing BN254 multichain flow:"); @@ -62,10 +58,8 @@ contract Integration_Multichain_Full_Flow_BN254 is MultichainIntegrationCheckUti console.log("BN254 certificate verified successfully"); } - /** - * @notice Test BN254 multichain flow with proportional verification - * @dev Test case 3: Verify BN254 certificate with proportional thresholds - */ + /// @notice Test BN254 multichain flow with proportional verification + /// @dev Test case 3: Verify BN254 certificate with proportional thresholds function test_BN254_MultichainStandard_ProportionalVerification() external { console.log("Testing BN254 multichain flow with proportional verification:"); @@ -115,10 +109,8 @@ contract Integration_Multichain_Full_Flow_BN254 is MultichainIntegrationCheckUti console.log("BN254 proportional verification tests completed successfully"); } - /** - * @notice Test BN254 multichain flow with nominal verification - * @dev Test case 4: Verify BN254 certificate with nominal thresholds - */ + /// @notice Test BN254 multichain flow with nominal verification + /// @dev Test case 4: Verify BN254 certificate with nominal thresholds function test_BN254_MultichainStandard_NominalVerification() external { console.log("Testing BN254 multichain flow with nominal verification:"); @@ -175,11 +167,9 @@ contract Integration_Multichain_Full_Flow_BN254 is MultichainIntegrationCheckUti contract Integration_Multichain_Full_Flow_ECDSA is MultichainIntegrationCheckUtils { using StdStyle for *; - /** - * @notice Test complete ECDSA multichain happy path flow - * @dev Covers key registration, table generation, cross-chain transport simulation, - * table updates, and certificate verification - */ + /// @notice Test complete ECDSA multichain happy path flow + /// @dev Covers key registration, table generation, cross-chain transport simulation, + /// table updates, and certificate verification function test_ECDSA_MultichainStandard() external { console.log("Testing ECDSA multichain flow:"); vm.warp(block.timestamp + 50_000); diff --git a/src/test/integration/tests/Multichain_Generation_Reservation_Removal.t.sol b/src/test/integration/tests/Multichain_Generation_Reservation_Removal.t.sol index 422990836b..b1414d6f7e 100644 --- a/src/test/integration/tests/Multichain_Generation_Reservation_Removal.t.sol +++ b/src/test/integration/tests/Multichain_Generation_Reservation_Removal.t.sol @@ -3,19 +3,15 @@ pragma solidity ^0.8.27; import "../MultichainIntegrationChecks.t.sol"; -/** - * @title Multichain_Generation_Reservation_Removal - * @notice Integration tests for generation reservation removal functionality - * @dev Tests the behavior when generation reservations are removed and tables can no longer be transported - */ +/// @title Multichain_Generation_Reservation_Removal +/// @notice Integration tests for generation reservation removal functionality +/// @dev Tests the behavior when generation reservations are removed and tables can no longer be transported contract Integration_Multichain_Generation_Reservation_Removal is MultichainIntegrationCheckUtils { using StdStyle for *; using BN254 for BN254.G1Point; - /** - * @notice Test that tables cannot be transported after removing generation reservation - * @dev Test case 2: Verify that after removing generation reservation, tables are not transported - */ + /// @notice Test that tables cannot be transported after removing generation reservation + /// @dev Test case 2: Verify that after removing generation reservation, tables are not transported function test_RemoveGenerationReservation_TablesNotTransported() external { vm.warp(block.timestamp + 50_000); console.log("Testing generation reservation removal - tables not transported:"); diff --git a/src/test/integration/tests/Multichain_Timing_Tests.t.sol b/src/test/integration/tests/Multichain_Timing_Tests.t.sol index 8b1dcd5bec..7c80383cd1 100644 --- a/src/test/integration/tests/Multichain_Timing_Tests.t.sol +++ b/src/test/integration/tests/Multichain_Timing_Tests.t.sol @@ -3,11 +3,9 @@ pragma solidity ^0.8.27; import "../MultichainIntegrationChecks.t.sol"; -/** - * @title Multichain_Timing_Tests - * @notice Integration tests for multichain timing constraints and edge cases - * @dev Tests the temporal behavior of global table root confirmations and operator table updates - */ +/// @title Multichain_Timing_Tests +/// @notice Integration tests for multichain timing constraints and edge cases +/// @dev Tests the temporal behavior of global table root confirmations and operator table updates contract Integration_Multichain_Timing_Tests_Base is MultichainIntegrationCheckUtils { using StdStyle for *; using BN254 for BN254.G1Point; @@ -27,9 +25,7 @@ contract Integration_Multichain_Timing_Tests_Base is MultichainIntegrationCheckU operatorSet = OperatorSet({avs: address(this), id: 1}); } - /** - * @notice Helper function to confirm global table root and update BN254 table with custom staleness period - */ + /// @notice Helper function to confirm global table root and update BN254 table with custom staleness period function _confirmGlobalTableRootAndUpdateBN254WithStaleness( OperatorSet memory _operatorSet, IOperatorTableCalculatorTypes.BN254OperatorSetInfo memory _operatorSetInfo, @@ -60,9 +56,7 @@ contract Integration_Multichain_Timing_Tests_Base is MultichainIntegrationCheckU operatorTableUpdater.updateOperatorTable(referenceTimestamp, globalTableRoot, operatorSetIndex, proof, operatorTable); } - /** - * @notice Helper function to confirm global table root and update ECDSA table with custom staleness period - */ + /// @notice Helper function to confirm global table root and update ECDSA table with custom staleness period function _confirmGlobalTableRootAndUpdateECDSAWithStaleness( OperatorSet memory _operatorSet, IOperatorTableCalculatorTypes.ECDSAOperatorInfo[] memory operatorInfos, @@ -93,9 +87,7 @@ contract Integration_Multichain_Timing_Tests_Base is MultichainIntegrationCheckU operatorTableUpdater.updateOperatorTable(referenceTimestamp, globalTableRoot, operatorSetIndex, proof, operatorTable); } - /** - * @notice Helper function to post a new global root - */ + /// @notice Helper function to post a new global root function _postNewGlobalRoot( OperatorSet memory _operatorSet, IOperatorTableCalculatorTypes.BN254OperatorSetInfo memory _operatorSetInfo, @@ -117,9 +109,7 @@ contract Integration_Multichain_Timing_Tests_Base is MultichainIntegrationCheckU _updateGlobalTableRoot(globalTableRoot, timestamp); } - /** - * @notice Helper function to test stale table transport - */ + /// @notice Helper function to test stale table transport function _testStaleTableTransport( OperatorSet memory _operatorSet, IOperatorTableCalculatorTypes.BN254OperatorSetInfo memory _operatorSetInfo, @@ -159,10 +149,8 @@ contract Integration_Multichain_Timing_Tests_GlobalTableRoot is Integration_Mult _createGenerationReservation(operatorSet); } - /** - * @notice Test that posting a root with the same reference timestamp as the latest reverts - * - */ + /// @notice Test that posting a root with the same reference timestamp as the latest reverts + /// function test_PostRoot_SameLatestReferenceTimestamp_Reverts() external { console.log("Testing post root with same latestReferenceTimestamp - should revert:"); @@ -212,10 +200,8 @@ contract Integration_Multichain_Timing_Tests_GlobalTableRoot is Integration_Mult console.log("Successfully verified that posting root with same timestamp reverts"); } - /** - * @notice Test that posting a root right after the latest reference timestamp succeeds - * @dev This tests the boundary condition where timestamp = latestReferenceTimestamp + 1 - */ + /// @notice Test that posting a root right after the latest reference timestamp succeeds + /// @dev This tests the boundary condition where timestamp = latestReferenceTimestamp + 1 function test_PostRoot_RightAfterLatestReferenceTimestamp_Succeeds() external { console.log("Testing post root right after latestReferenceTimestamp - should succeed:"); @@ -267,10 +253,8 @@ contract Integration_Multichain_Timing_Tests_GlobalTableRoot is Integration_Mult console.log("New latest reference timestamp:", newLatestReferenceTimestamp); } - /** - * @notice Test that transporting tables with a stale reference timestamp reverts - * @dev This tests that operator table updates must have timestamps > latest for that operator set - */ + /// @notice Test that transporting tables with a stale reference timestamp reverts + /// @dev This tests that operator table updates must have timestamps > latest for that operator set function test_TransportTables_StaleReferenceTimestamp_Reverts() external { console.log("Testing transport tables with stale reference timestamp - should revert:"); @@ -306,10 +290,8 @@ contract Integration_Multichain_Timing_Tests_GlobalTableRoot is Integration_Mult console.log("Operator set timestamp remains:", finalTimestamp); } - /** - * @notice Test that transporting tables right after updating the latest reference timestamp succeeds - * @dev This tests that table transport works immediately after the global table root is updated - */ + /// @notice Test that transporting tables right after updating the latest reference timestamp succeeds + /// @dev This tests that table transport works immediately after the global table root is updated function test_TransportTables_RightAfterLatestReferenceTimestamp_Succeeds() external { console.log("Testing transport tables right after latest reference timestamp - should succeed:"); @@ -363,10 +345,8 @@ contract Integration_Multichain_Timing_Tests_BN254 is Integration_Multichain_Tim _createGenerationReservation(operatorSet); } - /** - * @notice Test that verifying BN254 certificate after staleness period expires reverts - * @dev This tests that certificates become invalid after the maxStalenessPeriod - */ + /// @notice Test that verifying BN254 certificate after staleness period expires reverts + /// @dev This tests that certificates become invalid after the maxStalenessPeriod function test_VerifyBN254Certificate_AfterStalenessPeriod_Reverts() external { console.log("Testing BN254 certificate verification after staleness period - should revert:"); @@ -394,10 +374,8 @@ contract Integration_Multichain_Timing_Tests_BN254 is Integration_Multichain_Tim console.log("Successfully verified that BN254 certificate verification reverts after staleness period"); } - /** - * @notice Test that verifying BN254 certificate right at staleness period boundary succeeds - * @dev This tests the exact boundary condition where block.timestamp = referenceTimestamp + maxStalenessPeriod - */ + /// @notice Test that verifying BN254 certificate right at staleness period boundary succeeds + /// @dev This tests the exact boundary condition where block.timestamp = referenceTimestamp + maxStalenessPeriod function test_VerifyBN254Certificate_RightOnStalenessPeriod_Succeeds() external { console.log("Testing BN254 certificate verification right on staleness period boundary - should succeed:"); @@ -421,10 +399,8 @@ contract Integration_Multichain_Timing_Tests_BN254 is Integration_Multichain_Tim console.log("Successfully verified that BN254 certificate verification succeeds right at staleness period boundary"); } - /** - * @notice Test complex scenario: verify after staleness -> revert -> update staleness period -> verify again -> pass (BN254) - * @dev This tests the complete staleness period update flow for BN254 - */ + /// @notice Test complex scenario: verify after staleness -> revert -> update staleness period -> verify again -> pass (BN254) + /// @dev This tests the complete staleness period update flow for BN254 function test_BN254Certificate_StalenessUpdate_ComplexFlow() external { console.log("Testing BN254 complex staleness update flow:"); @@ -483,10 +459,8 @@ contract Integration_Multichain_Timing_Tests_ECDSA is Integration_Multichain_Tim _createGenerationReservation(operatorSet); } - /** - * @notice Test that verifying ECDSA certificate after staleness period expires reverts - * @dev This tests that ECDSA certificates become invalid after the maxStalenessPeriod - */ + /// @notice Test that verifying ECDSA certificate after staleness period expires reverts + /// @dev This tests that ECDSA certificates become invalid after the maxStalenessPeriod function test_VerifyECDSACertificate_AfterStalenessPeriod_Reverts() external { console.log("Testing ECDSA certificate verification after staleness period - should revert:"); IOperatorTableCalculatorTypes.ECDSAOperatorInfo[] memory operatorInfos = _generateECDSAOperatorTable(operatorSet, operators); @@ -515,10 +489,8 @@ contract Integration_Multichain_Timing_Tests_ECDSA is Integration_Multichain_Tim console.log("Successfully verified that ECDSA certificate verification reverts after staleness period"); } - /** - * @notice Test that verifying ECDSA certificate right at staleness period boundary succeeds - * @dev This tests the exact boundary condition for ECDSA certificates - */ + /// @notice Test that verifying ECDSA certificate right at staleness period boundary succeeds + /// @dev This tests the exact boundary condition for ECDSA certificates function test_VerifyECDSACertificate_RightOnStalenessPeriod_Succeeds() external { console.log("Testing ECDSA certificate verification right on staleness period boundary - should succeed:"); IOperatorTableCalculatorTypes.ECDSAOperatorInfo[] memory operatorInfos = _generateECDSAOperatorTable(operatorSet, operators); @@ -543,10 +515,8 @@ contract Integration_Multichain_Timing_Tests_ECDSA is Integration_Multichain_Tim console.log("Successfully verified that ECDSA certificate verification succeeds right at staleness period boundary"); } - /** - * @notice Test complex scenario: verify after staleness -> revert -> update staleness period -> verify again -> pass (ECDSA) - * @dev This tests the complete staleness period update flow for ECDSA - */ + /// @notice Test complex scenario: verify after staleness -> revert -> update staleness period -> verify again -> pass (ECDSA) + /// @dev This tests the complete staleness period update flow for ECDSA function test_ECDSACertificate_StalenessUpdate_ComplexFlow() external { console.log("Testing ECDSA complex staleness update flow:"); IOperatorTableCalculatorTypes.ECDSAOperatorInfo[] memory operatorInfos = _generateECDSAOperatorTable(operatorSet, operators); diff --git a/src/test/integration/tests/Timing.t.sol b/src/test/integration/tests/Timing.t.sol index 62656e5ba6..8e07c4d631 100644 --- a/src/test/integration/tests/Timing.t.sol +++ b/src/test/integration/tests/Timing.t.sol @@ -3,21 +3,17 @@ pragma solidity ^0.8.27; import "src/test/integration/tests/SlashingWithdrawals.t.sol"; -/** - * @notice These tests check for specific withdrawal correctness around timing - * @dev These tests assume the following: - * - The staker has a positive balance in all given strategies - * - The staker has no pending withdrawals - * - The staker is delegated to the operator - */ +/// @notice These tests check for specific withdrawal correctness around timing +/// @dev These tests assume the following: +/// - The staker has a positive balance in all given strategies +/// - The staker has no pending withdrawals +/// - The staker is delegated to the operator contract Integration_WithdrawalTiming is Integration_ALMSlashBase { /////////////////////////////// /// WITHDRAWAL TIMING TESTS /// /////////////////////////////// - /** - * @notice Test that a slash works correctly just before a _partial_ withdrawal is completed - */ + /// @notice Test that a slash works correctly just before a _partial_ withdrawal is completed function testFuzz_queuePartialWithdrawal_slashBeforeWithdrawalDelay_completeAsTokens(uint24 _r) public rand(_r) { uint[] memory depositSharesToWithdraw = new uint[](initDepositShares.length); /// 0. Calculate partial withdrawal amounts @@ -82,9 +78,7 @@ contract Integration_WithdrawalTiming is Integration_ALMSlashBase { assertEq(strats.length, strategies.length, "all strategies should have some shares remaining"); } - /** - * @notice Test that a slash works correctly just before a _total_ withdrawal is completed - */ + /// @notice Test that a slash works correctly just before a _total_ withdrawal is completed function testFuzz_queueTotalWithdrawal_slashBeforeWithdrawalDelay_completeAsTokens(uint24 _r) public rand(_r) { /// 1. Queue withdrawal uint[] memory withdrawableShares = _calcWithdrawable(staker, strategies, initDepositShares); @@ -139,9 +133,7 @@ contract Integration_WithdrawalTiming is Integration_ALMSlashBase { assertEq(strats.length, 0, "all strategies should have no shares remaining"); } - /** - * @notice Test that a staker can still complete a partial withdrawal even after a slash has been performed - */ + /// @notice Test that a staker can still complete a partial withdrawal even after a slash has been performed function testFuzz_queuePartialWithdrawal_slashAfterWithdrawalDelay_completeAsTokens(uint24 _r) public rand(_r) { uint[] memory depositSharesToWithdraw = new uint[](initDepositShares.length); /// 0. Calculate partial withdrawal amounts @@ -195,9 +187,7 @@ contract Integration_WithdrawalTiming is Integration_ALMSlashBase { assertEq(strats.length, strategies.length, "all strategies should have some shares remaining"); } - /** - * @notice Test that a staker is unaffected by a slash after the withdrawal delay has passed - */ + /// @notice Test that a staker is unaffected by a slash after the withdrawal delay has passed function testFuzz_queueTotalWithdrawal_slashAfterWithdrawalDelay_completeAsTokens(uint24 _r) public rand(_r) { /// 1. Queue withdrawal uint[] memory withdrawableShares = _calcWithdrawable(staker, strategies, initDepositShares); @@ -240,11 +230,9 @@ contract Integration_WithdrawalTiming is Integration_ALMSlashBase { } } -/** - * @notice These tests check for specific deallocation correctness around timing - * @dev These tests assume the following: - * - The operator is registered and allocated to the operator set - */ +/// @notice These tests check for specific deallocation correctness around timing +/// @dev These tests assume the following: +/// - The operator is registered and allocated to the operator set contract Integration_OperatorDeallocationTiming is Integration_ALMSlashBase { ////////////////////////////////////////// /// OPERATOR DEALLOCATION TIMING TESTS /// @@ -338,12 +326,10 @@ contract Integration_OperatorDeregistrationTiming is Integration_ALMSlashBase { } } -/** - * @notice These tests check for specific allocation correctness around timing - * @dev These tests inherit from IntegrationCheckUtils instead of Integration_ALMSlashBase because they require a - * different initialization -- specifically, the allocation must be performed within the tests. As such, there are no - * assumptions and many state variables are declared below. - */ +/// @notice These tests check for specific allocation correctness around timing +/// @dev These tests inherit from IntegrationCheckUtils instead of Integration_ALMSlashBase because they require a +/// different initialization -- specifically, the allocation must be performed within the tests. As such, there are no +/// assumptions and many state variables are declared below. contract Integration_OperatorAllocationTiming is IntegrationCheckUtils { AVS avs; User operator; diff --git a/src/test/integration/tests/eigenpod/Register_Allocate_Slash_VerifyWC_.t.sol b/src/test/integration/tests/eigenpod/Register_Allocate_Slash_VerifyWC_.t.sol index 4ebb9d039a..92fcbc555e 100644 --- a/src/test/integration/tests/eigenpod/Register_Allocate_Slash_VerifyWC_.t.sol +++ b/src/test/integration/tests/eigenpod/Register_Allocate_Slash_VerifyWC_.t.sol @@ -24,12 +24,10 @@ contract Integration_Register_Allocate_Slash_VerifyWC is IntegrationCheckUtils { uint slashId; - /** - * 1. Create an operatorSet and register the operator allocating all magnitude - * 2. slash operator to 1 magnitude remaining - * 3. delegate staker to operator - * 4. deposit (verify withdrawal credentials) - */ + /// 1. Create an operatorSet and register the operator allocating all magnitude + /// 2. slash operator to 1 magnitude remaining + /// 3. delegate staker to operator + /// 4. deposit (verify withdrawal credentials) function _init() internal override { _configAssetTypes(HOLDS_ETH); (staker, strategies, initDepositShares) = _newRandomStaker(); @@ -67,15 +65,13 @@ contract Integration_Register_Allocate_Slash_VerifyWC is IntegrationCheckUtils { check_VerifyWC_State(staker, validators, beaconBalanceGwei); } - /** - * Test sequence following _init() - * 4. slash validators on beacon chain (start/complete checkpoint) - * 5. queue withdrawal - * 6. complete withdrawal - * Given the operator has 1 magnitude remaining, the being slashed on the beacon chain - * and calculating a non-WAD BCSF, their slashing factor should be rounded down to 0. Resulting in - * the staker having 0 withdrawable shares. - */ + /// Test sequence following _init() + /// 4. slash validators on beacon chain (start/complete checkpoint) + /// 5. queue withdrawal + /// 6. complete withdrawal + /// Given the operator has 1 magnitude remaining, the being slashed on the beacon chain + /// and calculating a non-WAD BCSF, their slashing factor should be rounded down to 0. Resulting in + /// the staker having 0 withdrawable shares. function test_slashBC_startCompleteCP_queue_complete(uint24 _r) public rand(_r) { // 4. slash validators on beacon chain (start/complete checkpoint) uint40[] memory slashedValidators = _choose(validators); @@ -118,14 +114,12 @@ contract Integration_Register_Allocate_Slash_VerifyWC is IntegrationCheckUtils { check_Withdrawal_AsShares_State(staker, operator, withdrawals[0], strategies, 0.toArrayU256()); } - /** - * Test sequence following _init() - * 4. fully slash operator on opSet again to 0 magnitude - * 5. undelegate - * 6. redeposit (start/complete checkpoint) - * This is testing when an operator is fully slashed with 0 magnitude, the staker can still undelegate - * and "redeposit" to Eigenlayer. - */ + /// Test sequence following _init() + /// 4. fully slash operator on opSet again to 0 magnitude + /// 5. undelegate + /// 6. redeposit (start/complete checkpoint) + /// This is testing when an operator is fully slashed with 0 magnitude, the staker can still undelegate + /// and "redeposit" to Eigenlayer. function test_slash_undelegate_redeposit(uint24 _r) public rand(_r) { // 4. AVS slashes operator again to 0 magnitude and fully slashed SlashingParams memory slashParams = _genSlashing_Full(operator, operatorSet); @@ -159,15 +153,13 @@ contract Integration_Register_Allocate_Slash_VerifyWC is IntegrationCheckUtils { } } - /** - * Test sequence following _init() - * 4. fully slash operator on opSet again to 0 magnitude - * 5. undelegate - * 6. complete withdrawals as shares(although amount 0 from fully slashed operator) - * 7. redeposit (start/complete checkpoint) - * This is testing when an operator is fully slashed with 0 magnitude, the staker can still undelegate, - * complete withdrawals as shares(0 shares though), and redeposit to Eigenlayer. - */ + /// Test sequence following _init() + /// 4. fully slash operator on opSet again to 0 magnitude + /// 5. undelegate + /// 6. complete withdrawals as shares(although amount 0 from fully slashed operator) + /// 7. redeposit (start/complete checkpoint) + /// This is testing when an operator is fully slashed with 0 magnitude, the staker can still undelegate, + /// complete withdrawals as shares(0 shares though), and redeposit to Eigenlayer. function test_slash_undelegate_completeAsShares_startCompleteCP(uint24 _r) public rand(_r) { // 4. AVS slashes operator again to 0 magnitude and fully slashed SlashingParams memory slashParams = _genSlashing_Full(operator, operatorSet); @@ -196,15 +188,13 @@ contract Integration_Register_Allocate_Slash_VerifyWC is IntegrationCheckUtils { check_CompleteCheckpoint_State(staker); } - /** - * Test sequence following _init() - * 4. fully slash operator on opSet again to 0 magnitude - * 5. undelegate - * 6. complete withdrawals as tokens(although amount 0 from fully slashed operator) - * 7. redeposit (start new validators and verifywc) - * This is testing when an operator is fully slashed with 0 magnitude, the staker can still undelegate, - * complete withdrawals as tokens(0 tokens though), and redeposit to Eigenlayer. - */ + /// Test sequence following _init() + /// 4. fully slash operator on opSet again to 0 magnitude + /// 5. undelegate + /// 6. complete withdrawals as tokens(although amount 0 from fully slashed operator) + /// 7. redeposit (start new validators and verifywc) + /// This is testing when an operator is fully slashed with 0 magnitude, the staker can still undelegate, + /// complete withdrawals as tokens(0 tokens though), and redeposit to Eigenlayer. function test_slash_undelegate_completeAsTokens_verifyWC(uint24 _r) public rand(_r) { // 4. AVS slashes operator again to 0 magnitude and fully slashed SlashingParams memory slashParams = _genSlashing_Full(operator, operatorSet); @@ -232,13 +222,11 @@ contract Integration_Register_Allocate_Slash_VerifyWC is IntegrationCheckUtils { check_VerifyWC_State(staker, validators, beaconBalanceGwei); } - /** - * Test sequence following _init() - * 4. queue withdrawal - * 5. complete withdrawal as tokens - * This is testing a staker can queue a withdrawal and complete as tokens even - * though the operator has 1 maxMagnitude - */ + /// Test sequence following _init() + /// 4. queue withdrawal + /// 5. complete withdrawal as tokens + /// This is testing a staker can queue a withdrawal and complete as tokens even + /// though the operator has 1 maxMagnitude function test_queueAllShares_completeAsTokens(uint24 _r) public rand(_r) { // 4. queue withdrawal // ( , uint[] memory withdrawShares) = _randWithdrawal(strategies, initDepositShares); diff --git a/src/test/integration/tests/eigenpod/SlashBC_OneBCSF.t.sol b/src/test/integration/tests/eigenpod/SlashBC_OneBCSF.t.sol index a4159a608e..435b47ee41 100644 --- a/src/test/integration/tests/eigenpod/SlashBC_OneBCSF.t.sol +++ b/src/test/integration/tests/eigenpod/SlashBC_OneBCSF.t.sol @@ -24,15 +24,13 @@ contract Integration_SlashBC_OneBCSF is IntegrationCheckUtils { uint slashId; - /** - * Shared setup: - * 1. Update the EPM implementation to manually set the beaconChainSlashingFactor to 1 - * Note: Slashing the EigenPod enough (in units of gwei) to reduce the beaconChainSlashingFactor to 1 without - * rounding down to 0 in a single slash even with increased MaxEB to 2048 is not possible and would require several - * iterations of slashing to do so. Using a harness to set the beaconChainSlashingFactor to 1 is the easiest way for this test. - * 2. create a new staker, operator, and avs - * 3. start validators and verify withdrawal credentials - */ + /// Shared setup: + /// 1. Update the EPM implementation to manually set the beaconChainSlashingFactor to 1 + /// Note: Slashing the EigenPod enough (in units of gwei) to reduce the beaconChainSlashingFactor to 1 without + /// rounding down to 0 in a single slash even with increased MaxEB to 2048 is not possible and would require several + /// iterations of slashing to do so. Using a harness to set the beaconChainSlashingFactor to 1 is the easiest way for this test. + /// 2. create a new staker, operator, and avs + /// 3. start validators and verify withdrawal credentials function _init() internal override { // 1. etch a new implementation to set staker's beaconChainSlashingFactor to 1 EigenPodManagerWrapper eigenPodManagerWrapper = @@ -113,15 +111,13 @@ contract Integration_SlashBC_OneBCSF is IntegrationCheckUtils { } } - /** - * @notice Test that a staker with 1 maxMagnitude and 1 BCSF has slashingFactor rounded down to 0 - * and further deposits are not possible - * Test sequence following _init() - * 4. Create an operator set and register an operator - * 5. slash operator to 1 magnitude remaining - * 6. delegate to operator - * 7. deposit expecting revert (randomly pick to verifyWC, start/complete CP) - */ + /// @notice Test that a staker with 1 maxMagnitude and 1 BCSF has slashingFactor rounded down to 0 + /// and further deposits are not possible + /// Test sequence following _init() + /// 4. Create an operator set and register an operator + /// 5. slash operator to 1 magnitude remaining + /// 6. delegate to operator + /// 7. deposit expecting revert (randomly pick to verifyWC, start/complete CP) function test_slashAVS_delegate_revert_startCompleteCP(uint24 _r) public rand(_r) { // 4. Create an operator set and register an operator operatorSet = avs.createOperatorSet(strategies); diff --git a/src/test/integration/tests/eigenpod/Slashed_Eigenpod_BC.t.sol b/src/test/integration/tests/eigenpod/Slashed_Eigenpod_BC.t.sol index 2e70178081..e92127c97b 100644 --- a/src/test/integration/tests/eigenpod/Slashed_Eigenpod_BC.t.sol +++ b/src/test/integration/tests/eigenpod/Slashed_Eigenpod_BC.t.sol @@ -712,10 +712,8 @@ contract Integration_SlashedEigenpod_BC_HalfSlash is IntegrationCheckUtils { check_CompleteCheckpoint_WithCLSlashing_HandleRoundDown_State(staker, slashedGwei); } - /** - * @notice Test sets up an EigenPod which has a non-WAD BCSF. After queue withdrawing all depositShares - * which sets it to 0, they can then complete checkpoints repeatedly with 0 shares increase to increase the staker DSF each time - */ + /// @notice Test sets up an EigenPod which has a non-WAD BCSF. After queue withdrawing all depositShares + /// which sets it to 0, they can then complete checkpoints repeatedly with 0 shares increase to increase the staker DSF each time function test_completeCP_withNoAddedShares(uint24 _rand) public rand(_rand) { // 4. queue withdraw all depositShares having it set to 0 uint withdrawableSharesBefore = _getStakerWithdrawableShares(staker, strategies)[0]; diff --git a/src/test/integration/tests/eigenpod/VerifyWC_StartCP_CompleteCP.t.sol b/src/test/integration/tests/eigenpod/VerifyWC_StartCP_CompleteCP.t.sol index 9b8f514fa0..f2e3dcfae3 100644 --- a/src/test/integration/tests/eigenpod/VerifyWC_StartCP_CompleteCP.t.sol +++ b/src/test/integration/tests/eigenpod/VerifyWC_StartCP_CompleteCP.t.sol @@ -64,12 +64,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { // revert(); } - /** - * - * VERIFY -> START -> COMPLETE CHECKPOINT - * (TIMING VARIANTS) - * - */ + /// + /// VERIFY -> START -> COMPLETE CHECKPOINT + /// (TIMING VARIANTS) + /// /// 1. Verify validators' withdrawal credentials /// 2. start a checkpoint @@ -199,12 +197,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { check_CompleteCheckpoint_State(staker); } - /** - * - * VERIFY -> START -> COMPLETE CHECKPOINT - * (EXIT TO POD VARIANTS) - * - */ + /// + /// VERIFY -> START -> COMPLETE CHECKPOINT + /// (EXIT TO POD VARIANTS) + /// /// -- Fully exit validators before verifying withdrawal credentials /// 1. Verify validators' withdrawal credentials @@ -288,12 +284,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { check_CompleteCheckpoint_WithExits_State(staker, subset, exitedBalanceGwei); } - /** - * - * VERIFY -> START -> COMPLETE CHECKPOINT - * (SLASH TO POD VARIANTS) - * - */ + /// + /// VERIFY -> START -> COMPLETE CHECKPOINT + /// (SLASH TO POD VARIANTS) + /// /// -- get slashed on beacon chain /// 1. Try to verify validators' withdrawal credentials @@ -404,11 +398,9 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { check_CompleteCheckpoint_WithSlashing_HandleRoundDown_State(staker, validators, slashedBalanceGwei); } - /** - * - * VERIFY -> PROVE STALE BALANCE -> COMPLETE CHECKPOINT - * - */ + /// + /// VERIFY -> PROVE STALE BALANCE -> COMPLETE CHECKPOINT + /// /// 1. Verify validators' withdrawal credentials /// -- get slashed on beacon chain; exit to pod @@ -506,12 +498,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { check_CompleteCheckpoint_WithSlashing_HandleRoundDown_State(staker, validators, slashedBalanceGwei); } - /** - * - * VERIFY -> START -> COMPLETE CHECKPOINT - * (EARN ON CL VARIANTS) - * - */ + /// + /// VERIFY -> START -> COMPLETE CHECKPOINT + /// (EARN ON CL VARIANTS) + /// /// -- earn rewards on beacon chain (not withdrawn to pod) /// 1. Verify validators' withdrawal credentials @@ -593,12 +583,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { check_CompleteCheckpoint_EarnOnBeacon_State(staker, 0); } - /** - * - * VERIFY -> START -> COMPLETE CHECKPOINT - * (EARN TO POD VARIANTS) - * - */ + /// + /// VERIFY -> START -> COMPLETE CHECKPOINT + /// (EARN TO POD VARIANTS) + /// /// -- earn rewards on beacon chain (withdrawn to pod) /// 1. Verify validators' withdrawal credentials @@ -682,12 +670,10 @@ contract Integration_VerifyWC_StartCP_CompleteCP is IntegrationCheckUtils { check_CompleteCheckpoint_WithPodBalance_State(staker, 0); } - /** - * - * VERIFY -> START -> COMPLETE CHECKPOINT - * (NATIVE ETH VARIANTS) - * - */ + /// + /// VERIFY -> START -> COMPLETE CHECKPOINT + /// (NATIVE ETH VARIANTS) + /// /// -- Pod receives native ETH via fallback /// 1. start a checkpoint diff --git a/src/test/integration/users/User.t.sol b/src/test/integration/users/User.t.sol index 0136b9c845..2a7b08b613 100644 --- a/src/test/integration/users/User.t.sol +++ b/src/test/integration/users/User.t.sol @@ -133,9 +133,10 @@ contract User is Logger, TypeImporter { ); _tryPrankAppointee_AllocationManager(IAllocationManagerActions.registerForOperatorSets.selector); - allocationManager().registerForOperatorSets( - address(this), RegisterParams({avs: operatorSet.avs, operatorSetIds: operatorSet.id.toArrayU32(), data: ""}) - ); + allocationManager() + .registerForOperatorSets( + address(this), RegisterParams({avs: operatorSet.avs, operatorSetIds: operatorSet.id.toArrayU32(), data: ""}) + ); print.gasUsed(); } @@ -146,9 +147,10 @@ contract User is Logger, TypeImporter { ); _tryPrankAppointee_AllocationManager(IAllocationManagerActions.deregisterFromOperatorSets.selector); - allocationManager().deregisterFromOperatorSets( - DeregisterParams({operator: address(this), avs: operatorSet.avs, operatorSetIds: operatorSet.id.toArrayU32()}) - ); + allocationManager() + .deregisterFromOperatorSets( + DeregisterParams({operator: address(this), avs: operatorSet.avs, operatorSetIds: operatorSet.id.toArrayU32()}) + ); print.gasUsed(); } @@ -323,12 +325,7 @@ contract User is Logger, TypeImporter { return (withdrawals); } - function completeWithdrawalsAsTokens(Withdrawal[] memory withdrawals) - public - virtual - createSnapshot - returns (IERC20[][] memory tokens) - { + function completeWithdrawalsAsTokens(Withdrawal[] memory withdrawals) public virtual createSnapshot returns (IERC20[][] memory tokens) { print.method("completeWithdrawalsAsTokens"); tokens = new IERC20[][](withdrawals.length); for (uint i = 0; i < withdrawals.length; i++) { @@ -341,12 +338,7 @@ contract User is Logger, TypeImporter { return _completeQueuedWithdrawal(withdrawal, true); } - function completeWithdrawalsAsShares(Withdrawal[] memory withdrawals) - public - virtual - createSnapshot - returns (IERC20[][] memory tokens) - { + function completeWithdrawalsAsShares(Withdrawal[] memory withdrawals) public virtual createSnapshot returns (IERC20[][] memory tokens) { print.method("completeWithdrawalsAsShares"); tokens = new IERC20[][](withdrawals.length); for (uint i = 0; i < withdrawals.length; i++) { @@ -558,7 +550,8 @@ contract User is Logger, TypeImporter { beaconTimestamp: proof.beaconTimestamp, stateRootProof: proof.stateRootProof, proof: proof.validatorProof - }) {} catch (bytes memory err) { + }) {} + catch (bytes memory err) { _revert(err); } } @@ -826,7 +819,8 @@ contract User is Logger, TypeImporter { validatorIndices: _validators, validatorFieldsProofs: proofs.validatorFieldsProofs, validatorFields: proofs.validatorFields - }) {} catch (bytes memory err) { + }) {} + catch (bytes memory err) { _revert(err); } cheats.resumeTracing(); diff --git a/src/test/mocks/AVSTaskHookReentrantAttacker.sol b/src/test/mocks/AVSTaskHookReentrantAttacker.sol index 23f616414d..908e2a22c3 100644 --- a/src/test/mocks/AVSTaskHookReentrantAttacker.sol +++ b/src/test/mocks/AVSTaskHookReentrantAttacker.sol @@ -9,10 +9,8 @@ import {TaskMailbox} from "src/contracts/avs/task/TaskMailbox.sol"; import {ITaskMailboxTypes} from "src/contracts/interfaces/ITaskMailbox.sol"; import {IAVSTaskHook} from "src/contracts/interfaces/IAVSTaskHook.sol"; -/** - * @title AVSTaskHookReentrantAttacker - * @notice Mock contract for testing reentrancy protection in AVSTaskHook - */ +/// @title AVSTaskHookReentrantAttacker +/// @notice Mock contract for testing reentrancy protection in AVSTaskHook contract AVSTaskHookReentrantAttacker is IAVSTaskHook, ITaskMailboxTypes { TaskMailbox public taskMailbox; diff --git a/src/test/mocks/AllocationManagerMock.sol b/src/test/mocks/AllocationManagerMock.sol index 5425bb4ed0..b0cfe66aa2 100644 --- a/src/test/mocks/AllocationManagerMock.sol +++ b/src/test/mocks/AllocationManagerMock.sol @@ -141,7 +141,11 @@ contract AllocationManagerMock is Test { OperatorSet memory operatorSet, address[] memory operators, IStrategy[] memory strategies /*uint32 futureBlock*/ - ) external pure returns (uint[][] memory) { + ) + external + pure + returns (uint[][] memory) + { uint[][] memory minimumSlashableStake = new uint[][](operators.length); for (uint i = 0; i < operators.length; ++i) { diff --git a/src/test/mocks/BN254CertificateVerifierMock.sol b/src/test/mocks/BN254CertificateVerifierMock.sol index a1decc2dc3..6b75e353ec 100644 --- a/src/test/mocks/BN254CertificateVerifierMock.sol +++ b/src/test/mocks/BN254CertificateVerifierMock.sol @@ -16,7 +16,8 @@ contract BN254CertificateVerifierMock is Test, IBN254CertificateVerifierTypes, I mapping(bytes32 certificateHash => bool isValid) internal _isValidCertificate; - mapping(bytes32 operatorSetKey => mapping(uint32 referenceTimestamp => BN254OperatorSetInfo operatorSetInfo)) internal _operatorSetInfos; + mapping(bytes32 operatorSetKey => mapping(uint32 referenceTimestamp => BN254OperatorSetInfo operatorSetInfo)) internal + _operatorSetInfos; mapping(bytes32 operatorSetKey => address owner) internal _operatorSetOwners; mapping(bytes32 operatorSetKey => uint32 maxStalenessPeriod) internal _maxStalenessPeriods; mapping(bytes32 operatorSetKey => uint32 latestReferenceTimestamp) internal _latestReferenceTimestamp; @@ -75,11 +76,9 @@ contract BN254CertificateVerifierMock is Test, IBN254CertificateVerifierTypes, I return _isReferenceTimestampSet[operatorSet.key()][referenceTimestamp]; } - /** - * @notice Validates certificate timestamp against staleness requirements - * @param operatorSetKey The operator set key - * @param referenceTimestamp The reference timestamp to validate - */ + /// @notice Validates certificate timestamp against staleness requirements + /// @param operatorSetKey The operator set key + /// @param referenceTimestamp The reference timestamp to validate function _validateCertificateTimestamp(bytes32 operatorSetKey, uint32 referenceTimestamp) internal view { uint32 maxStaleness = _maxStalenessPeriods[operatorSetKey]; require(maxStaleness == 0 || block.timestamp <= referenceTimestamp + maxStaleness, CertificateStale()); @@ -88,11 +87,9 @@ contract BN254CertificateVerifierMock is Test, IBN254CertificateVerifierTypes, I require(operatorTableUpdater.isRootValidByTimestamp(referenceTimestamp), RootDisabled()); } - /** - * @notice Public function to validate certificate timestamp (for testing) - * @param operatorSet The operator set - * @param referenceTimestamp The reference timestamp to validate - */ + /// @notice Public function to validate certificate timestamp (for testing) + /// @param operatorSet The operator set + /// @param referenceTimestamp The reference timestamp to validate function validateCertificateTimestamp(OperatorSet memory operatorSet, uint32 referenceTimestamp) external view { _validateCertificateTimestamp(operatorSet.key(), referenceTimestamp); } diff --git a/src/test/mocks/DelegationManagerMock.sol b/src/test/mocks/DelegationManagerMock.sol index b07775d894..1c4ab66cac 100644 --- a/src/test/mocks/DelegationManagerMock.sol +++ b/src/test/mocks/DelegationManagerMock.sol @@ -28,9 +28,7 @@ contract DelegationManagerMock is Test { function slashOperatorShares( address operator, OperatorSet memory, - /** - * operatorSet - */ + /// operatorSet uint, /*slashId*/ IStrategy strategy, uint64 prevMaxMagnitude, @@ -63,7 +61,9 @@ contract DelegationManagerMock is Test { address operator, ISignatureUtilsMixinTypes.SignatureWithExpiry memory, /*approverSignatureAndExpiry*/ bytes32 /*approverSalt*/ - ) external { + ) + external + { delegatedTo[msg.sender] = operator; } diff --git a/src/test/mocks/ERC20Mock.sol b/src/test/mocks/ERC20Mock.sol index 01ead61ba3..1c6e3d0496 100644 --- a/src/test/mocks/ERC20Mock.sol +++ b/src/test/mocks/ERC20Mock.sol @@ -6,34 +6,32 @@ pragma solidity ^0.8.27; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/utils/Context.sol"; -/** - * @dev Implementation of the {IERC20} interface. - * - * This implementation is agnostic to the way tokens are created. This means - * that a supply mechanism has to be added in a derived contract using {_mint}. - * For a generic mechanism see {ERC20PresetMinterPauser}. - * - * TIP: For a detailed writeup see our guide - * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How - * to implement supply mechanisms]. - * - * The default value of {decimals} is 18. To change this, you should override - * this function so it returns a different value. - * - * We have followed general OpenZeppelin Contracts guidelines: functions revert - * instead returning `false` on failure. This behavior is nonetheless - * conventional and does not conflict with the expectations of ERC20 - * applications. - * - * Additionally, an {Approval} event is emitted on calls to {transferFrom}. - * This allows applications to reconstruct the allowance for all accounts just - * by listening to said events. Other implementations of the EIP may not emit - * these events, as it isn't required by the specification. - * - * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} - * functions have been added to mitigate the well-known issues around setting - * allowances. See {IERC20-approve}. - */ +/// @dev Implementation of the {IERC20} interface. +/// +/// This implementation is agnostic to the way tokens are created. This means +/// that a supply mechanism has to be added in a derived contract using {_mint}. +/// For a generic mechanism see {ERC20PresetMinterPauser}. +/// +/// TIP: For a detailed writeup see our guide +/// https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How +/// to implement supply mechanisms]. +/// +/// The default value of {decimals} is 18. To change this, you should override +/// this function so it returns a different value. +/// +/// We have followed general OpenZeppelin Contracts guidelines: functions revert +/// instead returning `false` on failure. This behavior is nonetheless +/// conventional and does not conflict with the expectations of ERC20 +/// applications. +/// +/// Additionally, an {Approval} event is emitted on calls to {transferFrom}. +/// This allows applications to reconstruct the allowance for all accounts just +/// by listening to said events. Other implementations of the EIP may not emit +/// these events, as it isn't required by the specification. +/// +/// Finally, the non-standard {decreaseAllowance} and {increaseAllowance} +/// functions have been added to mitigate the well-known issues around setting +/// allowances. See {IERC20-approve}. contract ERC20Mock is Context, IERC20 { mapping(address => uint) private _balances; @@ -47,102 +45,102 @@ contract ERC20Mock is Context, IERC20 { _mint(msg.sender, initSupply); } - /** - * @dev Returns the decimals places of the token. - */ + /// @dev Returns the decimals places of the token. function decimals() external pure returns (uint8) { return 18; } - /** - * @dev See {IERC20-totalSupply}. - */ + /// @dev See {IERC20-totalSupply}. function totalSupply() public view virtual override returns (uint) { return _totalSupply; } - /** - * @dev See {IERC20-balanceOf}. - */ + /// @dev See {IERC20-balanceOf}. function balanceOf(address account) public view virtual override returns (uint) { return _balances[account]; } - /** - * @dev See {IERC20-transfer}. - * - * Requirements: - * - * - `to` cannot be the zero address. - * - the caller must have a balance of at least `amount`. - */ + /// @dev See {IERC20-transfer}. + /// + /// Requirements: + /// + /// - `to` cannot be the zero address. + /// - the caller must have a balance of at least `amount`. function transfer(address to, uint amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } - /** - * @dev See {IERC20-allowance}. - */ + /// @dev See {IERC20-allowance}. function allowance(address owner, address spender) public view virtual override returns (uint) { return _allowances[owner][spender]; } - function mint(address, /*to*/ uint amount) public virtual { + function mint( + address, + /*to*/ + uint amount + ) + public + virtual + { address owner = _msgSender(); _mint(owner, amount); } - /** - * @dev See {IERC20-approve}. - * - * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on - * `transferFrom`. This is semantically equivalent to an infinite approval. - * - * Requirements: - * - * - `spender` cannot be the zero address. - */ - function approve(address, /*spender*/ uint /*amount*/ ) public virtual override returns (bool) { + /// @dev See {IERC20-approve}. + /// + /// NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on + /// `transferFrom`. This is semantically equivalent to an infinite approval. + /// + /// Requirements: + /// + /// - `spender` cannot be the zero address. + function approve( + address, + /*spender*/ + uint /*amount*/ + ) + public + virtual + override + returns (bool) + { return true; } - /** - * @dev See {IERC20-transferFrom}. - * - * Emits an {Approval} event indicating the updated allowance. This is not - * required by the EIP. See the note at the beginning of {ERC20}. - * - * NOTE: Does not update the allowance if the current allowance - * is the maximum `uint256`. - * - * Requirements: - * - * - `from` and `to` cannot be the zero address. - * - `from` must have a balance of at least `amount`. - * - the caller must have allowance for ``from``'s tokens of at least - * `amount`. - */ + /// @dev See {IERC20-transferFrom}. + /// + /// Emits an {Approval} event indicating the updated allowance. This is not + /// required by the EIP. See the note at the beginning of {ERC20}. + /// + /// NOTE: Does not update the allowance if the current allowance + /// is the maximum `uint256`. + /// + /// Requirements: + /// + /// - `from` and `to` cannot be the zero address. + /// - `from` must have a balance of at least `amount`. + /// - the caller must have allowance for ``from``'s tokens of at least + /// `amount`. function transferFrom(address from, address to, uint amount) public virtual override returns (bool) { _transfer(from, to, amount); return true; } - /** - * @dev Moves `amount` of tokens from `from` to `to`. - * - * This internal function is equivalent to {transfer}, and can be used to - * e.g. implement automatic token fees, slashing mechanisms, etc. - * - * Emits a {Transfer} event. - * - * Requirements: - * - * - `from` cannot be the zero address. - * - `to` cannot be the zero address. - * - `from` must have a balance of at least `amount`. - */ + /// @dev Moves `amount` of tokens from `from` to `to`. + /// + /// This internal function is equivalent to {transfer}, and can be used to + /// e.g. implement automatic token fees, slashing mechanisms, etc. + /// + /// Emits a {Transfer} event. + /// + /// Requirements: + /// + /// - `from` cannot be the zero address. + /// - `to` cannot be the zero address. + /// - `from` must have a balance of at least `amount`. function _transfer(address from, address to, uint amount) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); @@ -162,16 +160,14 @@ contract ERC20Mock is Context, IERC20 { _afterTokenTransfer(from, to, amount); } - /** - * @dev Creates `amount` tokens and assigns them to `account`, increasing - * the total supply. - * - * Emits a {Transfer} event with `from` set to the zero address. - * - * Requirements: - * - * - `account` cannot be the zero address. - */ + /// @dev Creates `amount` tokens and assigns them to `account`, increasing + /// the total supply. + /// + /// Emits a {Transfer} event with `from` set to the zero address. + /// + /// Requirements: + /// + /// - `account` cannot be the zero address. function _mint(address account, uint amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); @@ -183,17 +179,15 @@ contract ERC20Mock is Context, IERC20 { emit Transfer(address(0), account, amount); } - /** - * @dev Destroys `amount` tokens from `account`, reducing the - * total supply. - * - * Emits a {Transfer} event with `to` set to the zero address. - * - * Requirements: - * - * - `account` cannot be the zero address. - * - `account` must have at least `amount` tokens. - */ + /// @dev Destroys `amount` tokens from `account`, reducing the + /// total supply. + /// + /// Emits a {Transfer} event with `to` set to the zero address. + /// + /// Requirements: + /// + /// - `account` cannot be the zero address. + /// - `account` must have at least `amount` tokens. function _burn(address account, uint amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); @@ -212,19 +206,17 @@ contract ERC20Mock is Context, IERC20 { _afterTokenTransfer(account, address(0), amount); } - /** - * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. - * - * This internal function is equivalent to `approve`, and can be used to - * e.g. set automatic allowances for certain subsystems, etc. - * - * Emits an {Approval} event. - * - * Requirements: - * - * - `owner` cannot be the zero address. - * - `spender` cannot be the zero address. - */ + /// @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. + /// + /// This internal function is equivalent to `approve`, and can be used to + /// e.g. set automatic allowances for certain subsystems, etc. + /// + /// Emits an {Approval} event. + /// + /// Requirements: + /// + /// - `owner` cannot be the zero address. + /// - `spender` cannot be the zero address. function _approve(address owner, address spender, uint amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); @@ -233,48 +225,42 @@ contract ERC20Mock is Context, IERC20 { emit Approval(owner, spender, amount); } - /** - * @dev Updates `owner` s allowance for `spender` based on spent `amount`. - * - * Does not update the allowance amount in case of infinite allowance. - * Revert if not enough allowance is available. - * - * Might emit an {Approval} event. - */ + /// @dev Updates `owner` s allowance for `spender` based on spent `amount`. + /// + /// Does not update the allowance amount in case of infinite allowance. + /// Revert if not enough allowance is available. + /// + /// Might emit an {Approval} event. function _spendAllowance(address owner, address spender, uint amount) internal virtual { uint currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint).max) require(currentAllowance >= amount, "ERC20: insufficient allowance"); } - /** - * @dev Hook that is called before any transfer of tokens. This includes - * minting and burning. - * - * Calling conditions: - * - * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens - * will be transferred to `to`. - * - when `from` is zero, `amount` tokens will be minted for `to`. - * - when `to` is zero, `amount` of ``from``'s tokens will be burned. - * - `from` and `to` are never both zero. - * - * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. - */ + /// @dev Hook that is called before any transfer of tokens. This includes + /// minting and burning. + /// + /// Calling conditions: + /// + /// - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens + /// will be transferred to `to`. + /// - when `from` is zero, `amount` tokens will be minted for `to`. + /// - when `to` is zero, `amount` of ``from``'s tokens will be burned. + /// - `from` and `to` are never both zero. + /// + /// To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. function _beforeTokenTransfer(address from, address to, uint amount) internal virtual {} - /** - * @dev Hook that is called after any transfer of tokens. This includes - * minting and burning. - * - * Calling conditions: - * - * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens - * has been transferred to `to`. - * - when `from` is zero, `amount` tokens have been minted for `to`. - * - when `to` is zero, `amount` of ``from``'s tokens have been burned. - * - `from` and `to` are never both zero. - * - * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. - */ + /// @dev Hook that is called after any transfer of tokens. This includes + /// minting and burning. + /// + /// Calling conditions: + /// + /// - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens + /// has been transferred to `to`. + /// - when `from` is zero, `amount` tokens have been minted for `to`. + /// - when `to` is zero, `amount` of ``from``'s tokens have been burned. + /// - `from` and `to` are never both zero. + /// + /// To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. function _afterTokenTransfer(address from, address to, uint amount) internal virtual {} } diff --git a/src/test/mocks/ERC20_OneWeiFeeOnTransfer.sol b/src/test/mocks/ERC20_OneWeiFeeOnTransfer.sol index e6b29eaad0..839709b0fe 100644 --- a/src/test/mocks/ERC20_OneWeiFeeOnTransfer.sol +++ b/src/test/mocks/ERC20_OneWeiFeeOnTransfer.sol @@ -7,16 +7,14 @@ pragma solidity ^0.8.27; // pragma solidity ^0.8.0; -/** - * @dev Provides information about the current execution context, including the - * sender of the transaction and its data. While these are generally available - * via msg.sender and msg.data, they should not be accessed in such a direct - * manner, since when dealing with meta-transactions the account sending and - * paying for execution may not be the actual sender (as far as an application - * is concerned). - * - * This contract is only required for intermediate, library-like contracts. - */ +/// @dev Provides information about the current execution context, including the +/// sender of the transaction and its data. While these are generally available +/// via msg.sender and msg.data, they should not be accessed in such a direct +/// manner, since when dealing with meta-transactions the account sending and +/// paying for execution may not be the actual sender (as far as an application +/// is concerned). +/// +/// This contract is only required for intermediate, library-like contracts. abstract contract OpenZeppelin_Context { function _msgSender() internal view virtual returns (address) { return msg.sender; @@ -31,77 +29,59 @@ abstract contract OpenZeppelin_Context { // pragma solidity ^0.8.0; -/** - * @dev Interface of the ERC20 standard as defined in the EIP. - */ +/// @dev Interface of the ERC20 standard as defined in the EIP. interface OpenZeppelin_IERC20 { - /** - * @dev Emitted when `value` tokens are moved from one account (`from`) to - * another (`to`). - * - * Note that `value` may be zero. - */ + /// @dev Emitted when `value` tokens are moved from one account (`from`) to + /// another (`to`). + /// + /// Note that `value` may be zero. event Transfer(address indexed from, address indexed to, uint value); - /** - * @dev Emitted when the allowance of a `spender` for an `owner` is set by - * a call to {approve}. `value` is the new allowance. - */ + /// @dev Emitted when the allowance of a `spender` for an `owner` is set by + /// a call to {approve}. `value` is the new allowance. event Approval(address indexed owner, address indexed spender, uint value); - /** - * @dev Returns the amount of tokens in existence. - */ + /// @dev Returns the amount of tokens in existence. function totalSupply() external view returns (uint); - /** - * @dev Returns the amount of tokens owned by `account`. - */ + /// @dev Returns the amount of tokens owned by `account`. function balanceOf(address account) external view returns (uint); - /** - * @dev Moves `amount` tokens from the caller's account to `to`. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a {Transfer} event. - */ + /// @dev Moves `amount` tokens from the caller's account to `to`. + /// + /// Returns a boolean value indicating whether the operation succeeded. + /// + /// Emits a {Transfer} event. function transfer(address to, uint amount) external returns (bool); - /** - * @dev Returns the remaining number of tokens that `spender` will be - * allowed to spend on behalf of `owner` through {transferFrom}. This is - * zero by default. - * - * This value changes when {approve} or {transferFrom} are called. - */ + /// @dev Returns the remaining number of tokens that `spender` will be + /// allowed to spend on behalf of `owner` through {transferFrom}. This is + /// zero by default. + /// + /// This value changes when {approve} or {transferFrom} are called. function allowance(address owner, address spender) external view returns (uint); - /** - * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * IMPORTANT: Beware that changing an allowance with this method brings the risk - * that someone may use both the old and the new allowance by unfortunate - * transaction ordering. One possible solution to mitigate this race - * condition is to first reduce the spender's allowance to 0 and set the - * desired value afterwards: - * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 - * - * Emits an {Approval} event. - */ + /// @dev Sets `amount` as the allowance of `spender` over the caller's tokens. + /// + /// Returns a boolean value indicating whether the operation succeeded. + /// + /// IMPORTANT: Beware that changing an allowance with this method brings the risk + /// that someone may use both the old and the new allowance by unfortunate + /// transaction ordering. One possible solution to mitigate this race + /// condition is to first reduce the spender's allowance to 0 and set the + /// desired value afterwards: + /// https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 + /// + /// Emits an {Approval} event. function approve(address spender, uint amount) external returns (bool); - /** - * @dev Moves `amount` tokens from `from` to `to` using the - * allowance mechanism. `amount` is then deducted from the caller's - * allowance. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a {Transfer} event. - */ + /// @dev Moves `amount` tokens from `from` to `to` using the + /// allowance mechanism. `amount` is then deducted from the caller's + /// allowance. + /// + /// Returns a boolean value indicating whether the operation succeeded. + /// + /// Emits a {Transfer} event. function transferFrom(address from, address to, uint amount) external returns (bool); } @@ -111,25 +91,17 @@ interface OpenZeppelin_IERC20 { // import "../IERC20.sol"; -/** - * @dev Interface for the optional metadata functions from the ERC20 standard. - * - * _Available since v4.1._ - */ +/// @dev Interface for the optional metadata functions from the ERC20 standard. +/// +/// _Available since v4.1._ interface OpenZeppelin_IERC20Metadata is OpenZeppelin_IERC20 { - /** - * @dev Returns the name of the token. - */ + /// @dev Returns the name of the token. function name() external view returns (string memory); - /** - * @dev Returns the symbol of the token. - */ + /// @dev Returns the symbol of the token. function symbol() external view returns (string memory); - /** - * @dev Returns the decimals places of the token. - */ + /// @dev Returns the decimals places of the token. function decimals() external view returns (uint8); } @@ -139,34 +111,32 @@ interface OpenZeppelin_IERC20Metadata is OpenZeppelin_IERC20 { // import "./extensions/IERC20Metadata.sol"; // import "../../utils/Context.sol"; -/** - * @dev Implementation of the {IERC20} interface. - * - * This implementation is agnostic to the way tokens are created. This means - * that a supply mechanism has to be added in a derived contract using {_mint}. - * For a generic mechanism see {ERC20PresetMinterPauser}. - * - * TIP: For a detailed writeup see our guide - * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How - * to implement supply mechanisms]. - * - * The default value of {decimals} is 18. To change this, you should override - * this function so it returns a different value. - * - * We have followed general OpenZeppelin Contracts guidelines: functions revert - * instead returning `false` on failure. This behavior is nonetheless - * conventional and does not conflict with the expectations of ERC20 - * applications. - * - * Additionally, an {Approval} event is emitted on calls to {transferFrom}. - * This allows applications to reconstruct the allowance for all accounts just - * by listening to said events. Other implementations of the EIP may not emit - * these events, as it isn't required by the specification. - * - * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} - * functions have been added to mitigate the well-known issues around setting - * allowances. See {IERC20-approve}. - */ +/// @dev Implementation of the {IERC20} interface. +/// +/// This implementation is agnostic to the way tokens are created. This means +/// that a supply mechanism has to be added in a derived contract using {_mint}. +/// For a generic mechanism see {ERC20PresetMinterPauser}. +/// +/// TIP: For a detailed writeup see our guide +/// https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How +/// to implement supply mechanisms]. +/// +/// The default value of {decimals} is 18. To change this, you should override +/// this function so it returns a different value. +/// +/// We have followed general OpenZeppelin Contracts guidelines: functions revert +/// instead returning `false` on failure. This behavior is nonetheless +/// conventional and does not conflict with the expectations of ERC20 +/// applications. +/// +/// Additionally, an {Approval} event is emitted on calls to {transferFrom}. +/// This allows applications to reconstruct the allowance for all accounts just +/// by listening to said events. Other implementations of the EIP may not emit +/// these events, as it isn't required by the specification. +/// +/// Finally, the non-standard {decreaseAllowance} and {increaseAllowance} +/// functions have been added to mitigate the well-known issues around setting +/// allowances. See {IERC20-approve}. contract OpenZeppelin_ERC20 is OpenZeppelin_Context, OpenZeppelin_IERC20, OpenZeppelin_IERC20Metadata { mapping(address => uint) internal _balances; @@ -177,116 +147,96 @@ contract OpenZeppelin_ERC20 is OpenZeppelin_Context, OpenZeppelin_IERC20, OpenZe string private _name; string private _symbol; - /** - * @dev Sets the values for {name} and {symbol}. - * - * All two of these values are immutable: they can only be set once during - * construction. - */ + /// @dev Sets the values for {name} and {symbol}. + /// + /// All two of these values are immutable: they can only be set once during + /// construction. constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } - /** - * @dev Returns the name of the token. - */ + /// @dev Returns the name of the token. function name() public view virtual override returns (string memory) { return _name; } - /** - * @dev Returns the symbol of the token, usually a shorter version of the - * name. - */ + /// @dev Returns the symbol of the token, usually a shorter version of the + /// name. function symbol() public view virtual override returns (string memory) { return _symbol; } - /** - * @dev Returns the number of decimals used to get its user representation. - * For example, if `decimals` equals `2`, a balance of `505` tokens should - * be displayed to a user as `5.05` (`505 / 10 ** 2`). - * - * Tokens usually opt for a value of 18, imitating the relationship between - * Ether and Wei. This is the default value returned by this function, unless - * it's overridden. - * - * NOTE: This information is only used for _display_ purposes: it in - * no way affects any of the arithmetic of the contract, including - * {IERC20-balanceOf} and {IERC20-transfer}. - */ + /// @dev Returns the number of decimals used to get its user representation. + /// For example, if `decimals` equals `2`, a balance of `505` tokens should + /// be displayed to a user as `5.05` (`505 / 10 ** 2`). + /// + /// Tokens usually opt for a value of 18, imitating the relationship between + /// Ether and Wei. This is the default value returned by this function, unless + /// it's overridden. + /// + /// NOTE: This information is only used for _display_ purposes: it in + /// no way affects any of the arithmetic of the contract, including + /// {IERC20-balanceOf} and {IERC20-transfer}. function decimals() public view virtual override returns (uint8) { return 18; } - /** - * @dev See {IERC20-totalSupply}. - */ + /// @dev See {IERC20-totalSupply}. function totalSupply() public view virtual override returns (uint) { return _totalSupply; } - /** - * @dev See {IERC20-balanceOf}. - */ + /// @dev See {IERC20-balanceOf}. function balanceOf(address account) public view virtual override returns (uint) { return _balances[account]; } - /** - * @dev See {IERC20-transfer}. - * - * Requirements: - * - * - `to` cannot be the zero address. - * - the caller must have a balance of at least `amount`. - */ + /// @dev See {IERC20-transfer}. + /// + /// Requirements: + /// + /// - `to` cannot be the zero address. + /// - the caller must have a balance of at least `amount`. function transfer(address to, uint amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } - /** - * @dev See {IERC20-allowance}. - */ + /// @dev See {IERC20-allowance}. function allowance(address owner, address spender) public view virtual override returns (uint) { return _allowances[owner][spender]; } - /** - * @dev See {IERC20-approve}. - * - * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on - * `transferFrom`. This is semantically equivalent to an infinite approval. - * - * Requirements: - * - * - `spender` cannot be the zero address. - */ + /// @dev See {IERC20-approve}. + /// + /// NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on + /// `transferFrom`. This is semantically equivalent to an infinite approval. + /// + /// Requirements: + /// + /// - `spender` cannot be the zero address. function approve(address spender, uint amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } - /** - * @dev See {IERC20-transferFrom}. - * - * Emits an {Approval} event indicating the updated allowance. This is not - * required by the EIP. See the note at the beginning of {ERC20}. - * - * NOTE: Does not update the allowance if the current allowance - * is the maximum `uint256`. - * - * Requirements: - * - * - `from` and `to` cannot be the zero address. - * - `from` must have a balance of at least `amount`. - * - the caller must have allowance for ``from``'s tokens of at least - * `amount`. - */ + /// @dev See {IERC20-transferFrom}. + /// + /// Emits an {Approval} event indicating the updated allowance. This is not + /// required by the EIP. See the note at the beginning of {ERC20}. + /// + /// NOTE: Does not update the allowance if the current allowance + /// is the maximum `uint256`. + /// + /// Requirements: + /// + /// - `from` and `to` cannot be the zero address. + /// - `from` must have a balance of at least `amount`. + /// - the caller must have allowance for ``from``'s tokens of at least + /// `amount`. function transferFrom(address from, address to, uint amount) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); @@ -294,38 +244,34 @@ contract OpenZeppelin_ERC20 is OpenZeppelin_Context, OpenZeppelin_IERC20, OpenZe return true; } - /** - * @dev Atomically increases the allowance granted to `spender` by the caller. - * - * This is an alternative to {approve} that can be used as a mitigation for - * problems described in {IERC20-approve}. - * - * Emits an {Approval} event indicating the updated allowance. - * - * Requirements: - * - * - `spender` cannot be the zero address. - */ + /// @dev Atomically increases the allowance granted to `spender` by the caller. + /// + /// This is an alternative to {approve} that can be used as a mitigation for + /// problems described in {IERC20-approve}. + /// + /// Emits an {Approval} event indicating the updated allowance. + /// + /// Requirements: + /// + /// - `spender` cannot be the zero address. function increaseAllowance(address spender, uint addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } - /** - * @dev Atomically decreases the allowance granted to `spender` by the caller. - * - * This is an alternative to {approve} that can be used as a mitigation for - * problems described in {IERC20-approve}. - * - * Emits an {Approval} event indicating the updated allowance. - * - * Requirements: - * - * - `spender` cannot be the zero address. - * - `spender` must have allowance for the caller of at least - * `subtractedValue`. - */ + /// @dev Atomically decreases the allowance granted to `spender` by the caller. + /// + /// This is an alternative to {approve} that can be used as a mitigation for + /// problems described in {IERC20-approve}. + /// + /// Emits an {Approval} event indicating the updated allowance. + /// + /// Requirements: + /// + /// - `spender` cannot be the zero address. + /// - `spender` must have allowance for the caller of at least + /// `subtractedValue`. function decreaseAllowance(address spender, uint subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint currentAllowance = allowance(owner, spender); @@ -337,20 +283,18 @@ contract OpenZeppelin_ERC20 is OpenZeppelin_Context, OpenZeppelin_IERC20, OpenZe return true; } - /** - * @dev Moves `amount` of tokens from `from` to `to`. - * - * This internal function is equivalent to {transfer}, and can be used to - * e.g. implement automatic token fees, slashing mechanisms, etc. - * - * Emits a {Transfer} event. - * - * Requirements: - * - * - `from` cannot be the zero address. - * - `to` cannot be the zero address. - * - `from` must have a balance of at least `amount`. - */ + /// @dev Moves `amount` of tokens from `from` to `to`. + /// + /// This internal function is equivalent to {transfer}, and can be used to + /// e.g. implement automatic token fees, slashing mechanisms, etc. + /// + /// Emits a {Transfer} event. + /// + /// Requirements: + /// + /// - `from` cannot be the zero address. + /// - `to` cannot be the zero address. + /// - `from` must have a balance of at least `amount`. function _transfer(address from, address to, uint amount) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); @@ -371,16 +315,14 @@ contract OpenZeppelin_ERC20 is OpenZeppelin_Context, OpenZeppelin_IERC20, OpenZe _afterTokenTransfer(from, to, amount); } - /** - * @dev Creates `amount` tokens and assigns them to `account`, increasing - * the total supply. - * - * Emits a {Transfer} event with `from` set to the zero address. - * - * Requirements: - * - * - `account` cannot be the zero address. - */ + /// @dev Creates `amount` tokens and assigns them to `account`, increasing + /// the total supply. + /// + /// Emits a {Transfer} event with `from` set to the zero address. + /// + /// Requirements: + /// + /// - `account` cannot be the zero address. function _mint(address account, uint amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); @@ -396,17 +338,15 @@ contract OpenZeppelin_ERC20 is OpenZeppelin_Context, OpenZeppelin_IERC20, OpenZe _afterTokenTransfer(address(0), account, amount); } - /** - * @dev Destroys `amount` tokens from `account`, reducing the - * total supply. - * - * Emits a {Transfer} event with `to` set to the zero address. - * - * Requirements: - * - * - `account` cannot be the zero address. - * - `account` must have at least `amount` tokens. - */ + /// @dev Destroys `amount` tokens from `account`, reducing the + /// total supply. + /// + /// Emits a {Transfer} event with `to` set to the zero address. + /// + /// Requirements: + /// + /// - `account` cannot be the zero address. + /// - `account` must have at least `amount` tokens. function _burn(address account, uint amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); @@ -425,19 +365,17 @@ contract OpenZeppelin_ERC20 is OpenZeppelin_Context, OpenZeppelin_IERC20, OpenZe _afterTokenTransfer(account, address(0), amount); } - /** - * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. - * - * This internal function is equivalent to `approve`, and can be used to - * e.g. set automatic allowances for certain subsystems, etc. - * - * Emits an {Approval} event. - * - * Requirements: - * - * - `owner` cannot be the zero address. - * - `spender` cannot be the zero address. - */ + /// @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. + /// + /// This internal function is equivalent to `approve`, and can be used to + /// e.g. set automatic allowances for certain subsystems, etc. + /// + /// Emits an {Approval} event. + /// + /// Requirements: + /// + /// - `owner` cannot be the zero address. + /// - `spender` cannot be the zero address. function _approve(address owner, address spender, uint amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); @@ -446,14 +384,12 @@ contract OpenZeppelin_ERC20 is OpenZeppelin_Context, OpenZeppelin_IERC20, OpenZe emit Approval(owner, spender, amount); } - /** - * @dev Updates `owner` s allowance for `spender` based on spent `amount`. - * - * Does not update the allowance amount in case of infinite allowance. - * Revert if not enough allowance is available. - * - * Might emit an {Approval} event. - */ + /// @dev Updates `owner` s allowance for `spender` based on spent `amount`. + /// + /// Does not update the allowance amount in case of infinite allowance. + /// Revert if not enough allowance is available. + /// + /// Might emit an {Approval} event. function _spendAllowance(address owner, address spender, uint amount) internal virtual { uint currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint).max) { @@ -464,36 +400,32 @@ contract OpenZeppelin_ERC20 is OpenZeppelin_Context, OpenZeppelin_IERC20, OpenZe } } - /** - * @dev Hook that is called before any transfer of tokens. This includes - * minting and burning. - * - * Calling conditions: - * - * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens - * will be transferred to `to`. - * - when `from` is zero, `amount` tokens will be minted for `to`. - * - when `to` is zero, `amount` of ``from``'s tokens will be burned. - * - `from` and `to` are never both zero. - * - * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. - */ + /// @dev Hook that is called before any transfer of tokens. This includes + /// minting and burning. + /// + /// Calling conditions: + /// + /// - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens + /// will be transferred to `to`. + /// - when `from` is zero, `amount` tokens will be minted for `to`. + /// - when `to` is zero, `amount` of ``from``'s tokens will be burned. + /// - `from` and `to` are never both zero. + /// + /// To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. function _beforeTokenTransfer(address from, address to, uint amount) internal virtual {} - /** - * @dev Hook that is called after any transfer of tokens. This includes - * minting and burning. - * - * Calling conditions: - * - * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens - * has been transferred to `to`. - * - when `from` is zero, `amount` tokens have been minted for `to`. - * - when `to` is zero, `amount` of ``from``'s tokens have been burned. - * - `from` and `to` are never both zero. - * - * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. - */ + /// @dev Hook that is called after any transfer of tokens. This includes + /// minting and burning. + /// + /// Calling conditions: + /// + /// - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens + /// has been transferred to `to`. + /// - when `from` is zero, `amount` tokens have been minted for `to`. + /// - when `to` is zero, `amount` of ``from``'s tokens have been burned. + /// - `from` and `to` are never both zero. + /// + /// To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. function _afterTokenTransfer(address from, address to, uint amount) internal virtual {} } @@ -504,32 +436,26 @@ contract OpenZeppelin_ERC20 is OpenZeppelin_Context, OpenZeppelin_IERC20, OpenZe // import "../ERC20.sol"; // import "../../../utils/Context.sol"; -/** - * @dev Extension of {ERC20} that allows token holders to destroy both their own - * tokens and those that they have an allowance for, in a way that can be - * recognized off-chain (via event analysis). - */ +/// @dev Extension of {ERC20} that allows token holders to destroy both their own +/// tokens and those that they have an allowance for, in a way that can be +/// recognized off-chain (via event analysis). abstract contract OpenZeppelin_ERC20Burnable is OpenZeppelin_Context, OpenZeppelin_ERC20 { - /** - * @dev Destroys `amount` tokens from the caller. - * - * See {ERC20-_burn}. - */ + /// @dev Destroys `amount` tokens from the caller. + /// + /// See {ERC20-_burn}. function burn(uint amount) public virtual { _burn(_msgSender(), amount); } - /** - * @dev Destroys `amount` tokens from `account`, deducting from the caller's - * allowance. - * - * See {ERC20-_burn} and {ERC20-allowance}. - * - * Requirements: - * - * - the caller must have allowance for ``accounts``'s tokens of at least - * `amount`. - */ + /// @dev Destroys `amount` tokens from `account`, deducting from the caller's + /// allowance. + /// + /// See {ERC20-_burn} and {ERC20-allowance}. + /// + /// Requirements: + /// + /// - the caller must have allowance for ``accounts``'s tokens of at least + /// `amount`. function burnFrom(address account, uint amount) public virtual { _spendAllowance(account, _msgSender(), amount); _burn(account, amount); @@ -541,26 +467,22 @@ abstract contract OpenZeppelin_ERC20Burnable is OpenZeppelin_Context, OpenZeppel // import "../extensions/ERC20Burnable.sol"; -/** - * @dev {ERC20} token, including: - * - * - Preminted initial supply - * - Ability for holders to burn (destroy) their tokens - * - No access control mechanism (for minting/pausing) and hence no governance - * - * This contract uses {ERC20Burnable} to include burn capabilities - head to - * its documentation for details. - * - * _Available since v3.4._ - * - * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ - */ +/// @dev {ERC20} token, including: +/// +/// - Preminted initial supply +/// - Ability for holders to burn (destroy) their tokens +/// - No access control mechanism (for minting/pausing) and hence no governance +/// +/// This contract uses {ERC20Burnable} to include burn capabilities - head to +/// its documentation for details. +/// +/// _Available since v3.4._ +/// +/// _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ contract OpenZeppelin_ERC20PresetFixedSupply is OpenZeppelin_ERC20Burnable { - /** - * @dev Mints `initialSupply` amount of token and transfers them to `owner`. - * - * See {ERC20-constructor}. - */ + /// @dev Mints `initialSupply` amount of token and transfers them to `owner`. + /// + /// See {ERC20-constructor}. constructor(string memory name, string memory symbol, uint initialSupply, address owner) OpenZeppelin_ERC20(name, symbol) { _mint(owner, initialSupply); } @@ -572,20 +494,18 @@ contract ERC20_OneWeiFeeOnTransfer is OpenZeppelin_ERC20PresetFixedSupply { OpenZeppelin_ERC20PresetFixedSupply("ERC20_OneWeiFeeOnTransfer_Mock", "ERC20_OneWeiFeeOnTransfer_Mock", initSupply, initOwner) {} - /** - * @dev Moves `amount` of tokens from `from` to `to`. - * - * This internal function is equivalent to {transfer}, and can be used to - * e.g. implement automatic token fees, slashing mechanisms, etc. - * - * Emits a {Transfer} event. - * - * Requirements: - * - * - `from` cannot be the zero address. - * - `to` cannot be the zero address. - * - `from` must have a balance of at least `amount`. - */ + /// @dev Moves `amount` of tokens from `from` to `to`. + /// + /// This internal function is equivalent to {transfer}, and can be used to + /// e.g. implement automatic token fees, slashing mechanisms, etc. + /// + /// Emits a {Transfer} event. + /// + /// Requirements: + /// + /// - `from` cannot be the zero address. + /// - `to` cannot be the zero address. + /// - `from` must have a balance of at least `amount`. function _transfer(address from, address to, uint amount) internal virtual override { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); diff --git a/src/test/mocks/ETHDepositMock.sol b/src/test/mocks/ETHDepositMock.sol index f568d0ca28..6bf6fb6359 100644 --- a/src/test/mocks/ETHDepositMock.sol +++ b/src/test/mocks/ETHDepositMock.sol @@ -6,8 +6,7 @@ import "../../contracts/interfaces/IETHPOSDeposit.sol"; contract ETHPOSDepositMock is IETHPOSDeposit { function deposit(bytes calldata pubkey, bytes calldata withdrawal_credentials, bytes calldata signature, bytes32 deposit_data_root) external - payable - {} + payable {} function get_deposit_root() external pure returns (bytes32) { bytes32 root; diff --git a/src/test/mocks/EigenPodManagerMock.sol b/src/test/mocks/EigenPodManagerMock.sol index 7c829f3f47..4bd9a217d0 100644 --- a/src/test/mocks/EigenPodManagerMock.sol +++ b/src/test/mocks/EigenPodManagerMock.sol @@ -49,7 +49,10 @@ contract EigenPodManagerMock is Test, Pausable { address podOwner, IStrategy, // strategy uint shares - ) external returns (uint) { + ) + external + returns (uint) + { int updatedShares = podOwnerDepositShares[podOwner] - int(shares); podOwnerDepositShares[podOwner] = updatedShares; return uint(updatedShares); @@ -62,15 +65,13 @@ contract EigenPodManagerMock is Test, Pausable { function withdrawSharesAsTokens( address podOwner, address, - /** - * strategy - */ + /// strategy address, - /** - * token - */ + /// token uint shares - ) external { + ) + external + { podOwnerSharesWithdrawn[podOwner] += shares; } diff --git a/src/test/mocks/EigenPodMock.sol b/src/test/mocks/EigenPodMock.sol index f836f291d7..aa580b5809 100644 --- a/src/test/mocks/EigenPodMock.sol +++ b/src/test/mocks/EigenPodMock.sol @@ -17,12 +17,10 @@ contract EigenPodMock is IEigenPod, SemVerMixin, Test { /// @notice Called by EigenPodManager when the owner wants to create another ETH validator. function stake(bytes calldata pubkey, bytes calldata signature, bytes32 depositDataRoot) external payable {} - /** - * @notice Transfers `amountWei` in ether from this contract to the specified `recipient` address - * @notice Called by EigenPodManager to withdrawBeaconChainETH that has been added to the EigenPod's balance due to a withdrawal from the beacon chain. - * @dev Called during withdrawal or slashing. - * @dev Note that this function is marked as non-reentrant to prevent the recipient calling back into it - */ + /// @notice Transfers `amountWei` in ether from this contract to the specified `recipient` address + /// @notice Called by EigenPodManager to withdrawBeaconChainETH that has been added to the EigenPod's balance due to a withdrawal from the beacon chain. + /// @dev Called during withdrawal or slashing. + /// @dev Note that this function is marked as non-reentrant to prevent the recipient calling back into it function withdrawRestakedBeaconChainETH(address recipient, uint amount) external {} /// @notice The single EigenPodManager for EigenLayer diff --git a/src/test/mocks/MockAVSRegistrar.sol b/src/test/mocks/MockAVSRegistrar.sol index 49cb52f672..273e4347ea 100644 --- a/src/test/mocks/MockAVSRegistrar.sol +++ b/src/test/mocks/MockAVSRegistrar.sol @@ -2,7 +2,13 @@ pragma solidity ^0.8.27; contract MockAVSRegistrar { - function supportsAVS(address /*avs*/ ) external pure returns (bool) { + function supportsAVS( + address /*avs*/ + ) + external + pure + returns (bool) + { return true; } diff --git a/src/test/mocks/MockAVSTaskHook.sol b/src/test/mocks/MockAVSTaskHook.sol index 551b2af61d..7187520be5 100644 --- a/src/test/mocks/MockAVSTaskHook.sol +++ b/src/test/mocks/MockAVSTaskHook.sol @@ -11,26 +11,53 @@ contract MockAVSTaskHook is IAVSTaskHook { defaultFee = _fee; } - function validatePreTaskCreation(address, /*caller*/ ITaskMailboxTypes.TaskParams memory /*taskParams*/ ) external view { + function validatePreTaskCreation( + address, + /*caller*/ + ITaskMailboxTypes.TaskParams memory /*taskParams*/ + ) + external + view { //TODO: Implement } - function handlePostTaskCreation(bytes32 /*taskHash*/ ) external { + function handlePostTaskCreation( + bytes32 /*taskHash*/ + ) + external { //TODO: Implement } - function validatePreTaskResultSubmission(address, /*caller*/ bytes32, /*taskHash*/ bytes memory, /*cert*/ bytes memory /*result*/ ) + function validatePreTaskResultSubmission( + address, + /*caller*/ + bytes32, + /*taskHash*/ + bytes memory, + /*cert*/ + bytes memory /*result*/ + ) external - view - { + view { //TODO: Implement } - function handlePostTaskResultSubmission(address, /*caller*/ bytes32 /*taskHash*/ ) external { + function handlePostTaskResultSubmission( + address, + /*caller*/ + bytes32 /*taskHash*/ + ) + external { //TODO: Implement } - function calculateTaskFee(ITaskMailboxTypes.TaskParams memory /*taskParams*/ ) external view returns (uint96) { + function calculateTaskFee( + ITaskMailboxTypes.TaskParams memory /*taskParams*/ + ) + external + view + returns (uint96) + { return defaultFee; } } diff --git a/src/test/mocks/MockBN254CertificateVerifier.sol b/src/test/mocks/MockBN254CertificateVerifier.sol index ae4ea50ffc..dff4196a6b 100644 --- a/src/test/mocks/MockBN254CertificateVerifier.sol +++ b/src/test/mocks/MockBN254CertificateVerifier.sol @@ -33,7 +33,11 @@ contract MockBN254CertificateVerifier is IBN254CertificateVerifier { OperatorSetConfig calldata /*operatorSetConfig*/ ) external pure {} - function verifyCertificate(OperatorSet memory, /*operatorSet*/ BN254Certificate memory /*cert*/ ) + function verifyCertificate( + OperatorSet memory, + /*operatorSet*/ + BN254Certificate memory /*cert*/ + ) external pure returns (uint[] memory signedStakes) @@ -45,7 +49,11 @@ contract MockBN254CertificateVerifier is IBN254CertificateVerifier { OperatorSet memory, /*operatorSet*/ BN254Certificate memory, /*cert*/ uint16[] memory /*totalStakeProportionThresholds*/ - ) external pure returns (bool) { + ) + external + pure + returns (bool) + { return true; } @@ -53,16 +61,32 @@ contract MockBN254CertificateVerifier is IBN254CertificateVerifier { OperatorSet memory, /*operatorSet*/ BN254Certificate memory, /*cert*/ uint[] memory /*totalStakeNominalThresholds*/ - ) external pure returns (bool) { + ) + external + pure + returns (bool) + { return true; } // Implement IBaseCertificateVerifier required functions - function operatorTableUpdater(OperatorSet memory /*operatorSet*/ ) external pure returns (address) { + function operatorTableUpdater( + OperatorSet memory /*operatorSet*/ + ) + external + pure + returns (address) + { return address(0); } - function getLatestReferenceTimestamp(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + function getLatestReferenceTimestamp( + OperatorSet memory /*operatorSet*/ + ) + external + pure + returns (uint32) + { return 0; } @@ -72,11 +96,23 @@ contract MockBN254CertificateVerifier is IBN254CertificateVerifier { return owner != address(0) ? owner : operatorSet.avs; } - function latestReferenceTimestamp(OperatorSet memory /*operatorSet*/ ) external view returns (uint32) { + function latestReferenceTimestamp( + OperatorSet memory /*operatorSet*/ + ) + external + view + returns (uint32) + { return _latestReferenceTimestamp; } - function maxOperatorTableStaleness(OperatorSet memory /*operatorSet*/ ) external view returns (uint32) { + function maxOperatorTableStaleness( + OperatorSet memory /*operatorSet*/ + ) + external + view + returns (uint32) + { return _maxOperatorTableStaleness; } @@ -85,11 +121,21 @@ contract MockBN254CertificateVerifier is IBN254CertificateVerifier { BN254.G1Point memory, /*aggPubkey*/ BN254.G2Point memory, /*apkG2*/ BN254.G1Point memory /*signature*/ - ) external pure returns (bool pairingSuccessful, bool signatureValid) { + ) + external + pure + returns (bool pairingSuccessful, bool signatureValid) + { return (true, true); } - function getNonsignerOperatorInfo(OperatorSet memory, /*operatorSet*/ uint32, /*referenceTimestamp*/ uint /*operatorIndex*/ ) + function getNonsignerOperatorInfo( + OperatorSet memory, + /*operatorSet*/ + uint32, + /*referenceTimestamp*/ + uint /*operatorIndex*/ + ) external pure returns (IOperatorTableCalculatorTypes.BN254OperatorInfo memory) @@ -98,7 +144,13 @@ contract MockBN254CertificateVerifier is IBN254CertificateVerifier { return IOperatorTableCalculatorTypes.BN254OperatorInfo({pubkey: BN254.G1Point(0, 0), weights: weights}); } - function isNonsignerCached(OperatorSet memory, /*operatorSet*/ uint32, /*referenceTimestamp*/ uint /*operatorIndex*/ ) + function isNonsignerCached( + OperatorSet memory, + /*operatorSet*/ + uint32, + /*referenceTimestamp*/ + uint /*operatorIndex*/ + ) external pure returns (bool) @@ -106,7 +158,11 @@ contract MockBN254CertificateVerifier is IBN254CertificateVerifier { return false; } - function getOperatorSetInfo(OperatorSet memory, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) + function getOperatorSetInfo( + OperatorSet memory, + /*operatorSet*/ + uint32 /*referenceTimestamp*/ + ) external pure returns (IOperatorTableCalculatorTypes.BN254OperatorSetInfo memory) @@ -124,7 +180,11 @@ contract MockBN254CertificateVerifier is IBN254CertificateVerifier { return true; } - function getTotalStakeWeights(OperatorSet memory, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) + function getTotalStakeWeights( + OperatorSet memory, + /*operatorSet*/ + uint32 /*referenceTimestamp*/ + ) external pure returns (uint[] memory) @@ -132,7 +192,15 @@ contract MockBN254CertificateVerifier is IBN254CertificateVerifier { return new uint[](0); } - function getOperatorCount(OperatorSet memory, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) external pure returns (uint) { + function getOperatorCount( + OperatorSet memory, + /*operatorSet*/ + uint32 /*referenceTimestamp*/ + ) + external + pure + returns (uint) + { return 0; } diff --git a/src/test/mocks/MockBN254CertificateVerifierFailure.sol b/src/test/mocks/MockBN254CertificateVerifierFailure.sol index 294341078e..24494d9716 100644 --- a/src/test/mocks/MockBN254CertificateVerifierFailure.sol +++ b/src/test/mocks/MockBN254CertificateVerifierFailure.sol @@ -6,11 +6,9 @@ import {IOperatorTableCalculatorTypes} from "src/contracts/interfaces/IOperatorT import {OperatorSet} from "src/contracts/libraries/OperatorSetLib.sol"; import {BN254} from "src/contracts/libraries/BN254.sol"; -/** - * @title MockBN254CertificateVerifierFailure - * @notice Mock BN254 certificate verifier that always fails verification - * @dev Used for testing certificate verification failure scenarios - */ +/// @title MockBN254CertificateVerifierFailure +/// @notice Mock BN254 certificate verifier that always fails verification +/// @dev Used for testing certificate verification failure scenarios contract MockBN254CertificateVerifierFailure is IBN254CertificateVerifier { // Mapping to store operator set owners for testing mapping(bytes32 => address) public operatorSetOwners; @@ -26,7 +24,11 @@ contract MockBN254CertificateVerifierFailure is IBN254CertificateVerifier { OperatorSetConfig calldata /*operatorSetConfig*/ ) external pure {} - function verifyCertificate(OperatorSet memory, /*operatorSet*/ BN254Certificate memory /*cert*/ ) + function verifyCertificate( + OperatorSet memory, + /*operatorSet*/ + BN254Certificate memory /*cert*/ + ) external pure returns (uint[] memory signedStakes) @@ -38,7 +40,11 @@ contract MockBN254CertificateVerifierFailure is IBN254CertificateVerifier { OperatorSet memory, /*operatorSet*/ BN254Certificate memory, /*cert*/ uint16[] memory /*totalStakeProportionThresholds*/ - ) external pure returns (bool) { + ) + external + pure + returns (bool) + { return false; // Always fail } @@ -46,16 +52,32 @@ contract MockBN254CertificateVerifierFailure is IBN254CertificateVerifier { OperatorSet memory, /*operatorSet*/ BN254Certificate memory, /*cert*/ uint[] memory /*totalStakeNominalThresholds*/ - ) external pure returns (bool) { + ) + external + pure + returns (bool) + { return false; // Always fail } // Implement IBaseCertificateVerifier required functions - function operatorTableUpdater(OperatorSet memory /*operatorSet*/ ) external pure returns (address) { + function operatorTableUpdater( + OperatorSet memory /*operatorSet*/ + ) + external + pure + returns (address) + { return address(0); } - function getLatestReferenceTimestamp(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + function getLatestReferenceTimestamp( + OperatorSet memory /*operatorSet*/ + ) + external + pure + returns (uint32) + { return 0; } @@ -65,11 +87,23 @@ contract MockBN254CertificateVerifierFailure is IBN254CertificateVerifier { return owner != address(0) ? owner : operatorSet.avs; } - function latestReferenceTimestamp(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + function latestReferenceTimestamp( + OperatorSet memory /*operatorSet*/ + ) + external + pure + returns (uint32) + { return 0; } - function maxOperatorTableStaleness(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + function maxOperatorTableStaleness( + OperatorSet memory /*operatorSet*/ + ) + external + pure + returns (uint32) + { return 86_400; } @@ -78,11 +112,21 @@ contract MockBN254CertificateVerifierFailure is IBN254CertificateVerifier { BN254.G1Point memory, /*aggPubkey*/ BN254.G2Point memory, /*apkG2*/ BN254.G1Point memory /*signature*/ - ) external pure returns (bool pairingSuccessful, bool signatureValid) { + ) + external + pure + returns (bool pairingSuccessful, bool signatureValid) + { return (true, false); // Pairing succeeds but signature is invalid } - function getNonsignerOperatorInfo(OperatorSet memory, /*operatorSet*/ uint32, /*referenceTimestamp*/ uint /*operatorIndex*/ ) + function getNonsignerOperatorInfo( + OperatorSet memory, + /*operatorSet*/ + uint32, + /*referenceTimestamp*/ + uint /*operatorIndex*/ + ) external pure returns (IOperatorTableCalculatorTypes.BN254OperatorInfo memory) @@ -91,7 +135,13 @@ contract MockBN254CertificateVerifierFailure is IBN254CertificateVerifier { return IOperatorTableCalculatorTypes.BN254OperatorInfo({pubkey: BN254.G1Point(0, 0), weights: weights}); } - function isNonsignerCached(OperatorSet memory, /*operatorSet*/ uint32, /*referenceTimestamp*/ uint /*operatorIndex*/ ) + function isNonsignerCached( + OperatorSet memory, + /*operatorSet*/ + uint32, + /*referenceTimestamp*/ + uint /*operatorIndex*/ + ) external pure returns (bool) @@ -99,7 +149,11 @@ contract MockBN254CertificateVerifierFailure is IBN254CertificateVerifier { return false; } - function getOperatorSetInfo(OperatorSet memory, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) + function getOperatorSetInfo( + OperatorSet memory, + /*operatorSet*/ + uint32 /*referenceTimestamp*/ + ) external pure returns (IOperatorTableCalculatorTypes.BN254OperatorSetInfo memory) @@ -117,7 +171,11 @@ contract MockBN254CertificateVerifierFailure is IBN254CertificateVerifier { return true; } - function getTotalStakeWeights(OperatorSet memory, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) + function getTotalStakeWeights( + OperatorSet memory, + /*operatorSet*/ + uint32 /*referenceTimestamp*/ + ) external pure returns (uint[] memory) @@ -125,7 +183,15 @@ contract MockBN254CertificateVerifierFailure is IBN254CertificateVerifier { return new uint[](0); } - function getOperatorCount(OperatorSet memory, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) external pure returns (uint) { + function getOperatorCount( + OperatorSet memory, + /*operatorSet*/ + uint32 /*referenceTimestamp*/ + ) + external + pure + returns (uint) + { return 0; } diff --git a/src/test/mocks/MockECDSACertificateVerifier.sol b/src/test/mocks/MockECDSACertificateVerifier.sol index 68fc4367f5..8ec0520862 100644 --- a/src/test/mocks/MockECDSACertificateVerifier.sol +++ b/src/test/mocks/MockECDSACertificateVerifier.sol @@ -29,9 +29,15 @@ contract MockECDSACertificateVerifier is IECDSACertificateVerifier { uint32, /*referenceTimestamp*/ ECDSAOperatorInfo[] calldata, /*operatorInfos*/ OperatorSetConfig calldata /*operatorSetConfig*/ - ) external pure {} + ) + external + pure {} - function verifyCertificate(OperatorSet calldata, /*operatorSet*/ ECDSACertificate memory /*cert*/ ) + function verifyCertificate( + OperatorSet calldata, + /*operatorSet*/ + ECDSACertificate memory /*cert*/ + ) external pure returns (uint[] memory signedStakes, address[] memory signers) @@ -43,7 +49,11 @@ contract MockECDSACertificateVerifier is IECDSACertificateVerifier { OperatorSet calldata, /*operatorSet*/ ECDSACertificate memory, /*cert*/ uint16[] memory /*totalStakeProportionThresholds*/ - ) external pure returns (bool, address[] memory signers) { + ) + external + pure + returns (bool, address[] memory signers) + { return (true, new address[](0)); } @@ -51,16 +61,32 @@ contract MockECDSACertificateVerifier is IECDSACertificateVerifier { OperatorSet calldata, /*operatorSet*/ ECDSACertificate memory, /*cert*/ uint[] memory /*totalStakeNominalThresholds*/ - ) external pure returns (bool, address[] memory signers) { + ) + external + pure + returns (bool, address[] memory signers) + { return (true, new address[](0)); } // Implement IBaseCertificateVerifier required functions - function operatorTableUpdater(OperatorSet memory /*operatorSet*/ ) external pure returns (address) { + function operatorTableUpdater( + OperatorSet memory /*operatorSet*/ + ) + external + pure + returns (address) + { return address(0); } - function getLatestReferenceTimestamp(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + function getLatestReferenceTimestamp( + OperatorSet memory /*operatorSet*/ + ) + external + pure + returns (uint32) + { return 0; } @@ -70,15 +96,31 @@ contract MockECDSACertificateVerifier is IECDSACertificateVerifier { return owner != address(0) ? owner : operatorSet.avs; } - function latestReferenceTimestamp(OperatorSet memory /*operatorSet*/ ) external view returns (uint32) { + function latestReferenceTimestamp( + OperatorSet memory /*operatorSet*/ + ) + external + view + returns (uint32) + { return _latestReferenceTimestamp; } - function maxOperatorTableStaleness(OperatorSet memory /*operatorSet*/ ) external view returns (uint32) { + function maxOperatorTableStaleness( + OperatorSet memory /*operatorSet*/ + ) + external + view + returns (uint32) + { return _maxOperatorTableStaleness; } - function getCachedSignerList(OperatorSet calldata, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) + function getCachedSignerList( + OperatorSet calldata, + /*operatorSet*/ + uint32 /*referenceTimestamp*/ + ) external pure returns (address[] memory) @@ -86,7 +128,11 @@ contract MockECDSACertificateVerifier is IECDSACertificateVerifier { return new address[](0); } - function getOperatorInfos(OperatorSet calldata, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) + function getOperatorInfos( + OperatorSet calldata, + /*operatorSet*/ + uint32 /*referenceTimestamp*/ + ) external pure returns (ECDSAOperatorInfo[] memory) @@ -94,7 +140,13 @@ contract MockECDSACertificateVerifier is IECDSACertificateVerifier { return new ECDSAOperatorInfo[](0); } - function getOperatorInfo(OperatorSet calldata, /*operatorSet*/ uint32, /*referenceTimestamp*/ uint /*operatorIndex*/ ) + function getOperatorInfo( + OperatorSet calldata, + /*operatorSet*/ + uint32, + /*referenceTimestamp*/ + uint /*operatorIndex*/ + ) external pure returns (ECDSAOperatorInfo memory) @@ -103,11 +155,27 @@ contract MockECDSACertificateVerifier is IECDSACertificateVerifier { return ECDSAOperatorInfo({pubkey: address(0), weights: weights}); } - function getOperatorCount(OperatorSet memory, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) external pure returns (uint) { + function getOperatorCount( + OperatorSet memory, + /*operatorSet*/ + uint32 /*referenceTimestamp*/ + ) + external + pure + returns (uint) + { return 0; } - function getTotalStakes(OperatorSet calldata, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) external pure returns (uint[] memory) { + function getTotalStakes( + OperatorSet calldata, + /*operatorSet*/ + uint32 /*referenceTimestamp*/ + ) + external + pure + returns (uint[] memory) + { return new uint[](0); } diff --git a/src/test/mocks/MockECDSACertificateVerifierFailure.sol b/src/test/mocks/MockECDSACertificateVerifierFailure.sol index d943bc83d1..184126a03a 100644 --- a/src/test/mocks/MockECDSACertificateVerifierFailure.sol +++ b/src/test/mocks/MockECDSACertificateVerifierFailure.sol @@ -17,9 +17,15 @@ contract MockECDSACertificateVerifierFailure is IECDSACertificateVerifier { uint32, /*referenceTimestamp*/ ECDSAOperatorInfo[] calldata, /*operatorInfos*/ OperatorSetConfig calldata /*operatorSetConfig*/ - ) external pure {} + ) + external + pure {} - function verifyCertificate(OperatorSet calldata, /*operatorSet*/ ECDSACertificate memory /*cert*/ ) + function verifyCertificate( + OperatorSet calldata, + /*operatorSet*/ + ECDSACertificate memory /*cert*/ + ) external pure returns (uint[] memory signedStakes, address[] memory signers) @@ -31,7 +37,11 @@ contract MockECDSACertificateVerifierFailure is IECDSACertificateVerifier { OperatorSet calldata, /*operatorSet*/ ECDSACertificate memory, /*cert*/ uint16[] memory /*totalStakeProportionThresholds*/ - ) external pure returns (bool, address[] memory signers) { + ) + external + pure + returns (bool, address[] memory signers) + { return (false, new address[](0)); // Always fail } @@ -39,16 +49,32 @@ contract MockECDSACertificateVerifierFailure is IECDSACertificateVerifier { OperatorSet calldata, /*operatorSet*/ ECDSACertificate memory, /*cert*/ uint[] memory /*totalStakeNominalThresholds*/ - ) external pure returns (bool, address[] memory signers) { + ) + external + pure + returns (bool, address[] memory signers) + { return (false, new address[](0)); // Always fail } // Implement IBaseCertificateVerifier required functions - function operatorTableUpdater(OperatorSet memory /*operatorSet*/ ) external pure returns (address) { + function operatorTableUpdater( + OperatorSet memory /*operatorSet*/ + ) + external + pure + returns (address) + { return address(0); } - function getLatestReferenceTimestamp(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + function getLatestReferenceTimestamp( + OperatorSet memory /*operatorSet*/ + ) + external + pure + returns (uint32) + { return 0; } @@ -58,15 +84,31 @@ contract MockECDSACertificateVerifierFailure is IECDSACertificateVerifier { return owner != address(0) ? owner : operatorSet.avs; } - function latestReferenceTimestamp(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + function latestReferenceTimestamp( + OperatorSet memory /*operatorSet*/ + ) + external + pure + returns (uint32) + { return 0; } - function maxOperatorTableStaleness(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + function maxOperatorTableStaleness( + OperatorSet memory /*operatorSet*/ + ) + external + pure + returns (uint32) + { return 86_400; } - function getCachedSignerList(OperatorSet calldata, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) + function getCachedSignerList( + OperatorSet calldata, + /*operatorSet*/ + uint32 /*referenceTimestamp*/ + ) external pure returns (address[] memory) @@ -74,7 +116,11 @@ contract MockECDSACertificateVerifierFailure is IECDSACertificateVerifier { return new address[](0); } - function getOperatorInfos(OperatorSet calldata, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) + function getOperatorInfos( + OperatorSet calldata, + /*operatorSet*/ + uint32 /*referenceTimestamp*/ + ) external pure returns (ECDSAOperatorInfo[] memory) @@ -82,7 +128,13 @@ contract MockECDSACertificateVerifierFailure is IECDSACertificateVerifier { return new ECDSAOperatorInfo[](0); } - function getOperatorInfo(OperatorSet calldata, /*operatorSet*/ uint32, /*referenceTimestamp*/ uint /*operatorIndex*/ ) + function getOperatorInfo( + OperatorSet calldata, + /*operatorSet*/ + uint32, + /*referenceTimestamp*/ + uint /*operatorIndex*/ + ) external pure returns (ECDSAOperatorInfo memory) @@ -91,11 +143,27 @@ contract MockECDSACertificateVerifierFailure is IECDSACertificateVerifier { return ECDSAOperatorInfo({pubkey: address(0), weights: weights}); } - function getOperatorCount(OperatorSet memory, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) external pure returns (uint) { + function getOperatorCount( + OperatorSet memory, + /*operatorSet*/ + uint32 /*referenceTimestamp*/ + ) + external + pure + returns (uint) + { return 0; } - function getTotalStakes(OperatorSet calldata, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) external pure returns (uint[] memory) { + function getTotalStakes( + OperatorSet calldata, + /*operatorSet*/ + uint32 /*referenceTimestamp*/ + ) + external + pure + returns (uint[] memory) + { return new uint[](0); } diff --git a/src/test/mocks/MockERC20.sol b/src/test/mocks/MockERC20.sol index 01d43c5a14..c3555cc7d7 100644 --- a/src/test/mocks/MockERC20.sol +++ b/src/test/mocks/MockERC20.sol @@ -224,8 +224,8 @@ contract MockERC20 { } function _pureChainId() private pure returns (uint chainId) { - function() internal view returns (uint256) fnIn = _viewChainId; - function() internal pure returns (uint256) pureChainId; + function() internal view returns (uint) fnIn = _viewChainId; + function() internal pure returns (uint) pureChainId; assembly { pureChainId := fnIn } diff --git a/src/test/mocks/MockSimpleERC20.sol b/src/test/mocks/MockSimpleERC20.sol index 66302f8129..4fcba70f2d 100644 --- a/src/test/mocks/MockSimpleERC20.sol +++ b/src/test/mocks/MockSimpleERC20.sol @@ -3,11 +3,9 @@ pragma solidity ^0.8.27; import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; -/** - * @title MockSimpleERC20 - * @notice Mock ERC20 token for testing - * @dev Simple ERC20 implementation with mint function for testing - */ +/// @title MockSimpleERC20 +/// @notice Mock ERC20 token for testing +/// @dev Simple ERC20 implementation with mint function for testing contract MockSimpleERC20 is ERC20 { constructor() ERC20("Mock Token", "MOCK") {} diff --git a/src/test/mocks/StrategyManagerMock.sol b/src/test/mocks/StrategyManagerMock.sol index 8545762be9..d51df84d21 100644 --- a/src/test/mocks/StrategyManagerMock.sol +++ b/src/test/mocks/StrategyManagerMock.sol @@ -28,31 +28,25 @@ contract StrategyManagerMock is Test { delegation = _delegation; } - /** - * @notice mocks the return value of getDeposits - * @param staker staker whose deposits are being mocked - * @param _strategiesToReturn strategies to return in getDeposits - * @param _sharesToReturn shares to return in getDeposits - */ + /// @notice mocks the return value of getDeposits + /// @param staker staker whose deposits are being mocked + /// @param _strategiesToReturn strategies to return in getDeposits + /// @param _sharesToReturn shares to return in getDeposits function setDeposits(address staker, IStrategy[] calldata _strategiesToReturn, uint[] calldata _sharesToReturn) external { require(_strategiesToReturn.length == _sharesToReturn.length, "StrategyManagerMock: length mismatch"); strategiesToReturn[staker] = _strategiesToReturn; sharesToReturn[staker] = _sharesToReturn; } - /** - * @notice Adds deposit to the staker's deposits. Note that this function does not check if the staker - * has already deposited for the strategy. - */ + /// @notice Adds deposit to the staker's deposits. Note that this function does not check if the staker + /// has already deposited for the strategy. function addDeposit(address staker, IStrategy strategy, uint shares) external { strategiesToReturn[staker].push(strategy); sharesToReturn[staker].push(shares); } - /** - * @notice Get all details on the staker's deposits and corresponding shares - * @return (staker's strategies, shares in these strategies) - */ + /// @notice Get all details on the staker's deposits and corresponding shares + /// @return (staker's strategies, shares in these strategies) function getDeposits(address staker) external view returns (IStrategy[] memory, uint[] memory) { return (strategiesToReturn[staker], sharesToReturn[staker]); } @@ -65,7 +59,13 @@ contract StrategyManagerMock is Test { uint public stakerStrategyListLengthReturnValue; /// @notice Simple getter function that returns `stakerStrategyList[staker].length`. - function stakerStrategyListLength(address /*staker*/ ) external view returns (uint) { + function stakerStrategyListLength( + address /*staker*/ + ) + external + view + returns (uint) + { return stakerStrategyListLengthReturnValue; } @@ -90,14 +90,20 @@ contract StrategyManagerMock is Test { return updatedShares; } - function removeStrategiesFromDepositWhitelist(IStrategy[] calldata /*strategiesToRemoveFromWhitelist*/ ) external pure {} + function removeStrategiesFromDepositWhitelist( + IStrategy[] calldata /*strategiesToRemoveFromWhitelist*/ + ) + external + pure {} function withdrawSharesAsTokens( address staker, IStrategy strategy, address, // token uint shares - ) external { + ) + external + { strategySharesWithdrawn[staker][strategy] += shares; } diff --git a/src/test/unit/AVSDirectoryUnit.t.sol b/src/test/unit/AVSDirectoryUnit.t.sol index 1636a5898a..55b4315d76 100644 --- a/src/test/unit/AVSDirectoryUnit.t.sol +++ b/src/test/unit/AVSDirectoryUnit.t.sol @@ -105,7 +105,7 @@ contract AVSDirectoryUnitTests is EigenLayerUnitTestSetup, IAVSDirectoryEvents, function test_registerOperatorToAVS_Paused() public { cheats.prank(pauser); - avsDirectory.pause(2 ** PAUSED_OPERATOR_REGISTER_DEREGISTER_TO_AVS); + avsDirectory.pause(2**PAUSED_OPERATOR_REGISTER_DEREGISTER_TO_AVS); cheats.expectRevert(IPausable.CurrentlyPaused.selector); avsDirectory.registerOperatorToAVS(defaultOperator, defaultOperatorSignature); } @@ -155,7 +155,7 @@ contract AVSDirectoryUnitTests is EigenLayerUnitTestSetup, IAVSDirectoryEvents, function test_deregisterOperatorFromAVS_Paused() public { cheats.prank(pauser); - avsDirectory.pause(2 ** PAUSED_OPERATOR_REGISTER_DEREGISTER_TO_AVS); + avsDirectory.pause(2**PAUSED_OPERATOR_REGISTER_DEREGISTER_TO_AVS); cheats.expectRevert(IPausable.CurrentlyPaused.selector); avsDirectory.deregisterOperatorFromAVS(defaultOperator); } diff --git a/src/test/unit/AllocationManagerUnit.t.sol b/src/test/unit/AllocationManagerUnit.t.sol index ba90ff70e9..87bd758478 100644 --- a/src/test/unit/AllocationManagerUnit.t.sol +++ b/src/test/unit/AllocationManagerUnit.t.sol @@ -206,12 +206,10 @@ contract AllocationManagerUnitTests is EigenLayerUnitTestSetup, IAllocationManag uint allocatable; } - /** - * Get expected post slash storage values - * Assumes that: - * 1. WAD is max before slash - * 2. encumbered is equal to magnitude before slash - */ + /// Get expected post slash storage values + /// Assumes that: + /// 1. WAD is max before slash + /// 2. encumbered is equal to magnitude before slash function _getExpectedSlashVals(uint wadToSlash, uint64 magBeforeSlash) internal pure @@ -219,11 +217,9 @@ contract AllocationManagerUnitTests is EigenLayerUnitTestSetup, IAllocationManag { return _getExpectedSlashVals(wadToSlash, magBeforeSlash, magBeforeSlash); } - /** - * Get expected post slash storage values - * Assumes that: - * 1. WAD is max before slash - */ + /// Get expected post slash storage values + /// Assumes that: + /// 1. WAD is max before slash function _getExpectedSlashVals(uint wadToSlash, uint64 magBeforeSlash, uint64 encumberedMagBeforeSlash) internal @@ -472,10 +468,7 @@ contract AllocationManagerUnitTests is EigenLayerUnitTestSetup, IAllocationManag /// @dev Create allocate params for random magnitudes to the same default strategy across multiple operator sets /// NOTE: this variant allocates ALL magnitude (1 WAD) - function _randAllocateParams_SingleMockStrategy_AllocAll(OperatorSet[] memory operatorSets) - internal - returns (AllocateParams[] memory) - { + function _randAllocateParams_SingleMockStrategy_AllocAll(OperatorSet[] memory operatorSets) internal returns (AllocateParams[] memory) { // Give each set a minimum of 1 magnitude uint64[] memory magnitudes = new uint64[](operatorSets.length); uint64 usedMagnitude; @@ -550,7 +543,6 @@ contract AllocationManagerUnitTests_Initialization_Setters is AllocationManagerU /// ----------------------------------------------------------------------- /// initialize() /// ----------------------------------------------------------------------- - /// @dev Asserts the following: /// 1. The fn can only be called once, during deployment. /// 2. The fn initializes the contract state correctly (owner, pauserRegistry, and initialPausedStatus). @@ -596,7 +588,7 @@ contract AllocationManagerUnitTests_SlashOperator is AllocationManagerUnitTests } function test_revert_paused() public { - allocationManager.pause(2 ** PAUSED_OPERATOR_SLASHING); + allocationManager.pause(2**PAUSED_OPERATOR_SLASHING); cheats.expectRevert(IPausable.CurrentlyPaused.selector); allocationManager.slashOperator(defaultAVS, _randSlashingParams(defaultOperator, 0)); } @@ -689,13 +681,11 @@ contract AllocationManagerUnitTests_SlashOperator is AllocationManagerUnitTests ); } - /** - * Attempts to slash an operator before the allocation is active - * Validates: - * 1. The events of the slash indicate nothing was slashed - * 2. Storage is not mutated post slash - * 3. The operator's allocation takes effect as normal post slash - */ + /// Attempts to slash an operator before the allocation is active + /// Validates: + /// 1. The events of the slash indicate nothing was slashed + /// 2. Storage is not mutated post slash + /// 3. The operator's allocation takes effect as normal post slash function test_operatorAllocated_notActive() public { AllocateParams[] memory allocateParams = _newAllocateParams(defaultOperatorSet, WAD); @@ -749,13 +739,11 @@ contract AllocationManagerUnitTests_SlashOperator is AllocationManagerUnitTests }); } - /** - * Allocates all magnitude to for a single strategy to an operatorSet. Slashes 25% - * Validates: - * 1. Events are emitted - * 2. Allocation & info introspection - * 3. Slashable stake introspection - */ + /// Allocates all magnitude to for a single strategy to an operatorSet. Slashes 25% + /// Validates: + /// 1. Events are emitted + /// 2. Allocation & info introspection + /// 3. Slashable stake introspection function test_slashPostAllocation() public { // Generate allocation for this operator set, we allocate max AllocateParams[] memory allocateParams = _newAllocateParams(defaultOperatorSet, WAD); @@ -855,15 +843,13 @@ contract AllocationManagerUnitTests_SlashOperator is AllocationManagerUnitTests }); } - /** - * Allocates half of magnitude for a single strategy to an operatorSet. Then allocates again. Slashes 50% - * Asserts that: - * 1. Events are emitted - * 2. Encumbered mag is updated - * 3. Max mag is updated - * 4. Calculations for `getAllocatableMagnitude` and `getAllocation` are correct - * 5. The second allocation is not slashed from - */ + /// Allocates half of magnitude for a single strategy to an operatorSet. Then allocates again. Slashes 50% + /// Asserts that: + /// 1. Events are emitted + /// 2. Encumbered mag is updated + /// 3. Max mag is updated + /// 4. Calculations for `getAllocatableMagnitude` and `getAllocation` are correct + /// 5. The second allocation is not slashed from function testFuzz_slash_oneCompletedAlloc_onePendingAlloc(Randomness r) public rand(r) { uint wadToSlash = r.Uint256(0.01 ether, WAD); @@ -946,18 +932,16 @@ contract AllocationManagerUnitTests_SlashOperator is AllocationManagerUnitTests }); } - /** - * Allocates 100% magnitude for a single strategy to an operatorSet. - * First slashes 99% from the operatorSet, slashes 99.99% a second time, and on the third slash, slashes - * 99.9999999999999% which should get rounded up to 100% or WAD wadSlashed leaving the operator with no magnitude - * in the operatorSet, 0 encumbered magnitude, and 0 max magnitude. - * - * Asserts that: - * 1. Events are emitted - * 2. Storage properly updated after each slash - * 3. Slashed amounts are rounded up to ensure magnitude is always slashed - * 4. SlashCount increments - */ + /// Allocates 100% magnitude for a single strategy to an operatorSet. + /// First slashes 99% from the operatorSet, slashes 99.99% a second time, and on the third slash, slashes + /// 99.9999999999999% which should get rounded up to 100% or WAD wadSlashed leaving the operator with no magnitude + /// in the operatorSet, 0 encumbered magnitude, and 0 max magnitude. + /// + /// Asserts that: + /// 1. Events are emitted + /// 2. Storage properly updated after each slash + /// 3. Slashed amounts are rounded up to ensure magnitude is always slashed + /// 4. SlashCount increments function test_repeatUntilFullSlash() public { // Generate allocation for `strategyMock`, we allocate 100% to opSet 0 AllocateParams[] memory allocateParams = _newAllocateParams(defaultOperatorSet, WAD); @@ -1097,16 +1081,14 @@ contract AllocationManagerUnitTests_SlashOperator is AllocationManagerUnitTests }); } - /** - * Allocates all of magnitude to a single strategy to an operatorSet. Deallocate half. Finally, slash while deallocation is pending - * Asserts that: - * 1. Events are emitted, including for deallocation - * 2. Encumbered mag is updated - * 3. Max mag is updated - * 4. Calculations for `getAllocatableMagnitude` and `getAllocation` are correct - * 5. The deallocation is slashed from - * 6. Pending magnitude updates post deallocation are valid - */ + /// Allocates all of magnitude to a single strategy to an operatorSet. Deallocate half. Finally, slash while deallocation is pending + /// Asserts that: + /// 1. Events are emitted, including for deallocation + /// 2. Encumbered mag is updated + /// 3. Max mag is updated + /// 4. Calculations for `getAllocatableMagnitude` and `getAllocation` are correct + /// 5. The deallocation is slashed from + /// 6. Pending magnitude updates post deallocation are valid function testFuzz_SlashWhileDeallocationPending(Randomness r) public rand(r) { // Initialize state AllocateParams[] memory allocateParams = r.AllocateParams(defaultAVS, 1, 1); @@ -1163,7 +1145,11 @@ contract AllocationManagerUnitTests_SlashOperator is AllocationManagerUnitTests emit MaxMagnitudeUpdated(defaultOperator, allocateParams[0].strategies[0], uint64(WAD - magnitudeSlashed)); cheats.expectEmit(true, true, true, true, address(allocationManager)); emit OperatorSlashed( - defaultOperator, allocateParams[0].operatorSet, allocateParams[0].strategies, magnitudeSlashed.toArrayU256(), "" + defaultOperator, + allocateParams[0].operatorSet, + allocateParams[0].strategies, + magnitudeSlashed.toArrayU256(), + "" ); cheats.prank(defaultAVS); @@ -1199,12 +1185,10 @@ contract AllocationManagerUnitTests_SlashOperator is AllocationManagerUnitTests }); } - /** - * Allocates all magnitude to a single opSet. Then slashes the entire magnitude - * Validates: - * 1. Storage post slash - * 2. The operator cannot allocate again - */ + /// Allocates all magnitude to a single opSet. Then slashes the entire magnitude + /// Validates: + /// 1. Storage post slash + /// 2. The operator cannot allocate again function testRevert_allocateAfterSlashedEntirely() public { // Allocate all magnitude AllocateParams[] memory allocateParams = _newAllocateParams(defaultOperatorSet, WAD); @@ -1254,12 +1238,10 @@ contract AllocationManagerUnitTests_SlashOperator is AllocationManagerUnitTests allocationManager.modifyAllocations(defaultOperator, allocateParams2); } - /** - * Allocates all magnitude to a single opSet. Deallocates magnitude. Slashes all - * Asserts that: - * 1. The Allocation is 0 after slash - * 2. Them storage post slash for encumbered and maxMags is zero - */ + /// Allocates all magnitude to a single opSet. Deallocates magnitude. Slashes all + /// Asserts that: + /// 1. The Allocation is 0 after slash + /// 2. Them storage post slash for encumbered and maxMags is zero function test_slash_allocateAll_deallocateAll() public { // Allocate all magnitude cheats.prank(defaultOperator); @@ -1304,13 +1286,11 @@ contract AllocationManagerUnitTests_SlashOperator is AllocationManagerUnitTests assertEq(0, allocationManager.getAllocatableMagnitude(defaultOperator, strategyMock), "Allocatable magnitude should be 0"); } - /** - * Slashes the operator after deallocation, even if the deallocation has not been cleared. - * Validates that: - * 1. Even if we do not clear deallocation queue, the deallocation is NOT slashed from since we're passed the deallocationEffectBlock - * 2. Validates storage post slash & post clearing deallocation queue - * 3. Max magnitude only decreased proportionally by the magnitude set after deallocation - */ + /// Slashes the operator after deallocation, even if the deallocation has not been cleared. + /// Validates that: + /// 1. Even if we do not clear deallocation queue, the deallocation is NOT slashed from since we're passed the deallocationEffectBlock + /// 2. Validates storage post slash & post clearing deallocation queue + /// 3. Max magnitude only decreased proportionally by the magnitude set after deallocation function test_allocate_deallocate_slashAfterDeallocation() public { // Allocate all magnitude AllocateParams[] memory allocateParams = _newAllocateParams(defaultOperatorSet, WAD); @@ -1373,13 +1353,11 @@ contract AllocationManagerUnitTests_SlashOperator is AllocationManagerUnitTests }); } - /** - * Allocates to multiple operatorSets for a strategy. Only slashes from one operatorSet. - * Validates: - * 1. The first operatorSet has less slashable shares post slash - * 2. The second operatorSet has the same number slashable shares post slash (within slippage) - * 3. The PROPORTION that is slashable for opSet 2 has increased - */ + /// Allocates to multiple operatorSets for a strategy. Only slashes from one operatorSet. + /// Validates: + /// 1. The first operatorSet has less slashable shares post slash + /// 2. The second operatorSet has the same number slashable shares post slash (within slippage) + /// 3. The PROPORTION that is slashable for opSet 2 has increased function testFuzz_allocateMultipleOpsets_slashSingleOpset(Randomness r) public rand(r) { // Get magnitude to allocate uint64 magnitudeToAllocate = r.Uint64(1, 5e17); @@ -1464,13 +1442,11 @@ contract AllocationManagerUnitTests_SlashOperator is AllocationManagerUnitTests assertEq(opset2SlashableSharesBefore[0][0], minSlashableStake[0][0] + 1, "opSet2 slashable shares should be the same"); } - /** - * Allocates to multiple strategies for the given operatorSetKey. Slashes from both strategies Validates a slash propagates to both strategies. - * Validates that - * 1. Proper events are emitted for each strategy slashed - * 2. Each strategy is slashed proportional to its allocation - * 3. Storage is updated for each strategy, opSet - */ + /// Allocates to multiple strategies for the given operatorSetKey. Slashes from both strategies Validates a slash propagates to both strategies. + /// Validates that + /// 1. Proper events are emitted for each strategy slashed + /// 2. Each strategy is slashed proportional to its allocation + /// 3. Storage is updated for each strategy, opSet function testFuzz_allocateMultipleStrategies_slashMultiple(Randomness r) public rand(r) { // Initialize random params uint64 strategy1Magnitude = r.Uint64(1, 1e18); @@ -1658,10 +1634,8 @@ contract AllocationManagerUnitTests_SlashOperator is AllocationManagerUnitTests }); } - /** - * Allocates magnitude to an operator, deallocates all, warps to deallocation effect block and attempts to slash - * Asserts that the operator is not slashed - */ + /// Allocates magnitude to an operator, deallocates all, warps to deallocation effect block and attempts to slash + /// Asserts that the operator is not slashed function test_noFundsSlashedAfterDeallocationDelay() public { // Allocate all magnitude cheats.prank(defaultOperator); @@ -1787,9 +1761,7 @@ contract AllocationManagerUnitTests_SlashOperator is AllocationManagerUnitTests assertEq(0, allocationManager.getMaxMagnitude(defaultOperator, strategyMock), "Max magnitude should be 0"); } - /** - * @notice Tests that an AVS can update the slasher, and it can slash once the slasher is active - */ + /// @notice Tests that an AVS can update the slasher, and it can slash once the slasher is active function test_slash_updateSlasher_slashAgain() public { // Allocate all magnitude cheats.prank(defaultOperator); @@ -1854,7 +1826,7 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe error InvalidPermissions(); function test_revert_paused() public { - allocationManager.pause(2 ** PAUSED_MODIFY_ALLOCATIONS); + allocationManager.pause(2**PAUSED_MODIFY_ALLOCATIONS); cheats.expectRevert(IPausable.CurrentlyPaused.selector); allocationManager.modifyAllocations(address(this), new AllocateParams[](0)); } @@ -1895,10 +1867,10 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe function test_revert_invalidOperatorSet() public { AllocateParams[] memory allocateParams = AllocateParams({ - operatorSet: OperatorSet(random().Address(), 0), - strategies: defaultStrategies, - newMagnitudes: uint64(0.5 ether).toArrayU64() - }).toArray(); + operatorSet: OperatorSet(random().Address(), 0), + strategies: defaultStrategies, + newMagnitudes: uint64(0.5 ether).toArrayU64() + }).toArray(); cheats.expectRevert(InvalidOperatorSet.selector); cheats.prank(defaultOperator); @@ -1931,15 +1903,13 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe allocationManager.modifyAllocations(defaultOperator, allocateParams); } - /** - * @notice Regression tests for the bugfix where pending modifications were checked by - * require(allocation.pendingDiff == 0, ModificationAlreadyPending()); - * which would overwrite the effectBlock, pendingDiff if a pendingDiff - * of a deallocation was slashed to become 0. - * - * This test checks that the effectBlock, pendingDiff are not overwritten even if the pendingDiff is 0 - * when attempting to modify allocations again - */ + /// @notice Regression tests for the bugfix where pending modifications were checked by + /// require(allocation.pendingDiff == 0, ModificationAlreadyPending()); + /// which would overwrite the effectBlock, pendingDiff if a pendingDiff + /// of a deallocation was slashed to become 0. + /// + /// This test checks that the effectBlock, pendingDiff are not overwritten even if the pendingDiff is 0 + /// when attempting to modify allocations again function test_modifyAllocations_PendingDiffZero() public { // Step 1: Allocate to the operator set AllocateParams[] memory allocateParams = _newAllocateParams(defaultOperatorSet, 501); @@ -1990,14 +1960,12 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe assertEq(allocation.pendingDiff, 0, "Pending diff should still be 0"); } - /** - * @notice Regression tests for the bugfix where pending modifications were checked by - * require(allocation.pendingDiff == 0, ModificationAlreadyPending()); - * which would overwrite the effectBlock, pendingDiff if a pendingDiff - * of a deallocation was slashed to become 0. - * - * This test checks that the deallocationQueue is ascending ordered by effectBlocks - */ + /// @notice Regression tests for the bugfix where pending modifications were checked by + /// require(allocation.pendingDiff == 0, ModificationAlreadyPending()); + /// which would overwrite the effectBlock, pendingDiff if a pendingDiff + /// of a deallocation was slashed to become 0. + /// + /// This test checks that the deallocationQueue is ascending ordered by effectBlocks function test_modifyAllocations_PendingDiffZero_CheckOrderedDeallocationQueue() public { // Step 1: Register the operator to multiple operator sets OperatorSet memory operatorSet1 = OperatorSet(defaultAVS, 1); @@ -2053,17 +2021,15 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe _checkDeallocationQueueOrder(defaultOperator, defaultStrategies[0], 2); } - /** - * @notice Regression tests for the bugfix where pending modifications were checked by - * require(allocation.pendingDiff == 0, ModificationAlreadyPending()); - * which would overwrite the effectBlock, pendingDiff if a pendingDiff - * of a deallocation was slashed to become 0. - * - * This test checks that the deallocationQueue is ascending ordered by effectBlocks - * In this case the new modifyAllocations call is an allocation - * where the effectBlock is increased and the deallocationQueue is unordered as well because the operator - * allocationDelay configured to be long enough. - */ + /// @notice Regression tests for the bugfix where pending modifications were checked by + /// require(allocation.pendingDiff == 0, ModificationAlreadyPending()); + /// which would overwrite the effectBlock, pendingDiff if a pendingDiff + /// of a deallocation was slashed to become 0. + /// + /// This test checks that the deallocationQueue is ascending ordered by effectBlocks + /// In this case the new modifyAllocations call is an allocation + /// where the effectBlock is increased and the deallocationQueue is unordered as well because the operator + /// allocationDelay configured to be long enough. function test_modifyAllocations_PendingDiffZero_Allocation() public { // Step 1: Register the operator to multiple operator sets OperatorSet memory operatorSet1 = OperatorSet(defaultAVS, 1); @@ -2238,14 +2204,12 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe allocationManager.modifyAllocations(defaultOperator, allocateParams); } - /** - * @notice Tests edge cases around allocation delay: - * 1. Set allocation delay to a value greater than ALLOCATION_CONFIGURATION_DELAY - * 2. Allocate magnitude before the configured delay is hit - * 3. Set allocation delay to a value less than ALLOCATION_CONFIGURATION_DELAY - * 4. Allocate magnitude after allocation in step 2 takes effect, but before the new delay is hit - * Validates that you should be able to allocate in step 4 since there is no other pending modifications - */ + /// @notice Tests edge cases around allocation delay: + /// 1. Set allocation delay to a value greater than ALLOCATION_CONFIGURATION_DELAY + /// 2. Allocate magnitude before the configured delay is hit + /// 3. Set allocation delay to a value less than ALLOCATION_CONFIGURATION_DELAY + /// 4. Allocate magnitude after allocation in step 2 takes effect, but before the new delay is hit + /// Validates that you should be able to allocate in step 4 since there is no other pending modifications function testFuzz_ShouldBeAbleToAllocateSoonerThanLastDelay(Randomness r) public rand(r) { uint32 firstDelay = r.Uint32(ALLOCATION_CONFIGURATION_DELAY, type(uint24).max); uint32 secondDelay = r.Uint32(1, ALLOCATION_CONFIGURATION_DELAY - 1); @@ -2280,19 +2244,21 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe operator: defaultOperator, operatorSet: defaultOperatorSet, strategy: strategyMock, - expectedAllocation: Allocation({currentMagnitude: half, pendingDiff: int64(1), effectBlock: uint32(block.number + secondDelay)}), + expectedAllocation: Allocation({ + currentMagnitude: half, + pendingDiff: int64(1), + effectBlock: uint32(block.number + secondDelay) + }), expectedMagnitudes: Magnitudes({encumbered: half + 1, max: WAD, allocatable: WAD - (half + 1)}) }); } - /** - * @notice Allocates a random magnitude to the default operatorSet. - * Validates: - * 1. Storage is clear prior to allocation - * 2. Events are emitted - * 3. Allocation storage/introspection after allocation - * 4. Allocation storage/introspection after roll to allocation effect block - */ + /// @notice Allocates a random magnitude to the default operatorSet. + /// Validates: + /// 1. Storage is clear prior to allocation + /// 2. Events are emitted + /// 3. Allocation storage/introspection after allocation + /// 4. Allocation storage/introspection after roll to allocation effect block function testFuzz_allocate_singleStrat_singleOperatorSet(Randomness r) public rand(r) { // Create allocation AllocateParams[] memory allocateParams = _randAllocateParams_DefaultOpSet(); @@ -2350,13 +2316,11 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe }); } - /** - * @notice Allocates magnitude for a single strategy to multiple operatorSets - * Validates: - * 1. Events - * 2. Allocation storage/introspection after allocation - * 3. Allocation storage/introspection after roll to allocation effect block - */ + /// @notice Allocates magnitude for a single strategy to multiple operatorSets + /// Validates: + /// 1. Events + /// 2. Allocation storage/introspection after allocation + /// 3. Allocation storage/introspection after roll to allocation effect block function testFuzz_allocate_singleStrat_multipleSets(Randomness r) public rand(r) { uint8 numOpSets = uint8(r.Uint256(1, FUZZ_MAX_OP_SETS)); @@ -2439,12 +2403,10 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe } } - /** - * @notice Allocates once, warps to allocation effect block, then allocates again - * Validates: - * 1. Events for each allocation - * 2. Allocation storage/introspection immediately after each allocation - */ + /// @notice Allocates once, warps to allocation effect block, then allocates again + /// Validates: + /// 1. Events for each allocation + /// 2. Allocation storage/introspection immediately after each allocation function testFuzz_allocateMultipleTimes(Randomness r) public rand(r) { uint64 firstAlloc = r.Uint64(1, WAD - 1); uint64 secondAlloc = r.Uint64(firstAlloc + 1, WAD); @@ -2504,10 +2466,8 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe }); } - /** - * Allocates maximum magnitude to multiple strategies for the same operatorSet - * Validates that encumbered magnitude is max for each strategy - */ + /// Allocates maximum magnitude to multiple strategies for the same operatorSet + /// Validates that encumbered magnitude is max for each strategy function testFuzz_allocateMaxToMultipleStrategies(Randomness r) public rand(r) { uint numStrats = r.Uint256(2, FUZZ_MAX_STRATS); @@ -2539,15 +2499,13 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe } } - /** - * Allocates to `firstMod` magnitude and then deallocate to `secondMod` magnitude - * Validates: - * 1. Events are valid for the allocation and deallocation - * 2. Storage after the allocation is made - * 3. Storage after the deallocation is made - * 4. Storage after the deallocation effect block is hit - * 5. Storage after the deallocation queue is cleared (specifically encumbered mag is decreased) - */ + /// Allocates to `firstMod` magnitude and then deallocate to `secondMod` magnitude + /// Validates: + /// 1. Events are valid for the allocation and deallocation + /// 2. Storage after the allocation is made + /// 3. Storage after the deallocation is made + /// 4. Storage after the deallocation effect block is hit + /// 5. Storage after the deallocation queue is cleared (specifically encumbered mag is decreased) function testFuzz_allocate_deallocate_whenRegistered(Randomness r) public rand(r) { // Bound allocation and deallocation uint64 firstMod = r.Uint64(1, WAD); @@ -2621,10 +2579,8 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe }); } - /** - * Allocates to an operatorSet, then fully deallocates after the strategy is removed from the set. - * Validates that the deallocation takes effect immediately after the strategy is removed - */ + /// Allocates to an operatorSet, then fully deallocates after the strategy is removed from the set. + /// Validates that the deallocation takes effect immediately after the strategy is removed function test_allocate_removeStrategyFromSet_fullyDeallocate() public { // Allocate AllocateParams[] memory allocateParams = _randAllocateParams_SingleMockStrategy(defaultOperatorSet.toArray()); @@ -2662,11 +2618,9 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe }); } - /** - * Allocates to an operatorSet, deallocates, then removes a strategy from the operatorSet - * Validates that: - * 1. The deallocation still completes at its expected time - */ + /// Allocates to an operatorSet, deallocates, then removes a strategy from the operatorSet + /// Validates that: + /// 1. The deallocation still completes at its expected time function testFuzz_allocate_deallocate_removeStrategyFromSet(Randomness r) public { // Allocate AllocateParams[] memory allocateParams = _randAllocateParams_SingleMockStrategy(defaultOperatorSet.toArray()); @@ -2722,13 +2676,11 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe }); } - /** - * Allocates to an operator set, then fully deallocates when not registered to the set. - * Validates that: - * 1. Events are properly emitted post instantaneous deallocation - * 2. The deallocation is instant & can be reallocated immediately - * 3. Storage/introspection post combined deallocation/allocation - */ + /// Allocates to an operator set, then fully deallocates when not registered to the set. + /// Validates that: + /// 1. Events are properly emitted post instantaneous deallocation + /// 2. The deallocation is instant & can be reallocated immediately + /// 3. Storage/introspection post combined deallocation/allocation function testFuzz_allocate_fullyDeallocate_reallocate_WhenNotRegistered(Randomness r) public rand(r) { // Bound allocation and deallocation uint64 firstMod = r.Uint64(1, WAD); @@ -2796,13 +2748,11 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe }); } - /** - * Allocates all magnitude to a single strategy across multiple operatorSets. Deallocates fully, and then reallocates - * Validates: - * 1. Events are emitted for the allocation, deallocation, and reallocation (including the deallocation queue clear) - * 2. Stake is fully allocated & encumbered mag used up - * 3. Stake can be reallocated after the deallocation delay - */ + /// Allocates all magnitude to a single strategy across multiple operatorSets. Deallocates fully, and then reallocates + /// Validates: + /// 1. Events are emitted for the allocation, deallocation, and reallocation (including the deallocation queue clear) + /// 2. Stake is fully allocated & encumbered mag used up + /// 3. Stake can be reallocated after the deallocation delay function testFuzz_allocate_fromClearedDeallocQueue(Randomness r) public rand(r) { uint numOpSets = r.Uint256(1, FUZZ_MAX_OP_SETS); @@ -2894,18 +2844,20 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe operator: defaultOperator, operatorSet: finalOpSet, strategy: strategyMock, - expectedAllocation: Allocation({currentMagnitude: 0, pendingDiff: int128(uint128(WAD)), effectBlock: _defaultAllocEffectBlock()}), + expectedAllocation: Allocation({ + currentMagnitude: 0, + pendingDiff: int128(uint128(WAD)), + effectBlock: _defaultAllocEffectBlock() + }), expectedMagnitudes: Magnitudes({encumbered: WAD, max: WAD, allocatable: 0}) }); } - /** - * Allocates all mag and then deallocates all mag - * Validates - * 1. Events for the deallocation - * 2. Storage after deallocation - * 3. Storage after clearing the deallocation queue - */ + /// Allocates all mag and then deallocates all mag + /// Validates + /// 1. Events for the deallocation + /// 2. Storage after deallocation + /// 3. Storage after clearing the deallocation queue function test_deallocate_all() public { // Allocate all AllocateParams[] memory allocateParams = _newAllocateParams(defaultOperatorSet, WAD); @@ -2943,13 +2895,11 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe }); } - /** - * Allocates, deallocates, and then clears the deallocation queue. Multiple strategies & sets in a single operatorSet - * Validates: - * 1. Events for allocation, deallocation, and deallocation queue clear - * 2. Storage after allocation & after allocation effect block - * 3. Storage after deallocation & after deallocation effect block - */ + /// Allocates, deallocates, and then clears the deallocation queue. Multiple strategies & sets in a single operatorSet + /// Validates: + /// 1. Events for allocation, deallocation, and deallocation queue clear + /// 2. Storage after allocation & after allocation effect block + /// 3. Storage after deallocation & after deallocation effect block function testFuzz_lifecycle_allocate_deallocate_MultipleSetsAndStrats(Randomness r) public rand(r) { uint numAllocations = r.Uint256(2, FUZZ_MAX_ALLOCATIONS); uint numStrats = r.Uint256(2, FUZZ_MAX_STRATS); @@ -3069,7 +3019,11 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe operator: defaultOperator, operatorSet: deallocateParams[i].operatorSet, strategy: allocateParams[i].strategies[j], - expectedAllocation: Allocation({currentMagnitude: deallocateParams[i].newMagnitudes[j], pendingDiff: 0, effectBlock: 0}), + expectedAllocation: Allocation({ + currentMagnitude: deallocateParams[i].newMagnitudes[j], + pendingDiff: 0, + effectBlock: 0 + }), expectedMagnitudes: Magnitudes({ encumbered: deallocateParams[i].newMagnitudes[j], max: WAD, @@ -3089,7 +3043,7 @@ contract AllocationManagerUnitTests_ClearDeallocationQueue is AllocationManagerU /// ----------------------------------------------------------------------- function test_revert_paused() public { - allocationManager.pause(2 ** PAUSED_MODIFY_ALLOCATIONS); + allocationManager.pause(2**PAUSED_MODIFY_ALLOCATIONS); cheats.expectRevert(IPausable.CurrentlyPaused.selector); allocationManager.clearDeallocationQueue(defaultOperator, new IStrategy[](0), new uint16[](0)); } @@ -3102,12 +3056,10 @@ contract AllocationManagerUnitTests_ClearDeallocationQueue is AllocationManagerU allocationManager.clearDeallocationQueue(defaultOperator, strategies, numToClear); } - /** - * @notice Allocates magnitude to an operator and then - * - Clears deallocation queue when only an allocation exists - * - Clears deallocation queue when the alloc can be completed - asserts emit has been emitted - * - Validates storage after the second clear - */ + /// @notice Allocates magnitude to an operator and then + /// - Clears deallocation queue when only an allocation exists + /// - Clears deallocation queue when the alloc can be completed - asserts emit has been emitted + /// - Validates storage after the second clear function testFuzz_allocate(Randomness r) public rand(r) { AllocateParams[] memory allocateParams = _randAllocateParams_DefaultOpSet(); @@ -3142,13 +3094,11 @@ contract AllocationManagerUnitTests_ClearDeallocationQueue is AllocationManagerU }); } - /** - * @notice Allocates magnitude to an operator registered for some operator sets, and then - * - Clears deallocation queue when nothing can be completed - * - After the first clear, asserts the allocation info takes into account the deallocation - * - Clears deallocation queue when the dealloc can be completed - * - Assert events & validates storage after the deallocateParams are completed - */ + /// @notice Allocates magnitude to an operator registered for some operator sets, and then + /// - Clears deallocation queue when nothing can be completed + /// - After the first clear, asserts the allocation info takes into account the deallocation + /// - Clears deallocation queue when the dealloc can be completed + /// - Assert events & validates storage after the deallocateParams are completed function testFuzz_allocate_deallocate(Randomness r) public rand(r) { // Generate a random allocation and subsequent deallocation from the default operator set (AllocateParams[] memory allocateParams, AllocateParams[] memory deallocateParams) = @@ -3217,11 +3167,9 @@ contract AllocationManagerUnitTests_ClearDeallocationQueue is AllocationManagerU }); } - /** - * Allocates, deallocates, and then allocates again. Asserts that - * - The deallocation does not block state updates from the second allocation, even though the allocation has an earlier - * effect block - */ + /// Allocates, deallocates, and then allocates again. Asserts that + /// - The deallocation does not block state updates from the second allocation, even though the allocation has an earlier + /// effect block function test_allocate_deallocate_allocate() public { // Allocate half of mag to default operator set AllocateParams[] memory firstAllocation = _newAllocateParams(defaultOperatorSet, 5e17); @@ -3268,16 +3216,14 @@ contract AllocationManagerUnitTests_ClearDeallocationQueue is AllocationManagerU allocationManager.clearDeallocationQueue(defaultOperator, defaultStrategies, _maxNumToClear()); } - /** - * Allocates to opset1, allocates to opset2, deallocates from opset1. Asserts that the allocation, which has a higher - * effect block is not blocking the deallocation. - * The allocs/deallocs looks like - * 1. (allocation, opSet2, mag: 5e17, effectBlock: 50th day) - * 2. (deallocation, opSet1, mag: 0, effectBlock: 42.5 day) - * - * The deallocation queue looks like - * 1. (deallocation, opSet1, mag: 0, effectBlock: 42.5 day) - */ + /// Allocates to opset1, allocates to opset2, deallocates from opset1. Asserts that the allocation, which has a higher + /// effect block is not blocking the deallocation. + /// The allocs/deallocs looks like + /// 1. (allocation, opSet2, mag: 5e17, effectBlock: 50th day) + /// 2. (deallocation, opSet1, mag: 0, effectBlock: 42.5 day) + /// + /// The deallocation queue looks like + /// 1. (deallocation, opSet1, mag: 0, effectBlock: 42.5 day) function test_regression_deallocationNotBlocked() public { // Set allocation delay to be longer than the deallocation delay uint32 allocationDelay = DEALLOCATION_DELAY * 2; @@ -3475,7 +3421,7 @@ contract AllocationManagerUnitTests_registerForOperatorSets is AllocationManager } function test_registerForOperatorSets_Paused() public { - allocationManager.pause(2 ** PAUSED_OPERATOR_SET_REGISTRATION_AND_DEREGISTRATION); + allocationManager.pause(2**PAUSED_OPERATOR_SET_REGISTRATION_AND_DEREGISTRATION); cheats.expectRevert(IPausable.CurrentlyPaused.selector); allocationManager.registerForOperatorSets(defaultOperator, defaultRegisterParams); } @@ -3593,7 +3539,7 @@ contract AllocationManagerUnitTests_deregisterFromOperatorSets is AllocationMana } function test_deregisterFromOperatorSets_Paused() public { - allocationManager.pause(2 ** PAUSED_OPERATOR_SET_REGISTRATION_AND_DEREGISTRATION); + allocationManager.pause(2**PAUSED_OPERATOR_SET_REGISTRATION_AND_DEREGISTRATION); cheats.expectRevert(IPausable.CurrentlyPaused.selector); allocationManager.deregisterFromOperatorSets(defaultDeregisterParams); } @@ -4238,7 +4184,6 @@ contract AllocationManagerUnitTests_updateSlasher is AllocationManagerUnitTests, /// ----------------------------------------------------------------------- /// updateSlasher() + getSlasher() + getPendingSlasher() /// ----------------------------------------------------------------------- - /// @dev Thrown when the caller is not allowed to call a function on behalf of an account. error InvalidPermissions(); @@ -4648,10 +4593,8 @@ contract AllocationManagerUnitTests_getSlashableStake is AllocationManagerUnitTe using SlashingLib for *; using ArrayLib for *; - /** - * Allocates half of magnitude for a single strategy to an operatorSet. Then allocates again. Slashes 50% - * of the first allocation. Validates slashable stake at each step. - */ + /// Allocates half of magnitude for a single strategy to an operatorSet. Then allocates again. Slashes 50% + /// of the first allocation. Validates slashable stake at each step. function test_allocate_onePendingAllocation(Randomness r) public rand(r) { // Generate allocation for `strategyMock`, we allocate half { @@ -4702,10 +4645,8 @@ contract AllocationManagerUnitTests_getSlashableStake is AllocationManagerUnitTe }); } - /** - * Allocates to `firstMod` magnitude and then deallocate to `secondMod` magnitude - * Validates slashable stake at each step after allocation and deallocation - */ + /// Allocates to `firstMod` magnitude and then deallocate to `secondMod` magnitude + /// Validates slashable stake at each step after allocation and deallocation function testFuzz_allocate_deallocate_validateSlashableStake(Randomness r) public rand(r) { // Bound allocation and deallocation uint64 firstMod = r.Uint64(1, WAD); @@ -4771,10 +4712,8 @@ contract AllocationManagerUnitTests_getSlashableStake is AllocationManagerUnitTe }); } - /** - * Allocates all of magnitude to a single strategy to an operatorSet. - * Deallocate some portion. Finally, slash while deallocation is pending - */ + /// Allocates all of magnitude to a single strategy to an operatorSet. + /// Deallocate some portion. Finally, slash while deallocation is pending function testFuzz_SlashWhileDeallocationPending(Randomness r) public rand(r) { // Initialize state AllocateParams[] memory allocateParams = r.AllocateParams(defaultAVS, 1, 1); @@ -4986,9 +4925,7 @@ contract AllocationManagerUnitTests_getAllocatedStake is AllocationManagerUnitTe using ArrayLib for *; using SlashingLib for *; - /** - * Allocates to `firstMod` magnitude and validates allocated stake is correct - */ + /// Allocates to `firstMod` magnitude and validates allocated stake is correct function testFuzz_allocate(Randomness r) public rand(r) { // Generate allocation for `strategyMock`, we allocate half AllocateParams[] memory allocateParams = _newAllocateParams(defaultOperatorSet, 5e17); @@ -5002,10 +4939,8 @@ contract AllocationManagerUnitTests_getAllocatedStake is AllocationManagerUnitTe assertEq(allocatedStake[0][0], DEFAULT_OPERATOR_SHARES.mulWad(5e17), "allocated stake not correct"); } - /** - * Allocates to `firstMod` magnitude and then deallocate to `secondMod` magnitude - * Validates allocated stake is updated even after deallocation is cleared in storage - */ + /// Allocates to `firstMod` magnitude and then deallocate to `secondMod` magnitude + /// Validates allocated stake is updated even after deallocation is cleared in storage function testFuzz_allocate_deallocate(Randomness r) public rand(r) { // Bound allocation and deallocation uint64 firstMod = r.Uint64(1, WAD); @@ -5035,10 +4970,8 @@ contract AllocationManagerUnitTests_getAllocatedStake is AllocationManagerUnitTe assertEq(allocatedStake[0][0], DEFAULT_OPERATOR_SHARES.mulWad(secondMod), "allocated stake not correct"); } - /** - * Allocates to `firstMod` magnitude and then deregisters the operator. - * Validates allocated stake is nonzero even after deregistration delay - */ + /// Allocates to `firstMod` magnitude and then deregisters the operator. + /// Validates allocated stake is nonzero even after deregistration delay function testFuzz_allocate_deregister(Randomness r) public rand(r) { // 1. Generate allocation for `strategyMock`, we allocate half AllocateParams[] memory allocateParams = _newAllocateParams(defaultOperatorSet, 5e17); diff --git a/src/test/unit/BN254CertificateVerifierUnit.t.sol b/src/test/unit/BN254CertificateVerifierUnit.t.sol index 5fab075f21..82f13bc1e6 100644 --- a/src/test/unit/BN254CertificateVerifierUnit.t.sol +++ b/src/test/unit/BN254CertificateVerifierUnit.t.sol @@ -14,10 +14,8 @@ import "src/contracts/interfaces/IBaseCertificateVerifier.sol"; import "src/contracts/interfaces/IBN254CertificateVerifier.sol"; import "src/contracts/interfaces/ICrossChainRegistry.sol"; -/** - * @title BN254CertificateVerifierUnitTests - * @notice Base contract for all BN254CertificateVerifier unit tests - */ +/// @title BN254CertificateVerifierUnitTests +/// @notice Base contract for all BN254CertificateVerifier unit tests contract BN254CertificateVerifierUnitTests is EigenLayerMultichainUnitTestSetup, IBaseCertificateVerifierErrors, @@ -258,10 +256,8 @@ contract BN254CertificateVerifierUnitTests is } } -/** - * @title BN254CertificateVerifierUnitTests_updateOperatorTable - * @notice Unit tests for BN254CertificateVerifier.updateOperatorTable - */ +/// @title BN254CertificateVerifierUnitTests_updateOperatorTable +/// @notice Unit tests for BN254CertificateVerifier.updateOperatorTable contract BN254CertificateVerifierUnitTests_updateOperatorTable is BN254CertificateVerifierUnitTests, IBN254CertificateVerifierEvents { function test_revert_notTableUpdater() public { uint32 referenceTimestamp = uint32(block.timestamp); @@ -377,10 +373,8 @@ contract BN254CertificateVerifierUnitTests_updateOperatorTable is BN254Certifica } } -/** - * @title BN254CertificateVerifierUnitTests_verifyCertificate - * @notice Unit tests for BN254CertificateVerifier.verifyCertificate - */ +/// @title BN254CertificateVerifierUnitTests_verifyCertificate +/// @notice Unit tests for BN254CertificateVerifier.verifyCertificate contract BN254CertificateVerifierUnitTests_verifyCertificate is BN254CertificateVerifierUnitTests { function test_revert_certificateStale() public { uint32 referenceTimestamp = _initializeOperatorTableBase(); @@ -601,8 +595,12 @@ contract BN254CertificateVerifierUnitTests_verifyCertificate is BN254Certificate // Create operators uint numSigners = r.Uint256(1, numOperators - 1); uint nonSigners = numOperators - numSigners; - (BN254OperatorInfo[] memory operators,, uint32 referenceTimestamp, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) - = _updateOperatorTable(r, numSigners, nonSigners); + ( + BN254OperatorInfo[] memory operators,, + uint32 referenceTimestamp, + uint32[] memory nonSignerIndices, + BN254.G1Point memory signature + ) = _updateOperatorTable(r, numSigners, nonSigners); BN254Certificate memory cert = _createCertificate(referenceTimestamp, defaultMsgHash, nonSignerIndices, operators); @@ -680,15 +678,17 @@ contract BN254CertificateVerifierUnitTests_verifyCertificate is BN254Certificate } } -/** - * @title BN254CertificateVerifierUnitTests_verifyCertificateProportion - * @notice Unit tests for BN254CertificateVerifier.verifyCertificateProportion - */ +/// @title BN254CertificateVerifierUnitTests_verifyCertificateProportion +/// @notice Unit tests for BN254CertificateVerifier.verifyCertificateProportion contract BN254CertificateVerifierUnitTests_verifyCertificateProportion is BN254CertificateVerifierUnitTests { function testFuzz_revert_arrayLengthMismatch(Randomness r) public rand(r) { // Update operator table - (BN254OperatorInfo[] memory operators,, uint32 referenceTimestamp, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) - = _updateOperatorTable(r, numOperators, 0); // 0 nonsigners + ( + BN254OperatorInfo[] memory operators,, + uint32 referenceTimestamp, + uint32[] memory nonSignerIndices, + BN254.G1Point memory signature + ) = _updateOperatorTable(r, numOperators, 0); // 0 nonsigners BN254Certificate memory cert = _createCertificate(referenceTimestamp, defaultMsgHash, nonSignerIndices, operators); @@ -703,8 +703,12 @@ contract BN254CertificateVerifierUnitTests_verifyCertificateProportion is BN254C // Update operator table uint numSigners = r.Uint256(1, numOperators - 1); uint numNonsigners = numOperators - numSigners; - (BN254OperatorInfo[] memory operators,, uint32 referenceTimestamp, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) - = _updateOperatorTable(r, numSigners, numNonsigners); + ( + BN254OperatorInfo[] memory operators,, + uint32 referenceTimestamp, + uint32[] memory nonSignerIndices, + BN254.G1Point memory signature + ) = _updateOperatorTable(r, numSigners, numNonsigners); BN254Certificate memory cert = _createCertificate(referenceTimestamp, defaultMsgHash, nonSignerIndices, operators); @@ -792,17 +796,19 @@ contract BN254CertificateVerifierUnitTests_verifyCertificateProportion is BN254C } } -/** - * @title BN254CertificateVerifierUnitTests_verifyCertificateNominal - * @notice Unit tests for BN254CertificateVerifier.verifyCertificateNominal - */ +/// @title BN254CertificateVerifierUnitTests_verifyCertificateNominal +/// @notice Unit tests for BN254CertificateVerifier.verifyCertificateNominal contract BN254CertificateVerifierUnitTests_verifyCertificateNominal is BN254CertificateVerifierUnitTests { function testFuzz_revert_arrayLengthMismatch(Randomness r) public rand(r) { // Update operator table uint numSigners = r.Uint256(1, numOperators - 1); uint numNonsigners = numOperators - numSigners; - (BN254OperatorInfo[] memory operators,, uint32 referenceTimestamp, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) - = _updateOperatorTable(r, numSigners, numNonsigners); + ( + BN254OperatorInfo[] memory operators,, + uint32 referenceTimestamp, + uint32[] memory nonSignerIndices, + BN254.G1Point memory signature + ) = _updateOperatorTable(r, numSigners, numNonsigners); BN254Certificate memory cert = _createCertificate(referenceTimestamp, defaultMsgHash, nonSignerIndices, operators); @@ -817,8 +823,12 @@ contract BN254CertificateVerifierUnitTests_verifyCertificateNominal is BN254Cert // Update operator table uint numSigners = r.Uint256(1, numOperators); uint numNonsigners = numOperators - numSigners; - (BN254OperatorInfo[] memory operators,, uint32 referenceTimestamp, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) - = _updateOperatorTable(r, numSigners, numNonsigners); + ( + BN254OperatorInfo[] memory operators,, + uint32 referenceTimestamp, + uint32[] memory nonSignerIndices, + BN254.G1Point memory signature + ) = _updateOperatorTable(r, numSigners, numNonsigners); BN254Certificate memory cert = _createCertificate(referenceTimestamp, defaultMsgHash, nonSignerIndices, operators); @@ -838,8 +848,12 @@ contract BN254CertificateVerifierUnitTests_verifyCertificateNominal is BN254Cert // Update operator table uint numSigners = r.Uint256(1, numOperators - 1); // Ensure at least one non-signer uint numNonsigners = numOperators - numSigners; - (BN254OperatorInfo[] memory operators,, uint32 referenceTimestamp, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) - = _updateOperatorTable(r, numSigners, numNonsigners); + ( + BN254OperatorInfo[] memory operators,, + uint32 referenceTimestamp, + uint32[] memory nonSignerIndices, + BN254.G1Point memory signature + ) = _updateOperatorTable(r, numSigners, numNonsigners); BN254Certificate memory cert = _createCertificate(referenceTimestamp, defaultMsgHash, nonSignerIndices, operators); @@ -860,8 +874,12 @@ contract BN254CertificateVerifierUnitTests_verifyCertificateNominal is BN254Cert // Update operator table uint numSigners = r.Uint256(1, numOperators); uint numNonsigners = numOperators - numSigners; - (BN254OperatorInfo[] memory operators,, uint32 referenceTimestamp, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) - = _updateOperatorTable(r, numSigners, numNonsigners); + ( + BN254OperatorInfo[] memory operators,, + uint32 referenceTimestamp, + uint32[] memory nonSignerIndices, + BN254.G1Point memory signature + ) = _updateOperatorTable(r, numSigners, numNonsigners); BN254Certificate memory cert = _createCertificate(referenceTimestamp, defaultMsgHash, nonSignerIndices, operators); @@ -885,10 +903,8 @@ contract BN254CertificateVerifierUnitTests_verifyCertificateNominal is BN254Cert } } -/** - * @title BN254CertificateVerifierUnitTests_ViewFunctions - * @notice Unit tests for BN254CertificateVerifier view functions - */ +/// @title BN254CertificateVerifierUnitTests_ViewFunctions +/// @notice Unit tests for BN254CertificateVerifier view functions contract BN254CertificateVerifierUnitTests_ViewFunctions is BN254CertificateVerifierUnitTests { uint32 referenceTimestamp; BN254OperatorSetInfo operatorSetInfo; @@ -1036,10 +1052,8 @@ contract BN254CertificateVerifierUnitTests_ViewFunctions is BN254CertificateVeri } } -/** - * @title BN254CertificateVerifierUnitTests_trySignatureVerification - * @notice Unit tests for BN254CertificateVerifier.trySignatureVerification - */ +/// @title BN254CertificateVerifierUnitTests_trySignatureVerification +/// @notice Unit tests for BN254CertificateVerifier.trySignatureVerification contract BN254CertificateVerifierUnitTests_trySignatureVerification is BN254CertificateVerifierUnitTests { function testFuzz_trySignatureVerification_validSignature(Randomness r) public rand(r) { // Create all operators as signers diff --git a/src/test/unit/CrossChainRegistryUnit.t.sol b/src/test/unit/CrossChainRegistryUnit.t.sol index d88ad2071c..526a10dbfd 100644 --- a/src/test/unit/CrossChainRegistryUnit.t.sol +++ b/src/test/unit/CrossChainRegistryUnit.t.sol @@ -6,10 +6,8 @@ import "src/test/utils/EigenLayerMultichainUnitTestSetup.sol"; import "src/test/mocks/OperatorTableCalculatorMock.sol"; import "src/contracts/interfaces/IKeyRegistrar.sol"; -/** - * @title CrossChainRegistryUnitTests - * @notice Base contract for all CrossChainRegistry unit tests - */ +/// @title CrossChainRegistryUnitTests +/// @notice Base contract for all CrossChainRegistry unit tests contract CrossChainRegistryUnitTests is EigenLayerMultichainUnitTestSetup, ICrossChainRegistryErrors, @@ -130,10 +128,8 @@ contract CrossChainRegistryUnitTests is } } -/** - * @title CrossChainRegistryUnitTests_initialize - * @notice Unit tests for CrossChainRegistry.initialize - */ +/// @title CrossChainRegistryUnitTests_initialize +/// @notice Unit tests for CrossChainRegistry.initialize contract CrossChainRegistryUnitTests_initialize is CrossChainRegistryUnitTests { function test_initialize_AlreadyInitialized() public { cheats.expectRevert("Initializable: contract is already initialized"); @@ -170,10 +166,8 @@ contract CrossChainRegistryUnitTests_initialize is CrossChainRegistryUnitTests { } } -/** - * @title CrossChainRegistryUnitTests_createGenerationReservation - * @notice Unit tests for CrossChainRegistry.createGenerationReservation - */ +/// @title CrossChainRegistryUnitTests_createGenerationReservation +/// @notice Unit tests for CrossChainRegistry.createGenerationReservation contract CrossChainRegistryUnitTests_createGenerationReservation is CrossChainRegistryUnitTests { function test_Revert_Paused() public { cheats.prank(pauser); @@ -260,10 +254,8 @@ contract CrossChainRegistryUnitTests_createGenerationReservation is CrossChainRe } } -/** - * @title CrossChainRegistryUnitTests_removeGenerationReservation - * @notice Unit tests for CrossChainRegistry.removeGenerationReservation - */ +/// @title CrossChainRegistryUnitTests_removeGenerationReservation +/// @notice Unit tests for CrossChainRegistry.removeGenerationReservation contract CrossChainRegistryUnitTests_removeGenerationReservation is CrossChainRegistryUnitTests { function setUp() public override { super.setUp(); @@ -329,10 +321,8 @@ contract CrossChainRegistryUnitTests_removeGenerationReservation is CrossChainRe } } -/** - * @title CrossChainRegistryUnitTests_setOperatorTableCalculator - * @notice Unit tests for CrossChainRegistry.setOperatorTableCalculator - */ +/// @title CrossChainRegistryUnitTests_setOperatorTableCalculator +/// @notice Unit tests for CrossChainRegistry.setOperatorTableCalculator contract CrossChainRegistryUnitTests_setOperatorTableCalculator is CrossChainRegistryUnitTests { OperatorTableCalculatorMock newCalculator; @@ -400,10 +390,8 @@ contract CrossChainRegistryUnitTests_setOperatorTableCalculator is CrossChainReg } } -/** - * @title CrossChainRegistryUnitTests_setOperatorSetConfig - * @notice Unit tests for CrossChainRegistry.setOperatorSetConfig - */ +/// @title CrossChainRegistryUnitTests_setOperatorSetConfig +/// @notice Unit tests for CrossChainRegistry.setOperatorSetConfig contract CrossChainRegistryUnitTests_setOperatorSetConfig is CrossChainRegistryUnitTests { OperatorSetConfig newConfig; @@ -499,10 +487,8 @@ contract CrossChainRegistryUnitTests_setOperatorSetConfig is CrossChainRegistryU } } -/** - * @title CrossChainRegistryUnitTests_addChainIDsToWhitelist - * @notice Unit tests for CrossChainRegistry.addChainIDsToWhitelist - */ +/// @title CrossChainRegistryUnitTests_addChainIDsToWhitelist +/// @notice Unit tests for CrossChainRegistry.addChainIDsToWhitelist contract CrossChainRegistryUnitTests_addChainIDsToWhitelist is CrossChainRegistryUnitTests { uint[] newChainIDs; address[] newOperatorTableUpdaters; @@ -607,10 +593,8 @@ contract CrossChainRegistryUnitTests_addChainIDsToWhitelist is CrossChainRegistr } } -/** - * @title CrossChainRegistryUnitTests_removeChainIDsFromWhitelist - * @notice Unit tests for CrossChainRegistry.removeChainIDsFromWhitelist - */ +/// @title CrossChainRegistryUnitTests_removeChainIDsFromWhitelist +/// @notice Unit tests for CrossChainRegistry.removeChainIDsFromWhitelist contract CrossChainRegistryUnitTests_removeChainIDsFromWhitelist is CrossChainRegistryUnitTests { function setUp() public override { super.setUp(); @@ -655,10 +639,8 @@ contract CrossChainRegistryUnitTests_removeChainIDsFromWhitelist is CrossChainRe } } -/** - * @title CrossChainRegistryUnitTests_getActiveGenerationReservations - * @notice Unit tests for CrossChainRegistry.getActiveGenerationReservations - */ +/// @title CrossChainRegistryUnitTests_getActiveGenerationReservations +/// @notice Unit tests for CrossChainRegistry.getActiveGenerationReservations contract CrossChainRegistryUnitTests_getActiveGenerationReservations is CrossChainRegistryUnitTests { function test_getActiveGenerationReservations_Empty() public { OperatorSet[] memory reservations = crossChainRegistry.getActiveGenerationReservations(); @@ -692,10 +674,8 @@ contract CrossChainRegistryUnitTests_getActiveGenerationReservations is CrossCha } } -/** - * @title CrossChainRegistryUnitTests_calculateOperatorTableBytes - * @notice Unit tests for CrossChainRegistry.calculateOperatorTableBytes - */ +/// @title CrossChainRegistryUnitTests_calculateOperatorTableBytes +/// @notice Unit tests for CrossChainRegistry.calculateOperatorTableBytes contract CrossChainRegistryUnitTests_calculateOperatorTableBytes is CrossChainRegistryUnitTests { bytes testOperatorTableBytes = hex"1234567890"; @@ -737,10 +717,8 @@ contract CrossChainRegistryUnitTests_calculateOperatorTableBytes is CrossChainRe } } -/** - * @title CrossChainRegistryUnitTests_getSupportedChains - * @notice Unit tests for CrossChainRegistry.getSupportedChains - */ +/// @title CrossChainRegistryUnitTests_getSupportedChains +/// @notice Unit tests for CrossChainRegistry.getSupportedChains contract CrossChainRegistryUnitTests_getSupportedChains is CrossChainRegistryUnitTests { function test_getSupportedChains_Initial() public { (uint[] memory supportedChains, address[] memory operatorTableUpdaters) = crossChainRegistry.getSupportedChains(); @@ -787,10 +765,8 @@ contract CrossChainRegistryUnitTests_getSupportedChains is CrossChainRegistryUni } } -/** - * @title CrossChainRegistryUnitTests_setTableUpdateCadence - * @notice Unit tests for CrossChainRegistry.setTableUpdateCadence - */ +/// @title CrossChainRegistryUnitTests_setTableUpdateCadence +/// @notice Unit tests for CrossChainRegistry.setTableUpdateCadence contract CrossChainRegistryUnitTests_setTableUpdateCadence is CrossChainRegistryUnitTests { function test_Revert_NotOwner() public { uint32 newTableUpdateCadence = 14 days; @@ -848,10 +824,8 @@ contract CrossChainRegistryUnitTests_setTableUpdateCadence is CrossChainRegistry } } -/** - * @title CrossChainRegistryUnitTests_getActiveGenerationReservationsByRange - * @notice Unit tests for CrossChainRegistry.getActiveGenerationReservationsByRange - */ +/// @title CrossChainRegistryUnitTests_getActiveGenerationReservationsByRange +/// @notice Unit tests for CrossChainRegistry.getActiveGenerationReservationsByRange contract CrossChainRegistryUnitTests_getActiveGenerationReservationsByRange is CrossChainRegistryUnitTests { function test_revert_invalidRange_startGreaterThanEnd() public { // Create some reservations first @@ -980,10 +954,8 @@ contract CrossChainRegistryUnitTests_getActiveGenerationReservationsByRange is C } } -/** - * @title CrossChainRegistryUnitTests_getActiveGenerationReservationCount - * @notice Unit tests for CrossChainRegistry.getActiveGenerationReservationCount - */ +/// @title CrossChainRegistryUnitTests_getActiveGenerationReservationCount +/// @notice Unit tests for CrossChainRegistry.getActiveGenerationReservationCount contract CrossChainRegistryUnitTests_getActiveGenerationReservationCount is CrossChainRegistryUnitTests { function test_getActiveGenerationReservationCount_Empty() public { uint count = crossChainRegistry.getActiveGenerationReservationCount(); diff --git a/src/test/unit/DelegationUnit.t.sol b/src/test/unit/DelegationUnit.t.sol index 24291d45bd..3e71ea8674 100644 --- a/src/test/unit/DelegationUnit.t.sol +++ b/src/test/unit/DelegationUnit.t.sol @@ -11,12 +11,10 @@ import "src/contracts/libraries/SlashingLib.sol"; import "src/test/utils/ArrayLib.sol"; import "src/test/harnesses/DelegationManagerHarness.sol"; -/** - * @notice Unit testing of the DelegationManager contract. Withdrawals are tightly coupled - * with EigenPodManager and StrategyManager and are part of integration tests. - * Contracts tested: DelegationManager - * Contracts not mocked: StrategyBase, PauserRegistry - */ +/// @notice Unit testing of the DelegationManager contract. Withdrawals are tightly coupled +/// with EigenPodManager and StrategyManager and are part of integration tests. +/// Contracts tested: DelegationManager +/// Contracts not mocked: StrategyBase, PauserRegistry contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManagerEvents, IDelegationManagerErrors { using SlashingLib for *; using ArrayLib for *; @@ -134,15 +132,11 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag isExcludedFuzzAddress[defaultApprover] = true; } - /** - * INTERNAL / HELPER FUNCTIONS - */ + /// INTERNAL / HELPER FUNCTIONS - /** - * @notice internal function to deploy mock tokens and strategies and have the staker deposit into them. - * Since we are mocking the strategyManager we call strategyManagerMock.setDeposits so that when - * DelegationManager calls getDeposits, we can have these share amounts returned. - */ + /// @notice internal function to deploy mock tokens and strategies and have the staker deposit into them. + /// Since we are mocking the strategyManager we call strategyManagerMock.setDeposits so that when + /// DelegationManager calls getDeposits, we can have these share amounts returned. function _deployAndDepositIntoStrategies(address staker, uint[] memory sharesAmounts, bool depositBeaconChainShares) internal returns (IStrategy[] memory) @@ -173,11 +167,9 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag return strategies; } - /** - * @notice internal function to deploy mock tokens and strategies and have the staker deposit into them. - * Since we are mocking the strategyManager we call strategyManagerMock.setDeposits so that when - * DelegationManager calls getDeposits, we can have these share amounts returned. - */ + /// @notice internal function to deploy mock tokens and strategies and have the staker deposit into them. + /// Since we are mocking the strategyManager we call strategyManagerMock.setDeposits so that when + /// DelegationManager calls getDeposits, we can have these share amounts returned. function _depositIntoStrategies(address staker, IStrategy[] memory strategies, uint[] memory sharesAmounts) internal { uint numStrats = strategies.length; require(numStrats == sharesAmounts.length, "DelegationManagerUnitTests: length mismatch"); @@ -188,10 +180,8 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag } } - /** - * @notice internal function for calculating a signature from the delegationSigner corresponding to `_delegationSignerPrivateKey`, approving - * the `staker` to delegate to `operator`, with the specified `salt`, and expiring at `expiry`. - */ + /// @notice internal function for calculating a signature from the delegationSigner corresponding to `_delegationSignerPrivateKey`, approving + /// the `staker` to delegate to `operator`, with the specified `salt`, and expiring at `expiry`. function _getApproverSignature(uint _delegationSignerPrivateKey, address staker, address operator, bytes32 salt, uint expiry) internal view @@ -237,10 +227,8 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag function _registerOperatorWith1271DelegationApprover(address operator) internal returns (ERC1271WalletMock) { address delegationSigner = defaultApprover; - /** - * deploy a ERC1271WalletMock contract with the `delegationSigner` address as the owner, - * so that we can create valid signatures from the `delegationSigner` for the contract to check when called - */ + /// deploy a ERC1271WalletMock contract with the `delegationSigner` address as the owner, + /// so that we can create valid signatures from the `delegationSigner` for the contract to check when called ERC1271WalletMock wallet = new ERC1271WalletMock(delegationSigner); _registerOperator(operator, address(wallet), emptyStringForMetadataURI); @@ -255,10 +243,8 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag delegationManager.registerAsOperator(delegationApprover, 0, metadataURI); } - /** - * @notice Using this helper function to fuzz withdrawalAmounts since fuzzing two dynamic sized arrays of equal lengths - * reject too many inputs. - */ + /// @notice Using this helper function to fuzz withdrawalAmounts since fuzzing two dynamic sized arrays of equal lengths + /// reject too many inputs. function _fuzzDepositWithdrawalAmounts(Randomness r, uint32 numStrategies) internal returns ( @@ -390,12 +376,10 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag return operatorMaxMagnitude; } - /** - * Deploy and deposit staker into a single strategy, then set up a queued withdrawal for the staker - * Assumptions: - * - operator is already a registered operator. - * - withdrawalAmount <= depositAmount - */ + /// Deploy and deposit staker into a single strategy, then set up a queued withdrawal for the staker + /// Assumptions: + /// - operator is already a registered operator. + /// - withdrawalAmount <= depositAmount function _setUpCompleteQueuedWithdrawalSingleStrat( address staker, uint depositAmount, @@ -422,13 +406,11 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag return (withdrawal, tokens, withdrawalRoot); } - /** - * Deploy and deposit staker into a single strategy, then set up multiple queued withdrawals for the staker - * Assumptions: - * - operator is already a registered operator. - * - total deposit amount = depositAmount * numWithdrawals - * - this will fully withdraw from the single strategy - */ + /// Deploy and deposit staker into a single strategy, then set up multiple queued withdrawals for the staker + /// Assumptions: + /// - operator is already a registered operator. + /// - total deposit amount = depositAmount * numWithdrawals + /// - this will fully withdraw from the single strategy function _setUpCompleteQueuedWithdrawalsSingleStrat(address staker, uint depositAmount, uint numWithdrawals) internal returns (Withdrawal[] memory withdrawals, IERC20[][] memory tokens, bytes32[] memory withdrawalRoots) @@ -464,12 +446,10 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag return (withdrawals, tokens, withdrawalRoots); } - /** - * Deploy and deposit staker into strategies, then set up a queued withdrawal for the staker - * Assumptions: - * - operator is already a registered operator. - * - for each i, withdrawalAmount[i] <= depositAmount[i] (see filterFuzzedDepositWithdrawInputs above) - */ + /// Deploy and deposit staker into strategies, then set up a queued withdrawal for the staker + /// Assumptions: + /// - operator is already a registered operator. + /// - for each i, withdrawalAmount[i] <= depositAmount[i] (see filterFuzzedDepositWithdrawInputs above) function _setUpCompleteQueuedWithdrawal( address staker, uint[] memory depositAmounts, @@ -658,7 +638,10 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag cheats.expectEmit(true, true, true, true, address(delegationManager)); emit OperatorSharesDecreased( - params.operator, params.staker, params.queuedWithdrawalParams[i].strategies[j], sharesToWithdraw[j] + params.operator, + params.staker, + params.queuedWithdrawalParams[i].strategies[j], + sharesToWithdraw[j] ); } cheats.expectEmit(true, true, true, true, address(delegationManager)); @@ -926,12 +909,10 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag uint64 beaconChainSlashingFactor; } - /** - * @notice Asserts for a queuedWithdrawal that its root is no longer pending and the withdrawal no longer exists - * Also checks if the withdrawal is completed as shares that the current operator shares are increased appropriately - * with the staker's depositScalingFactor updated. - * NOTE: assumes no duplicate strategies in the withdrawal - */ + /// @notice Asserts for a queuedWithdrawal that its root is no longer pending and the withdrawal no longer exists + /// Also checks if the withdrawal is completed as shares that the current operator shares are increased appropriately + /// with the staker's depositScalingFactor updated. + /// NOTE: assumes no duplicate strategies in the withdrawal function _assertCompletedWithdrawal(AssertCompletedWithdrawalStruct memory params) internal view { assertTrue(delegationManager.delegatedTo(params.staker) == params.currentOperator, "staker should be delegated to currentOperator"); @@ -1009,8 +990,11 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag uint64 prevMaxMagnitude, uint64 newMaxMagnitude ) internal view returns (uint sharesToDecrement, uint operatorSharesAfterSlash) { - (sharesToDecrement, operatorSharesAfterSlash) = - _calcSlashedAmount({operatorShares: operatorSharesBefore, prevMaxMagnitude: prevMaxMagnitude, newMaxMagnitude: newMaxMagnitude}); + (sharesToDecrement, operatorSharesAfterSlash) = _calcSlashedAmount({ + operatorShares: operatorSharesBefore, + prevMaxMagnitude: prevMaxMagnitude, + newMaxMagnitude: newMaxMagnitude + }); assertEq( operatorSharesAfterSlash, @@ -1070,11 +1054,9 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag assertLe(withdrawableShares, operatorShares, "withdrawableShares should be less than or equal to operatorShares"); } - /** - * @notice Assertion checks after queuing a withdrawal. Reads withdrawals set in storage in test - * - Asserts exact match of Withdrawal struct exists in storage - * - Asserts Withdrawal root is pending - */ + /// @notice Assertion checks after queuing a withdrawal. Reads withdrawals set in storage in test + /// - Asserts exact match of Withdrawal struct exists in storage + /// - Asserts Withdrawal root is pending function _assertQueuedWithdrawalExists(address staker) internal view { for (uint i = 0; i < stakerQueuedWithdrawals[staker].length; ++i) { Withdrawal memory withdrawal = stakerQueuedWithdrawals[staker][i]; @@ -1099,11 +1081,9 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag } } - /** - * @notice Assertion checks after queuing a withdrawal. Reads withdrawals set in storage in test - * - Asserts exact match of Withdrawal struct exists in storage - * - Asserts Withdrawal root is pending - */ + /// @notice Assertion checks after queuing a withdrawal. Reads withdrawals set in storage in test + /// - Asserts exact match of Withdrawal struct exists in storage + /// - Asserts Withdrawal root is pending function _assertQueuedWithdrawalExists(address staker, Withdrawal memory withdrawal) internal view { bytes32 withdrawalRootToCheck = delegationManager.calculateWithdrawalRoot(withdrawal); assertTrue(delegationManager.pendingWithdrawals(withdrawalRootToCheck), "withdrawalRoot not pending"); @@ -1182,7 +1162,7 @@ contract DelegationManagerUnitTests_RegisterModifyOperator is DelegationManagerU function test_registerAsOperator_revert_paused() public { // set the pausing flag cheats.prank(pauser); - delegationManager.pause(2 ** PAUSED_NEW_DELEGATION); + delegationManager.pause(2**PAUSED_NEW_DELEGATION); cheats.expectRevert(IPausable.CurrentlyPaused.selector); delegationManager.registerAsOperator(address(0), 0, emptyStringForMetadataURI); @@ -1200,15 +1180,13 @@ contract DelegationManagerUnitTests_RegisterModifyOperator is DelegationManagerU cheats.stopPrank(); } - /** - * @notice `operator` registers via calling `DelegationManager.registerAsOperator(delegationApprover, metadataURI)` - * Should be able to set any parameters, other than too high value for `stakerOptOutWindowBlocks` - * The set parameters should match the desired parameters (correct storage update) - * Operator becomes delegated to themselves - * Properly emits events – especially the `OperatorRegistered` event, but also `StakerDelegated` & `DelegationApproverUpdated` events - * Reverts appropriately if operator was already delegated to someone (including themselves, i.e. they were already an operator) - * @param operator and @param delegationApprover are fuzzed inputs - */ + /// @notice `operator` registers via calling `DelegationManager.registerAsOperator(delegationApprover, metadataURI)` + /// Should be able to set any parameters, other than too high value for `stakerOptOutWindowBlocks` + /// The set parameters should match the desired parameters (correct storage update) + /// Operator becomes delegated to themselves + /// Properly emits events – especially the `OperatorRegistered` event, but also `StakerDelegated` & `DelegationApproverUpdated` events + /// Reverts appropriately if operator was already delegated to someone (including themselves, i.e. they were already an operator) + /// @param operator and @param delegationApprover are fuzzed inputs function testFuzz_registerAsOperator(address operator, address delegationApprover, string memory metadataURI) public filterFuzzedAddressInputs(operator) @@ -1290,7 +1268,11 @@ contract DelegationManagerUnitTests_RegisterModifyOperator is DelegationManagerU // register operator, their own staker depositShares should increase their operatorShares _registerOperator_expectEmit( - RegisterAsOperatorEmitStruct({operator: defaultOperator, delegationApprover: address(0), metadataURI: emptyStringForMetadataURI}) + RegisterAsOperatorEmitStruct({ + operator: defaultOperator, + delegationApprover: address(0), + metadataURI: emptyStringForMetadataURI + }) ); _registerOperatorWithBaseDetails(defaultOperator); uint operatorSharesAfter = delegationManager.operatorShares(defaultOperator, strategyMock); @@ -1302,15 +1284,13 @@ contract DelegationManagerUnitTests_RegisterModifyOperator is DelegationManagerU assertEq(strategyManagerMock.stakerDepositShares(defaultOperator, strategyMock), shares, "staker deposit shares not set correctly"); } - /** - * @notice Tests that an operator can modify their OperatorDetails by calling `DelegationManager.modifyOperatorDetails` - * Should be able to set any parameters, other than setting their `earningsReceiver` to the zero address or too high value for `stakerOptOutWindowBlocks` - * The set parameters should match the desired parameters (correct storage update) - * Properly emits an `DelegationApproverUpdated` event - * Reverts appropriately if the caller is not an operator - * Reverts if operator tries to decrease their `stakerOptOutWindowBlocks` parameter - * @param delegationApprover1 and @param delegationApprover2 are fuzzed inputs - */ + /// @notice Tests that an operator can modify their OperatorDetails by calling `DelegationManager.modifyOperatorDetails` + /// Should be able to set any parameters, other than setting their `earningsReceiver` to the zero address or too high value for `stakerOptOutWindowBlocks` + /// The set parameters should match the desired parameters (correct storage update) + /// Properly emits an `DelegationApproverUpdated` event + /// Reverts appropriately if the caller is not an operator + /// Reverts if operator tries to decrease their `stakerOptOutWindowBlocks` parameter + /// @param delegationApprover1 and @param delegationApprover2 are fuzzed inputs function testFuzz_modifyOperatorParameters(address delegationApprover1, address delegationApprover2) public { _registerOperator_expectEmit( RegisterAsOperatorEmitStruct({ @@ -1348,11 +1328,9 @@ contract DelegationManagerUnitTests_RegisterModifyOperator is DelegationManagerU delegationManager.modifyOperatorDetails(defaultOperator, defaultOperator); } - /** - * @notice Verifies that a staker cannot call cannot modify their `OperatorDetails` without first registering as an operator - * @dev This is an important check to ensure that our definition of 'operator' remains consistent, in particular for preserving the - * invariant that 'operators' are always delegated to themselves - */ + /// @notice Verifies that a staker cannot call cannot modify their `OperatorDetails` without first registering as an operator + /// @dev This is an important check to ensure that our definition of 'operator' remains consistent, in particular for preserving the + /// invariant that 'operators' are always delegated to themselves function testFuzz_UpdateOperatorMetadataURI(string memory metadataURI) public { _registerOperatorWithBaseDetails(defaultOperator); @@ -1407,7 +1385,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { // set the pausing flag cheats.prank(pauser); - delegationManager.pause(2 ** PAUSED_NEW_DELEGATION); + delegationManager.pause(2**PAUSED_NEW_DELEGATION); ISignatureUtilsMixinTypes.SignatureWithExpiry memory approverSignatureAndExpiry; cheats.prank(defaultStaker); @@ -1415,9 +1393,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { delegationManager.delegateTo(defaultOperator, approverSignatureAndExpiry, emptySalt); } - /** - * @notice Delegates from `staker` to an operator, then verifies that the `staker` cannot delegate to another `operator` (at least without first undelegating) - */ + /// @notice Delegates from `staker` to an operator, then verifies that the `staker` cannot delegate to another `operator` (at least without first undelegating) function testFuzz_Revert_WhenDelegateWhileDelegated( Randomness r, ISignatureUtilsMixinTypes.SignatureWithExpiry memory approverSignatureAndExpiry @@ -1449,18 +1425,16 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { delegationManager.delegateTo(operator, approverSignatureAndExpiry, emptySalt); } - /** - * @notice `staker` delegates to an operator who does not require any signature verification (i.e. the operator’s `delegationApprover` address is set to the zero address) - * via the `staker` calling `DelegationManager.delegateTo` - * The function should pass with any `operatorSignature` input (since it should be unused) - * Assertion checks - * - Properly emitted events from `delegateTo` - * - depositShares incremented for staker correctly - * - withdrawableShares are correct - * - depositScalingFactor is updated correctly - * - operatorShares increase by depositShares amount - * - defaultOperator is an operator, staker is delegated to defaultOperator, staker is not an operator - */ + /// @notice `staker` delegates to an operator who does not require any signature verification (i.e. the operator’s `delegationApprover` address is set to the zero address) + /// via the `staker` calling `DelegationManager.delegateTo` + /// The function should pass with any `operatorSignature` input (since it should be unused) + /// Assertion checks + /// - Properly emitted events from `delegateTo` + /// - depositShares incremented for staker correctly + /// - withdrawableShares are correct + /// - depositScalingFactor is updated correctly + /// - operatorShares increase by depositShares amount + /// - defaultOperator is an operator, staker is delegated to defaultOperator, staker is not an operator function testFuzz_OperatorWhoAcceptsAllStakers_StrategyManagerShares( Randomness r, ISignatureUtilsMixinTypes.SignatureWithExpiry memory approverSignatureAndExpiry @@ -1511,19 +1485,17 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { ); } - /** - * @notice `staker` delegates to an operator who does not require any signature verification (i.e. the operator’s `delegationApprover` address is set to the zero address) - * via the `staker` calling `DelegationManager.delegateTo`. `staker` holds beaconChainETHStrategy Shares - * The function should pass with any `operatorSignature` input (since it should be unused) - * Assertion Checks - * - Properly emitted events from `delegateTo` - * - depositShares incremented for staker correctly - * - withdrawableShares are correct - * - depositScalingFactor is updated correctly - * - operatorShares increase by depositShares amount - * - defaultOperator is an operator, staker is delegated to defaultOperator, staker is not an operator - * - That the staker withdrawableShares is <= operatorShares (less due to rounding from non-WAD maxMagnitude) - */ + /// @notice `staker` delegates to an operator who does not require any signature verification (i.e. the operator’s `delegationApprover` address is set to the zero address) + /// via the `staker` calling `DelegationManager.delegateTo`. `staker` holds beaconChainETHStrategy Shares + /// The function should pass with any `operatorSignature` input (since it should be unused) + /// Assertion Checks + /// - Properly emitted events from `delegateTo` + /// - depositShares incremented for staker correctly + /// - withdrawableShares are correct + /// - depositScalingFactor is updated correctly + /// - operatorShares increase by depositShares amount + /// - defaultOperator is an operator, staker is delegated to defaultOperator, staker is not an operator + /// - That the staker withdrawableShares is <= operatorShares (less due to rounding from non-WAD maxMagnitude) function testFuzz_OperatorWhoAcceptsAllStakers_beaconChainStrategyShares( Randomness r, ISignatureUtilsMixinTypes.SignatureWithExpiry memory approverSignatureAndExpiry @@ -1583,15 +1555,13 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { ); } - /** - * @notice `staker` delegates to an operator who does not require any signature verification (i.e. the operator’s `delegationApprover` address is set to the zero address) - * but it should revert as the strategy has been fully slashed for the operator. - * Assertion checks - * - staker is not delegated to defaultOperator afterwards - * - staker is not delegated - * - staker is not registered as an operator - * - salt is not spent - */ + /// @notice `staker` delegates to an operator who does not require any signature verification (i.e. the operator’s `delegationApprover` address is set to the zero address) + /// but it should revert as the strategy has been fully slashed for the operator. + /// Assertion checks + /// - staker is not delegated to defaultOperator afterwards + /// - staker is not delegated + /// - staker is not registered as an operator + /// - salt is not spent function testFuzz_Revert_OperatorWhoAcceptsAllStakers_AlreadySlashed100Percent_StrategyManagerShares(Randomness r) public rand(r) { address staker = r.Address(); uint shares = r.Uint256(1, MAX_STRATEGY_SHARES); @@ -1621,17 +1591,15 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { ); } - /** - * @notice `staker` delegates to an operator who does not require any signature verification (i.e. the operator’s `delegationApprover` address is set to the zero address) - * but it should revert as the beaconChainStrategy has been fully slashed for the operator. - * The function should pass with any `operatorSignature` input (since it should be unused) - * Assertion checks - * - beaconChainETHStrategy shares are unchanged for the operator - * - staker is not delegated to defaultOperator afterwards - * - staker is not delegated - * - staker is not registered as an operator - * - salt is not spent - */ + /// @notice `staker` delegates to an operator who does not require any signature verification (i.e. the operator’s `delegationApprover` address is set to the zero address) + /// but it should revert as the beaconChainStrategy has been fully slashed for the operator. + /// The function should pass with any `operatorSignature` input (since it should be unused) + /// Assertion checks + /// - beaconChainETHStrategy shares are unchanged for the operator + /// - staker is not delegated to defaultOperator afterwards + /// - staker is not delegated + /// - staker is not registered as an operator + /// - salt is not spent function testFuzz_Revert_OperatorWhoAcceptsAllStakers_AlreadySlashed100Percent_BeaconChainStrategyShares( Randomness r, ISignatureUtilsMixinTypes.SignatureWithExpiry memory approverSignatureAndExpiry @@ -1671,18 +1639,16 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { ); } - /** - * @notice `staker` delegates to an operator who does not require any signature verification (i.e. the operator’s `delegationApprover` address is set to the zero address) - * and the strategy has already been slashed for the operator. - * Assertion Checks - * - Properly emitted events from `delegateTo` - * - depositShares incremented for staker correctly - * - withdrawableShares are correct - * - depositScalingFactor is updated correctly - * - operatorShares increase by depositShares amount - * - defaultOperator is an operator, staker is delegated to defaultOperator, staker is not an operator - * - That the staker withdrawableShares is <= operatorShares (less due to rounding from non-WAD maxMagnitude) - */ + /// @notice `staker` delegates to an operator who does not require any signature verification (i.e. the operator’s `delegationApprover` address is set to the zero address) + /// and the strategy has already been slashed for the operator. + /// Assertion Checks + /// - Properly emitted events from `delegateTo` + /// - depositShares incremented for staker correctly + /// - withdrawableShares are correct + /// - depositScalingFactor is updated correctly + /// - operatorShares increase by depositShares amount + /// - defaultOperator is an operator, staker is delegated to defaultOperator, staker is not an operator + /// - That the staker withdrawableShares is <= operatorShares (less due to rounding from non-WAD maxMagnitude) function testFuzz_OperatorWhoAcceptsAllStakers_AlreadySlashed_StrategyManagerShares(Randomness r) public rand(r) { address staker = r.Address(); uint shares = r.Uint256(1 gwei, MAX_STRATEGY_SHARES); @@ -1733,18 +1699,16 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { ); } - /** - * @notice `staker` delegates to an operator who does not require any signature verification (i.e. the operator’s `delegationApprover` address is set to the zero address) - * and the strategy has already been slashed for the operator. `staker` holds beaconChainETHStrategy Shares - * Assertion Checks - * - Properly emitted events from `delegateTo` - * - depositShares incremented for staker correctly - * - withdrawableShares are correct - * - depositScalingFactor is updated correctly - * - operatorShares increase by depositShares amount - * - defaultOperator is an operator, staker is delegated to defaultOperator, staker is not an operator - * - That the staker withdrawableShares is <= operatorShares (less due to rounding from non-WAD maxMagnitude) - */ + /// @notice `staker` delegates to an operator who does not require any signature verification (i.e. the operator’s `delegationApprover` address is set to the zero address) + /// and the strategy has already been slashed for the operator. `staker` holds beaconChainETHStrategy Shares + /// Assertion Checks + /// - Properly emitted events from `delegateTo` + /// - depositShares incremented for staker correctly + /// - withdrawableShares are correct + /// - depositScalingFactor is updated correctly + /// - operatorShares increase by depositShares amount + /// - defaultOperator is an operator, staker is delegated to defaultOperator, staker is not an operator + /// - That the staker withdrawableShares is <= operatorShares (less due to rounding from non-WAD maxMagnitude) function testFuzz_OperatorWhoAcceptsAllStakers_AlreadySlashed_beaconChainStrategyShares(Randomness r) public rand(r) { address staker = r.Address(); uint64 maxMagnitude = r.Uint64(1, WAD); @@ -1797,19 +1761,17 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { ); } - /** - * @notice `staker` delegates to an operator who does not require any signature verification (i.e. the operator’s `delegationApprover` address is set to the zero address) - * and the strategy has already been slashed for the operator. `staker` holds beaconChainETHStrategy Shares and has been - * slashed on the beaconChain resulting in a non-WAD beaconChainSlashingFactor. - * Assertion Checks - * - Properly emitted events from `delegateTo` - * - depositShares incremented for staker correctly - * - withdrawableShares are correct - * - depositScalingFactor is updated correctly - * - operatorShares increase by withdrawableShares amount - * - defaultOperator is an operator, staker is delegated to defaultOperator, staker is not an operator - * - That the staker withdrawableShares is <= operatorShares (less due to rounding from non-WAD maxMagnitude) - */ + /// @notice `staker` delegates to an operator who does not require any signature verification (i.e. the operator’s `delegationApprover` address is set to the zero address) + /// and the strategy has already been slashed for the operator. `staker` holds beaconChainETHStrategy Shares and has been + /// slashed on the beaconChain resulting in a non-WAD beaconChainSlashingFactor. + /// Assertion Checks + /// - Properly emitted events from `delegateTo` + /// - depositShares incremented for staker correctly + /// - withdrawableShares are correct + /// - depositScalingFactor is updated correctly + /// - operatorShares increase by withdrawableShares amount + /// - defaultOperator is an operator, staker is delegated to defaultOperator, staker is not an operator + /// - That the staker withdrawableShares is <= operatorShares (less due to rounding from non-WAD maxMagnitude) function testFuzz_OperatorWhoAcceptsAllStakers_AlreadySlashedAVSAndBeaconChain_beaconChainStrategyShares(Randomness r) public rand(r) { address staker = r.Address(); uint64 maxMagnitude = r.Uint64(1, WAD); @@ -1863,19 +1825,17 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { ); } - /** - * @notice `staker` delegates to an operator who does not require any signature verification (i.e. the operator’s `delegationApprover` address is set to the zero address) - * via the `staker` calling `DelegationManager.delegateTo` - * Similar to tests above but now with staker who has both EigenPod and StrategyManager shares. - * Assertion Checks for strategyMock and beaconChainETHStrategy - * - Properly emitted events from `delegateTo` - * - depositShares incremented for staker correctly - * - withdrawableShares are correct - * - depositScalingFactor is updated correctly - * - operatorShares increase by depositShares amount - * - defaultOperator is an operator, staker is delegated to defaultOperator, staker is not an operator - * - That the staker withdrawableShares is <= operatorShares (less due to rounding from non-WAD maxMagnitude) - */ + /// @notice `staker` delegates to an operator who does not require any signature verification (i.e. the operator’s `delegationApprover` address is set to the zero address) + /// via the `staker` calling `DelegationManager.delegateTo` + /// Similar to tests above but now with staker who has both EigenPod and StrategyManager shares. + /// Assertion Checks for strategyMock and beaconChainETHStrategy + /// - Properly emitted events from `delegateTo` + /// - depositShares incremented for staker correctly + /// - withdrawableShares are correct + /// - depositScalingFactor is updated correctly + /// - operatorShares increase by depositShares amount + /// - defaultOperator is an operator, staker is delegated to defaultOperator, staker is not an operator + /// - That the staker withdrawableShares is <= operatorShares (less due to rounding from non-WAD maxMagnitude) function testFuzz_OperatorWhoAcceptsAllStakers_BeaconChainAndStrategyManagerShares( Randomness r, ISignatureUtilsMixinTypes.SignatureWithExpiry memory approverSignatureAndExpiry @@ -1953,20 +1913,18 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { ); } - /** - * @notice `defaultStaker` delegates to an operator who does not require any signature verification (i.e. the operator’s `delegationApprover` address is set to the zero address) - * via the `defaultStaker` calling `DelegationManager.delegateTo` - * Similar to tests above but now with staker who has both EigenPod and StrategyManager shares. - * The operator has been slashed prior to deposit for both strategies. - * Assertion Checks for strategyMock and beaconChainETHStrategy - * - Properly emitted events from `delegateTo` - * - depositShares incremented for staker correctly - * - withdrawableShares are correct - * - depositScalingFactor is updated correctly - * - operatorShares increase by depositShares amount - * - defaultOperator is an operator, defaultStaker is delegated to defaultOperator, defaultStaker is not an operator - * - That the defaultStaker withdrawableShares is <= operatorShares (less due to rounding from non-WAD maxMagnitude) - */ + /// @notice `defaultStaker` delegates to an operator who does not require any signature verification (i.e. the operator’s `delegationApprover` address is set to the zero address) + /// via the `defaultStaker` calling `DelegationManager.delegateTo` + /// Similar to tests above but now with staker who has both EigenPod and StrategyManager shares. + /// The operator has been slashed prior to deposit for both strategies. + /// Assertion Checks for strategyMock and beaconChainETHStrategy + /// - Properly emitted events from `delegateTo` + /// - depositShares incremented for staker correctly + /// - withdrawableShares are correct + /// - depositScalingFactor is updated correctly + /// - operatorShares increase by depositShares amount + /// - defaultOperator is an operator, defaultStaker is delegated to defaultOperator, defaultStaker is not an operator + /// - That the defaultStaker withdrawableShares is <= operatorShares (less due to rounding from non-WAD maxMagnitude) function testFuzz_OperatorWhoAcceptsAllStakers_AlreadySlashed_BeaconChainAndStrategyManagerShares(Randomness r) public rand(r) { // 1. register operator and setup values, magnitudes uint shares = r.Uint256(1, MAX_STRATEGY_SHARES); @@ -2041,11 +1999,9 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { ); } - /** - * @notice `staker` delegates to a operator who does not require any signature verification similar to test above. - * In this scenario, staker doesn't have any delegatable shares and operator shares should not increase. Staker - * should still be correctly delegated to the operator after the call. - */ + /// @notice `staker` delegates to a operator who does not require any signature verification similar to test above. + /// In this scenario, staker doesn't have any delegatable shares and operator shares should not increase. Staker + /// should still be correctly delegated to the operator after the call. function testFuzz_OperatorWhoAcceptsAllStakers_ZeroDelegatableShares( Randomness r, ISignatureUtilsMixinTypes.SignatureWithExpiry memory approverSignatureAndExpiry @@ -2077,9 +2033,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { ); } - /** - * @notice Like `testDelegateToOperatorWhoRequiresECDSASignature` but using an invalid expiry on purpose and checking that reversion occurs - */ + /// @notice Like `testDelegateToOperatorWhoRequiresECDSASignature` but using an invalid expiry on purpose and checking that reversion occurs function testFuzz_Revert_WhenOperatorWhoRequiresECDSASignature_ExpiredDelegationApproverSignature(Randomness r) public rand(r) { address staker = r.Address(); bytes32 salt = r.Bytes32(); @@ -2100,10 +2054,8 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { cheats.stopPrank(); } - /** - * @notice Like `testDelegateToOperatorWhoRequiresECDSASignature` but undelegating after delegating and trying the same approveSignature - * and checking that reversion occurs with the same salt - */ + /// @notice Like `testDelegateToOperatorWhoRequiresECDSASignature` but undelegating after delegating and trying the same approveSignature + /// and checking that reversion occurs with the same salt function testFuzz_Revert_WhenOperatorWhoRequiresECDSASignature_PreviouslyUsedSalt(Randomness r) public rand(r) { address staker = r.Address(); bytes32 salt = r.Bytes32(); @@ -2134,9 +2086,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { cheats.stopPrank(); } - /** - * @notice Like `testDelegateToOperatorWhoRequiresECDSASignature` but using an incorrect signature on purpose and checking that reversion occurs - */ + /// @notice Like `testDelegateToOperatorWhoRequiresECDSASignature` but using an incorrect signature on purpose and checking that reversion occurs function testFuzz_Revert_WhenOperatorWhoRequiresECDSASignature_WithBadSignature(Randomness random) public rand(random) { address staker = random.Address(); uint expiry = random.Uint256(block.timestamp + 1, type(uint).max); @@ -2163,15 +2113,13 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { cheats.stopPrank(); } - /** - * @notice `staker` delegates to an operator who requires signature verification through an EOA (i.e. the operator’s `delegationApprover` address is set to a nonzero EOA) - * via the `staker` calling `DelegationManager.delegateTo` - * The function should pass *only with a valid ECDSA signature from the `delegationApprover`, OR if called by the operator or their delegationApprover themselves - * Properly emits a `StakerDelegated` event - * Staker is correctly delegated after the call (i.e. correct storage update) - * Reverts if the staker is already delegated (to the operator or to anyone else) - * Reverts if the ‘operator’ is not actually registered as an operator - */ + /// @notice `staker` delegates to an operator who requires signature verification through an EOA (i.e. the operator’s `delegationApprover` address is set to a nonzero EOA) + /// via the `staker` calling `DelegationManager.delegateTo` + /// The function should pass *only with a valid ECDSA signature from the `delegationApprover`, OR if called by the operator or their delegationApprover themselves + /// Properly emits a `StakerDelegated` event + /// Staker is correctly delegated after the call (i.e. correct storage update) + /// Reverts if the staker is already delegated (to the operator or to anyone else) + /// Reverts if the ‘operator’ is not actually registered as an operator function testFuzz_OperatorWhoRequiresECDSASignature(Randomness r) public rand(r) { address staker = r.Address(); bytes32 salt = r.Bytes32(); @@ -2214,16 +2162,14 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { } } - /** - * @notice `staker` delegates to an operator who requires signature verification through an EOA (i.e. the operator’s `delegationApprover` address is set to a nonzero EOA) - * via the `staker` calling `DelegationManager.delegateTo` - * The function should pass *only with a valid ECDSA signature from the `delegationApprover`, OR if called by the operator or their delegationApprover themselves - * Properly emits a `StakerDelegated` event - * Staker is correctly delegated after the call (i.e. correct storage update) - * Operator shares should increase by the amount of shares delegated - * Reverts if the staker is already delegated (to the operator or to anyone else) - * Reverts if the ‘operator’ is not actually registered as an operator - */ + /// @notice `staker` delegates to an operator who requires signature verification through an EOA (i.e. the operator’s `delegationApprover` address is set to a nonzero EOA) + /// via the `staker` calling `DelegationManager.delegateTo` + /// The function should pass *only with a valid ECDSA signature from the `delegationApprover`, OR if called by the operator or their delegationApprover themselves + /// Properly emits a `StakerDelegated` event + /// Staker is correctly delegated after the call (i.e. correct storage update) + /// Operator shares should increase by the amount of shares delegated + /// Reverts if the staker is already delegated (to the operator or to anyone else) + /// Reverts if the ‘operator’ is not actually registered as an operator function testFuzz_OperatorWhoRequiresECDSASignature_StrategyManagerShares(Randomness r) public rand(r) { address staker = r.Address(); bytes32 salt = r.Bytes32(); @@ -2289,16 +2235,14 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { } } - /** - * @notice `staker` delegates to an operator who requires signature verification through an EOA (i.e. the operator’s `delegationApprover` address is set to a nonzero EOA) - * via the `staker` calling `DelegationManager.delegateTo` - * The function should pass *only with a valid ECDSA signature from the `delegationApprover`, OR if called by the operator or their delegationApprover themselves - * Properly emits a `StakerDelegated` event - * Staker is correctly delegated after the call (i.e. correct storage update) - * Operator beaconShares should increase by the amount of shares delegated if beaconShares > 0 - * Reverts if the staker is already delegated (to the operator or to anyone else) - * Reverts if the ‘operator’ is not actually registered as an operator - */ + /// @notice `staker` delegates to an operator who requires signature verification through an EOA (i.e. the operator’s `delegationApprover` address is set to a nonzero EOA) + /// via the `staker` calling `DelegationManager.delegateTo` + /// The function should pass *only with a valid ECDSA signature from the `delegationApprover`, OR if called by the operator or their delegationApprover themselves + /// Properly emits a `StakerDelegated` event + /// Staker is correctly delegated after the call (i.e. correct storage update) + /// Operator beaconShares should increase by the amount of shares delegated if beaconShares > 0 + /// Reverts if the staker is already delegated (to the operator or to anyone else) + /// Reverts if the ‘operator’ is not actually registered as an operator function testFuzz_OperatorWhoRequiresECDSASignature_BeaconChainStrategyShares(Randomness r) public rand(r) { address staker = r.Address(); bytes32 salt = r.Bytes32(); @@ -2366,17 +2310,15 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { } } - /** - * @notice `staker` delegates to an operator who requires signature verification through an EOA (i.e. the operator’s `delegationApprover` address is set to a nonzero EOA) - * via the `staker` calling `DelegationManager.delegateTo` - * The function should pass *only with a valid ECDSA signature from the `delegationApprover`, OR if called by the operator or their delegationApprover themselves - * Properly emits a `StakerDelegated` event - * Staker is correctly delegated after the call (i.e. correct storage update) - * Operator beaconshares should increase by the amount of beaconShares delegated if beaconShares > 0 - * Operator strategy manager shares should icnrease by amount of shares - * Reverts if the staker is already delegated (to the operator or to anyone else) - * Reverts if the ‘operator’ is not actually registered as an operator - */ + /// @notice `staker` delegates to an operator who requires signature verification through an EOA (i.e. the operator’s `delegationApprover` address is set to a nonzero EOA) + /// via the `staker` calling `DelegationManager.delegateTo` + /// The function should pass *only with a valid ECDSA signature from the `delegationApprover`, OR if called by the operator or their delegationApprover themselves + /// Properly emits a `StakerDelegated` event + /// Staker is correctly delegated after the call (i.e. correct storage update) + /// Operator beaconshares should increase by the amount of beaconShares delegated if beaconShares > 0 + /// Operator strategy manager shares should icnrease by amount of shares + /// Reverts if the staker is already delegated (to the operator or to anyone else) + /// Reverts if the ‘operator’ is not actually registered as an operator function testFuzz_OperatorWhoRequiresECDSASignature_BeaconChainAndStrategyManagerShares(Randomness r) public rand(r) { address staker = r.Address(); bytes32 salt = r.Bytes32(); @@ -2466,10 +2408,8 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { } } - /** - * @notice delegateTo test with operator's delegationApprover address set to a contract address - * and check that reversion occurs when the signature is expired - */ + /// @notice delegateTo test with operator's delegationApprover address set to a contract address + /// and check that reversion occurs when the signature is expired function testFuzz_Revert_WhenOperatorWhoRequiresEIP1271Signature_ExpiredDelegationApproverSignature(Randomness r) public rand(r) { address staker = r.Address(); uint expiry = r.Uint256(0, block.timestamp - 1); @@ -2491,11 +2431,9 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { cheats.stopPrank(); } - /** - * @notice delegateTo test with operator's delegationApprover address set to a contract address - * and check that reversion occurs when the signature approverSalt is already used. - * Performed by delegating to operator, undelegating, and trying to reuse the same signature - */ + /// @notice delegateTo test with operator's delegationApprover address set to a contract address + /// and check that reversion occurs when the signature approverSalt is already used. + /// Performed by delegating to operator, undelegating, and trying to reuse the same signature function testFuzz_Revert_WhenOperatorWhoRequiresEIP1271Signature_PreviouslyUsedSalt(Randomness r) public rand(r) { address staker = r.Address(); bytes32 salt = r.Bytes32(); @@ -2521,10 +2459,8 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { cheats.stopPrank(); } - /** - * @notice delegateTo test with operator's delegationApprover address set to a contract address that - * is non compliant with EIP1271 - */ + /// @notice delegateTo test with operator's delegationApprover address set to a contract address that + /// is non compliant with EIP1271 function testFuzz_Revert_WhenOperatorWhoRequiresEIP1271Signature_NonCompliantWallet(Randomness r) public rand(r) { address staker = r.Address(); uint expiry = r.Uint256(block.timestamp, type(uint).max); @@ -2545,10 +2481,8 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { cheats.stopPrank(); } - /** - * @notice delegateTo test with operator's delegationApprover address set to a contract address that - * returns a value other than the EIP1271 "magic bytes" and checking that reversion occurs appropriately - */ + /// @notice delegateTo test with operator's delegationApprover address set to a contract address that + /// returns a value other than the EIP1271 "magic bytes" and checking that reversion occurs appropriately function testFuzz_Revert_WhenOperatorWhoRequiresEIP1271Signature_IsValidSignatureFails(Randomness r) public rand(r) { address staker = r.Address(); bytes32 salt = r.Bytes32(); @@ -2572,16 +2506,14 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests { cheats.stopPrank(); } - /** - * @notice `staker` delegates to an operator who requires signature verification through an EIP1271-compliant contract (i.e. the operator’s `delegationApprover` address is - * set to a nonzero and code-containing address) via the `staker` calling `DelegationManager.delegateTo` - * The function uses OZ's ERC1271WalletMock contract, and thus should pass *only when a valid ECDSA signature from the `owner` of the ERC1271WalletMock contract, - * OR if called by the operator or their delegationApprover themselves - * Properly emits a `StakerDelegated` event - * Staker is correctly delegated after the call (i.e. correct storage update) - * Reverts if the staker is already delegated (to the operator or to anyone else) - * Reverts if the ‘operator’ is not actually registered as an operator - */ + /// @notice `staker` delegates to an operator who requires signature verification through an EIP1271-compliant contract (i.e. the operator’s `delegationApprover` address is + /// set to a nonzero and code-containing address) via the `staker` calling `DelegationManager.delegateTo` + /// The function uses OZ's ERC1271WalletMock contract, and thus should pass *only when a valid ECDSA signature from the `owner` of the ERC1271WalletMock contract, + /// OR if called by the operator or their delegationApprover themselves + /// Properly emits a `StakerDelegated` event + /// Staker is correctly delegated after the call (i.e. correct storage update) + /// Reverts if the staker is already delegated (to the operator or to anyone else) + /// Reverts if the ‘operator’ is not actually registered as an operator function testFuzz_OperatorWhoRequiresEIP1271Signature(Randomness r) public rand(r) { address staker = r.Address(); bytes32 salt = r.Bytes32(); @@ -2639,10 +2571,8 @@ contract DelegationManagerUnitTests_increaseDelegatedShares is DelegationManager delegationManager.increaseDelegatedShares(invalidCaller, strategyMock, 0, shares); } - /** - * @notice Verifies that `DelegationManager.increaseDelegatedShares` reverts when operator slashed 100% for a strategy - * and the staker has deposits in that strategy - */ + /// @notice Verifies that `DelegationManager.increaseDelegatedShares` reverts when operator slashed 100% for a strategy + /// and the staker has deposits in that strategy function testFuzz_Revert_increaseDelegatedShares_slashedOperator100Percent(Randomness r) public rand(r) { uint shares = r.Uint256(1, MAX_STRATEGY_SHARES); address staker = r.Address(); @@ -2666,13 +2596,11 @@ contract DelegationManagerUnitTests_increaseDelegatedShares is DelegationManager assertEq(_delegatedSharesBefore, 0, "nonzero shares delegated to zero address!"); } - /** - * @notice Verifies that `DelegationManager.increaseDelegatedShares` reverts when operator slashed 100% for a strategy - * and the staker has deposits in that strategy. In this test case, the staker was initially deposited and delegated - * to the operator before the operator was slashed 100%. - * @dev Checks that withdrawable shares after 100% slashed is 0 - * @dev Checks that as a staker, redepositing after 100% slashed reverts - */ + /// @notice Verifies that `DelegationManager.increaseDelegatedShares` reverts when operator slashed 100% for a strategy + /// and the staker has deposits in that strategy. In this test case, the staker was initially deposited and delegated + /// to the operator before the operator was slashed 100%. + /// @dev Checks that withdrawable shares after 100% slashed is 0 + /// @dev Checks that as a staker, redepositing after 100% slashed reverts function testFuzz_Revert_increaseDelegatedShares_slashedOperator100PercentWithExistingStaker(Randomness r) public rand(r) { address staker = r.Address(); uint64 initialMagnitude = r.Uint64(1, WAD); @@ -2733,15 +2661,13 @@ contract DelegationManagerUnitTests_increaseDelegatedShares is DelegationManager assertEq(0, entries.length, "should not have emitted any events"); } - /** - * @notice Verifies that `DelegationManager.increaseDelegatedShares` properly increases the delegated `shares` that the operator - * who the `staker` is delegated to has in the strategy - * Asserts: - * - depositScalingFactor, depositShares, withdrawableShares, operatorShares after deposit - * - correct operator shares after deposit - * - * @dev Checks that there is no change if the staker is not delegated - */ + /// @notice Verifies that `DelegationManager.increaseDelegatedShares` properly increases the delegated `shares` that the operator + /// who the `staker` is delegated to has in the strategy + /// Asserts: + /// - depositScalingFactor, depositShares, withdrawableShares, operatorShares after deposit + /// - correct operator shares after deposit + /// + /// @dev Checks that there is no change if the staker is not delegated function testFuzz_increaseDelegatedShares(Randomness r) public rand(r) { address staker = r.Address(); uint shares = r.Uint256(1, MAX_STRATEGY_SHARES); @@ -2832,11 +2758,9 @@ contract DelegationManagerUnitTests_increaseDelegatedShares is DelegationManager _assertWithdrawableAndOperatorShares(withdrawableShares[0], delegatedSharesAfter, "Invalid withdrawable shares"); } - /** - * @notice Verifies that `DelegationManager.increaseDelegatedShares` properly increases the delegated `shares` that the operator - * who the `staker` is delegated to has in the strategy - * @dev Checks that there is no change if the staker is not delegated - */ + /// @notice Verifies that `DelegationManager.increaseDelegatedShares` properly increases the delegated `shares` that the operator + /// who the `staker` is delegated to has in the strategy + /// @dev Checks that there is no change if the staker is not delegated function testFuzz_increaseDelegatedShares_slashedOperator(Randomness r) public rand(r) { address staker = r.Address(); uint shares = r.Uint256(1, MAX_STRATEGY_SHARES); @@ -2891,11 +2815,9 @@ contract DelegationManagerUnitTests_increaseDelegatedShares is DelegationManager } } - /** - * @notice Verifies that `DelegationManager.increaseDelegatedShares` properly increases the delegated `shares` for the - * `defaultOperator` who the staker is delegated to. Asserts for proper events emitted and correct withdrawable shares, - * despoitScalingFactor for the staker, and operator shares after deposit. - */ + /// @notice Verifies that `DelegationManager.increaseDelegatedShares` properly increases the delegated `shares` for the + /// `defaultOperator` who the staker is delegated to. Asserts for proper events emitted and correct withdrawable shares, + /// despoitScalingFactor for the staker, and operator shares after deposit. function testFuzz_increaseDelegatedShares_slashedOperatorAndBeaconChainShares(Randomness r) public rand(r) { address staker = r.Address(); uint shares = r.Uint256(1, MAX_ETH_SUPPLY); @@ -2941,10 +2863,8 @@ contract DelegationManagerUnitTests_increaseDelegatedShares is DelegationManager _assertWithdrawableAndOperatorShares(withdrawableShares[0], delegatedSharesAfter, "Invalid withdrawable shares"); } - /** - * @notice Verifies that `DelegationManager.increaseDelegatedShares` doesn't revert when operator slashed 100% for a strategy - * and the staker has deposits in a separate strategy - */ + /// @notice Verifies that `DelegationManager.increaseDelegatedShares` doesn't revert when operator slashed 100% for a strategy + /// and the staker has deposits in a separate strategy function testFuzz_increaseDelegatedShares_slashedOperator100Percent(Randomness r) public rand(r) { address staker = r.Address(); uint shares = r.Uint256(1, MAX_STRATEGY_SHARES); @@ -2996,13 +2916,11 @@ contract DelegationManagerUnitTests_increaseDelegatedShares is DelegationManager _assertWithdrawableAndOperatorShares(withdrawableShares[0], delegatedSharesAfter, "Invalid withdrawable shares"); } - /** - * @notice A unique test setup where impact of rounding can clearly be observed here. - * After making the initial deposit of 44182209037560531097078597505 shares, and the operator's magnitude is set to 999999999999990009, - * Each subsequent deposit amount of 1000 actually results in LESS withdrawable shares for the staker. There in an increasing drift - * between the operator's shares and the staker's withdrawable shares. - * The test below results in a drift difference of 4.418e13 - */ + /// @notice A unique test setup where impact of rounding can clearly be observed here. + /// After making the initial deposit of 44182209037560531097078597505 shares, and the operator's magnitude is set to 999999999999990009, + /// Each subsequent deposit amount of 1000 actually results in LESS withdrawable shares for the staker. There in an increasing drift + /// between the operator's shares and the staker's withdrawable shares. + /// The test below results in a drift difference of 4.418e13 function test_increaseDelegatedShares_depositRepeatedly() public { uint64 initialMagnitude = 999_999_999_999_990_009; uint shares = 44_182_209_037_560_531_097_078_597_505; @@ -3070,12 +2988,10 @@ contract DelegationManagerUnitTests_decreaseDelegatedShares is DelegationManager assertEq(delegationManager.operatorShares(defaultOperator, strategyMock), 0, "shares should not have changed"); } - /** - * @notice Verifies that `decreaseDelegatedShares` properly updates the staker's withdrawable shares - * and their delegated operator's shares are decreased by the correct amount. - * Ensures that after the decrease, the staker's withdrawableShares <= operatorShares, - * preventing any underflow for the operator's shares if they were all to be withdrawn. - */ + /// @notice Verifies that `decreaseDelegatedShares` properly updates the staker's withdrawable shares + /// and their delegated operator's shares are decreased by the correct amount. + /// Ensures that after the decrease, the staker's withdrawableShares <= operatorShares, + /// preventing any underflow for the operator's shares if they were all to be withdrawn. function testFuzz_decreaseDelegatedShares_nonSlashedOperator(Randomness r) public rand(r) { int beaconShares = int(r.Uint256(1, MAX_ETH_SUPPLY)); uint sharesDecrease = r.Uint256(0, uint(beaconShares) - 1); @@ -3111,7 +3027,11 @@ contract DelegationManagerUnitTests_decreaseDelegatedShares is DelegationManager }); // expected events _decreaseDelegatedShares_expectEmit( - DecreaseDelegatedSharesEmitStruct({staker: defaultStaker, operator: defaultOperator, sharesToDecrease: operatorSharesToDecrease}) + DecreaseDelegatedSharesEmitStruct({ + staker: defaultStaker, + operator: defaultOperator, + sharesToDecrease: operatorSharesToDecrease + }) ); cheats.prank(address(eigenPodManagerMock)); delegationManager.decreaseDelegatedShares(defaultStaker, uint(beaconShares), beaconChainSlashingFactorDecrease); @@ -3144,14 +3064,12 @@ contract DelegationManagerUnitTests_decreaseDelegatedShares is DelegationManager ); } - /** - * @notice Similar test to `testFuzz_decreaseDelegatedShares_nonSlashedOperator` but with - * a pre-slashed operator (maxMagnitude < WAD). - * Verifies that `decreaseDelegatedShares` properly updates the staker's withdrawable shares - * and their delegated operator's shares are decreased by the correct amount. - * Ensures that after the decrease, the staker's withdrawableShares <= operatorShares, - * preventing any underflow for the operator's shares if they were all to be withdrawn. - */ + /// @notice Similar test to `testFuzz_decreaseDelegatedShares_nonSlashedOperator` but with + /// a pre-slashed operator (maxMagnitude < WAD). + /// Verifies that `decreaseDelegatedShares` properly updates the staker's withdrawable shares + /// and their delegated operator's shares are decreased by the correct amount. + /// Ensures that after the decrease, the staker's withdrawableShares <= operatorShares, + /// preventing any underflow for the operator's shares if they were all to be withdrawn. function testFuzz_decreaseDelegatedShares_slashedOperator(Randomness r) public rand(r) { int beaconShares = int(r.Uint256(1, MAX_ETH_SUPPLY)); uint sharesDecrease = r.Uint256(0, uint(beaconShares) - 1); @@ -3189,7 +3107,11 @@ contract DelegationManagerUnitTests_decreaseDelegatedShares is DelegationManager }); // expected events _decreaseDelegatedShares_expectEmit( - DecreaseDelegatedSharesEmitStruct({staker: defaultStaker, operator: defaultOperator, sharesToDecrease: operatorSharesToDecrease}) + DecreaseDelegatedSharesEmitStruct({ + staker: defaultStaker, + operator: defaultOperator, + sharesToDecrease: operatorSharesToDecrease + }) ); cheats.prank(address(eigenPodManagerMock)); delegationManager.decreaseDelegatedShares(defaultStaker, uint(beaconShares), beaconChainSlashingFactorDecrease); @@ -3222,11 +3144,9 @@ contract DelegationManagerUnitTests_decreaseDelegatedShares is DelegationManager ); } - /** - * @notice Verifies that if a staker's beaconChainSlashingFactor is reduced to 0 if their entire balance - * is slashed. Their withdrawable shares should be 0 afterwards and decreasing operatorShares should - * not underflow and revert either. - */ + /// @notice Verifies that if a staker's beaconChainSlashingFactor is reduced to 0 if their entire balance + /// is slashed. Their withdrawable shares should be 0 afterwards and decreasing operatorShares should + /// not underflow and revert either. function testFuzz_decreaseDelegatedShares_entireBalance(Randomness r) public rand(r) { int beaconShares = int(r.Uint256(1, MAX_ETH_SUPPLY)); uint64 maxMagnitude = r.Uint64(1, WAD); @@ -3263,7 +3183,11 @@ contract DelegationManagerUnitTests_decreaseDelegatedShares is DelegationManager }); // expected events _decreaseDelegatedShares_expectEmit( - DecreaseDelegatedSharesEmitStruct({staker: defaultStaker, operator: defaultOperator, sharesToDecrease: operatorSharesToDecrease}) + DecreaseDelegatedSharesEmitStruct({ + staker: defaultStaker, + operator: defaultOperator, + sharesToDecrease: operatorSharesToDecrease + }) ); cheats.prank(address(eigenPodManagerMock)); delegationManager.decreaseDelegatedShares(defaultStaker, uint(beaconShares), prevBeaconSlashingFactor); @@ -3303,7 +3227,7 @@ contract DelegationManagerUnitTests_undelegate is DelegationManagerUnitTests { _delegateToOperatorWhoAcceptsAllStakers(staker, operator); // set the pausing flag cheats.prank(pauser); - delegationManager.pause(2 ** PAUSED_ENTER_WITHDRAWAL_QUEUE); + delegationManager.pause(2**PAUSED_ENTER_WITHDRAWAL_QUEUE); cheats.prank(staker); cheats.expectRevert(IPausable.CurrentlyPaused.selector); @@ -3329,9 +3253,7 @@ contract DelegationManagerUnitTests_undelegate is DelegationManagerUnitTests { delegationManager.undelegate(operator); } - /** - * @notice verifies that `DelegationManager.undelegate` reverts if trying to undelegate an operator from themselves - */ + /// @notice verifies that `DelegationManager.undelegate` reverts if trying to undelegate an operator from themselves function testFuzz_Revert_undelegate_operatorCannotForceUndelegateThemself(Randomness r) public rand(r) { address delegationApprover = r.Address(); bool callFromOperatorOrApprover = r.Boolean(); @@ -3349,10 +3271,8 @@ contract DelegationManagerUnitTests_undelegate is DelegationManagerUnitTests { delegationManager.undelegate(defaultOperator); } - /** - * @notice Verifies that the `undelegate` function has proper access controls (can only be called by the operator who the `staker` has delegated - * to or the operator's `delegationApprover`), or the staker themselves - */ + /// @notice Verifies that the `undelegate` function has proper access controls (can only be called by the operator who the `staker` has delegated + /// to or the operator's `delegationApprover`), or the staker themselves function testFuzz_Revert_undelegate_invalidCaller(Randomness r) public rand(r) { address invalidCaller = r.Address(); address staker = r.Address(); @@ -3365,13 +3285,11 @@ contract DelegationManagerUnitTests_undelegate is DelegationManagerUnitTests { delegationManager.undelegate(staker); } - /** - * Staker is undelegated from an operator, via a call to `undelegate`, properly originating from the staker's address. - * Reverts if the staker is themselves an operator (i.e. they are delegated to themselves) - * Does nothing if the staker is already undelegated - * Properly undelegates the staker, i.e. the staker becomes “delegated to” the zero address, and `isDelegated(staker)` returns ‘false’ - * Emits a `StakerUndelegated` event - */ + /// Staker is undelegated from an operator, via a call to `undelegate`, properly originating from the staker's address. + /// Reverts if the staker is themselves an operator (i.e. they are delegated to themselves) + /// Does nothing if the staker is already undelegated + /// Properly undelegates the staker, i.e. the staker becomes “delegated to” the zero address, and `isDelegated(staker)` returns ‘false’ + /// Emits a `StakerUndelegated` event function testFuzz_undelegate_noDelegateableShares(Randomness r) public rand(r) { address staker = r.Address(); @@ -3389,9 +3307,7 @@ contract DelegationManagerUnitTests_undelegate is DelegationManagerUnitTests { assertFalse(delegationManager.isDelegated(staker), "staker not undelegated"); } - /** - * @notice Verifies that the `undelegate` function allows for a force undelegation - */ + /// @notice Verifies that the `undelegate` function allows for a force undelegation function testFuzz_undelegate_forceUndelegation_noDelegateableShares(Randomness r) public rand(r) { address staker = r.Address(); bytes32 salt = r.Bytes32(); @@ -3426,9 +3342,7 @@ contract DelegationManagerUnitTests_undelegate is DelegationManagerUnitTests { assertFalse(delegationManager.isDelegated(staker), "staker not undelegated"); } - /** - * @notice Verifies that the `undelegate` function properly queues a withdrawal for all shares of the staker - */ + /// @notice Verifies that the `undelegate` function properly queues a withdrawal for all shares of the staker function testFuzz_undelegate_nonSlashedOperator(Randomness r) public rand(r) { uint shares = r.Uint256(1, MAX_STRATEGY_SHARES); IStrategy[] memory strategyArray = r.StrategyArray(1); @@ -3489,10 +3403,8 @@ contract DelegationManagerUnitTests_undelegate is DelegationManagerUnitTests { }); } - /** - * @notice Verifies that the `undelegate` function properly queues a withdrawal for all shares of the staker - * @notice The operator should have its shares slashed prior to the staker's deposit - */ + /// @notice Verifies that the `undelegate` function properly queues a withdrawal for all shares of the staker + /// @notice The operator should have its shares slashed prior to the staker's deposit function testFuzz_undelegate_preSlashedOperator(Randomness r) public rand(r) { uint shares = r.Uint256(1, MAX_STRATEGY_SHARES); uint64 operatorMagnitude = r.Uint64(1, WAD); @@ -3564,10 +3476,8 @@ contract DelegationManagerUnitTests_undelegate is DelegationManagerUnitTests { assertEq(stakerWithdrawableShares[0], 0, "staker withdrawable shares not calculated correctly"); } - /** - * @notice Verifies that the `undelegate` function properly queues a withdrawal for all shares of the staker - * @notice The operator should have its shares slashed prior to the staker's deposit - */ + /// @notice Verifies that the `undelegate` function properly queues a withdrawal for all shares of the staker + /// @notice The operator should have its shares slashed prior to the staker's deposit function testFuzz_undelegate_slashedWhileStaked(Randomness r) public rand(r) { uint shares = r.Uint256(1, MAX_STRATEGY_SHARES); uint64 prevMaxMagnitude = r.Uint64(2, WAD); @@ -3680,10 +3590,8 @@ contract DelegationManagerUnitTests_undelegate is DelegationManagerUnitTests { assertEq(depositShares[0], 0, "staker deposit shares not reset correctly"); } - /** - * @notice Verifies that the `undelegate` function properly undelegates a staker even though their shares - * were slashed entirely. - */ + /// @notice Verifies that the `undelegate` function properly undelegates a staker even though their shares + /// were slashed entirely. function testFuzz_undelegate_slashedOperator100PercentWhileStaked(Randomness r) public rand(r) { uint shares = r.Uint256(1, MAX_STRATEGY_SHARES); IStrategy[] memory strategyArray = r.StrategyArray(1); @@ -3877,10 +3785,8 @@ contract DelegationManagerUnitTests_undelegate is DelegationManagerUnitTests { } } - /** - * @notice Given an operator with slashed magnitude, delegate, undelegate, and then delegate back to the same operator with - * completing withdrawals as shares. This should result in the operatorShares after the second delegation being <= the shares from the first delegation. - */ + /// @notice Given an operator with slashed magnitude, delegate, undelegate, and then delegate back to the same operator with + /// completing withdrawals as shares. This should result in the operatorShares after the second delegation being <= the shares from the first delegation. function testFuzz_undelegate_delegateAgainWithRounding(Randomness r) public rand(r) { uint shares = r.Uint256(1, MAX_STRATEGY_SHARES); // set magnitude to 66% to ensure rounding when calculating `toShares` @@ -3980,7 +3886,7 @@ contract DelegationManagerUnitTests_redelegate is DelegationManagerUnitTests { // set the pausing flag cheats.prank(pauser); - delegationManager.pause(2 ** PAUSED_NEW_DELEGATION); + delegationManager.pause(2**PAUSED_NEW_DELEGATION); cheats.prank(staker); cheats.expectRevert(IPausable.CurrentlyPaused.selector); @@ -3999,7 +3905,7 @@ contract DelegationManagerUnitTests_redelegate is DelegationManagerUnitTests { // set the pausing flag cheats.prank(pauser); - delegationManager.pause(2 ** PAUSED_ENTER_WITHDRAWAL_QUEUE); + delegationManager.pause(2**PAUSED_ENTER_WITHDRAWAL_QUEUE); cheats.prank(staker); cheats.expectRevert(IPausable.CurrentlyPaused.selector); @@ -4103,10 +4009,8 @@ contract DelegationManagerUnitTests_redelegate is DelegationManagerUnitTests { cheats.stopPrank(); } - /** - * @notice Verifies that the `redelegate` function properly queues a withdrawal for all shares of the staker - * ... and delegates to a new operator - */ + /// @notice Verifies that the `redelegate` function properly queues a withdrawal for all shares of the staker + /// ... and delegates to a new operator function testFuzz_redelegate_noSlashing(Randomness r) public { uint shares = r.Uint256(1, MAX_STRATEGY_SHARES); IStrategy[] memory strategyArray = r.StrategyArray(1); @@ -4162,10 +4066,8 @@ contract DelegationManagerUnitTests_redelegate is DelegationManagerUnitTests { assertEq(stakerWithdrawableShares[0], 0, "staker withdrawable shares not calculated correctly"); } - /** - * @notice This function tests to ensure that a delegator can re-delegate to an operator after undelegating. - * Asserts the shares after re-delegating are the same as originally. No slashing is done in this test. - */ + /// @notice This function tests to ensure that a delegator can re-delegate to an operator after undelegating. + /// Asserts the shares after re-delegating are the same as originally. No slashing is done in this test. function testFuzz_undelegate_redelegateWithSharesBack(Randomness r) public rand(r) { address staker = r.Address(); address operator = r.Address(); @@ -4254,7 +4156,7 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes function test_Revert_WhenEnterQueueWithdrawalsPaused() public { cheats.prank(pauser); - delegationManager.pause(2 ** PAUSED_ENTER_WITHDRAWAL_QUEUE); + delegationManager.pause(2**PAUSED_ENTER_WITHDRAWAL_QUEUE); (QueuedWithdrawalParams[] memory queuedWithdrawalParams,,) = _setUpQueueWithdrawalsSingleStrat({staker: defaultStaker, strategy: strategyMock, depositSharesToWithdraw: 100}); cheats.expectRevert(IPausable.CurrentlyPaused.selector); @@ -4303,14 +4205,12 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes delegationManager.queueWithdrawals(queuedWithdrawalParams); } - /** - * @notice Verifies that `DelegationManager.queueWithdrawals` properly queues a withdrawal for the `withdrawer` - * from the `strategy` for the `sharesAmount`. - * - Asserts that staker is delegated to the operator - * - Asserts that shares for delegatedTo operator are decreased by `sharesAmount` - * - Asserts that staker cumulativeWithdrawalsQueued nonce is incremented - * - Checks that event was emitted with correct withdrawalRoot and withdrawal - */ + /// @notice Verifies that `DelegationManager.queueWithdrawals` properly queues a withdrawal for the `withdrawer` + /// from the `strategy` for the `sharesAmount`. + /// - Asserts that staker is delegated to the operator + /// - Asserts that shares for delegatedTo operator are decreased by `sharesAmount` + /// - Asserts that staker cumulativeWithdrawalsQueued nonce is incremented + /// - Checks that event was emitted with correct withdrawalRoot and withdrawal function testFuzz_queueWithdrawal_SingleStrat_nonSlashedOperator(Randomness r) public rand(r) { uint depositAmount = r.Uint256(1, MAX_STRATEGY_SHARES); uint withdrawalAmount = r.Uint256(1, depositAmount); @@ -4364,14 +4264,12 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes assertEq(nonceBefore + 1, nonceAfter, "staker nonce should have incremented"); } - /** - * @notice Verifies that `DelegationManager.queueWithdrawals` properly queues a withdrawal for the `withdrawer` - * from the `strategy` for the `sharesAmount`. Operator is slashed prior to the staker's deposit - * - Asserts that staker is delegated to the operator - * - Asserts that shares for delegatedTo operator are decreased by `sharesAmount` - * - Asserts that staker cumulativeWithdrawalsQueued nonce is incremented - * - Checks that event was emitted with correct withdrawalRoot and withdrawal - */ + /// @notice Verifies that `DelegationManager.queueWithdrawals` properly queues a withdrawal for the `withdrawer` + /// from the `strategy` for the `sharesAmount`. Operator is slashed prior to the staker's deposit + /// - Asserts that staker is delegated to the operator + /// - Asserts that shares for delegatedTo operator are decreased by `sharesAmount` + /// - Asserts that staker cumulativeWithdrawalsQueued nonce is incremented + /// - Checks that event was emitted with correct withdrawalRoot and withdrawal function testFuzz_queueWithdrawal_SingleStrat_preSlashedOperator(Randomness r) public rand(r) { uint depositAmount = r.Uint256(1, MAX_STRATEGY_SHARES); uint withdrawalAmount = r.Uint256(1, depositAmount); @@ -4431,14 +4329,12 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes assertEq(nonceBefore + 1, nonceAfter, "staker nonce should have incremented"); } - /** - * @notice Verifies that `DelegationManager.queueWithdrawals` properly queues a withdrawal for the `withdrawer` - * from the `strategy` for the `sharesAmount`. Operator is slashed while the staker is deposited - * - Asserts that staker is delegated to the operator - * - Asserts that shares for delegatedTo operator are decreased by `sharesAmount` - * - Asserts that staker cumulativeWithdrawalsQueued nonce is incremented - * - Checks that event was emitted with correct withdrawalRoot and withdrawal - */ + /// @notice Verifies that `DelegationManager.queueWithdrawals` properly queues a withdrawal for the `withdrawer` + /// from the `strategy` for the `sharesAmount`. Operator is slashed while the staker is deposited + /// - Asserts that staker is delegated to the operator + /// - Asserts that shares for delegatedTo operator are decreased by `sharesAmount` + /// - Asserts that staker cumulativeWithdrawalsQueued nonce is incremented + /// - Checks that event was emitted with correct withdrawalRoot and withdrawal function testFuzz_queueWithdrawal_SingleStrat_slashedWhileStaked(Randomness r) public rand(r) { uint depositAmount = r.Uint256(1, MAX_STRATEGY_SHARES); uint withdrawalAmount = r.Uint256(1, depositAmount); @@ -4481,8 +4377,11 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes uint nonceBefore = delegationManager.cumulativeWithdrawalsQueued(defaultStaker); { - (QueuedWithdrawalParams[] memory queuedWithdrawalParams, Withdrawal memory withdrawal, bytes32 withdrawalRoot) = - _setUpQueueWithdrawalsSingleStrat({staker: defaultStaker, strategy: strategyMock, depositSharesToWithdraw: withdrawalAmount}); + (QueuedWithdrawalParams[] memory queuedWithdrawalParams, Withdrawal memory withdrawal, bytes32 withdrawalRoot) = _setUpQueueWithdrawalsSingleStrat({ + staker: defaultStaker, + strategy: strategyMock, + depositSharesToWithdraw: withdrawalAmount + }); // queueWithdrawals _queueWithdrawals_expectEmit( @@ -4513,13 +4412,11 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes }); } - /** - * @notice Verifies that `DelegationManager.queueWithdrawals` queues an empty withdrawal for the `withdrawer` - * from the `strategy` for the `sharesAmount` since the Operator is slashed 100% while the staker is deposited - * - Asserts that queuing a withdrawal results in an empty withdrawal when the operator is slashed 100% - * - Asserts that staker withdrawableShares after is 0 - * - Checks that event was emitted with correct withdrawalRoot and withdrawal - */ + /// @notice Verifies that `DelegationManager.queueWithdrawals` queues an empty withdrawal for the `withdrawer` + /// from the `strategy` for the `sharesAmount` since the Operator is slashed 100% while the staker is deposited + /// - Asserts that queuing a withdrawal results in an empty withdrawal when the operator is slashed 100% + /// - Asserts that staker withdrawableShares after is 0 + /// - Checks that event was emitted with correct withdrawalRoot and withdrawal function testFuzz_queueWithdrawal_SingleStrat_slashed100PercentWhileStaked(Randomness r) public rand(r) { uint depositAmount = r.Uint256(1, MAX_STRATEGY_SHARES); @@ -4538,8 +4435,7 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes depositAmount: depositAmount }); - (QueuedWithdrawalParams[] memory queuedWithdrawalParams, Withdrawal memory withdrawal, bytes32 withdrawalRoot) = - _setUpQueueWithdrawalsSingleStrat({ + (QueuedWithdrawalParams[] memory queuedWithdrawalParams, Withdrawal memory withdrawal, bytes32 withdrawalRoot) = _setUpQueueWithdrawalsSingleStrat({ staker: defaultStaker, strategy: strategyMock, depositSharesToWithdraw: 0 // expected 0 since slashed 100% @@ -4587,16 +4483,14 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes _assertQueuedWithdrawalExists(defaultStaker, withdrawal); } - /** - * @notice Verifies that `DelegationManager.queueWithdrawals` properly queues a withdrawal for the `withdrawer` - * with multiple strategies and sharesAmounts. Operator has default WAD maxMagnitude for all strategies. - * Depending on number of strategies randomized, deposits sharesAmounts into each strategy for the staker and delegates to operator. - * For each strategy, - * - Asserts that staker is delegated to the operator - * - Asserts that the staker withdrawal is queued both with the root and actual Withdrawal struct in storage - * - Asserts that the operator shares decrease by the expected withdrawn shares - * - Checks that event was emitted with correct withdrawalRoot and withdrawal - */ + /// @notice Verifies that `DelegationManager.queueWithdrawals` properly queues a withdrawal for the `withdrawer` + /// with multiple strategies and sharesAmounts. Operator has default WAD maxMagnitude for all strategies. + /// Depending on number of strategies randomized, deposits sharesAmounts into each strategy for the staker and delegates to operator. + /// For each strategy, + /// - Asserts that staker is delegated to the operator + /// - Asserts that the staker withdrawal is queued both with the root and actual Withdrawal struct in storage + /// - Asserts that the operator shares decrease by the expected withdrawn shares + /// - Checks that event was emitted with correct withdrawalRoot and withdrawal function testFuzz_queueWithdrawal_MultipleStrats_nonSlashedOperator(Randomness r) public rand(r) { uint32 numStrategies = r.Uint32(1, 32); bool depositBeaconChainShares = r.Boolean(); @@ -4662,16 +4556,14 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes _assertQueuedWithdrawalExists(defaultStaker, withdrawal); } - /** - * @notice Verifies that `DelegationManager.queueWithdrawals` properly queues a withdrawal for the `withdrawer` - * with multiple strategies and sharesAmounts. Operator has random maxMagnitudes for each strategy. - * Depending on number of strategies randomized, deposits sharesAmounts into each strategy for the staker and delegates to operator. - * For each strategy, - * - Asserts that staker is delegated to the operator - * - Asserts that shares for delegatedTo operator are decreased by `depositAmount` - * - Asserts that staker cumulativeWithdrawalsQueued nonce is incremented - * - Checks that event was emitted with correct withdrawalRoot and withdrawal - */ + /// @notice Verifies that `DelegationManager.queueWithdrawals` properly queues a withdrawal for the `withdrawer` + /// with multiple strategies and sharesAmounts. Operator has random maxMagnitudes for each strategy. + /// Depending on number of strategies randomized, deposits sharesAmounts into each strategy for the staker and delegates to operator. + /// For each strategy, + /// - Asserts that staker is delegated to the operator + /// - Asserts that shares for delegatedTo operator are decreased by `depositAmount` + /// - Asserts that staker cumulativeWithdrawalsQueued nonce is incremented + /// - Checks that event was emitted with correct withdrawalRoot and withdrawal function testFuzz_queueWithdrawal_MultipleStrats_preSlashedOperator(Randomness r) public rand(r) { // 1. Setup // - fuzz numbers of strategies, deposit and withdraw amounts, and prev/new magnitudes for each strategy respectively @@ -4738,17 +4630,15 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes _assertQueuedWithdrawalExists(defaultStaker); } - /** - * @notice Verifies that `DelegationManager.queueWithdrawals` properly queues a withdrawal for the `withdrawer` - * with multiple strategies and sharesAmounts. Operator has random maxMagnitudes for each strategy. - * Depending on number of strategies randomized, deposits sharesAmounts into each strategy for the staker and delegates to operator. - * After depositing, the operator gets slashed for each of the strategies and has new maxMagnitudes set. - * For each strategy, - * - Asserts that staker is delegated to the operator - * - Asserts that shares for delegatedTo operator are decreased by `depositAmount` - * - Asserts that staker cumulativeWithdrawalsQueued nonce is incremented - * - Checks that event was emitted with correct withdrawalRoot and withdrawal - */ + /// @notice Verifies that `DelegationManager.queueWithdrawals` properly queues a withdrawal for the `withdrawer` + /// with multiple strategies and sharesAmounts. Operator has random maxMagnitudes for each strategy. + /// Depending on number of strategies randomized, deposits sharesAmounts into each strategy for the staker and delegates to operator. + /// After depositing, the operator gets slashed for each of the strategies and has new maxMagnitudes set. + /// For each strategy, + /// - Asserts that staker is delegated to the operator + /// - Asserts that shares for delegatedTo operator are decreased by `depositAmount` + /// - Asserts that staker cumulativeWithdrawalsQueued nonce is incremented + /// - Checks that event was emitted with correct withdrawalRoot and withdrawal function testFuzz_queueWithdrawal_MultipleStrats_slashedWhileStaked(Randomness r) public rand(r) { // 1. Setup // - fuzz numbers of strategies, deposit and withdraw amounts, and prev/new magnitudes for each strategy respectively @@ -4756,8 +4646,12 @@ contract DelegationManagerUnitTests_queueWithdrawals is DelegationManagerUnitTes IStrategy[] memory strategies = r.StrategyArray(r.Uint32(1, 32)); bool depositBeaconChainShares = r.Boolean(); if (depositBeaconChainShares) strategies[strategies.length - 1] = beaconChainETHStrategy; - (uint[] memory depositAmounts, uint[] memory withdrawalAmounts, uint64[] memory prevMaxMagnitudes, uint64[] memory newMaxMagnitudes) - = _fuzzDepositWithdrawalAmounts({r: r, numStrategies: uint32(strategies.length)}); + ( + uint[] memory depositAmounts, + uint[] memory withdrawalAmounts, + uint64[] memory prevMaxMagnitudes, + uint64[] memory newMaxMagnitudes + ) = _fuzzDepositWithdrawalAmounts({r: r, numStrategies: uint32(strategies.length)}); _registerOperatorWithBaseDetails(defaultOperator); allocationManagerMock.setMaxMagnitudes(defaultOperator, strategies, prevMaxMagnitudes); _depositIntoStrategies(defaultStaker, strategies, depositAmounts); @@ -4942,7 +4836,7 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage function test_Revert_WhenExitWithdrawalQueuePaused() public { cheats.prank(pauser); - delegationManager.pause(2 ** PAUSED_EXIT_WITHDRAWAL_QUEUE); + delegationManager.pause(2**PAUSED_EXIT_WITHDRAWAL_QUEUE); _registerOperatorWithBaseDetails(defaultOperator); ( Withdrawal memory withdrawal, @@ -5041,11 +4935,9 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage delegationManager.completeQueuedWithdrawal(withdrawal, tokens, false); } - /** - * @notice should revert if MIN_WITHDRAWAL_DELAY_BLOCKS has not passed, and if - * delegationManager.getCompletableTimestamp returns a value greater than MIN_WITHDRAWAL_DELAY_BLOCKS - * then it should revert if the validBlockNumber has not passed either. - */ + /// @notice should revert if MIN_WITHDRAWAL_DELAY_BLOCKS has not passed, and if + /// delegationManager.getCompletableTimestamp returns a value greater than MIN_WITHDRAWAL_DELAY_BLOCKS + /// then it should revert if the validBlockNumber has not passed either. function test_Revert_WhenWithdrawalDelayNotPassed(Randomness r) public rand(r) { uint32 numStrategies = r.Uint32(1, 32); bool receiveAsTokens = r.Boolean(); @@ -5114,9 +5006,7 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage assertEq(withdrawableShares[0], 0, "withdrawable shares should be 0"); } - /** - * Test completing multiple queued withdrawals for a single strategy by passing in the withdrawals - */ + /// Test completing multiple queued withdrawals for a single strategy by passing in the withdrawals function test_completeQueuedWithdrawals_MultipleWithdrawals(Randomness r) public rand(r) { address staker = r.Address(); uint depositAmount = r.Uint256(1, MAX_STRATEGY_SHARES); @@ -5162,18 +5052,16 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage ); } - /** - * @notice Verifies that `DelegationManager.completeQueuedWithdrawal` properly completes a queued withdrawal for the `withdrawer` - * for a single strategy. - * - Asserts that the withdrawalRoot is True before `completeQueuedWithdrawal` and False after - * - Asserts that event `WithdrawalCompleted` is emitted with withdrawalRoot - * if receiveAsTokens is true - * - Asserts operatorShares is unchanged after `completeQueuedWithdrawal` - * - Asserts that the staker's withdrawable shares, deposit shares, and depositScalingFactors are unchanged - * if receiveAsTokens is false - * - Asserts operatorShares is increased correctly after `completeQueuedWithdrawal` - * - Asserts that the staker's withdrawable shares, deposit shares, and depositScalingFactors are updated correctly - */ + /// @notice Verifies that `DelegationManager.completeQueuedWithdrawal` properly completes a queued withdrawal for the `withdrawer` + /// for a single strategy. + /// - Asserts that the withdrawalRoot is True before `completeQueuedWithdrawal` and False after + /// - Asserts that event `WithdrawalCompleted` is emitted with withdrawalRoot + /// if receiveAsTokens is true + /// - Asserts operatorShares is unchanged after `completeQueuedWithdrawal` + /// - Asserts that the staker's withdrawable shares, deposit shares, and depositScalingFactors are unchanged + /// if receiveAsTokens is false + /// - Asserts operatorShares is increased correctly after `completeQueuedWithdrawal` + /// - Asserts that the staker's withdrawable shares, deposit shares, and depositScalingFactors are updated correctly function test_completeQueuedWithdrawal_SingleStrat(Randomness r) public rand(r) { uint depositAmount = r.Uint256(1, MAX_STRATEGY_SHARES); uint withdrawalAmount = r.Uint256(1, depositAmount); @@ -5214,14 +5102,12 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage ); } - /** - * @notice Verifies that `DelegationManager.completeQueuedWithdrawal` properly completes a queued withdrawal for the `withdrawer` - * for a single strategy. Withdraws as tokens so there are no operator shares increase. - * - Asserts that the withdrawalRoot is True before `completeQueuedWithdrawal` and False after - * - Asserts operatorShares is decreased after the operator is slashed - * - Checks that event `WithdrawalCompleted` is emitted with withdrawalRoot - * - Asserts that the shares the staker completed withdrawal for are less than what is expected since its operator is slashed - */ + /// @notice Verifies that `DelegationManager.completeQueuedWithdrawal` properly completes a queued withdrawal for the `withdrawer` + /// for a single strategy. Withdraws as tokens so there are no operator shares increase. + /// - Asserts that the withdrawalRoot is True before `completeQueuedWithdrawal` and False after + /// - Asserts operatorShares is decreased after the operator is slashed + /// - Checks that event `WithdrawalCompleted` is emitted with withdrawalRoot + /// - Asserts that the shares the staker completed withdrawal for are less than what is expected since its operator is slashed function test_completeQueuedWithdrawal_SingleStrat_slashOperatorDuringQueue(Randomness r) public rand(r) { uint depositAmount = r.Uint256(1, MAX_STRATEGY_SHARES); uint withdrawalAmount = r.Uint256(1, depositAmount); @@ -5307,14 +5193,12 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage ); } - /** - * @notice Verifies that `DelegationManager.completeQueuedWithdrawal` properly completes a queued withdrawal for the `withdrawer` - * for the BeaconChainStrategy. Withdraws as tokens so there are no operator shares increase. - * - Asserts that the withdrawalRoot is True before `completeQueuedWithdrawal` and False after - * - Asserts operatorShares is decreased after staker is slashed - * - Checks that event `WithdrawalCompleted` is emitted with withdrawalRoot - * - Asserts that the shares the staker completed withdrawal for are less than what is expected since the staker is slashed during queue - */ + /// @notice Verifies that `DelegationManager.completeQueuedWithdrawal` properly completes a queued withdrawal for the `withdrawer` + /// for the BeaconChainStrategy. Withdraws as tokens so there are no operator shares increase. + /// - Asserts that the withdrawalRoot is True before `completeQueuedWithdrawal` and False after + /// - Asserts operatorShares is decreased after staker is slashed + /// - Checks that event `WithdrawalCompleted` is emitted with withdrawalRoot + /// - Asserts that the shares the staker completed withdrawal for are less than what is expected since the staker is slashed during queue function test_completeQueuedWithdrawal_BeaconStrat_slashStakerDuringQueue(Randomness r) public rand(r) { int depositAmount = int(r.Uint256(1, MAX_ETH_SUPPLY)); uint withdrawalAmount = r.Uint256(1, uint(depositAmount)); @@ -5331,8 +5215,7 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage _delegateToOperatorWhoAcceptsAllStakers(defaultStaker, defaultOperator); // Queue withdrawal - (QueuedWithdrawalParams[] memory queuedWithdrawalParams, Withdrawal memory withdrawal, bytes32 withdrawalRoot) = - _setUpQueueWithdrawalsSingleStrat({ + (QueuedWithdrawalParams[] memory queuedWithdrawalParams, Withdrawal memory withdrawal, bytes32 withdrawalRoot) = _setUpQueueWithdrawalsSingleStrat({ staker: defaultStaker, strategy: beaconChainETHStrategy, depositSharesToWithdraw: withdrawalAmount @@ -5402,14 +5285,12 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage ); } - /** - * @notice Verifies that `DelegationManager.completeQueuedWithdrawal` properly completes a queued withdrawal for the `withdrawer` - * for the BeaconChainStrategy. Withdraws as tokens so there are no operator shares increase. - * - Asserts that the withdrawalRoot is True before `completeQueuedWithdrawal` and False after - * - Asserts operatorShares is decreased after staker is slashed and after the operator is slashed - * - Checks that event `WithdrawalCompleted` is emitted with withdrawalRoot - * - Asserts that the shares the staker completed withdrawal for are less than what is expected since both the staker and its operator are slashed during queue - */ + /// @notice Verifies that `DelegationManager.completeQueuedWithdrawal` properly completes a queued withdrawal for the `withdrawer` + /// for the BeaconChainStrategy. Withdraws as tokens so there are no operator shares increase. + /// - Asserts that the withdrawalRoot is True before `completeQueuedWithdrawal` and False after + /// - Asserts operatorShares is decreased after staker is slashed and after the operator is slashed + /// - Checks that event `WithdrawalCompleted` is emitted with withdrawalRoot + /// - Asserts that the shares the staker completed withdrawal for are less than what is expected since both the staker and its operator are slashed during queue function test_completeQueuedWithdrawal_BeaconStratWithdrawAsTokens_slashStakerAndOperator(Randomness r) public rand(r) { int depositAmount = int(r.Uint256(1, MAX_ETH_SUPPLY)); uint withdrawalAmount = r.Uint256(1, uint(depositAmount)); @@ -5424,8 +5305,7 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage uint operatorSharesBeforeQueue = delegationManager.operatorShares(defaultOperator, beaconChainETHStrategy); // Queue withdrawal - (QueuedWithdrawalParams[] memory queuedWithdrawalParams, Withdrawal memory withdrawal, bytes32 withdrawalRoot) = - _setUpQueueWithdrawalsSingleStrat({ + (QueuedWithdrawalParams[] memory queuedWithdrawalParams, Withdrawal memory withdrawal, bytes32 withdrawalRoot) = _setUpQueueWithdrawalsSingleStrat({ staker: defaultStaker, strategy: beaconChainETHStrategy, depositSharesToWithdraw: withdrawalAmount @@ -5496,14 +5376,12 @@ contract DelegationManagerUnitTests_completeQueuedWithdrawal is DelegationManage ); } - /** - * @notice Verifies that `DelegationManager.completeQueuedWithdrawal` properly completes a queued withdrawal for the `withdrawer` - * for a single strategy. Withdraws as shares so if the withdrawer is delegated, operator shares increase. In the test case, this only - * happens if staker and withdrawer are fuzzed the same address (i.e. staker == withdrawer) - * - Asserts that the withdrawalRoot is True before `completeQueuedWithdrawal` and False after - * - Asserts if staker == withdrawer, operatorShares increase, otherwise operatorShares are unchanged - * - Checks that event `WithdrawalCompleted` is emitted with withdrawalRoot - */ + /// @notice Verifies that `DelegationManager.completeQueuedWithdrawal` properly completes a queued withdrawal for the `withdrawer` + /// for a single strategy. Withdraws as shares so if the withdrawer is delegated, operator shares increase. In the test case, this only + /// happens if staker and withdrawer are fuzzed the same address (i.e. staker == withdrawer) + /// - Asserts that the withdrawalRoot is True before `completeQueuedWithdrawal` and False after + /// - Asserts if staker == withdrawer, operatorShares increase, otherwise operatorShares are unchanged + /// - Checks that event `WithdrawalCompleted` is emitted with withdrawalRoot function testFuzz_completeQueuedWithdrawal_SingleStratWithdrawAsShares_nonSlashedOperator(Randomness r) public rand(r) { address staker = r.Address(); uint128 depositAmount = r.Uint128(); @@ -5743,9 +5621,7 @@ contract DelegationManagerUnitTests_slashingShares is DelegationManagerUnitTests delegationManager.completeQueuedWithdrawal(withdrawal, tokens, true); } - /** - * @notice Queues 5 withdrawals at different blocks. Then, warps such that the first 2 are completable. Validates the slashable shares - */ + /// @notice Queues 5 withdrawals at different blocks. Then, warps such that the first 2 are completable. Validates the slashable shares function test_slashableSharesInQueue() public { // Register operator _registerOperatorWithBaseDetails(defaultOperator); @@ -5896,11 +5772,9 @@ contract DelegationManagerUnitTests_slashingShares is DelegationManagerUnitTests // } // } - /** - * @notice Test burning shares for an operator with no queued withdrawals - * - Asserts slashable shares before and after in queue is 0 - * - Asserts operator shares are decreased by half - */ + /// @notice Test burning shares for an operator with no queued withdrawals + /// - Asserts slashable shares before and after in queue is 0 + /// - Asserts operator shares are decreased by half function testFuzz_slashOperatorShares_NoQueuedWithdrawals(Randomness r) public rand(r) { address operator = r.Address(); address staker = r.Address(); @@ -6201,19 +6075,17 @@ contract DelegationManagerUnitTests_slashingShares is DelegationManagerUnitTests // assertEq(operatorSharesAfter, operatorSharesBefore - sharesToDecrease, "operator shares should be decreased by sharesToBurn"); // } - /** - * @notice Test burning shares for an operator with slashable queued withdrawals in past MIN_WITHDRAWAL_DELAY_BLOCKS window. - * There exists multiple withdrawals that are slashable but queued with different maxMagnitudes at - * time of queuing. - * - * Test Setup: - * - staker1 deposits, queues withdrawal for some amount, - * - operator slashed 50% - * - staker 2 deposits, queues withdrawal for some amount - * - operator is then slashed another 50% - * slashed amount for staker 1 should be 75% and staker 2 should be 50% where the total - * slashed amount is the sum of both - */ + /// @notice Test burning shares for an operator with slashable queued withdrawals in past MIN_WITHDRAWAL_DELAY_BLOCKS window. + /// There exists multiple withdrawals that are slashable but queued with different maxMagnitudes at + /// time of queuing. + /// + /// Test Setup: + /// - staker1 deposits, queues withdrawal for some amount, + /// - operator slashed 50% + /// - staker 2 deposits, queues withdrawal for some amount + /// - operator is then slashed another 50% + /// slashed amount for staker 1 should be 75% and staker 2 should be 50% where the total + /// slashed amount is the sum of both function testFuzz_slashOperatorShares_MultipleWithdrawalsMultipleSlashings(Randomness r) public rand(r) { address operator = r.Address(); address staker = r.Address(); @@ -6346,11 +6218,9 @@ contract DelegationManagerUnitTests_slashingShares is DelegationManagerUnitTests } } - /** - * @notice Ensure that when a withdrawal is completable then there are no slashable shares in the queue. - * However if the withdrawal is not completable and the withdrawal delay hasn't elapsed, then the withdrawal - * should be counted as slashable. - */ + /// @notice Ensure that when a withdrawal is completable then there are no slashable shares in the queue. + /// However if the withdrawal is not completable and the withdrawal delay hasn't elapsed, then the withdrawal + /// should be counted as slashable. function testFuzz_slashOperatorShares_Timings(Randomness r) public rand(r) { // 1. Randomize operator and staker info // Operator info @@ -6516,12 +6386,10 @@ contract DelegationManagerUnitTests_slashingShares is DelegationManagerUnitTests // assertEq(operatorSharesAfter, operatorSharesBefore - sharesToDecrease, "operator shares should be decreased by sharesToDecrease"); // } - /** - * @notice This test demonstrates that the rate that withdrawable shares decrease from slashing is at LEAST - * greater than or equal to the rate that the operator shares decrease from slashing. - * We want this property otherwise undelegating/queue withdrawing all shares as a staker could lead to a underflow revert. - * Note: If the SlashingLib.calcSlashedAmount function were to round down (overslash) then this test would fail. - */ + /// @notice This test demonstrates that the rate that withdrawable shares decrease from slashing is at LEAST + /// greater than or equal to the rate that the operator shares decrease from slashing. + /// We want this property otherwise undelegating/queue withdrawing all shares as a staker could lead to a underflow revert. + /// Note: If the SlashingLib.calcSlashedAmount function were to round down (overslash) then this test would fail. function test_slashOperatorShares_slashedRepeatedly() public { uint64 initialMagnitude = 90_009; uint shares = 40_000_000_004_182_209_037_560_531_097_078_597_505; @@ -6566,11 +6434,9 @@ contract DelegationManagerUnitTests_slashingShares is DelegationManagerUnitTests } } - /** - * @notice This unit test will slash a staker's beaconChainETH strategy shares from both on EigenLayer - * and also on the beaconChain. This test ensures that the order of slashing does not matter and nets - * the same withdrawableShares for the staker whether slashing occurred on the beaconChain, or on EigenLayer first. - */ + /// @notice This unit test will slash a staker's beaconChainETH strategy shares from both on EigenLayer + /// and also on the beaconChain. This test ensures that the order of slashing does not matter and nets + /// the same withdrawableShares for the staker whether slashing occurred on the beaconChain, or on EigenLayer first. function testFuzz_beaconSlashAndAVSSlash(Randomness r) public rand(r) { uint64 initialMagnitude = r.Uint64(2, WAD); uint64 newMaxMagnitude = r.Uint64(1, initialMagnitude); @@ -6759,11 +6625,9 @@ contract DelegationManagerUnitTests_SharesUnderflowChecks is DelegationManagerUn using ArrayLib for *; using SlashingLib for *; - /** - * @notice Fuzzed tests - * Single staker with fuzzed starting shares and magnitude. - * Slash 100 magnitude and deposit 100 shares for 100 iterations. - */ + /// @notice Fuzzed tests + /// Single staker with fuzzed starting shares and magnitude. + /// Slash 100 magnitude and deposit 100 shares for 100 iterations. /// forge-config: default.fuzz.runs = 50 function testFuzz_slashDepositRepeatedly(Randomness r) public rand(r) { uint64 initMagnitude = r.Uint64(10_000, WAD); @@ -6848,11 +6712,9 @@ contract DelegationManagerUnitTests_SharesUnderflowChecks is DelegationManagerUn } } - /** - * @notice Fuzzed tests - * Single staker with fuzzed starting shares and magnitude. - * Slash 100 magnitude and fuzz deposit amount for 100 iterations. - */ + /// @notice Fuzzed tests + /// Single staker with fuzzed starting shares and magnitude. + /// Slash 100 magnitude and fuzz deposit amount for 100 iterations. /// forge-config: default.fuzz.runs = 50 function testFuzz_slashDepositRepeatedly_randDeposits(Randomness r) public rand(r) { uint64 initMagnitude = r.Uint64(10_000, WAD); @@ -6939,11 +6801,9 @@ contract DelegationManagerUnitTests_SharesUnderflowChecks is DelegationManagerUn } } - /** - * @notice Fuzzed tests - * For 500 stakers, deposit `shares` amount and delegate to the operator. After each staker delegates, - * slash 100 magnitude. - */ + /// @notice Fuzzed tests + /// For 500 stakers, deposit `shares` amount and delegate to the operator. After each staker delegates, + /// slash 100 magnitude. /// forge-config: default.fuzz.runs = 50 function testFuzz_depositMultipleStakers_slash_repeatedly(Randomness r) public rand(r) { uint64 initMagnitude = r.Uint64(50_000, WAD); @@ -7016,11 +6876,9 @@ contract DelegationManagerUnitTests_SharesUnderflowChecks is DelegationManagerUn } } - /** - * @notice Fuzzed tests - * For 500 stakers, deposit `shares` amount and delegate to the operator. After each staker delegates, - * slash 1000 magnitude. Initial magnitude is very small so this will slash larger proportions. - */ + /// @notice Fuzzed tests + /// For 500 stakers, deposit `shares` amount and delegate to the operator. After each staker delegates, + /// slash 1000 magnitude. Initial magnitude is very small so this will slash larger proportions. /// forge-config: default.fuzz.runs = 50 function testFuzz_depositMultipleStakers_slashLargeMagnitudes(Randomness r) public rand(r) { uint64 initMagnitude = r.Uint64(50_000, WAD); @@ -7093,10 +6951,8 @@ contract DelegationManagerUnitTests_SharesUnderflowChecks is DelegationManagerUn } } - /** - * @notice Same as above `testFuzz_depositMultipleStakers_slashLargeMagnitudes` test but with slashing - * 1 magnitude instead of 100. - */ + /// @notice Same as above `testFuzz_depositMultipleStakers_slashLargeMagnitudes` test but with slashing + /// 1 magnitude instead of 100. /// forge-config: default.fuzz.runs = 50 function testFuzz_depositMultipleStakers_slashSmallMagnitudes(Randomness r) public rand(r) { uint64 initMagnitude = r.Uint64(1000, WAD); @@ -7169,10 +7025,8 @@ contract DelegationManagerUnitTests_SharesUnderflowChecks is DelegationManagerUn } } - /** - * @notice Setup 500 delegated stakers who each deposit `shares` amount. - * Then slash 1 magnitude 500 times and then compare amount of shares that can be withdrawn vs operatorShares - */ + /// @notice Setup 500 delegated stakers who each deposit `shares` amount. + /// Then slash 1 magnitude 500 times and then compare amount of shares that can be withdrawn vs operatorShares /// forge-config: default.fuzz.runs = 50 function testFuzz_depositMultipleStakersOnce_slashSmallMagnitudes(Randomness r) public rand(r) { uint64 initMagnitude = r.Uint64(1000, WAD); @@ -7251,21 +7105,19 @@ contract DelegationManagerUnitTests_SharesUnderflowChecks is DelegationManagerUn contract DelegationManagerUnitTests_Rounding is DelegationManagerUnitTests {} -/** - * @notice TODO Lifecycle tests - These tests combine multiple functionalities of the DelegationManager - * 1. Old SigP test - registerAsOperator, separate staker delegate to operator, as operator undelegate (reverts), - * checks that staker is still delegated and operator still registered, staker undelegates, checks staker not delegated and operator - * is still registered - * 2. RegisterOperator, Deposit, Delegate, Queue, Complete - * 3. RegisterOperator, Mock Slash(set maxMagnitudes), Deposit/Delegate, Queue, Complete - * 4. RegisterOperator, Deposit/Delegate, Mock Slash(set maxMagnitudes), Queue, Complete - * 5. RegisterOperator, Mock Slash(set maxMagnitudes), Deposit/Delegate, Queue, Mock Slash(set maxMagnitudes), Complete - * 7. RegisterOperator, Deposit/Delegate, Mock Slash 100% (set maxMagnitudes), Undelegate, Complete non 100% slashed strategies - * 8. RegisterOperator, Deposit/Delegate, Undelegate, Re delegate to another operator, Mock Slash 100% (set maxMagnitudes), Complete as shares - * (withdrawals should have been slashed even though delegated to a new operator) - * 9. Invariant check getWithdrawableShares = sum(deposits), Multiple deposits with operator who has never been slashed - * 10. Invariant check getWithdrawableShares = sum(deposits), Multiple deposits with operator who HAS been been slashed - */ +/// @notice TODO Lifecycle tests - These tests combine multiple functionalities of the DelegationManager +/// 1. Old SigP test - registerAsOperator, separate staker delegate to operator, as operator undelegate (reverts), +/// checks that staker is still delegated and operator still registered, staker undelegates, checks staker not delegated and operator +/// is still registered +/// 2. RegisterOperator, Deposit, Delegate, Queue, Complete +/// 3. RegisterOperator, Mock Slash(set maxMagnitudes), Deposit/Delegate, Queue, Complete +/// 4. RegisterOperator, Deposit/Delegate, Mock Slash(set maxMagnitudes), Queue, Complete +/// 5. RegisterOperator, Mock Slash(set maxMagnitudes), Deposit/Delegate, Queue, Mock Slash(set maxMagnitudes), Complete +/// 7. RegisterOperator, Deposit/Delegate, Mock Slash 100% (set maxMagnitudes), Undelegate, Complete non 100% slashed strategies +/// 8. RegisterOperator, Deposit/Delegate, Undelegate, Re delegate to another operator, Mock Slash 100% (set maxMagnitudes), Complete as shares +/// (withdrawals should have been slashed even though delegated to a new operator) +/// 9. Invariant check getWithdrawableShares = sum(deposits), Multiple deposits with operator who has never been slashed +/// 10. Invariant check getWithdrawableShares = sum(deposits), Multiple deposits with operator who HAS been been slashed contract DelegationManagerUnitTests_Lifecycle is DelegationManagerUnitTests { using ArrayLib for *; @@ -7317,12 +7169,10 @@ contract DelegationManagerUnitTests_Lifecycle is DelegationManagerUnitTests { assertEq(delegationManager.operatorShares(operator, strategies[0]), 100 ether, "operator shares should be 0 after withdrawal"); } - /** - * @notice While delegated to an operator who becomes 100% slashed. When the staker undelegates and queues a withdrawal - * for all their shares which are now 0, the withdrawal should be completed with 0 shares even if they delegate to a new operator - * who has not been slashed. - * Note: This specifically tests that the completeQueuedWithdrawal is looking up the correct maxMagnitude for the operator - */ + /// @notice While delegated to an operator who becomes 100% slashed. When the staker undelegates and queues a withdrawal + /// for all their shares which are now 0, the withdrawal should be completed with 0 shares even if they delegate to a new operator + /// who has not been slashed. + /// Note: This specifically tests that the completeQueuedWithdrawal is looking up the correct maxMagnitude for the operator function testFuzz_undelegate_slashOperator100Percent_delegate_complete(Randomness r) public rand(r) { uint shares = r.Uint256(1, MAX_STRATEGY_SHARES); address newOperator = r.Address(); @@ -7576,14 +7426,20 @@ contract DelegationManagerUnitTests_getQueuedWithdrawals is DelegationManagerUni assertApproxEqAbs(afterSlash, newStakerShares, 1, "bad operator shares after slash"); // Queue withdrawals. - (QueuedWithdrawalParams[] memory queuedWithdrawalParams0, Withdrawal memory withdrawal0, bytes32 withdrawalRoot0) = - _setUpQueueWithdrawalsSingleStrat({staker: defaultStaker, strategy: strategyMock, depositSharesToWithdraw: totalDepositShares / 2}); + (QueuedWithdrawalParams[] memory queuedWithdrawalParams0, Withdrawal memory withdrawal0, bytes32 withdrawalRoot0) = _setUpQueueWithdrawalsSingleStrat({ + staker: defaultStaker, + strategy: strategyMock, + depositSharesToWithdraw: totalDepositShares / 2 + }); cheats.prank(defaultStaker); delegationManager.queueWithdrawals(queuedWithdrawalParams0); - (QueuedWithdrawalParams[] memory queuedWithdrawalParams1, Withdrawal memory withdrawal1, bytes32 withdrawalRoot1) = - _setUpQueueWithdrawalsSingleStrat({staker: defaultStaker, strategy: strategyMock, depositSharesToWithdraw: totalDepositShares / 2}); + (QueuedWithdrawalParams[] memory queuedWithdrawalParams1, Withdrawal memory withdrawal1, bytes32 withdrawalRoot1) = _setUpQueueWithdrawalsSingleStrat({ + staker: defaultStaker, + strategy: strategyMock, + depositSharesToWithdraw: totalDepositShares / 2 + }); cheats.prank(defaultStaker); delegationManager.queueWithdrawals(queuedWithdrawalParams1); @@ -7605,12 +7461,10 @@ contract DelegationManagerUnitTests_getQueuedWithdrawals is DelegationManagerUni assertEq(_withdrawalRoot(withdrawal1), withdrawalRoot1, "_withdrawalRoot(withdrawal1) != withdrawalRoot1"); } - /** - * @notice Assert that the shares returned in the view function `getQueuedWithdrawals` are unaffected from a - * slash that occurs after the withdrawal is completed. Also assert that completing the withdrawal matches the - * expected withdrawn shares from the view function. - * Slashing on the completableBlock of the withdrawal should have no affect on the withdrawn shares. - */ + /// @notice Assert that the shares returned in the view function `getQueuedWithdrawals` are unaffected from a + /// slash that occurs after the withdrawal is completed. Also assert that completing the withdrawal matches the + /// expected withdrawn shares from the view function. + /// Slashing on the completableBlock of the withdrawal should have no affect on the withdrawn shares. function test_getQueuedWithdrawals_SlashAfterWithdrawalCompletion(Randomness r) public rand(r) { uint depositAmount = r.Uint256(1, MAX_STRATEGY_SHARES); diff --git a/src/test/unit/ECDSACertificateVerifierUnit.t.sol b/src/test/unit/ECDSACertificateVerifierUnit.t.sol index 51debb5b46..9b238f602b 100644 --- a/src/test/unit/ECDSACertificateVerifierUnit.t.sol +++ b/src/test/unit/ECDSACertificateVerifierUnit.t.sol @@ -12,10 +12,8 @@ import "src/contracts/interfaces/ICrossChainRegistry.sol"; import "src/test/utils/EigenLayerMultichainUnitTestSetup.sol"; import "src/test/utils/Random.sol"; -/** - * @title ECDSACertificateVerifierUnitTests - * @notice Base contract for all ECDSACertificateVerifier unit tests - */ +/// @title ECDSACertificateVerifierUnitTests +/// @notice Base contract for all ECDSACertificateVerifier unit tests contract ECDSACertificateVerifierUnitTests is EigenLayerMultichainUnitTestSetup, IECDSACertificateVerifierErrors, @@ -60,14 +58,12 @@ contract ECDSACertificateVerifierUnitTests is // Helper functions - /** - * @notice Generate signer and non-signer private keys - * @param pseudoRandomNumber Pseudo random number for generating keys - * @param numSigners Number of signers to generate - * @param numNonSigners Number of non-signers to generate - * @return signerPrivKeys Array of signer private keys - * @return nonSignerPrivKeys Array of non-signer private keys - */ + /// @notice Generate signer and non-signer private keys + /// @param pseudoRandomNumber Pseudo random number for generating keys + /// @param numSigners Number of signers to generate + /// @param numNonSigners Number of non-signers to generate + /// @return signerPrivKeys Array of signer private keys + /// @return nonSignerPrivKeys Array of non-signer private keys function _generateSignerAndNonSignerPrivateKeys(uint pseudoRandomNumber, uint numSigners, uint numNonSigners) internal pure @@ -89,15 +85,13 @@ contract ECDSACertificateVerifierUnitTests is } } - /** - * @notice Create operators with split keys - * @param pseudoRandomNumber Pseudo random number for generating operator data - * @param numSigners Number of signers - * @param numNonSigners Number of non-signers - * @return operators Array of operator infos - * @return nonSignerIndices Array of non-signer indices - * @return signerPrivKeys Array of signer private keys - */ + /// @notice Create operators with split keys + /// @param pseudoRandomNumber Pseudo random number for generating operator data + /// @param numSigners Number of signers + /// @param numNonSigners Number of non-signers + /// @return operators Array of operator infos + /// @return nonSignerIndices Array of non-signer indices + /// @return signerPrivKeys Array of signer private keys function _createOperatorsWithSplitKeys(uint pseudoRandomNumber, uint numSigners, uint numNonSigners) internal view @@ -138,15 +132,13 @@ contract ECDSACertificateVerifierUnitTests is } } - /** - * @notice Create a certificate with ECDSA signatures - * @param referenceTimestamp Reference timestamp for the certificate - * @param messageHash Message hash to sign - * @param nonSignerIndices Array of non-signer indices - * @param operators Array of operator infos - * @param signerPrivKeys Array of signer private keys - * @return cert The created certificate - */ + /// @notice Create a certificate with ECDSA signatures + /// @param referenceTimestamp Reference timestamp for the certificate + /// @param messageHash Message hash to sign + /// @param nonSignerIndices Array of non-signer indices + /// @param operators Array of operator infos + /// @param signerPrivKeys Array of signer private keys + /// @return cert The created certificate function _createCertificate( uint32 referenceTimestamp, bytes32 messageHash, @@ -198,17 +190,15 @@ contract ECDSACertificateVerifierUnitTests is }); } - /** - * @notice Update operator table with randomness - * @param r Randomness for generating operator data - * @param numSigners Number of signers - * @param numNonSigners Number of non-signers - * @return operators Array of operator infos - * @return operatorSetConfig Operator set configuration - * @return referenceTimestamp Reference timestamp - * @return nonSignerIndices Array of non-signer indices - * @return signerPrivKeys Array of signer private keys - */ + /// @notice Update operator table with randomness + /// @param r Randomness for generating operator data + /// @param numSigners Number of signers + /// @param numNonSigners Number of non-signers + /// @return operators Array of operator infos + /// @return operatorSetConfig Operator set configuration + /// @return referenceTimestamp Reference timestamp + /// @return nonSignerIndices Array of non-signer indices + /// @return signerPrivKeys Array of signer private keys function _updateOperatorTable(Randomness r, uint numSigners, uint numNonSigners) internal returns ( @@ -232,10 +222,8 @@ contract ECDSACertificateVerifierUnitTests is verifier.updateOperatorTable(defaultOperatorSet, referenceTimestamp, operators, operatorSetConfig); } - /** - * @notice Initialize operator table for basic tests - * @return referenceTimestamp The reference timestamp used - */ + /// @notice Initialize operator table for basic tests + /// @return referenceTimestamp The reference timestamp used function _initializeOperatorTableBase() internal returns (uint32 referenceTimestamp) { referenceTimestamp = uint32(block.timestamp); (IECDSACertificateVerifierTypes.ECDSAOperatorInfo[] memory operators,,) = _createOperatorsWithSplitKeys(123, numOperators, 0); @@ -245,10 +233,8 @@ contract ECDSACertificateVerifierUnitTests is } } -/** - * @title ECDSACertificateVerifierUnitTests_updateOperatorTable - * @notice Unit tests for ECDSACertificateVerifier.updateOperatorTable - */ +/// @title ECDSACertificateVerifierUnitTests_updateOperatorTable +/// @notice Unit tests for ECDSACertificateVerifier.updateOperatorTable contract ECDSACertificateVerifierUnitTests_updateOperatorTable is ECDSACertificateVerifierUnitTests { function test_revert_notTableUpdater() public { // Empty data @@ -350,10 +336,8 @@ contract ECDSACertificateVerifierUnitTests_updateOperatorTable is ECDSACertifica } } -/** - * @title ECDSACertificateVerifierUnitTests_verifyCertificate - * @notice Unit tests for ECDSACertificateVerifier.verifyCertificate - */ +/// @title ECDSACertificateVerifierUnitTests_verifyCertificate +/// @notice Unit tests for ECDSACertificateVerifier.verifyCertificate contract ECDSACertificateVerifierUnitTests_verifyCertificate is ECDSACertificateVerifierUnitTests { function test_revert_certificateStale() public { uint32 referenceTimestamp = _initializeOperatorTableBase(); @@ -883,10 +867,8 @@ contract ECDSACertificateVerifierUnitTests_verifyCertificate is ECDSACertificate } } -/** - * @title ECDSACertificateVerifierUnitTests_verifyCertificateProportion - * @notice Unit tests for ECDSACertificateVerifier.verifyCertificateProportion - */ +/// @title ECDSACertificateVerifierUnitTests_verifyCertificateProportion +/// @notice Unit tests for ECDSACertificateVerifier.verifyCertificateProportion contract ECDSACertificateVerifierUnitTests_verifyCertificateProportion is ECDSACertificateVerifierUnitTests { function testFuzz_revert_arrayLengthMismatch(Randomness r) public rand(r) { // Update operator table @@ -1012,10 +994,8 @@ contract ECDSACertificateVerifierUnitTests_verifyCertificateProportion is ECDSAC } } -/** - * @title ECDSACertificateVerifierUnitTests_verifyCertificateNominal - * @notice Unit tests for ECDSACertificateVerifier.verifyCertificateNominal - */ +/// @title ECDSACertificateVerifierUnitTests_verifyCertificateNominal +/// @notice Unit tests for ECDSACertificateVerifier.verifyCertificateNominal contract ECDSACertificateVerifierUnitTests_verifyCertificateNominal is ECDSACertificateVerifierUnitTests { function testFuzz_revert_arrayLengthMismatch(Randomness r) public rand(r) { // Update operator table @@ -1130,10 +1110,8 @@ contract ECDSACertificateVerifierUnitTests_verifyCertificateNominal is ECDSACert } } -/** - * @title ECDSACertificateVerifierUnitTests_ViewFunctions - * @notice Unit tests for ECDSACertificateVerifier view functions - */ +/// @title ECDSACertificateVerifierUnitTests_ViewFunctions +/// @notice Unit tests for ECDSACertificateVerifier view functions contract ECDSACertificateVerifierUnitTests_ViewFunctions is ECDSACertificateVerifierUnitTests { uint32 referenceTimestamp; diff --git a/src/test/unit/EigenPodManagerUnit.t.sol b/src/test/unit/EigenPodManagerUnit.t.sol index 950a4cde5e..a17501741f 100644 --- a/src/test/unit/EigenPodManagerUnit.t.sol +++ b/src/test/unit/EigenPodManagerUnit.t.sol @@ -49,7 +49,11 @@ contract EigenPodManagerUnitTests is EigenLayerUnitTestSetup, IEigenPodManagerEv new TransparentUpgradeableProxy( address(eigenPodManagerImplementation), address(eigenLayerProxyAdmin), - abi.encodeWithSelector(EigenPodManager.initialize.selector, initialOwner, 0 /*initialPausedStatus*/ ) + abi.encodeWithSelector( + EigenPodManager.initialize.selector, + initialOwner, + 0 /*initialPausedStatus*/ + ) ) ) ); @@ -62,11 +66,9 @@ contract EigenPodManagerUnitTests is EigenLayerUnitTestSetup, IEigenPodManagerEv isExcludedFuzzAddress[address(eigenPodManager)] = true; } - /** - * - * Helper Functions/Modifiers - * - */ + /// + /// Helper Functions/Modifiers + /// function _initializePodWithShares(address podOwner, int shares) internal { // Deploy pod _deployAndReturnEigenPodForStaker(podOwner); @@ -98,11 +100,9 @@ contract EigenPodManagerUnitTests is EigenLayerUnitTestSetup, IEigenPodManagerEv } contract EigenPodManagerUnitTests_Initialization_Setters is EigenPodManagerUnitTests { - /** - * - * Initialization Tests - * - */ + /// + /// Initialization Tests + /// function test_initialization() public view { // Check max pods, beacon chain, owner, and pauser assertEq(eigenPodManager.owner(), initialOwner, "Initialization: owner incorrect"); @@ -119,7 +119,10 @@ contract EigenPodManagerUnitTests_Initialization_Setters is EigenPodManagerUnitT function test_initialize_revert_alreadyInitialized() public { cheats.expectRevert("Initializable: contract is already initialized"); - eigenPodManager.initialize(initialOwner, 0 /*initialPausedStatus*/ ); + eigenPodManager.initialize( + initialOwner, + 0 /*initialPausedStatus*/ + ); } } @@ -238,11 +241,9 @@ contract EigenPodManagerUnitTests_ShareUpdateTests is EigenPodManagerUnitTests { eigenLayerProxyAdmin.upgrade(ITransparentUpgradeableProxy(payable(address(eigenPodManager))), address(eigenPodManagerWrapper)); } - /** - * - * Add Shares Tests - * - */ + /// + /// Add Shares Tests + /// function testFuzz_addShares_revert_notDelegationManager(address notDelegationManager) public filterFuzzedAddressInputs(notDelegationManager) @@ -316,11 +317,9 @@ contract EigenPodManagerUnitTests_ShareUpdateTests is EigenPodManagerUnitTests { else assertEq(addedShares, 0); } - /** - * - * Remove Shares Tests - * - */ + /// + /// Remove Shares Tests + /// function testFuzz_removeDepositShares_revert_notDelegationManager(address notDelegationManager) public filterFuzzedAddressInputs(notDelegationManager) @@ -427,11 +426,9 @@ contract EigenPodManagerUnitTests_WithdrawSharesAsTokensTests is EigenPodManager new EigenPodManagerWrapper(ethPOSMock, eigenPodBeacon, IDelegationManager(address(delegationManagerMock)), pauserRegistry); eigenLayerProxyAdmin.upgrade(ITransparentUpgradeableProxy(payable(address(eigenPodManager))), address(eigenPodManagerWrapper)); } - /** - * - * WithdrawSharesAsTokens Tests - * - */ + /// + /// WithdrawSharesAsTokens Tests + /// function test_withdrawSharesAsTokens_revert_invalidStrategy() public { cheats.prank(address(delegationManagerMock)); @@ -452,10 +449,8 @@ contract EigenPodManagerUnitTests_WithdrawSharesAsTokensTests is EigenPodManager eigenPodManager.withdrawSharesAsTokens(defaultStaker, beaconChainETHStrategy, IERC20(address(0)), uint(shares)); } - /** - * @notice The `withdrawSharesAsTokens` is called in the `completeQueuedWithdrawal` function from the - * delegationManager. When a withdrawal is queued in the delegationManager, `removeDepositShares is called` - */ + /// @notice The `withdrawSharesAsTokens` is called in the `completeQueuedWithdrawal` function from the + /// delegationManager. When a withdrawal is queued in the delegationManager, `removeDepositShares is called` function test_withdrawSharesAsTokens_m2NegativeShares_reduceEntireDeficit() public { // Shares to initialize & withdraw int sharesBeginning = -100e18; diff --git a/src/test/unit/EigenPodUnit.t.sol b/src/test/unit/EigenPodUnit.t.sol index 346b8549b0..462f965790 100644 --- a/src/test/unit/EigenPodUnit.t.sol +++ b/src/test/unit/EigenPodUnit.t.sol @@ -66,14 +66,12 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, // Deploy Proxy same way as EigenPodManager does eigenPod = EigenPod( - payable( - Create2.deploy( + payable(Create2.deploy( 0, bytes32(uint(uint160(address(this)))), // set the beacon address to the eigenPodBeacon abi.encodePacked(beaconProxyBytecode, abi.encode(eigenPodBeacon, "")) - ) - ) + )) ); // Store the eigenPodBeacon address in the eigenPod beacon proxy @@ -87,11 +85,9 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, eigenPod.setProofSubmitter(defaultProofSubmitter); } - /** - * - * EIGENPOD Helpers - * - */ + /// + /// EIGENPOD Helpers + /// modifier timewarp() { uint curState = timeMachine.travelToLast(); _; @@ -143,11 +139,9 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, return sha256(abi.encodePacked(pubkey, bytes16(0))); } - /** - * - * verifyWithdrawalCredentials Assertions - * - */ + /// + /// verifyWithdrawalCredentials Assertions + /// function assert_Snap_Added_ActiveValidatorCount(EigenPodUser staker, uint addedValidators, string memory err) internal { uint curActiveValidatorCount = _getActiveValidatorCount(staker); uint prevActiveValidatorCount = _getPrevActiveValidatorCount(staker); @@ -225,11 +219,9 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, return _getValidatorStatuses(staker, pubkeyHashes); } - /** - * - * startCheckpoint Assertions - * - */ + /// + /// startCheckpoint Assertions + /// function check_StartCheckpoint_State(EigenPodUser staker) internal { assert_ProofsRemainingEqualsActive(staker, "checkpoint proofs remaining should equal active validator count"); assert_Snap_Created_Checkpoint(staker, "staker should have created a new checkpoint"); @@ -257,11 +249,9 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, return _getCheckpointTimestamp(staker); } - /** - * - * verifyCheckpointProofs - * - */ + /// + /// verifyCheckpointProofs + /// /// @notice assumes positive rewards and that the checkpoint will be finalized function _expectEventsVerifyCheckpointProofs( @@ -365,12 +355,9 @@ contract EigenPodUnitTests_Initialization is EigenPodUnitTests { } contract EigenPodUnitTests_EPMFunctions is EigenPodUnitTests { - /** - * - * stake() tests - * - */ - + /// + /// stake() tests + /// // Beacon chain staking constnats bytes public constant pubkey = hex"88347ed1c492eedc97fc8c506a35d44d81f27a0c7a1c661b35913cfd15256c0cccbd34a83341f505c7de2983292f2cab"; bytes public signature; @@ -409,11 +396,9 @@ contract EigenPodUnitTests_EPMFunctions is EigenPodUnitTests { assertEq(address(ethPOSDepositMock).balance, 32 ether, "Incorrect amount transferred"); } - /** - * - * withdrawRestakedBeaconChainETH() tests - * - */ + /// + /// withdrawRestakedBeaconChainETH() tests + /// function testFuzz_withdrawRestakedBeaconChainETH_revert_notEigenPodManager(address invalidCaller, address recipient, uint randAmount) public filterFuzzedAddressInputs(invalidCaller) @@ -522,11 +507,9 @@ contract EigenPodUnitTests_EPMFunctions is EigenPodUnitTests { } contract EigenPodUnitTests_recoverTokens is EigenPodUnitTests { - /** - * - * recoverTokens() tests - * - */ + /// + /// recoverTokens() tests + /// function testFuzz_recoverTokens_revert_notPodOwner(address invalidCaller) public { (EigenPodUser staker,) = _newEigenPodStaker({rand: 0}); EigenPod pod = staker.pod(); @@ -604,12 +587,9 @@ contract EigenPodUnitTests_recoverTokens is EigenPodUnitTests { } contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, ProofParsing { - /** - * - * verifyWithdrawalCredentials() tests - * - */ - + /// + /// verifyWithdrawalCredentials() tests + /// /// @notice revert when verify wc is not called by pod owner function testFuzz_revert_callerIsNotPodOwnerOrProofSubmitter(address invalidCaller) public { (EigenPodUser staker,) = _newEigenPodStaker({rand: 0}); @@ -639,7 +619,7 @@ contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, Pro (uint40[] memory validators,,) = staker.startValidators(); cheats.prank(pauser); - eigenPodManagerMock.pause(2 ** PAUSED_EIGENPODS_VERIFY_CREDENTIALS); + eigenPodManagerMock.pause(2**PAUSED_EIGENPODS_VERIFY_CREDENTIALS); cheats.expectRevert(IEigenPodErrors.CurrentlyPaused.selector); staker.verifyWithdrawalCredentials(validators); @@ -944,7 +924,9 @@ contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, Pro emit ValidatorRestaked(beaconChain.pubkeyHash(validators[i])); cheats.expectEmit(true, true, true, true, address(pod)); emit ValidatorBalanceUpdated( - beaconChain.pubkeyHash(validators[i]), pod.lastCheckpointTimestamp(), beaconChain.effectiveBalance(validators[i]) + beaconChain.pubkeyHash(validators[i]), + pod.lastCheckpointTimestamp(), + beaconChain.effectiveBalance(validators[i]) ); } // staker.verifyWithdrawalCredentials(validators); @@ -976,12 +958,9 @@ contract EigenPodUnitTests_verifyWithdrawalCredentials is EigenPodUnitTests, Pro } contract EigenPodUnitTests_startCheckpoint is EigenPodUnitTests { - /** - * - * startCheckpoint() tests - * - */ - + /// + /// startCheckpoint() tests + /// /// @notice revert when startCheckpoint is not called by pod owner function testFuzz_revert_callerIsNotPodOwnerOrProofSubmitter(uint rand, address invalidCaller) public { (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); @@ -1005,7 +984,7 @@ contract EigenPodUnitTests_startCheckpoint is EigenPodUnitTests { staker.startValidators(); cheats.prank(pauser); - eigenPodManagerMock.pause(2 ** PAUSED_START_CHECKPOINT); + eigenPodManagerMock.pause(2**PAUSED_START_CHECKPOINT); cheats.expectRevert(IEigenPodErrors.CurrentlyPaused.selector); staker.startCheckpoint(); @@ -1086,12 +1065,9 @@ contract EigenPodUnitTests_startCheckpoint is EigenPodUnitTests { } contract EigenPodUnitTests_verifyCheckpointProofs is EigenPodUnitTests { - /** - * - * verifyCheckpointProofs() tests - * - */ - + /// + /// verifyCheckpointProofs() tests + /// /// @notice test verifyCheckpointProofs reverts when paused function testFuzz_revert_verifyCheckpointProofsPaused(uint rand) public { (EigenPodUser staker,) = _newEigenPodStaker({rand: rand}); @@ -1100,7 +1076,7 @@ contract EigenPodUnitTests_verifyCheckpointProofs is EigenPodUnitTests { CheckpointProofs memory proofs = beaconChain.getCheckpointProofs(validators, pod.currentCheckpointTimestamp()); cheats.prank(pauser); - eigenPodManagerMock.pause(2 ** PAUSED_EIGENPODS_VERIFY_CHECKPOINT_PROOFS); + eigenPodManagerMock.pause(2**PAUSED_EIGENPODS_VERIFY_CHECKPOINT_PROOFS); cheats.expectRevert(IEigenPodErrors.CurrentlyPaused.selector); pod.verifyCheckpointProofs({balanceContainerProof: proofs.balanceContainerProof, proofs: proofs.balanceProofs}); } @@ -1389,7 +1365,7 @@ contract EigenPodUnitTests_verifyStaleBalance is EigenPodUnitTests { StaleBalanceProofs memory proofs = beaconChain.getStaleBalanceProofs(validators[0]); cheats.prank(pauser); - eigenPodManagerMock.pause(2 ** PAUSED_VERIFY_STALE_BALANCE); + eigenPodManagerMock.pause(2**PAUSED_VERIFY_STALE_BALANCE); cheats.expectRevert(IEigenPodErrors.CurrentlyPaused.selector); pod.verifyStaleBalance({ beaconTimestamp: proofs.beaconTimestamp, @@ -1406,7 +1382,7 @@ contract EigenPodUnitTests_verifyStaleBalance is EigenPodUnitTests { StaleBalanceProofs memory proofs = beaconChain.getStaleBalanceProofs(validators[0]); cheats.prank(pauser); - eigenPodManagerMock.pause(2 ** PAUSED_START_CHECKPOINT); + eigenPodManagerMock.pause(2**PAUSED_START_CHECKPOINT); cheats.expectRevert(IEigenPodErrors.CurrentlyPaused.selector); pod.verifyStaleBalance({ beaconTimestamp: proofs.beaconTimestamp, @@ -1752,7 +1728,7 @@ contract EigenPodUnitTests_PectraFeatures is EigenPodUnitTests { address podOwner = pod.podOwner(); cheats.startPrank(pauser); - uint pauseStatus = (2 ** PAUSED_CONSOLIDATIONS) + (2 ** PAUSED_WITHDRAWAL_REQUESTS); + uint pauseStatus = (2**PAUSED_CONSOLIDATIONS) + (2**PAUSED_WITHDRAWAL_REQUESTS); eigenPodManagerMock.pause(pauseStatus); cheats.stopPrank(); diff --git a/src/test/unit/KeyRegistrarUnit.t.sol b/src/test/unit/KeyRegistrarUnit.t.sol index 527defea21..7383d41efb 100644 --- a/src/test/unit/KeyRegistrarUnit.t.sol +++ b/src/test/unit/KeyRegistrarUnit.t.sol @@ -14,12 +14,7 @@ import "src/test/utils/EigenLayerMultichainUnitTestSetup.sol"; import "src/contracts/libraries/OperatorSetLib.sol"; import "src/contracts/interfaces/ISignatureUtilsMixin.sol"; -contract KeyRegistrarUnitTests is - EigenLayerMultichainUnitTestSetup, - IKeyRegistrarErrors, - IKeyRegistrarEvents, - ISignatureUtilsMixinErrors -{ +contract KeyRegistrarUnitTests is EigenLayerMultichainUnitTestSetup, IKeyRegistrarErrors, IKeyRegistrarEvents, ISignatureUtilsMixinErrors { using BN254 for BN254.G1Point; // Test accounts @@ -111,10 +106,8 @@ contract KeyRegistrarUnitTests is } } -/** - * @title KeyRegistrarUnitTests_configureOperatorSet - * @notice Unit tests for KeyRegistrar.configureOperatorSet - */ +/// @title KeyRegistrarUnitTests_configureOperatorSet +/// @notice Unit tests for KeyRegistrar.configureOperatorSet contract KeyRegistrarUnitTests_configureOperatorSet is KeyRegistrarUnitTests { function test_revert_unauthorized() public { OperatorSet memory operatorSet = _createOperatorSet(avs1, DEFAULT_OPERATOR_SET_ID); @@ -188,10 +181,8 @@ contract KeyRegistrarUnitTests_configureOperatorSet is KeyRegistrarUnitTests { } } -/** - * @title KeyRegistrarUnitTests_registerKey_ECDSA - * @notice Unit tests for KeyRegistrar.registerKey with ECDSA keys - */ +/// @title KeyRegistrarUnitTests_registerKey_ECDSA +/// @notice Unit tests for KeyRegistrar.registerKey with ECDSA keys contract KeyRegistrarUnitTests_registerKey_ECDSA is KeyRegistrarUnitTests { function test_revert_invalidFormat() public { OperatorSet memory operatorSet = _createOperatorSet(avs1, DEFAULT_OPERATOR_SET_ID); @@ -373,10 +364,8 @@ contract KeyRegistrarUnitTests_registerKey_ECDSA is KeyRegistrarUnitTests { } } -/** - * @title KeyRegistrarUnitTests_registerKey_BN254 - * @notice Unit tests for KeyRegistrar.registerKey with BN254 keys - */ +/// @title KeyRegistrarUnitTests_registerKey_BN254 +/// @notice Unit tests for KeyRegistrar.registerKey with BN254 keys contract KeyRegistrarUnitTests_registerKey_BN254 is KeyRegistrarUnitTests { function test_revert_zeroPubkey() public { OperatorSet memory operatorSet = _createOperatorSet(avs1, DEFAULT_OPERATOR_SET_ID); @@ -606,10 +595,8 @@ contract KeyRegistrarUnitTests_registerKey_BN254 is KeyRegistrarUnitTests { } } -/** - * @title KeyRegistrarUnitTests_deregisterKey - * @notice Unit tests for KeyRegistrar.deregisterKey - */ +/// @title KeyRegistrarUnitTests_deregisterKey +/// @notice Unit tests for KeyRegistrar.deregisterKey contract KeyRegistrarUnitTests_deregisterKey is KeyRegistrarUnitTests { function test_revert_keyNotFound() public { OperatorSet memory operatorSet = _createOperatorSet(avs1, DEFAULT_OPERATOR_SET_ID); @@ -705,10 +692,8 @@ contract KeyRegistrarUnitTests_deregisterKey is KeyRegistrarUnitTests { } } -/** - * @title KeyRegistrarUnitTests_ViewFunctions - * @notice Unit tests for KeyRegistrar view functions - */ +/// @title KeyRegistrarUnitTests_ViewFunctions +/// @notice Unit tests for KeyRegistrar view functions contract KeyRegistrarUnitTests_ViewFunctions is KeyRegistrarUnitTests { function test_getKeyHash_unregisteredOperator() public { OperatorSet memory operatorSet = _createOperatorSet(avs1, DEFAULT_OPERATOR_SET_ID); @@ -983,10 +968,8 @@ contract KeyRegistrarUnitTests_ViewFunctions is KeyRegistrarUnitTests { } } -/** - * @title KeyRegistrarUnitTests_MultipleOperatorSets - * @notice Unit tests for KeyRegistrar with multiple operator sets - */ +/// @title KeyRegistrarUnitTests_MultipleOperatorSets +/// @notice Unit tests for KeyRegistrar with multiple operator sets contract KeyRegistrarUnitTests_MultipleOperatorSets is KeyRegistrarUnitTests { function test_multipleOperatorSets_differentKeyTypes() public { uint32 ecdsaSetId = 0; @@ -1056,10 +1039,8 @@ contract KeyRegistrarUnitTests_MultipleOperatorSets is KeyRegistrarUnitTests { } } -/** - * @title KeyRegistrarUnitTests_GlobalKeyPersistence - * @notice Unit tests for global key persistence in KeyRegistrar - */ +/// @title KeyRegistrarUnitTests_GlobalKeyPersistence +/// @notice Unit tests for global key persistence in KeyRegistrar contract KeyRegistrarUnitTests_GlobalKeyPersistence is KeyRegistrarUnitTests { function test_globalKeyPersistence_ECDSA() public { OperatorSet memory operatorSet1 = _createOperatorSet(avs1, DEFAULT_OPERATOR_SET_ID); @@ -1130,10 +1111,8 @@ contract KeyRegistrarUnitTests_GlobalKeyPersistence is KeyRegistrarUnitTests { } } -/** - * @title KeyRegistrarUnitTests_rotateKey - * @notice Unit tests for KeyRegistrar.rotateKey - */ +/// @title KeyRegistrarUnitTests_rotateKey +/// @notice Unit tests for KeyRegistrar.rotateKey contract KeyRegistrarUnitTests_rotateKey is KeyRegistrarUnitTests { function test_rotateKey_ECDSA_success() public { OperatorSet memory operatorSet = _createOperatorSet(avs1, DEFAULT_OPERATOR_SET_ID); @@ -1439,10 +1418,8 @@ contract KeyRegistrarUnitTests_rotateKey is KeyRegistrarUnitTests { } } -/** - * @title KeyRegistrarUnitTests_RotationScheduling - * @notice Additional unit tests covering scheduled rotation features - */ +/// @title KeyRegistrarUnitTests_RotationScheduling +/// @notice Additional unit tests covering scheduled rotation features contract KeyRegistrarUnitTests_RotationScheduling is KeyRegistrarUnitTests { function test_rotateKey_revert_rotationDisabled_byDefault() public { OperatorSet memory operatorSet = _createOperatorSet(avs1, DEFAULT_OPERATOR_SET_ID); @@ -1652,10 +1629,8 @@ contract KeyRegistrarUnitTests_RotationScheduling is KeyRegistrarUnitTests { } } -/** - * @title KeyRegistrarUnitTests_CrossCurveInteraction - * @notice Unit tests for cross-curve type interactions in KeyRegistrar - */ +/// @title KeyRegistrarUnitTests_CrossCurveInteraction +/// @notice Unit tests for cross-curve type interactions in KeyRegistrar contract KeyRegistrarUnitTests_CrossCurveInteraction is KeyRegistrarUnitTests { function test_crossCurveGlobalUniqueness() public { // Configure ECDSA and BN254 operator sets @@ -1686,10 +1661,8 @@ contract KeyRegistrarUnitTests_CrossCurveInteraction is KeyRegistrarUnitTests { } } -/** - * @title KeyRegistrarUnitTests_SignatureVerification - * @notice Unit tests for signature verification in KeyRegistrar - */ +/// @title KeyRegistrarUnitTests_SignatureVerification +/// @notice Unit tests for signature verification in KeyRegistrar contract KeyRegistrarUnitTests_SignatureVerification is KeyRegistrarUnitTests { using BN254 for BN254.G1Point; diff --git a/src/test/unit/OperatorTableUpdaterUnit.t.sol b/src/test/unit/OperatorTableUpdaterUnit.t.sol index 02fc962e8d..c372c3de94 100644 --- a/src/test/unit/OperatorTableUpdaterUnit.t.sol +++ b/src/test/unit/OperatorTableUpdaterUnit.t.sol @@ -122,7 +122,7 @@ contract OperatorTableUpdaterUnitTests is function _createGlobalTableRoot(Randomness r, bytes32 operatorSetLeafHash) internal returns (bytes32, uint32, bytes32[] memory) { // Generate a random power of 2 between 2 and 2^16 uint exponent = r.Uint256(1, 16); - uint numLeaves = 2 ** exponent; + uint numLeaves = 2**exponent; // Create leaves array with the specified size bytes32[] memory leaves = new bytes32[](numLeaves); @@ -148,7 +148,7 @@ contract OperatorTableUpdaterUnitTests is { // Generate a random power of 2 between the number of operatorSetLeafHashes and 2^16 uint exponent = r.Uint256(operatorSetLeafHashes.length, 16); - uint numLeaves = 2 ** exponent; + uint numLeaves = 2**exponent; // Create leaves array with the specified size bytes32[] memory leaves = new bytes32[](numLeaves); diff --git a/src/test/unit/PausableUnit.t.sol b/src/test/unit/PausableUnit.t.sol index 403a6d2754..cd1c3189ba 100644 --- a/src/test/unit/PausableUnit.t.sol +++ b/src/test/unit/PausableUnit.t.sol @@ -107,7 +107,7 @@ contract PausableUnitTests is Test { } function testPauseSingleIndex(uint previousPausedStatus, uint8 indexToPause) public { - uint newPausedStatus = (2 ** indexToPause); + uint newPausedStatus = (2**indexToPause); testPause(previousPausedStatus, newPausedStatus); require(pausable.paused(indexToPause), "index is not paused"); } diff --git a/src/test/unit/RewardsCoordinatorUnit.t.sol b/src/test/unit/RewardsCoordinatorUnit.t.sol index bf31c7975d..9586288497 100644 --- a/src/test/unit/RewardsCoordinatorUnit.t.sol +++ b/src/test/unit/RewardsCoordinatorUnit.t.sol @@ -11,11 +11,9 @@ import "src/test/utils/EigenLayerUnitTestSetup.sol"; import "src/test/mocks/Reenterer.sol"; import "src/test/mocks/ERC20Mock.sol"; -/** - * @notice Unit testing of the RewardsCoordinator contract - * Contracts tested: RewardsCoordinator - * Contracts not mocked: StrategyBase, PauserRegistry - */ +/// @notice Unit testing of the RewardsCoordinator contract +/// Contracts tested: RewardsCoordinator +/// Contracts not mocked: StrategyBase, PauserRegistry contract RewardsCoordinatorUnitTests is EigenLayerUnitTestSetup, IRewardsCoordinatorEvents, IRewardsCoordinatorErrors { // used for stack too deep struct FuzzAVSRewardsSubmission { @@ -428,7 +426,7 @@ contract RewardsCoordinatorUnitTests_setOperatorAVSSplit is RewardsCoordinatorUn cheats.assume(operator != address(0)); split = uint16(bound(split, 0, ONE_HUNDRED_IN_BIPS)); cheats.prank(pauser); - rewardsCoordinator.pause(2 ** PAUSED_OPERATOR_AVS_SPLIT); + rewardsCoordinator.pause(2**PAUSED_OPERATOR_AVS_SPLIT); cheats.prank(operator); cheats.expectRevert(IPausable.CurrentlyPaused.selector); @@ -488,10 +486,7 @@ contract RewardsCoordinatorUnitTests_setOperatorAVSSplit is RewardsCoordinatorUn } // Testing that the split has been initialized for the first time. - function testFuzz_setOperatorAVSSplitFirstTime(address operator, address avs, uint16 split) - public - filterFuzzedAddressInputs(operator) - { + function testFuzz_setOperatorAVSSplitFirstTime(address operator, address avs, uint16 split) public filterFuzzedAddressInputs(operator) { cheats.assume(operator != address(0)); split = uint16(bound(split, 0, ONE_HUNDRED_IN_BIPS)); uint32 activatedAt = uint32(block.timestamp) + activationDelay; @@ -581,7 +576,7 @@ contract RewardsCoordinatorUnitTests_setOperatorPISplit is RewardsCoordinatorUni cheats.assume(operator != address(0)); split = uint16(bound(split, 0, ONE_HUNDRED_IN_BIPS)); cheats.prank(pauser); - rewardsCoordinator.pause(2 ** PAUSED_OPERATOR_PI_SPLIT); + rewardsCoordinator.pause(2**PAUSED_OPERATOR_PI_SPLIT); cheats.prank(operator); cheats.expectRevert(IPausable.CurrentlyPaused.selector); @@ -735,7 +730,7 @@ contract RewardsCoordinatorUnitsTests_setOperatorSetSplit is RewardsCoordinatorU cheats.assume(operator != address(0)); split = uint16(bound(split, 0, ONE_HUNDRED_IN_BIPS)); cheats.prank(pauser); - rewardsCoordinator.pause(2 ** PAUSED_OPERATOR_SET_SPLIT); + rewardsCoordinator.pause(2**PAUSED_OPERATOR_SET_SPLIT); cheats.prank(operator); cheats.expectRevert(IPausable.CurrentlyPaused.selector); @@ -877,7 +872,7 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi // Revert when paused function test_Revert_WhenPaused() public { cheats.prank(pauser); - rewardsCoordinator.pause(2 ** PAUSED_AVS_REWARDS_SUBMISSION); + rewardsCoordinator.pause(2**PAUSED_AVS_REWARDS_SUBMISSION); cheats.expectRevert(IPausable.CurrentlyPaused.selector); RewardsSubmission[] memory rewardsSubmissions; @@ -1237,13 +1232,11 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi rewardsCoordinator.createAVSRewardsSubmission(rewardsSubmissions); } - /** - * @notice test a single rewards submission asserting for the following - * - correct event emitted - * - submission nonce incrementation by 1, and rewards submission hash being set in storage. - * - rewards submission hash being set in storage - * - token balance before and after of avs and rewardsCoordinator - */ + /// @notice test a single rewards submission asserting for the following + /// - correct event emitted + /// - submission nonce incrementation by 1, and rewards submission hash being set in storage. + /// - rewards submission hash being set in storage + /// - token balance before and after of avs and rewardsCoordinator function testFuzz_createAVSRewardsSubmission_SingleSubmission(address avs, uint startTimestamp, uint duration, uint amount) public filterFuzzedAddressInputs(avs) @@ -1298,13 +1291,11 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi ); } - /** - * @notice test multiple rewards submissions asserting for the following - * - correct event emitted - * - submission nonce incrementation by numSubmissions, and rewards submission hashes being set in storage. - * - rewards submission hash being set in storage - * - token balances before and after of avs and rewardsCoordinator - */ + /// @notice test multiple rewards submissions asserting for the following + /// - correct event emitted + /// - submission nonce incrementation by numSubmissions, and rewards submission hashes being set in storage. + /// - rewards submission hash being set in storage + /// - token balances before and after of avs and rewardsCoordinator function testFuzz_createAVSRewardsSubmission_MultipleSubmissions(FuzzAVSRewardsSubmission memory param, uint numSubmissions) public filterFuzzedAddressInputs(param.avs) @@ -1387,7 +1378,7 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllSubmission is RewardsCoo // Revert when paused function test_Revert_WhenPaused() public { cheats.prank(pauser); - rewardsCoordinator.pause(2 ** PAUSED_REWARDS_FOR_ALL_SUBMISSION); + rewardsCoordinator.pause(2**PAUSED_REWARDS_FOR_ALL_SUBMISSION); cheats.expectRevert(IPausable.CurrentlyPaused.selector); RewardsSubmission[] memory rewardsSubmissions; @@ -1461,13 +1452,11 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllSubmission is RewardsCoo rewardsCoordinator.createRewardsForAllSubmission(rewardsSubmissions); } - /** - * @notice test a single rewards submission asserting for the following - * - correct event emitted - * - submission nonce incrementation by 1, and rewards submission hash being set in storage. - * - rewards submission hash being set in storage - * - token balance before and after of RewardsForAllSubmitter and rewardsCoordinator - */ + /// @notice test a single rewards submission asserting for the following + /// - correct event emitted + /// - submission nonce incrementation by 1, and rewards submission hash being set in storage. + /// - rewards submission hash being set in storage + /// - token balance before and after of RewardsForAllSubmitter and rewardsCoordinator function testFuzz_createRewardsForAllSubmission_SingleSubmission(uint startTimestamp, uint duration, uint amount) public { cheats.prank(rewardsCoordinator.owner()); @@ -1525,16 +1514,12 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllSubmission is RewardsCoo ); } - /** - * @notice test multiple rewards submissions asserting for the following - * - correct event emitted - * - submission nonce incrementation by numSubmissions, and rewards submission hashes being set in storage. - * - rewards submission hash being set in storage - * - token balances before and after of createRewardsForAllSubmission submitter and rewardsCoordinator - */ - function testFuzz_createRewardsForAllSubmission_MultipleSubmissions(FuzzAVSRewardsSubmission memory param, uint numSubmissions) - public - { + /// @notice test multiple rewards submissions asserting for the following + /// - correct event emitted + /// - submission nonce incrementation by numSubmissions, and rewards submission hashes being set in storage. + /// - rewards submission hash being set in storage + /// - token balances before and after of createRewardsForAllSubmission submitter and rewardsCoordinator + function testFuzz_createRewardsForAllSubmission_MultipleSubmissions(FuzzAVSRewardsSubmission memory param, uint numSubmissions) public { numSubmissions = bound(numSubmissions, 2, 10); cheats.prank(rewardsCoordinator.owner()); @@ -1576,7 +1561,10 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllSubmission is RewardsCoo rewardsSubmissionHashes[i] = keccak256(abi.encode(rewardsForAllSubmitter, startSubmissionNonce + i, rewardsSubmissions[i])); cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit RewardsSubmissionForAllCreated( - rewardsForAllSubmitter, startSubmissionNonce + i, rewardsSubmissionHashes[i], rewardsSubmissions[i] + rewardsForAllSubmitter, + startSubmissionNonce + i, + rewardsSubmissionHashes[i], + rewardsSubmissions[i] ); } @@ -1614,7 +1602,7 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllEarners is RewardsCoordi // Revert when paused function test_Revert_WhenPaused() public { cheats.prank(pauser); - rewardsCoordinator.pause(2 ** PAUSED_REWARD_ALL_STAKERS_AND_OPERATORS); + rewardsCoordinator.pause(2**PAUSED_REWARD_ALL_STAKERS_AND_OPERATORS); cheats.expectRevert(IPausable.CurrentlyPaused.selector); RewardsSubmission[] memory rewardsSubmissions; @@ -1688,13 +1676,11 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllEarners is RewardsCoordi rewardsCoordinator.createRewardsForAllEarners(rewardsSubmissions); } - /** - * @notice test a single rewards submission asserting for the following - * - correct event emitted - * - submission nonce incrementation by 1, and rewards submission hash being set in storage. - * - rewards submission hash being set in storage - * - token balance before and after of RewardsForAllSubmitter and rewardsCoordinator - */ + /// @notice test a single rewards submission asserting for the following + /// - correct event emitted + /// - submission nonce incrementation by 1, and rewards submission hash being set in storage. + /// - rewards submission hash being set in storage + /// - token balance before and after of RewardsForAllSubmitter and rewardsCoordinator function testFuzz_createRewardsForAllSubmission_SingleSubmission(uint startTimestamp, uint duration, uint amount) public { cheats.prank(rewardsCoordinator.owner()); @@ -1732,7 +1718,10 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllEarners is RewardsCoordi cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit RewardsSubmissionForAllEarnersCreated( - rewardsForAllSubmitter, currSubmissionNonce, rewardsSubmissionHash, rewardsSubmissions[0] + rewardsForAllSubmitter, + currSubmissionNonce, + rewardsSubmissionHash, + rewardsSubmissions[0] ); rewardsCoordinator.createRewardsForAllEarners(rewardsSubmissions); cheats.stopPrank(); @@ -1754,16 +1743,12 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllEarners is RewardsCoordi ); } - /** - * @notice test multiple rewards submissions asserting for the following - * - correct event emitted - * - submission nonce incrementation by numSubmissions, and rewards submission hashes being set in storage. - * - rewards submission hash being set in storage - * - token balances before and after of createRewardsForAllSubmission submitter and rewardsCoordinator - */ - function testFuzz_createRewardsForAllSubmission_MultipleSubmissions(FuzzAVSRewardsSubmission memory param, uint numSubmissions) - public - { + /// @notice test multiple rewards submissions asserting for the following + /// - correct event emitted + /// - submission nonce incrementation by numSubmissions, and rewards submission hashes being set in storage. + /// - rewards submission hash being set in storage + /// - token balances before and after of createRewardsForAllSubmission submitter and rewardsCoordinator + function testFuzz_createRewardsForAllSubmission_MultipleSubmissions(FuzzAVSRewardsSubmission memory param, uint numSubmissions) public { numSubmissions = bound(numSubmissions, 2, 10); cheats.prank(rewardsCoordinator.owner()); @@ -1805,7 +1790,10 @@ contract RewardsCoordinatorUnitTests_createRewardsForAllEarners is RewardsCoordi rewardsSubmissionHashes[i] = keccak256(abi.encode(rewardsForAllSubmitter, startSubmissionNonce + i, rewardsSubmissions[i])); cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit RewardsSubmissionForAllEarnersCreated( - rewardsForAllSubmitter, startSubmissionNonce + i, rewardsSubmissionHashes[i], rewardsSubmissions[i] + rewardsForAllSubmitter, + startSubmissionNonce + i, + rewardsSubmissionHashes[i], + rewardsSubmissions[i] ); } @@ -1892,7 +1880,7 @@ contract RewardsCoordinatorUnitTests_createOperatorDirectedAVSRewardsSubmission // Revert when paused function test_Revert_WhenPaused() public { cheats.prank(pauser); - rewardsCoordinator.pause(2 ** PAUSED_OPERATOR_DIRECTED_AVS_REWARDS_SUBMISSION); + rewardsCoordinator.pause(2**PAUSED_OPERATOR_DIRECTED_AVS_REWARDS_SUBMISSION); cheats.expectRevert(IPausable.CurrentlyPaused.selector); OperatorDirectedRewardsSubmission[] memory operatorDirectedRewardsSubmissions; @@ -2053,10 +2041,7 @@ contract RewardsCoordinatorUnitTests_createOperatorDirectedAVSRewardsSubmission } // Revert when duplicate operators - function testFuzz_Revert_WhenDuplicateOperators(address avs, uint startTimestamp, uint duration) - public - filterFuzzedAddressInputs(avs) - { + function testFuzz_Revert_WhenDuplicateOperators(address avs, uint startTimestamp, uint duration) public filterFuzzedAddressInputs(avs) { cheats.assume(avs != address(0)); cheats.prank(rewardsCoordinator.owner()); @@ -2452,13 +2437,11 @@ contract RewardsCoordinatorUnitTests_createOperatorDirectedAVSRewardsSubmission rewardsCoordinator.createOperatorDirectedAVSRewardsSubmission(avs, operatorDirectedRewardsSubmissions); } - /** - * @notice test a single rewards submission asserting for the following - * - correct event emitted - * - submission nonce incrementation by 1, and rewards submission hash being set in storage. - * - rewards submission hash being set in storage - * - token balance before and after of avs and rewardsCoordinator - */ + /// @notice test a single rewards submission asserting for the following + /// - correct event emitted + /// - submission nonce incrementation by 1, and rewards submission hash being set in storage. + /// - rewards submission hash being set in storage + /// - token balance before and after of avs and rewardsCoordinator function testFuzz_createOperatorDirectedAVSRewardsSubmission_SingleSubmission(address avs, uint startTimestamp, uint duration) public filterFuzzedAddressInputs(avs) @@ -2500,7 +2483,11 @@ contract RewardsCoordinatorUnitTests_createOperatorDirectedAVSRewardsSubmission bytes32 rewardsSubmissionHash = keccak256(abi.encode(avs, currSubmissionNonce, operatorDirectedRewardsSubmissions[0])); cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit OperatorDirectedAVSRewardsSubmissionCreated( - avs, avs, rewardsSubmissionHash, currSubmissionNonce, operatorDirectedRewardsSubmissions[0] + avs, + avs, + rewardsSubmissionHash, + currSubmissionNonce, + operatorDirectedRewardsSubmissions[0] ); rewardsCoordinator.createOperatorDirectedAVSRewardsSubmission(avs, operatorDirectedRewardsSubmissions); cheats.stopPrank(); @@ -2518,13 +2505,11 @@ contract RewardsCoordinatorUnitTests_createOperatorDirectedAVSRewardsSubmission ); } - /** - * @notice Same test as above, uses UAM - * - correct event emitted - * - submission nonce incrementation by 1, and rewards submission hash being set in storage. - * - rewards submission hash being set in storage - * - token balance before and after of avs and rewardsCoordinator - */ + /// @notice Same test as above, uses UAM + /// - correct event emitted + /// - submission nonce incrementation by 1, and rewards submission hash being set in storage. + /// - rewards submission hash being set in storage + /// - token balance before and after of avs and rewardsCoordinator function testFuzz_createOperatorDirectedAVSRewardsSubmission_SingleSubmission_UAM(address avs, uint startTimestamp, uint duration) public filterFuzzedAddressInputs(avs) @@ -2572,7 +2557,11 @@ contract RewardsCoordinatorUnitTests_createOperatorDirectedAVSRewardsSubmission bytes32 rewardsSubmissionHash = keccak256(abi.encode(avs, currSubmissionNonce, operatorDirectedRewardsSubmissions[0])); cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit OperatorDirectedAVSRewardsSubmissionCreated( - defaultAppointee, avs, rewardsSubmissionHash, currSubmissionNonce, operatorDirectedRewardsSubmissions[0] + defaultAppointee, + avs, + rewardsSubmissionHash, + currSubmissionNonce, + operatorDirectedRewardsSubmissions[0] ); rewardsCoordinator.createOperatorDirectedAVSRewardsSubmission(avs, operatorDirectedRewardsSubmissions); cheats.stopPrank(); @@ -2594,13 +2583,11 @@ contract RewardsCoordinatorUnitTests_createOperatorDirectedAVSRewardsSubmission ); } - /** - * @notice test a multiple rewards submission asserting for the following - * - correct event emitted - * - submission nonce incrementation by 1, and rewards submission hash being set in storage. - * - rewards submission hash being set in storage - * - token balance before and after of avs and rewardsCoordinator - */ + /// @notice test a multiple rewards submission asserting for the following + /// - correct event emitted + /// - submission nonce incrementation by 1, and rewards submission hash being set in storage. + /// - rewards submission hash being set in storage + /// - token balance before and after of avs and rewardsCoordinator function testFuzz_createOperatorDirectedAVSRewardsSubmission_MultipleSubmissions( FuzzOperatorDirectedAVSRewardsSubmission memory param, uint numSubmissions @@ -2657,7 +2644,11 @@ contract RewardsCoordinatorUnitTests_createOperatorDirectedAVSRewardsSubmission rewardsSubmissionHashes[i] = keccak256(abi.encode(param.avs, startSubmissionNonce + i, rewardsSubmissions[i])); cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit OperatorDirectedAVSRewardsSubmissionCreated( - param.avs, param.avs, rewardsSubmissionHashes[i], startSubmissionNonce + i, rewardsSubmissions[i] + param.avs, + param.avs, + rewardsSubmissionHashes[i], + startSubmissionNonce + i, + rewardsSubmissions[i] ); } @@ -2748,7 +2739,7 @@ contract RewardsCoordinatorUnitTests_createOperatorDirectedOperatorSetRewardsSub // Revert when paused function test_Revert_WhenPaused() public { cheats.prank(pauser); - rewardsCoordinator.pause(2 ** PAUSED_OPERATOR_DIRECTED_OPERATOR_SET_REWARDS_SUBMISSION); + rewardsCoordinator.pause(2**PAUSED_OPERATOR_DIRECTED_OPERATOR_SET_REWARDS_SUBMISSION); cheats.expectRevert(IPausable.CurrentlyPaused.selector); OperatorDirectedRewardsSubmission[] memory operatorDirectedRewardsSubmissions; @@ -2932,10 +2923,7 @@ contract RewardsCoordinatorUnitTests_createOperatorDirectedOperatorSetRewardsSub } // Revert when duplicate operators - function testFuzz_Revert_WhenDuplicateOperators(address avs, uint startTimestamp, uint duration) - public - filterFuzzedAddressInputs(avs) - { + function testFuzz_Revert_WhenDuplicateOperators(address avs, uint startTimestamp, uint duration) public filterFuzzedAddressInputs(avs) { cheats.assume(avs != address(0)); operatorSet = OperatorSet(avs, 1); @@ -3375,13 +3363,11 @@ contract RewardsCoordinatorUnitTests_createOperatorDirectedOperatorSetRewardsSub rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, operatorDirectedRewardsSubmissions); } - /** - * @notice test a single rewards submission asserting for the following - * - correct event emitted - * - submission nonce incrementation by 1, and rewards submission hash being set in storage. - * - rewards submission hash being set in storage - * - token balance before and after of avs and rewardsCoordinator - */ + /// @notice test a single rewards submission asserting for the following + /// - correct event emitted + /// - submission nonce incrementation by 1, and rewards submission hash being set in storage. + /// - rewards submission hash being set in storage + /// - token balance before and after of avs and rewardsCoordinator function testFuzz_createOperatorDirectedOperatorSetRewardsSubmission_SingleSubmission(address avs, uint startTimestamp, uint duration) public filterFuzzedAddressInputs(avs) @@ -3427,7 +3413,11 @@ contract RewardsCoordinatorUnitTests_createOperatorDirectedOperatorSetRewardsSub bytes32 rewardsSubmissionHash = keccak256(abi.encode(avs, currSubmissionNonce, operatorDirectedRewardsSubmissions[0])); cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit OperatorDirectedOperatorSetRewardsSubmissionCreated( - avs, rewardsSubmissionHash, operatorSet, currSubmissionNonce, operatorDirectedRewardsSubmissions[0] + avs, + rewardsSubmissionHash, + operatorSet, + currSubmissionNonce, + operatorDirectedRewardsSubmissions[0] ); rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, operatorDirectedRewardsSubmissions); cheats.stopPrank(); @@ -3445,13 +3435,11 @@ contract RewardsCoordinatorUnitTests_createOperatorDirectedOperatorSetRewardsSub ); } - /** - * @notice Same test as above, uses UAM - * - correct event emitted - * - submission nonce incrementation by 1, and rewards submission hash being set in storage. - * - rewards submission hash being set in storage - * - token balance before and after of avs and rewardsCoordinator - */ + /// @notice Same test as above, uses UAM + /// - correct event emitted + /// - submission nonce incrementation by 1, and rewards submission hash being set in storage. + /// - rewards submission hash being set in storage + /// - token balance before and after of avs and rewardsCoordinator function testFuzz_createOperatorDirectedOperatorSetRewardsSubmission_SingleSubmission_UAM( address avs, uint startTimestamp, @@ -3506,7 +3494,11 @@ contract RewardsCoordinatorUnitTests_createOperatorDirectedOperatorSetRewardsSub bytes32 rewardsSubmissionHash = keccak256(abi.encode(avs, currSubmissionNonce, operatorDirectedRewardsSubmissions[0])); cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit OperatorDirectedOperatorSetRewardsSubmissionCreated( - defaultAppointee, rewardsSubmissionHash, operatorSet, currSubmissionNonce, operatorDirectedRewardsSubmissions[0] + defaultAppointee, + rewardsSubmissionHash, + operatorSet, + currSubmissionNonce, + operatorDirectedRewardsSubmissions[0] ); rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, operatorDirectedRewardsSubmissions); cheats.stopPrank(); @@ -3528,13 +3520,11 @@ contract RewardsCoordinatorUnitTests_createOperatorDirectedOperatorSetRewardsSub ); } - /** - * @notice test a multiple rewards submission asserting for the following - * - correct event emitted - * - submission nonce incrementation by 1, and rewards submission hash being set in storage. - * - rewards submission hash being set in storage - * - token balance before and after of avs and rewardsCoordinator - */ + /// @notice test a multiple rewards submission asserting for the following + /// - correct event emitted + /// - submission nonce incrementation by 1, and rewards submission hash being set in storage. + /// - rewards submission hash being set in storage + /// - token balance before and after of avs and rewardsCoordinator function testFuzz_createOperatorDirectedOperatorSetRewardsSubmission_MultipleSubmissions( FuzzOperatorDirectedAVSRewardsSubmission memory param, uint numSubmissions @@ -3595,7 +3585,11 @@ contract RewardsCoordinatorUnitTests_createOperatorDirectedOperatorSetRewardsSub rewardsSubmissionHashes[i] = keccak256(abi.encode(param.avs, startSubmissionNonce + i, rewardsSubmissions[i])); cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit OperatorDirectedOperatorSetRewardsSubmissionCreated( - param.avs, rewardsSubmissionHashes[i], operatorSet, startSubmissionNonce + i, rewardsSubmissions[i] + param.avs, + rewardsSubmissionHashes[i], + operatorSet, + startSubmissionNonce + i, + rewardsSubmissions[i] ); } @@ -3640,7 +3634,7 @@ contract RewardsCoordinatorUnitTests_submitRoot is RewardsCoordinatorUnitTests { function test_Revert_WhenSubmitRootPaused() public { cheats.prank(pauser); - rewardsCoordinator.pause(2 ** PAUSED_SUBMIT_ROOTS); + rewardsCoordinator.pause(2**PAUSED_SUBMIT_ROOTS); cheats.expectRevert(IPausable.CurrentlyPaused.selector); rewardsCoordinator.submitRoot(bytes32(0), 0); @@ -4187,9 +4181,8 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests assertTrue(rewardsCoordinator.checkClaim(claim), "RewardsCoordinator.checkClaim: claim not valid"); // Set cumulativeClaimed to be max uint256, should revert when attempting to claim - stdstore.target(address(rewardsCoordinator)).sig("cumulativeClaimed(address,address)").with_key(claim.earnerLeaf.earner).with_key( - address(claim.tokenLeaves[0].token) - ).checked_write(type(uint).max); + stdstore.target(address(rewardsCoordinator)).sig("cumulativeClaimed(address,address)").with_key(claim.earnerLeaf.earner) + .with_key(address(claim.tokenLeaves[0].token)).checked_write(type(uint).max); cheats.startPrank(claimer); cheats.expectRevert(EarningsNotGreaterThanClaimed.selector); rewardsCoordinator.processClaim(claim, claimer); diff --git a/src/test/unit/StrategyBaseUnit.t.sol b/src/test/unit/StrategyBaseUnit.t.sol index 6680bde9a7..7c65220d09 100644 --- a/src/test/unit/StrategyBaseUnit.t.sol +++ b/src/test/unit/StrategyBaseUnit.t.sol @@ -29,17 +29,13 @@ contract StrategyBaseUnitTests is Test { uint initialSupply = 1e36; address initialOwner = address(this); - /** - * @notice virtual shares used as part of the mitigation of the common 'share inflation' attack vector. - * Constant value chosen to reasonably reduce attempted share inflation by the first depositor, while still - * incurring reasonably small losses to depositors - */ + /// @notice virtual shares used as part of the mitigation of the common 'share inflation' attack vector. + /// Constant value chosen to reasonably reduce attempted share inflation by the first depositor, while still + /// incurring reasonably small losses to depositors uint internal constant SHARES_OFFSET = 1e3; - /** - * @notice virtual balance used as part of the mitigation of the common 'share inflation' attack vector - * Constant value chosen to reasonably reduce attempted share inflation by the first depositor, while still - * incurring reasonably small losses to depositors - */ + /// @notice virtual balance used as part of the mitigation of the common 'share inflation' attack vector + /// Constant value chosen to reasonably reduce attempted share inflation by the first depositor, while still + /// incurring reasonably small losses to depositors uint internal constant BALANCE_OFFSET = 1e3; event ExchangeRateEmitted(uint rate); diff --git a/src/test/unit/StrategyFactoryUnit.t.sol b/src/test/unit/StrategyFactoryUnit.t.sol index 5bc3869927..873883ce0e 100644 --- a/src/test/unit/StrategyFactoryUnit.t.sol +++ b/src/test/unit/StrategyFactoryUnit.t.sol @@ -8,10 +8,8 @@ import "src/contracts/strategies/StrategyFactory.sol"; import "src/test/utils/EigenLayerUnitTestSetup.sol"; import "../../contracts/permissions/PauserRegistry.sol"; -/** - * @notice Unit testing of the StrategyFactory contract. - * Contracts tested: StrategyFactory - */ +/// @notice Unit testing of the StrategyFactory contract. +/// Contracts tested: StrategyFactory contract StrategyFactoryUnitTests is EigenLayerUnitTestSetup { // Contract under test StrategyFactory public strategyFactory; @@ -92,7 +90,11 @@ contract StrategyFactoryUnitTests is EigenLayerUnitTestSetup { function test_initialize_revert_reinitialization() public { cheats.expectRevert("Initializable: contract is already initialized"); - strategyFactory.initialize({_initialOwner: initialOwner, _initialPausedStatus: initialPausedStatus, _strategyBeacon: strategyBeacon}); + strategyFactory.initialize({ + _initialOwner: initialOwner, + _initialPausedStatus: initialPausedStatus, + _strategyBeacon: strategyBeacon + }); } function test_deployNewStrategy() public { diff --git a/src/test/unit/StrategyManagerUnit.t.sol b/src/test/unit/StrategyManagerUnit.t.sol index eace3ca1e1..e320842778 100644 --- a/src/test/unit/StrategyManagerUnit.t.sol +++ b/src/test/unit/StrategyManagerUnit.t.sol @@ -12,12 +12,10 @@ import "src/test/mocks/Reenterer.sol"; import "src/test/mocks/MockDecimals.sol"; import "src/test/utils/EigenLayerUnitTestSetup.sol"; -/** - * @notice Unit testing of the StrategyManager contract, entire withdrawal tests related to the - * DelegationManager are not tested here but callable functions by the DelegationManager are mocked and tested here. - * Contracts tested: StrategyManager.sol - * Contracts not mocked: StrategyBase, PauserRegistry - */ +/// @notice Unit testing of the StrategyManager contract, entire withdrawal tests related to the +/// DelegationManager are not tested here but callable functions by the DelegationManager are mocked and tested here. +/// Contracts tested: StrategyManager.sol +/// Contracts not mocked: StrategyBase, PauserRegistry contract StrategyManagerUnitTests is EigenLayerUnitTestSetup, IStrategyManagerEvents { address constant DEFAULT_BURN_ADDRESS = address(0x00000000000000000000000000000000000E16E4); @@ -50,7 +48,12 @@ contract StrategyManagerUnitTests is EigenLayerUnitTestSetup, IStrategyManagerEv new TransparentUpgradeableProxy( address(strategyManagerImplementation), address(eigenLayerProxyAdmin), - abi.encodeWithSelector(StrategyManager.initialize.selector, initialOwner, initialOwner, 0 /*initialPausedStatus*/ ) + abi.encodeWithSelector( + StrategyManager.initialize.selector, + initialOwner, + initialOwner, + 0 /*initialPausedStatus*/ + ) ) ) ); @@ -183,10 +186,8 @@ contract StrategyManagerUnitTests is EigenLayerUnitTestSetup, IStrategyManagerEv return signature; } - /** - * @notice internal function to help check if a strategy is part of list of deposited strategies for a staker - * Used to check if removed correctly after withdrawing all shares for a given strategy - */ + /// @notice internal function to help check if a strategy is part of list of deposited strategies for a staker + /// Used to check if removed correctly after withdrawing all shares for a given strategy function _isDepositedStrategy(address staker, IStrategy strategy) internal view returns (bool) { uint stakerStrategyListLength = strategyManager.stakerStrategyListLength(staker); for (uint i = 0; i < stakerStrategyListLength; ++i) { @@ -195,9 +196,7 @@ contract StrategyManagerUnitTests is EigenLayerUnitTestSetup, IStrategyManagerEv return false; } - /** - * @notice Deploys numberOfStrategiesToAdd new strategies and adds them to the whitelist - */ + /// @notice Deploys numberOfStrategiesToAdd new strategies and adds them to the whitelist function _addStrategiesToWhitelist(uint8 numberOfStrategiesToAdd) internal returns (IStrategy[] memory) { IStrategy[] memory strategyArray = new IStrategy[](numberOfStrategiesToAdd); // loop that deploys a new strategy and adds it to the array @@ -645,12 +644,10 @@ contract StrategyManagerUnitTests_depositIntoStrategyWithSignature is StrategyMa _depositIntoStrategyWithSignature(staker, 1e18, type(uint).max, IPausable.CurrentlyPaused.selector); } - /** - * @notice reenterer contract which is configured as the strategy contract - * is configured to call depositIntoStrategy after reenterer.deposit() is called from the - * depositIntoStrategyWithSignature() is called from the StrategyManager. Situation is not likely to occur given - * the strategy has to be whitelisted but it at least protects from reentrant attacks - */ + /// @notice reenterer contract which is configured as the strategy contract + /// is configured to call depositIntoStrategy after reenterer.deposit() is called from the + /// depositIntoStrategyWithSignature() is called from the StrategyManager. Situation is not likely to occur given + /// the strategy has to be whitelisted but it at least protects from reentrant attacks function test_Revert_WhenReentering() public { reenterer = new Reenterer(); @@ -745,18 +742,14 @@ contract StrategyManagerUnitTests_depositIntoStrategyWithSignature is StrategyMa } contract StrategyManagerUnitTests_removeDepositShares is StrategyManagerUnitTests { - /** - * @notice Should revert if not called by DelegationManager - */ + /// @notice Should revert if not called by DelegationManager function test_Revert_DelegationManagerModifier() external { DelegationManagerMock invalidDelegationManager = new DelegationManagerMock(); cheats.expectRevert(IStrategyManagerErrors.OnlyDelegationManager.selector); invalidDelegationManager.removeDepositShares(strategyManager, address(this), dummyStrat, 1); } - /** - * @notice deposits a single strategy and tests removeDepositShares() function reverts when sharesAmount is 0 - */ + /// @notice deposits a single strategy and tests removeDepositShares() function reverts when sharesAmount is 0 function testFuzz_Revert_ZeroShares(address staker, uint depositAmount) external filterFuzzedAddressInputs(staker) { cheats.assume(staker != address(0)); cheats.assume(depositAmount > 0 && depositAmount < dummyToken.totalSupply()); @@ -766,10 +759,8 @@ contract StrategyManagerUnitTests_removeDepositShares is StrategyManagerUnitTest delegationManagerMock.removeDepositShares(strategyManager, staker, strategy, 0); } - /** - * @notice deposits a single strategy and tests removeDepositShares() function reverts when sharesAmount is - * higher than depositAmount - */ + /// @notice deposits a single strategy and tests removeDepositShares() function reverts when sharesAmount is + /// higher than depositAmount function testFuzz_Revert_ShareAmountTooHigh(address staker, uint depositAmount, uint removeSharesAmount) external filterFuzzedAddressInputs(staker) @@ -783,10 +774,8 @@ contract StrategyManagerUnitTests_removeDepositShares is StrategyManagerUnitTest delegationManagerMock.removeDepositShares(strategyManager, staker, strategy, removeSharesAmount); } - /** - * @notice deposit single strategy and removeDepositShares() for less than the deposited amount - * Shares should be updated correctly with stakerStrategyListLength unchanged - */ + /// @notice deposit single strategy and removeDepositShares() for less than the deposited amount + /// Shares should be updated correctly with stakerStrategyListLength unchanged function testFuzz_RemoveSharesLessThanDeposit(address staker, uint depositAmount, uint removeSharesAmount) external filterFuzzedAddressInputs(staker) @@ -805,10 +794,8 @@ contract StrategyManagerUnitTests_removeDepositShares is StrategyManagerUnitTest assertEq(stakerStrategyListLengthBefore, stakerStrategyListLengthAfter, "stakerStrategyListLength shouldn't have changed"); } - /** - * @notice testing removeDepositShares() - * deposits 1 strategy and tests it is removed from staker strategy list after removing all shares - */ + /// @notice testing removeDepositShares() + /// deposits 1 strategy and tests it is removed from staker strategy list after removing all shares function testFuzz_RemovesStakerStrategyListSingleStrat(address staker, uint sharesAmount) external filterFuzzedAddressInputs(staker) { cheats.assume(staker != address(0)); cheats.assume(sharesAmount > 0 && sharesAmount < dummyToken.totalSupply()); @@ -831,11 +818,9 @@ contract StrategyManagerUnitTests_removeDepositShares is StrategyManagerUnitTest assertFalse(_isDepositedStrategy(staker, strategy), "strategy should not be part of staker strategy list"); } - /** - * @notice testing removeDepositShares() function with 3 strategies deposited. - * Randomly selects one of the 3 strategies to be fully removed from staker strategy list. - * Only callable by DelegationManager - */ + /// @notice testing removeDepositShares() function with 3 strategies deposited. + /// Randomly selects one of the 3 strategies to be fully removed from staker strategy list. + /// Only callable by DelegationManager function testFuzz_RemovesStakerStrategyListMultipleStrat(address staker, uint[3] memory amounts, uint8 randStrategy) external filterFuzzedAddressInputs(staker) @@ -872,11 +857,9 @@ contract StrategyManagerUnitTests_removeDepositShares is StrategyManagerUnitTest assertFalse(_isDepositedStrategy(staker, removeStrategy), "strategy should not be part of staker strategy list"); } - /** - * @notice testing removeDepositShares() function with 3 strategies deposited. - * Removing Shares could result in removing from staker strategy list if depositAmounts[i] == sharesAmounts[i]. - * Only callable by DelegationManager - */ + /// @notice testing removeDepositShares() function with 3 strategies deposited. + /// Removing Shares could result in removing from staker strategy list if depositAmounts[i] == sharesAmounts[i]. + /// Only callable by DelegationManager function testFuzz_RemoveShares(uint[3] memory depositAmounts, uint[3] memory sharesAmounts) external { address staker = address(this); IStrategy[] memory strategies = new IStrategy[](3); @@ -980,10 +963,8 @@ contract StrategyManagerUnitTests_addShares is StrategyManagerUnitTests { assertTrue(_isDepositedStrategy(staker, strategy), "strategy should be deposited"); } - /** - * @notice When _addShares() called either by depositIntoStrategy or addShares() results in appending to - * stakerStrategyListLength when the staker has MAX_STAKER_STRATEGY_LIST_LENGTH strategies, it should revert - */ + /// @notice When _addShares() called either by depositIntoStrategy or addShares() results in appending to + /// stakerStrategyListLength when the staker has MAX_STAKER_STRATEGY_LIST_LENGTH strategies, it should revert function test_Revert_WhenMaxStrategyListLength() external { address staker = address(this); IERC20 token = dummyToken; @@ -1030,10 +1011,8 @@ contract StrategyManagerUnitTests_withdrawSharesAsTokens is StrategyManagerUnitT invalidDelegationManager.removeDepositShares(strategyManager, address(this), dummyStrat, 1); } - /** - * @notice deposits a single strategy and withdrawSharesAsTokens() function reverts when sharesAmount is - * higher than depositAmount - */ + /// @notice deposits a single strategy and withdrawSharesAsTokens() function reverts when sharesAmount is + /// higher than depositAmount function testFuzz_Revert_ShareAmountTooHigh(address staker, uint depositAmount, uint sharesAmount) external filterFuzzedAddressInputs(staker) @@ -1563,9 +1542,7 @@ contract StrategyManagerUnitTests_removeStrategiesFromDepositWhitelist is Strate strategyManager.removeStrategiesFromDepositWhitelist(strategyArray); } - /** - * @notice testing that mapping is still false and no event emitted - */ + /// @notice testing that mapping is still false and no event emitted function test_RemoveNonWhitelistedStrategy() external { IStrategy[] memory strategyArray = new IStrategy[](1); IStrategy strategy = _deployNewStrategy(dummyToken, strategyManager, pauserRegistry, dummyAdmin); @@ -1580,9 +1557,7 @@ contract StrategyManagerUnitTests_removeStrategiesFromDepositWhitelist is Strate assertFalse(strategyManager.strategyIsWhitelistedForDeposit(strategy), "strategy still should not be whitelisted"); } - /** - * @notice testing that strategy is removed from whitelist and event is emitted - */ + /// @notice testing that strategy is removed from whitelist and event is emitted function test_RemoveWhitelistedStrategy() external { IStrategy[] memory strategyArray = new IStrategy[](1); IStrategy strategy = _deployNewStrategy(dummyToken, strategyManager, pauserRegistry, dummyAdmin); diff --git a/src/test/unit/TaskMailboxUnit.t.sol b/src/test/unit/TaskMailboxUnit.t.sol index 7c08c8d486..4d458e711d 100644 --- a/src/test/unit/TaskMailboxUnit.t.sol +++ b/src/test/unit/TaskMailboxUnit.t.sol @@ -128,13 +128,11 @@ contract TaskMailboxUnitTests is Test, ITaskMailboxTypes, ITaskMailboxErrors, IT }); } - /** - * @notice Create a valid BN254 certificate for a given result - * @param taskHash The task hash - * @param result The result data to create certificate for - * @param referenceTimestamp The reference timestamp - * @return The BN254 certificate - */ + /// @notice Create a valid BN254 certificate for a given result + /// @param taskHash The task hash + /// @param result The result data to create certificate for + /// @param referenceTimestamp The reference timestamp + /// @return The BN254 certificate function _createValidBN254CertificateForResult(bytes32 taskHash, bytes memory result, uint96 referenceTimestamp) internal view @@ -143,23 +141,19 @@ contract TaskMailboxUnitTests is Test, ITaskMailboxTypes, ITaskMailboxErrors, IT return _createValidBN254Certificate(taskMailbox.getMessageHash(taskHash, result), referenceTimestamp); } - /** - * @notice Get the reference timestamp for a task (helper for tests) - * @param _taskHash The task hash - * @return The reference timestamp stored in the task - */ + /// @notice Get the reference timestamp for a task (helper for tests) + /// @param _taskHash The task hash + /// @return The reference timestamp stored in the task function _getTaskReferenceTimestamp(bytes32 _taskHash) internal view returns (uint32) { Task memory task = taskMailbox.getTaskInfo(_taskHash); return task.operatorTableReferenceTimestamp; } - /** - * @notice Create a valid ECDSA certificate for a given result - * @param taskHash The task hash - * @param result The result data to create certificate for - * @param referenceTimestamp The reference timestamp - * @return The ECDSA certificate - */ + /// @notice Create a valid ECDSA certificate for a given result + /// @param taskHash The task hash + /// @param result The result data to create certificate for + /// @param referenceTimestamp The reference timestamp + /// @return The ECDSA certificate function _createValidECDSACertificateForResult(bytes32 taskHash, bytes memory result, uint96 referenceTimestamp) internal view @@ -316,7 +310,10 @@ contract TaskMailboxUnitTests_setExecutorOperatorSetTaskConfig is TaskMailboxUni feeToken: IERC20(fuzzFeeToken), curveType: IKeyRegistrarTypes.CurveType.BN254, feeCollector: fuzzFeeCollector, - consensus: Consensus({consensusType: ConsensusType.STAKE_PROPORTION_THRESHOLD, value: abi.encode(fuzzStakeProportionThreshold)}), + consensus: Consensus({ + consensusType: ConsensusType.STAKE_PROPORTION_THRESHOLD, + value: abi.encode(fuzzStakeProportionThreshold) + }), taskMetadata: fuzzTaskMetadata }); diff --git a/src/test/utils/BN256G2.sol b/src/test/utils/BN256G2.sol index 0e282f6ffa..bac69a4c06 100644 --- a/src/test/utils/BN256G2.sol +++ b/src/test/utils/BN256G2.sol @@ -1,10 +1,8 @@ pragma solidity ^0.8.0; -/** - * @title Elliptic curve operations on twist points for alt_bn128 - * @author Mustafa Al-Bassam (mus@musalbas.com) - * @dev Homepage: https://github.com/musalbas/solidity-BN256G2 - */ +/// @title Elliptic curve operations on twist points for alt_bn128 +/// @author Mustafa Al-Bassam (mus@musalbas.com) +/// @dev Homepage: https://github.com/musalbas/solidity-BN256G2 library BN256G2 { uint internal constant FIELD_MODULUS = 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47; uint internal constant TWISTBX = 0x2b149d40ceb8aaae81be18991be06ac3b5b4c5e559dbefa33267e6dc24a138e5; @@ -16,18 +14,16 @@ library BN256G2 { uint internal constant PTZX = 4; uint internal constant PTZY = 5; - /** - * @notice Add two twist points - * @param pt1xx Coefficient 1 of x on point 1 - * @param pt1xy Coefficient 2 of x on point 1 - * @param pt1yx Coefficient 1 of y on point 1 - * @param pt1yy Coefficient 2 of y on point 1 - * @param pt2xx Coefficient 1 of x on point 2 - * @param pt2xy Coefficient 2 of x on point 2 - * @param pt2yx Coefficient 1 of y on point 2 - * @param pt2yy Coefficient 2 of y on point 2 - * @return (pt3xx, pt3xy, pt3yx, pt3yy) - */ + /// @notice Add two twist points + /// @param pt1xx Coefficient 1 of x on point 1 + /// @param pt1xy Coefficient 2 of x on point 1 + /// @param pt1yx Coefficient 1 of y on point 1 + /// @param pt1yy Coefficient 2 of y on point 1 + /// @param pt2xx Coefficient 1 of x on point 2 + /// @param pt2xy Coefficient 2 of x on point 2 + /// @param pt2yx Coefficient 1 of y on point 2 + /// @param pt2yy Coefficient 2 of y on point 2 + /// @return (pt3xx, pt3xy, pt3yx, pt3yy) function ECTwistAdd(uint pt1xx, uint pt1xy, uint pt1yx, uint pt1yy, uint pt2xx, uint pt2xy, uint pt2yx, uint pt2yy) public view @@ -49,15 +45,13 @@ library BN256G2 { return _fromJacobian(pt3[PTXX], pt3[PTXY], pt3[PTYX], pt3[PTYY], pt3[PTZX], pt3[PTZY]); } - /** - * @notice Multiply a twist point by a scalar - * @param s Scalar to multiply by - * @param pt1xx Coefficient 1 of x - * @param pt1xy Coefficient 2 of x - * @param pt1yx Coefficient 1 of y - * @param pt1yy Coefficient 2 of y - * @return (pt2xx, pt2xy, pt2yx, pt2yy) - */ + /// @notice Multiply a twist point by a scalar + /// @param s Scalar to multiply by + /// @param pt1xx Coefficient 1 of x + /// @param pt1xy Coefficient 2 of x + /// @param pt1yx Coefficient 1 of y + /// @param pt1yy Coefficient 2 of y + /// @return (pt2xx, pt2xy, pt2yx, pt2yy) function ECTwistMul(uint s, uint pt1xx, uint pt1xy, uint pt1yx, uint pt1yy) public view returns (uint, uint, uint, uint) { uint pt1zx = 1; if (pt1xx == 0 && pt1xy == 0 && pt1yx == 0 && pt1yy == 0) { @@ -73,10 +67,8 @@ library BN256G2 { return _fromJacobian(pt2[PTXX], pt2[PTXY], pt2[PTYX], pt2[PTYY], pt2[PTZX], pt2[PTZY]); } - /** - * @notice Get the field modulus - * @return The field modulus - */ + /// @notice Get the field modulus + /// @return The field modulus function GetFieldModulus() public pure returns (uint) { return FIELD_MODULUS; } diff --git a/src/test/utils/BytesLib.sol b/src/test/utils/BytesLib.sol index 2f5f93680c..1bfa7c3fc1 100644 --- a/src/test/utils/BytesLib.sol +++ b/src/test/utils/BytesLib.sol @@ -384,7 +384,7 @@ library BytesLib { let end := add(mc, length) for { let cc := add(_postBytes, 0x20) } // while(uint256(mc < end) + cb == 2) // the next line is the loop condition: - eq(add(lt(mc, end), cb), 2) { + eq(add(lt(mc, end), cb), 2) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { diff --git a/src/test/utils/EigenPodUser.t.sol b/src/test/utils/EigenPodUser.t.sol index 42c8993be4..6fb7fec9a0 100644 --- a/src/test/utils/EigenPodUser.t.sol +++ b/src/test/utils/EigenPodUser.t.sol @@ -40,14 +40,12 @@ contract EigenPodUser is Logger, TypeImporter { beaconChain = deployer.beaconChain(); eigenPodBeacon = deployer.eigenPodBeacon(); pod = EigenPod( - payable( - Create2.deploy( + payable(Create2.deploy( 0, bytes32(uint(uint160(address(this)))), // set the beacon address to the eigenPodBeacon abi.encodePacked(beaconProxyBytecode, abi.encode(eigenPodBeacon, "")) - ) - ) + )) ); pod.initialize(address(this)); @@ -65,11 +63,9 @@ contract EigenPodUser is Logger, TypeImporter { return _NAME; } - /** - * - * BEACON CHAIN METHODS - * - */ + /// + /// BEACON CHAIN METHODS + /// /// @dev Uses any ETH held by the User to start validators on the beacon chain /// @return A list of created validator indices @@ -115,11 +111,9 @@ contract EigenPodUser is Logger, TypeImporter { return _exitValidators(_validators); } - /** - * - * EIGENPOD METHODS - * - */ + /// + /// EIGENPOD METHODS + /// function verifyWithdrawalCredentials(uint40[] memory _validators) public virtual createSnapshot { print.method("verifyWithdrawalCredentials"); @@ -138,11 +132,9 @@ contract EigenPodUser is Logger, TypeImporter { _completeCheckpoint(); } - /** - * - * INTERNAL METHODS - * - */ + /// + /// INTERNAL METHODS + /// /// @dev Uses any ETH held by the User to start validators on the beacon chain /// @dev Creates validators between 32 and 2048 ETH diff --git a/src/test/utils/Random.sol b/src/test/utils/Random.sol index 27131b3a54..f52f3177b1 100644 --- a/src/test/utils/Random.sol +++ b/src/test/utils/Random.sol @@ -13,7 +13,6 @@ library Random { /// ----------------------------------------------------------------------- /// Constants /// ----------------------------------------------------------------------- - /// @dev Equivalent to: `uint256(keccak256("RANDOMNESS.SEED"))`. uint constant SEED = 0x93bfe7cafd9427243dc4fe8c6e706851eb6696ba8e48960dd74ecc96544938ce; From d9695f8a776807eac7532b7f66b41a510bcd47fc Mon Sep 17 00:00:00 2001 From: "clandestine.eth" <96172957+0xClandestine@users.noreply.github.com> Date: Mon, 1 Dec 2025 15:07:42 -0500 Subject: [PATCH 4/8] fix: flakey test --- src/test/unit/RewardsCoordinatorUnit.t.sol | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/unit/RewardsCoordinatorUnit.t.sol b/src/test/unit/RewardsCoordinatorUnit.t.sol index 9586288497..5a4a0a3dd4 100644 --- a/src/test/unit/RewardsCoordinatorUnit.t.sol +++ b/src/test/unit/RewardsCoordinatorUnit.t.sol @@ -4121,6 +4121,9 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests public filterFuzzedAddressInputs(claimerFor) { + // Ensure invalidEarner is actually different from the real earner + cheats.assume(invalidEarner != earner); + // if setClaimerFor is true, set the earners claimer to the fuzzed address address claimer; if (setClaimerFor) { From a480db257ed756794f5e6c81cc56d5b046f0fa91 Mon Sep 17 00:00:00 2001 From: "clandestine.eth" <96172957+0xClandestine@users.noreply.github.com> Date: Mon, 1 Dec 2025 15:10:35 -0500 Subject: [PATCH 5/8] fix: flakey test + make fmt --- src/test/unit/EigenPodUnit.t.sol | 6 ++++++ src/test/unit/RewardsCoordinatorUnit.t.sol | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/test/unit/EigenPodUnit.t.sol b/src/test/unit/EigenPodUnit.t.sol index 462f965790..ed1089d320 100644 --- a/src/test/unit/EigenPodUnit.t.sol +++ b/src/test/unit/EigenPodUnit.t.sol @@ -428,6 +428,8 @@ contract EigenPodUnitTests_EPMFunctions is EigenPodUnitTests { // ensure amount is too large uint64 withdrawableRestakedExecutionLayerGwei = pod.withdrawableRestakedExecutionLayerGwei(); + // Bound to prevent uint64 overflow when converting wei to gwei in withdrawRestakedBeaconChainETH + randAmountWei = bound(randAmountWei, 0, type(uint64).max * 1 gwei); randAmountWei = randAmountWei - (randAmountWei % 1 gwei); cheats.assume((randAmountWei / 1 gwei) > withdrawableRestakedExecutionLayerGwei); cheats.expectRevert(IEigenPodErrors.InsufficientWithdrawableBalance.selector); @@ -447,6 +449,8 @@ contract EigenPodUnitTests_EPMFunctions is EigenPodUnitTests { // ensure valid fuzzed wei amounts uint64 withdrawableRestakedExecutionLayerGwei = pod.withdrawableRestakedExecutionLayerGwei(); + // Bound to prevent uint64 overflow when converting wei to gwei in withdrawRestakedBeaconChainETH + randAmountWei = bound(randAmountWei, 0, type(uint64).max * 1 gwei); randAmountWei = randAmountWei - (randAmountWei % 1 gwei); cheats.assume((randAmountWei / 1 gwei) <= withdrawableRestakedExecutionLayerGwei); @@ -482,6 +486,8 @@ contract EigenPodUnitTests_EPMFunctions is EigenPodUnitTests { // ensure valid fuzzed wei amounts uint64 withdrawableRestakedExecutionLayerGwei = pod.withdrawableRestakedExecutionLayerGwei(); + // Bound to prevent uint64 overflow when converting wei to gwei in withdrawRestakedBeaconChainETH + randAmountWei = bound(randAmountWei, 0, type(uint64).max * 1 gwei); uint randAmountWeiAdjusted = randAmountWei - (randAmountWei % 1 gwei); cheats.assume((randAmountWei / 1 gwei) <= withdrawableRestakedExecutionLayerGwei); diff --git a/src/test/unit/RewardsCoordinatorUnit.t.sol b/src/test/unit/RewardsCoordinatorUnit.t.sol index 5a4a0a3dd4..40b3768c29 100644 --- a/src/test/unit/RewardsCoordinatorUnit.t.sol +++ b/src/test/unit/RewardsCoordinatorUnit.t.sol @@ -4123,7 +4123,7 @@ contract RewardsCoordinatorUnitTests_processClaim is RewardsCoordinatorUnitTests { // Ensure invalidEarner is actually different from the real earner cheats.assume(invalidEarner != earner); - + // if setClaimerFor is true, set the earners claimer to the fuzzed address address claimer; if (setClaimerFor) { From f5d9da71b8a75310967db5a43da1c32c5e331301 Mon Sep 17 00:00:00 2001 From: "clandestine.eth" <96172957+0xClandestine@users.noreply.github.com> Date: Mon, 1 Dec 2025 15:14:23 -0500 Subject: [PATCH 6/8] fix: flakey tests --- src/test/unit/EigenPodUnit.t.sol | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/test/unit/EigenPodUnit.t.sol b/src/test/unit/EigenPodUnit.t.sol index ed1089d320..33548c2807 100644 --- a/src/test/unit/EigenPodUnit.t.sol +++ b/src/test/unit/EigenPodUnit.t.sol @@ -428,10 +428,10 @@ contract EigenPodUnitTests_EPMFunctions is EigenPodUnitTests { // ensure amount is too large uint64 withdrawableRestakedExecutionLayerGwei = pod.withdrawableRestakedExecutionLayerGwei(); - // Bound to prevent uint64 overflow when converting wei to gwei in withdrawRestakedBeaconChainETH - randAmountWei = bound(randAmountWei, 0, type(uint64).max * 1 gwei); - randAmountWei = randAmountWei - (randAmountWei % 1 gwei); - cheats.assume((randAmountWei / 1 gwei) > withdrawableRestakedExecutionLayerGwei); + // Bound gwei amount to fit in uint64, then convert to wei to prevent overflow + uint amountGwei = bound(randAmountWei / 1 gwei, 0, type(uint64).max); + randAmountWei = amountGwei * 1 gwei; + cheats.assume(amountGwei > withdrawableRestakedExecutionLayerGwei); cheats.expectRevert(IEigenPodErrors.InsufficientWithdrawableBalance.selector); cheats.prank(address(eigenPodManagerMock)); pod.withdrawRestakedBeaconChainETH(recipient, randAmountWei); @@ -449,10 +449,10 @@ contract EigenPodUnitTests_EPMFunctions is EigenPodUnitTests { // ensure valid fuzzed wei amounts uint64 withdrawableRestakedExecutionLayerGwei = pod.withdrawableRestakedExecutionLayerGwei(); - // Bound to prevent uint64 overflow when converting wei to gwei in withdrawRestakedBeaconChainETH - randAmountWei = bound(randAmountWei, 0, type(uint64).max * 1 gwei); - randAmountWei = randAmountWei - (randAmountWei % 1 gwei); - cheats.assume((randAmountWei / 1 gwei) <= withdrawableRestakedExecutionLayerGwei); + // Bound gwei amount to fit in uint64, then convert to wei to prevent overflow + uint amountGwei = bound(randAmountWei / 1 gwei, 0, type(uint64).max); + randAmountWei = amountGwei * 1 gwei; + cheats.assume(amountGwei <= withdrawableRestakedExecutionLayerGwei); address recipient = cheats.addr(uint(123_456_789)); @@ -486,8 +486,8 @@ contract EigenPodUnitTests_EPMFunctions is EigenPodUnitTests { // ensure valid fuzzed wei amounts uint64 withdrawableRestakedExecutionLayerGwei = pod.withdrawableRestakedExecutionLayerGwei(); - // Bound to prevent uint64 overflow when converting wei to gwei in withdrawRestakedBeaconChainETH - randAmountWei = bound(randAmountWei, 0, type(uint64).max * 1 gwei); + // Bound to prevent overflow, but keep full wei precision to test rounding behavior + randAmountWei = bound(randAmountWei, 0, uint(type(uint64).max) * 1 gwei); uint randAmountWeiAdjusted = randAmountWei - (randAmountWei % 1 gwei); cheats.assume((randAmountWei / 1 gwei) <= withdrawableRestakedExecutionLayerGwei); From 9b95ab0dfa9f48fcf95dbd61f1a3bbfac368c687 Mon Sep 17 00:00:00 2001 From: Yash Patil <40046473+ypatil12@users.noreply.github.com> Date: Mon, 1 Dec 2025 16:18:15 -0500 Subject: [PATCH 7/8] chore: bindings --- pkg/bindings/BN254/binding.go | 2 +- pkg/bindings/BN254CertificateVerifier/binding.go | 2 +- pkg/bindings/BN254SignatureVerifier/binding.go | 2 +- pkg/bindings/BackingEigen/binding.go | 2 +- pkg/bindings/BeaconChainProofs/binding.go | 2 +- pkg/bindings/ECDSACertificateVerifier/binding.go | 2 +- pkg/bindings/Eigen/binding.go | 2 +- pkg/bindings/Endian/binding.go | 2 +- pkg/bindings/Merkle/binding.go | 2 +- pkg/bindings/OperatorSetLib/binding.go | 2 +- pkg/bindings/OperatorTableUpdater/binding.go | 2 +- pkg/bindings/PauserRegistry/binding.go | 2 +- pkg/bindings/PermissionController/binding.go | 2 +- pkg/bindings/ProtocolRegistry/binding.go | 2 +- pkg/bindings/ReleaseManager/binding.go | 2 +- pkg/bindings/TaskMailbox/binding.go | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pkg/bindings/BN254/binding.go b/pkg/bindings/BN254/binding.go index e574ea4e30..e4fe3dc625 100644 --- a/pkg/bindings/BN254/binding.go +++ b/pkg/bindings/BN254/binding.go @@ -32,7 +32,7 @@ var ( // BN254MetaData contains all meta data concerning the BN254 contract. var BN254MetaData = &bind.MetaData{ ABI: "[{\"type\":\"error\",\"name\":\"ECAddFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECMulFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECPairingFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExpModFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ScalarTooLarge\",\"inputs\":[]}]", - Bin: "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220525873b9d5bfb80a423d39b32b26f3621f3cec7aea4f8ba5d032d25caf80a19c64736f6c634300081e0033", + Bin: "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212201d0d337e635f73102ddcee593e2237a05a00197e17c35efd8bdeae60b88c423764736f6c634300081e0033", } // BN254ABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/BN254CertificateVerifier/binding.go b/pkg/bindings/BN254CertificateVerifier/binding.go index 0a1fb12986..c13407b60e 100644 --- a/pkg/bindings/BN254CertificateVerifier/binding.go +++ b/pkg/bindings/BN254CertificateVerifier/binding.go @@ -86,7 +86,7 @@ type OperatorSet struct { // BN254CertificateVerifierMetaData contains all meta data concerning the BN254CertificateVerifier contract. var BN254CertificateVerifierMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_operatorTableUpdater\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"OPERATOR_INFO_LEAF_SALT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"OPERATOR_TABLE_LEAF_SALT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateCertificateDigest\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"calculateOperatorInfoLeaf\",\"inputs\":[{\"name\":\"operatorInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"calculateOperatorTableLeaf\",\"inputs\":[{\"name\":\"operatorTableBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getNonsignerOperatorInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorCount\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorSetInfo\",\"components\":[{\"name\":\"operatorInfoTreeRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"numOperators\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"aggregatePubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"totalWeights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalStakeWeights\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isNonsignerCached\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isReferenceTimestampSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorTableUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"trySignatureVerification\",\"inputs\":[{\"name\":\"msgHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"aggPubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apkG2\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[{\"name\":\"pairingSuccessful\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"signatureValid\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorSetInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorSetInfo\",\"components\":[{\"name\":\"operatorInfoTreeRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"numOperators\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"aggregatePubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"totalWeights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}]}]}],\"outputs\":[{\"name\":\"totalSignedStakeWeights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}]}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}]}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorSetInfo\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorSetInfo\",\"components\":[{\"name\":\"operatorInfoTreeRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"numOperators\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"aggregatePubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"totalWeights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECAddFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECMulFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECPairingFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EmptyRoot\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExpModFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidIndex\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorIndex\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProofLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NonSignerIndicesNotSorted\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RootDisabled\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", - Bin: "0x60a060405234801561000f575f5ffd5b50604051612c1d380380612c1d83398101604081905261002e91610105565b6001600160a01b038116608052610043610049565b50610132565b5f54610100900460ff16156100b45760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610103575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b5f60208284031215610115575f5ffd5b81516001600160a01b038116811461012b575f5ffd5b9392505050565b608051612ac56101585f395f8181610286015281816107d00152610f680152612ac55ff3fe608060405234801561000f575f5ffd5b5060043610610127575f3560e01c80636141879e116100a9578063a2c902f51161006e578063a2c902f5146102e6578063a2f2e24d146102ee578063cd83a72b14610301578063dd2ae1b914610314578063eb39e68f14610327575f5ffd5b80636141879e146102595780636738c40b1461026c57806368d6e081146102815780637d1d1f5b146102c057806384818920146102d3575f5ffd5b806323c2a3cb116100ef57806323c2a3cb146101d857806326af6a3c146101eb578063538a37901461020b5780635be872741461021e5780635ddb9b5b14610231575f5ffd5b8063017d79741461012b578063080b715014610153578063121409ea14610173578063184674341461018d5780631a18746c146101ae575b5f5ffd5b61013e6101393660046123ad565b610347565b60405190151581526020015b60405180910390f35b610166610161366004612488565b6104d8565b60405161014a91906124d3565b61017b608e81565b60405160ff909116815260200161014a565b6101a061019b36600461250a565b6104ed565b60405190815260200161014a565b6101c16101bc366004612532565b610550565b60408051921515835290151560208301520161014a565b6101a06101e6366004612580565b610571565b6101fe6101f93660046125b2565b6105a7565b60405161014a9190612627565b6101a0610219366004612654565b61065f565b61013e61022c3660046125b2565b6106ae565b61024461023f366004612685565b610779565b60405163ffffffff909116815260200161014a565b610244610267366004612685565b61079f565b61027f61027a3660046126b5565b6107c5565b005b6102a87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161014a565b6101666102ce366004612580565b6109ab565b6102a86102e1366004612685565b610a2b565b61017b607581565b6101a06102fc36600461276e565b610a54565b61013e61030f366004612580565b610a6b565b61013e6103223660046127da565b610aa1565b61033a610335366004612580565b610b34565b60405161014a9190612892565b5f5f6103538585610bf9565b90505f61035f86610d96565b5f8181526004602081815260408084208a5163ffffffff1685528252808420815160808101835281548152600182015481850152825180840184526002830154815260038301548186015281840152938101805483518186028101860190945280845296975094959394909360608601938301828280156103fd57602002820191905f5260205f20905b8154815260200190600101908083116103e9575b50505050508152505090505f8160600151905085518451146104325760405163512509d360e11b815260040160405180910390fd5b5f5b84518110156104c7575f612710888381518110610453576104536128a4565b602002602001015161ffff16848481518110610471576104716128a4565b602002602001015161048391906128cc565b61048d91906128f7565b9050808683815181106104a2576104a26128a4565b602002602001015110156104be575f96505050505050506104d1565b50600101610434565b5060019450505050505b9392505050565b60606104e48383610bf9565b90505b92915050565b604080517fd9f77a423768f4b0526fa60a7c732334516a93f1d228dce50ad804ea74ced36e602082015263ffffffff841691810191909152606081018290525f906080015b60405160208183030381529060405280519060200120905092915050565b5f5f61056486848787600162061a80610df9565b9150915094509492505050565b5f5f61057c84610d96565b5f90815260046020908152604080832063ffffffff8716845290915290206001015491505092915050565b6105af611d46565b5f6105b985610d96565b5f81815260056020908152604080832063ffffffff89168452825280832087845282529182902082516080810184528154818501908152600183015460608301528152600282018054855181860281018601909652808652959650909491938584019390929083018282801561064c57602002820191905f5260205f20905b815481526020019060010190808311610638575b5050505050815250509150509392505050565b5f6075826040516020016106739190612627565b60408051601f1981840301815290829052610691929160200161290a565b604051602081830303815290604052805190602001209050919050565b5f5f6106b985610d96565b5f81815260056020908152604080832063ffffffff8916845282528083208784528252808320815160808101835281548184019081526001830154606083015281526002820180548451818702810187019095528085529697509495909491938581019392919083018282801561074d57602002820191905f5260205f20905b815481526020019060010190808311610739575b505050919092525050815151919250501580159061076f575080516020015115155b9695505050505050565b5f5f61078483610d96565b5f9081526003602052604090205463ffffffff169392505050565b5f5f6107aa83610d96565b5f9081526002602052604090205463ffffffff169392505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461080e5760405163030c1b6b60e11b815260040160405180910390fd5b5f61082661082136879003870187612685565b610d96565b5f8181526003602052604090205490915063ffffffff9081169085161161086057604051632f20889f60e01b815260040160405180910390fd5b5f81815260046020818152604080842063ffffffff891685528252928390208651815581870151600182015592860151805160028501558101516003840155606086015180518794936108b893908501920190611d70565b5050505f818152600360209081526040909120805463ffffffff191663ffffffff87161790556108ea90830183612933565b5f8281526001602090815260409182902080546001600160a01b0319166001600160a01b0394909416939093179092556109299190840190840161294c565b5f828152600260209081526040808320805463ffffffff191663ffffffff958616179055600682528083209388168352929052819020805460ff19166001179055517f93e6bea1c9b5dce4a5c07b00261e956df2a4a253d9ab6ca070ca2037d72ada9e9061099c90879087908790612965565b60405180910390a15050505050565b60605f6109b784610d96565b5f81815260046020818152604080842063ffffffff891685528252928390209091018054835181840281018401909452808452939450919290830182828015610a1d57602002820191905f5260205f20905b815481526020019060010190808311610a09575b505050505091505092915050565b5f5f610a3683610d96565b5f908152600160205260409020546001600160a01b03169392505050565b5f608e8383604051602001610532939291906129b1565b5f5f610a7684610d96565b5f90815260066020908152604080832063ffffffff8716845290915290205460ff1691505092915050565b5f5f610aad8585610bf9565b90508251815114610ad15760405163512509d360e11b815260040160405180910390fd5b5f5b8151811015610b2857838181518110610aee57610aee6128a4565b6020026020010151828281518110610b0857610b086128a4565b60200260200101511015610b20575f925050506104d1565b600101610ad3565b50600195945050505050565b610b3c611db9565b5f610b4684610d96565b5f81815260046020818152604080842063ffffffff8916855282529283902083516080810185528154815260018201548184015284518086018652600283015481526003830154818501528186015292810180548551818502810185019096528086529596509294909360608601939092909190830182828015610be757602002820191905f5260205f20905b815481526020019060010190808311610bd3575b50505050508152505091505092915050565b6060610c03611deb565b610c0c84610d96565b8082528351610c1b9190610ec1565b80515f908152600460208181526040808420875163ffffffff1685528252928390208351608081018552815481526001820154818401528451808601865260028301548152600383015481850152818601529281018054855181850281018501909652808652939491936060860193830182828015610cb757602002820191905f5260205f20905b815481526020019060010190808311610ca3575b505050919092525050506020820181905260600151516001600160401b03811115610ce457610ce4611f19565b604051908082528060200260200182016040528015610d0d578160200160208202803683370190505b5060408201525f5b81602001516060015151811015610d71578160200151606001518181518110610d4057610d406128a4565b602002602001015182604001518281518110610d5e57610d5e6128a4565b6020908102919091010152600101610d15565b50610d7c8184610ffb565b6060820152610d8b8184611158565b604001519392505050565b5f815f0151826020015163ffffffff16604051602001610de192919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b6040516020818303038152906040526104e7906129d8565b5f5f5f610e05896111d7565b90505f610e148a89898c611261565b90505f610e2b610e248a84611315565b8b9061137d565b90505f610e6d610e6684610e606040805180820182525f80825260209182015281518083019092526001825260029082015290565b90611315565b859061137d565b90508715610e9257610e8982610e816113f1565b838c8b6114b1565b96509450610eb2565b610ea582610e9e6113f1565b838c6116c5565b95508515610eb257600194505b50505050965096945050505050565b5f8281526002602052604090205463ffffffff16801580610ef15750610ee781836129fb565b63ffffffff164211155b610f0e5760405163640fcd6b60e11b815260040160405180910390fd5b5f83815260066020908152604080832063ffffffff8616845290915290205460ff16610f4d57604051630cad17b760e31b815260040160405180910390fd5b60405163193877e160e21b815263ffffffff831660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906364e1df8490602401602060405180830381865afa158015610fb5573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fd99190612a17565b610ff657604051631b14174b60e01b815260040160405180910390fd5b505050565b6040805180820182525f80825260209182018190528251808401909352808352908201819052805b836080015151811015611150575f84608001518281518110611047576110476128a4565b602002602001015190505f82111561108357805163ffffffff80851691161161108357604051631d8c4d1760e31b815260040160405180910390fd5b6020808701510151815163ffffffff16106110b1576040516301fa53c760e11b815260040160405180910390fd5b855185515f916110c191846118fc565b80519091506110d190869061137d565b94505f5b8160200151518110156111435787604001515181101561113b5781602001518181518110611105576111056128a4565b602002602001015188604001518281518110611123576111236128a4565b602002602001018181516111379190612a36565b9052505b6001016110d5565b5050519150600101611023565b505092915050565b5f6111786111698460600151611a73565b6020850151604001519061137d565b90505f61118c835f015184602001516104ed565b90505f5f6111a4838587606001518860400151610550565b915091508180156111b25750805b6111cf5760405163439cc0cd60e01b815260040160405180910390fd5b505050505050565b604080518082019091525f80825260208201525f80806112045f516020612a705f395f51905f5286612a49565b90505b61121081611b09565b90935091505f516020612a705f395f51905f528283098303611248576040805180820190915290815260208101919091529392505050565b5f516020612a705f395f51905f52600182089050611207565b8251602080850151845180519083015186840151805190850151875188870151604080519889018e90528801989098526060870195909552608086019390935260a085019190915260c084015260e08301526101008201526101208101919091525f907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019061014001604051602081830303815290604052805190602001205f1c61130c9190612a49565b95945050505050565b604080518082019091525f8082526020820152611330611e30565b835181526020808501519082015260408082018490525f908360608460076107d05a03fa9050808061135e57fe5b508061115057604051632319df1960e11b815260040160405180910390fd5b604080518082019091525f8082526020820152611398611e4e565b835181526020808501518183015283516040808401919091529084015160608301525f908360808460066107d05a03fa905080806113d257fe5b50806111505760405163d4b68fd760e01b815260040160405180910390fd5b6113f9611e6c565b50604080516080810182527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28183019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed6060830152815281518083019092527f275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec82527f1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d60208381019190915281019190915290565b6040805180820182528681526020808201869052825180840190935286835282018490525f918291906114e2611e8c565b5f5b6002811015611699575f6114f98260066128cc565b905084826002811061150d5761150d6128a4565b6020020151518361151e835f612a5c565b600c811061152e5761152e6128a4565b6020020152848260028110611545576115456128a4565b6020020151602001518382600161155c9190612a5c565b600c811061156c5761156c6128a4565b6020020152838260028110611583576115836128a4565b6020020151515183611596836002612a5c565b600c81106115a6576115a66128a4565b60200201528382600281106115bd576115bd6128a4565b60200201515160016020020151836115d6836003612a5c565b600c81106115e6576115e66128a4565b60200201528382600281106115fd576115fd6128a4565b6020020151602001515f60028110611617576116176128a4565b602002015183611628836004612a5c565b600c8110611638576116386128a4565b602002015283826002811061164f5761164f6128a4565b60200201516020015160016002811061166a5761166a6128a4565b60200201518361167b836005612a5c565b600c811061168b5761168b6128a4565b6020020152506001016114e4565b506116a2611eab565b5f6020826101808560088cfa9151919c9115159b50909950505050505050505050565b6040805180820182528581526020808201859052825180840190935285835282018390525f916116f3611e8c565b5f5b60028110156118aa575f61170a8260066128cc565b905084826002811061171e5761171e6128a4565b6020020151518361172f835f612a5c565b600c811061173f5761173f6128a4565b6020020152848260028110611756576117566128a4565b6020020151602001518382600161176d9190612a5c565b600c811061177d5761177d6128a4565b6020020152838260028110611794576117946128a4565b60200201515151836117a7836002612a5c565b600c81106117b7576117b76128a4565b60200201528382600281106117ce576117ce6128a4565b60200201515160016020020151836117e7836003612a5c565b600c81106117f7576117f76128a4565b602002015283826002811061180e5761180e6128a4565b6020020151602001515f60028110611828576118286128a4565b602002015183611839836004612a5c565b600c8110611849576118496128a4565b6020020152838260028110611860576118606128a4565b60200201516020015160016002811061187b5761187b6128a4565b60200201518361188c836005612a5c565b600c811061189c5761189c6128a4565b6020020152506001016116f5565b506118b3611eab565b5f6020826101808560086107d05a03fa905080806118cd57fe5b50806118ec576040516324ccc79360e21b815260040160405180910390fd5b5051151598975050505050505050565b611904611d46565b5f84815260056020908152604080832063ffffffff808816855290835281842086519091168452825280832081516080810183528154818401908152600183015460608301528152600282018054845181870281018701909552808552919492938584019390929083018282801561199957602002820191905f5260205f20905b815481526020019060010190808311611985575b5050509190925250508151519192505f9115159050806119bd575081516020015115155b905080611a66575f6119dd8787875f015188604001518960200151611b85565b9050806119fd5760405163439cc0cd60e01b815260040160405180910390fd5b6040808601515f8981526005602090815283822063ffffffff808c1684529082528483208a5190911683528152929020815180518255830151600182015582820151805192939192611a559260028501920190611d70565b509050508460400151935050611a6a565b8192505b50509392505050565b604080518082019091525f80825260208201528151158015611a9757506020820151155b15611ab4575050604080518082019091525f808252602082015290565b6040518060400160405280835f015181526020015f516020612a705f395f51905f528460200151611ae59190612a49565b611afc905f516020612a705f395f51905f52612a36565b905292915050565b919050565b5f80805f516020612a705f395f51905f5260035f516020612a705f395f51905f52865f516020612a705f395f51905f52888909090890505f611b79827f0c19139cb84c680a6e14116da060561765e05aa45a1c72a34f082305b61f3f525f516020612a705f395f51905f52611bd3565b91959194509092505050565b5f5f611b908461065f565b5f88815260046020908152604080832063ffffffff808c168552925290912054919250611bc7908590839085908a811690611c4c16565b98975050505050505050565b5f5f611bdd611eab565b611be5611ec9565b602080825281810181905260408201819052606082018890526080820187905260a082018690528260c08360056107d05a03fa92508280611c2257fe5b5082611c415760405163d51edae360e01b815260040160405180910390fd5b505195945050505050565b5f83611c6b576040516329e7276760e11b815260040160405180910390fd5b83611c77868585611c81565b1495945050505050565b5f83515f03611c915750816104d1565b60208451611c9f9190612a49565b15611cbd576040516313717da960e21b815260040160405180910390fd5b8260205b85518111611d1e57611cd4600285612a49565b5f03611cf557815f528086015160205260405f209150600284049350611d0c565b808601515f528160205260405f2091506002840493505b611d17602082612a5c565b9050611cc1565b508215611d3e576040516363df817160e01b815260040160405180910390fd5b949350505050565b604080516080810182525f91810182815260608201929092529081905b8152602001606081525090565b828054828255905f5260205f20908101928215611da9579160200282015b82811115611da9578251825591602001919060010190611d8e565b50611db5929150611ee7565b5090565b60405180608001604052805f81526020015f8152602001611d6360405180604001604052805f81526020015f81525090565b60405180608001604052805f8152602001611e04611db9565b815260200160608152602001611e2b60405180604001604052805f81526020015f81525090565b905290565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b6040518060400160405280611e7f611efb565b8152602001611e2b611efb565b604051806101800160405280600c906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b5b80821115611db5575f8155600101611ee8565b60405180604001604052806002906020820280368337509192915050565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b0381118282101715611f4f57611f4f611f19565b60405290565b60405160a081016001600160401b0381118282101715611f4f57611f4f611f19565b604051606081016001600160401b0381118282101715611f4f57611f4f611f19565b604051608081016001600160401b0381118282101715611f4f57611f4f611f19565b604051601f8201601f191681016001600160401b0381118282101715611fe357611fe3611f19565b604052919050565b80356001600160a01b0381168114611b04575f5ffd5b803563ffffffff81168114611b04575f5ffd5b5f60408284031215612024575f5ffd5b61202c611f2d565b905061203782611feb565b815261204560208301612001565b602082015292915050565b5f60408284031215612060575f5ffd5b612068611f2d565b823581526020928301359281019290925250919050565b5f82601f83011261208e575f5ffd5b612096611f2d565b8060408401858111156120a7575f5ffd5b845b818110156120c15780358452602093840193016120a9565b509095945050505050565b5f608082840312156120dc575f5ffd5b6120e4611f2d565b90506120f0838361207f565b8152612045836040840161207f565b5f6001600160401b0382111561211757612117611f19565b5060051b60200190565b5f82601f830112612130575f5ffd5b813561214361213e826120ff565b611fbb565b8082825260208201915060208360051b860101925085831115612164575f5ffd5b602085015b83811015612181578035835260209283019201612169565b5095945050505050565b5f6060828403121561219b575f5ffd5b6121a3611f2d565b90506121af8383612050565b815260408201356001600160401b038111156121c9575f5ffd5b6121d584828501612121565b60208301525092915050565b5f61012082840312156121f2575f5ffd5b6121fa611f55565b905061220582612001565b81526020828101359082015261221e8360408401612050565b604082015261223083608084016120cc565b60608201526101008201356001600160401b0381111561224e575f5ffd5b8201601f8101841361225e575f5ffd5b803561226c61213e826120ff565b8082825260208201915060208360051b85010192508683111561228d575f5ffd5b602084015b8381101561239d5780356001600160401b038111156122af575f5ffd5b85016060818a03601f190112156122c4575f5ffd5b6122cc611f77565b6122d860208301612001565b815260408201356001600160401b038111156122f2575f5ffd5b82016020810190603f018b13612306575f5ffd5b80356001600160401b0381111561231f5761231f611f19565b612332601f8201601f1916602001611fbb565b8181528c6020838501011115612346575f5ffd5b816020840160208301375f6020838301015280602085015250505060608201356001600160401b03811115612379575f5ffd5b6123888b60208386010161218b565b60408301525084525060209283019201612292565b5060808501525091949350505050565b5f5f5f608084860312156123bf575f5ffd5b6123c98585612014565b925060408401356001600160401b038111156123e3575f5ffd5b6123ef868287016121e1565b92505060608401356001600160401b0381111561240a575f5ffd5b8401601f8101861361241a575f5ffd5b803561242861213e826120ff565b8082825260208201915060208360051b850101925088831115612449575f5ffd5b6020840193505b8284101561247a57833561ffff81168114612469575f5ffd5b825260209384019390910190612450565b809450505050509250925092565b5f5f60608385031215612499575f5ffd5b6124a38484612014565b915060408301356001600160401b038111156124bd575f5ffd5b6124c9858286016121e1565b9150509250929050565b602080825282518282018190525f918401906040840190835b818110156120c15783518352602093840193909201916001016124ec565b5f5f6040838503121561251b575f5ffd5b61252483612001565b946020939093013593505050565b5f5f5f5f6101208587031215612546575f5ffd5b843593506125578660208701612050565b925061256686606087016120cc565b91506125758660e08701612050565b905092959194509250565b5f5f60608385031215612591575f5ffd5b61259b8484612014565b91506125a960408401612001565b90509250929050565b5f5f5f608084860312156125c4575f5ffd5b6125ce8585612014565b92506125dc60408501612001565b929592945050506060919091013590565b5f8151808452602084019350602083015f5b8281101561261d5781518652602095860195909101906001016125ff565b5093949350505050565b60208082528251805183830152015160408201525f6020830151606080840152611d3e60808401826125ed565b5f60208284031215612664575f5ffd5b81356001600160401b03811115612679575f5ffd5b611d3e8482850161218b565b5f60408284031215612695575f5ffd5b6104e48383612014565b5f604082840312156126af575f5ffd5b50919050565b5f5f5f5f60c085870312156126c8575f5ffd5b6126d2868661269f565b93506126e060408601612001565b925060608501356001600160401b038111156126fa575f5ffd5b850160a0818803121561270b575f5ffd5b612713611f99565b813581526020808301359082015261272e8860408401612050565b604082015260808201356001600160401b0381111561274b575f5ffd5b61275789828501612121565b60608301525092506125759050866080870161269f565b5f5f6020838503121561277f575f5ffd5b82356001600160401b03811115612794575f5ffd5b8301601f810185136127a4575f5ffd5b80356001600160401b038111156127b9575f5ffd5b8560208284010111156127ca575f5ffd5b6020919091019590945092505050565b5f5f5f608084860312156127ec575f5ffd5b6127f68585612014565b925060408401356001600160401b03811115612810575f5ffd5b61281c868287016121e1565b92505060608401356001600160401b03811115612837575f5ffd5b61284386828701612121565b9150509250925092565b80518252602081015160208301525f6040820151612878604085018280518252602090810151910152565b50606082015160a06080850152611d3e60a08501826125ed565b602081525f6104e4602083018461284d565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176104e7576104e76128b8565b634e487b7160e01b5f52601260045260245ffd5b5f82612905576129056128e3565b500490565b60ff60f81b8360f81b1681525f82518060208501600185015e5f92016001019182525092915050565b5f60208284031215612943575f5ffd5b6104e482611feb565b5f6020828403121561295c575f5ffd5b6104e482612001565b6001600160a01b0361297685611feb565b16815263ffffffff61298a60208601612001565b16602082015263ffffffff83166040820152608060608201525f61130c608083018461284d565b60f884901b6001600160f81b0319168152818360018301375f910160010190815292915050565b805160208083015191908110156126af575f1960209190910360031b1b16919050565b63ffffffff81811683821601908111156104e7576104e76128b8565b5f60208284031215612a27575f5ffd5b815180151581146104d1575f5ffd5b818103818111156104e7576104e76128b8565b5f82612a5757612a576128e3565b500690565b808201808211156104e7576104e76128b856fe30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47a2646970667358221220207e95b97158fb6b207979ba2c964ffa52769133be22cef0b4e7df97c209215264736f6c634300081e0033", + Bin: "0x60a060405234801561000f575f5ffd5b50604051612c1d380380612c1d83398101604081905261002e91610105565b6001600160a01b038116608052610043610049565b50610132565b5f54610100900460ff16156100b45760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610103575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b5f60208284031215610115575f5ffd5b81516001600160a01b038116811461012b575f5ffd5b9392505050565b608051612ac56101585f395f8181610286015281816107d00152610f680152612ac55ff3fe608060405234801561000f575f5ffd5b5060043610610127575f3560e01c80636141879e116100a9578063a2c902f51161006e578063a2c902f5146102e6578063a2f2e24d146102ee578063cd83a72b14610301578063dd2ae1b914610314578063eb39e68f14610327575f5ffd5b80636141879e146102595780636738c40b1461026c57806368d6e081146102815780637d1d1f5b146102c057806384818920146102d3575f5ffd5b806323c2a3cb116100ef57806323c2a3cb146101d857806326af6a3c146101eb578063538a37901461020b5780635be872741461021e5780635ddb9b5b14610231575f5ffd5b8063017d79741461012b578063080b715014610153578063121409ea14610173578063184674341461018d5780631a18746c146101ae575b5f5ffd5b61013e6101393660046123ad565b610347565b60405190151581526020015b60405180910390f35b610166610161366004612488565b6104d8565b60405161014a91906124d3565b61017b608e81565b60405160ff909116815260200161014a565b6101a061019b36600461250a565b6104ed565b60405190815260200161014a565b6101c16101bc366004612532565b610550565b60408051921515835290151560208301520161014a565b6101a06101e6366004612580565b610571565b6101fe6101f93660046125b2565b6105a7565b60405161014a9190612627565b6101a0610219366004612654565b61065f565b61013e61022c3660046125b2565b6106ae565b61024461023f366004612685565b610779565b60405163ffffffff909116815260200161014a565b610244610267366004612685565b61079f565b61027f61027a3660046126b5565b6107c5565b005b6102a87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161014a565b6101666102ce366004612580565b6109ab565b6102a86102e1366004612685565b610a2b565b61017b607581565b6101a06102fc36600461276e565b610a54565b61013e61030f366004612580565b610a6b565b61013e6103223660046127da565b610aa1565b61033a610335366004612580565b610b34565b60405161014a9190612892565b5f5f6103538585610bf9565b90505f61035f86610d96565b5f8181526004602081815260408084208a5163ffffffff1685528252808420815160808101835281548152600182015481850152825180840184526002830154815260038301548186015281840152938101805483518186028101860190945280845296975094959394909360608601938301828280156103fd57602002820191905f5260205f20905b8154815260200190600101908083116103e9575b50505050508152505090505f8160600151905085518451146104325760405163512509d360e11b815260040160405180910390fd5b5f5b84518110156104c7575f612710888381518110610453576104536128a4565b602002602001015161ffff16848481518110610471576104716128a4565b602002602001015161048391906128cc565b61048d91906128f7565b9050808683815181106104a2576104a26128a4565b602002602001015110156104be575f96505050505050506104d1565b50600101610434565b5060019450505050505b9392505050565b60606104e48383610bf9565b90505b92915050565b604080517fd9f77a423768f4b0526fa60a7c732334516a93f1d228dce50ad804ea74ced36e602082015263ffffffff841691810191909152606081018290525f906080015b60405160208183030381529060405280519060200120905092915050565b5f5f61056486848787600162061a80610df9565b9150915094509492505050565b5f5f61057c84610d96565b5f90815260046020908152604080832063ffffffff8716845290915290206001015491505092915050565b6105af611d46565b5f6105b985610d96565b5f81815260056020908152604080832063ffffffff89168452825280832087845282529182902082516080810184528154818501908152600183015460608301528152600282018054855181860281018601909652808652959650909491938584019390929083018282801561064c57602002820191905f5260205f20905b815481526020019060010190808311610638575b5050505050815250509150509392505050565b5f6075826040516020016106739190612627565b60408051601f1981840301815290829052610691929160200161290a565b604051602081830303815290604052805190602001209050919050565b5f5f6106b985610d96565b5f81815260056020908152604080832063ffffffff8916845282528083208784528252808320815160808101835281548184019081526001830154606083015281526002820180548451818702810187019095528085529697509495909491938581019392919083018282801561074d57602002820191905f5260205f20905b815481526020019060010190808311610739575b505050919092525050815151919250501580159061076f575080516020015115155b9695505050505050565b5f5f61078483610d96565b5f9081526003602052604090205463ffffffff169392505050565b5f5f6107aa83610d96565b5f9081526002602052604090205463ffffffff169392505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461080e5760405163030c1b6b60e11b815260040160405180910390fd5b5f61082661082136879003870187612685565b610d96565b5f8181526003602052604090205490915063ffffffff9081169085161161086057604051632f20889f60e01b815260040160405180910390fd5b5f81815260046020818152604080842063ffffffff891685528252928390208651815581870151600182015592860151805160028501558101516003840155606086015180518794936108b893908501920190611d70565b5050505f818152600360209081526040909120805463ffffffff191663ffffffff87161790556108ea90830183612933565b5f8281526001602090815260409182902080546001600160a01b0319166001600160a01b0394909416939093179092556109299190840190840161294c565b5f828152600260209081526040808320805463ffffffff191663ffffffff958616179055600682528083209388168352929052819020805460ff19166001179055517f93e6bea1c9b5dce4a5c07b00261e956df2a4a253d9ab6ca070ca2037d72ada9e9061099c90879087908790612965565b60405180910390a15050505050565b60605f6109b784610d96565b5f81815260046020818152604080842063ffffffff891685528252928390209091018054835181840281018401909452808452939450919290830182828015610a1d57602002820191905f5260205f20905b815481526020019060010190808311610a09575b505050505091505092915050565b5f5f610a3683610d96565b5f908152600160205260409020546001600160a01b03169392505050565b5f608e8383604051602001610532939291906129b1565b5f5f610a7684610d96565b5f90815260066020908152604080832063ffffffff8716845290915290205460ff1691505092915050565b5f5f610aad8585610bf9565b90508251815114610ad15760405163512509d360e11b815260040160405180910390fd5b5f5b8151811015610b2857838181518110610aee57610aee6128a4565b6020026020010151828281518110610b0857610b086128a4565b60200260200101511015610b20575f925050506104d1565b600101610ad3565b50600195945050505050565b610b3c611db9565b5f610b4684610d96565b5f81815260046020818152604080842063ffffffff8916855282529283902083516080810185528154815260018201548184015284518086018652600283015481526003830154818501528186015292810180548551818502810185019096528086529596509294909360608601939092909190830182828015610be757602002820191905f5260205f20905b815481526020019060010190808311610bd3575b50505050508152505091505092915050565b6060610c03611deb565b610c0c84610d96565b8082528351610c1b9190610ec1565b80515f908152600460208181526040808420875163ffffffff1685528252928390208351608081018552815481526001820154818401528451808601865260028301548152600383015481850152818601529281018054855181850281018501909652808652939491936060860193830182828015610cb757602002820191905f5260205f20905b815481526020019060010190808311610ca3575b505050919092525050506020820181905260600151516001600160401b03811115610ce457610ce4611f19565b604051908082528060200260200182016040528015610d0d578160200160208202803683370190505b5060408201525f5b81602001516060015151811015610d71578160200151606001518181518110610d4057610d406128a4565b602002602001015182604001518281518110610d5e57610d5e6128a4565b6020908102919091010152600101610d15565b50610d7c8184610ffb565b6060820152610d8b8184611158565b604001519392505050565b5f815f0151826020015163ffffffff16604051602001610de192919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b6040516020818303038152906040526104e7906129d8565b5f5f5f610e05896111d7565b90505f610e148a89898c611261565b90505f610e2b610e248a84611315565b8b9061137d565b90505f610e6d610e6684610e606040805180820182525f80825260209182015281518083019092526001825260029082015290565b90611315565b859061137d565b90508715610e9257610e8982610e816113f1565b838c8b6114b1565b96509450610eb2565b610ea582610e9e6113f1565b838c6116c5565b95508515610eb257600194505b50505050965096945050505050565b5f8281526002602052604090205463ffffffff16801580610ef15750610ee781836129fb565b63ffffffff164211155b610f0e5760405163640fcd6b60e11b815260040160405180910390fd5b5f83815260066020908152604080832063ffffffff8616845290915290205460ff16610f4d57604051630cad17b760e31b815260040160405180910390fd5b60405163193877e160e21b815263ffffffff831660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906364e1df8490602401602060405180830381865afa158015610fb5573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fd99190612a17565b610ff657604051631b14174b60e01b815260040160405180910390fd5b505050565b6040805180820182525f80825260209182018190528251808401909352808352908201819052805b836080015151811015611150575f84608001518281518110611047576110476128a4565b602002602001015190505f82111561108357805163ffffffff80851691161161108357604051631d8c4d1760e31b815260040160405180910390fd5b6020808701510151815163ffffffff16106110b1576040516301fa53c760e11b815260040160405180910390fd5b855185515f916110c191846118fc565b80519091506110d190869061137d565b94505f5b8160200151518110156111435787604001515181101561113b5781602001518181518110611105576111056128a4565b602002602001015188604001518281518110611123576111236128a4565b602002602001018181516111379190612a36565b9052505b6001016110d5565b5050519150600101611023565b505092915050565b5f6111786111698460600151611a73565b6020850151604001519061137d565b90505f61118c835f015184602001516104ed565b90505f5f6111a4838587606001518860400151610550565b915091508180156111b25750805b6111cf5760405163439cc0cd60e01b815260040160405180910390fd5b505050505050565b604080518082019091525f80825260208201525f80806112045f516020612a705f395f51905f5286612a49565b90505b61121081611b09565b90935091505f516020612a705f395f51905f528283098303611248576040805180820190915290815260208101919091529392505050565b5f516020612a705f395f51905f52600182089050611207565b8251602080850151845180519083015186840151805190850151875188870151604080519889018e90528801989098526060870195909552608086019390935260a085019190915260c084015260e08301526101008201526101208101919091525f907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019061014001604051602081830303815290604052805190602001205f1c61130c9190612a49565b95945050505050565b604080518082019091525f8082526020820152611330611e30565b835181526020808501519082015260408082018490525f908360608460076107d05a03fa9050808061135e57fe5b508061115057604051632319df1960e11b815260040160405180910390fd5b604080518082019091525f8082526020820152611398611e4e565b835181526020808501518183015283516040808401919091529084015160608301525f908360808460066107d05a03fa905080806113d257fe5b50806111505760405163d4b68fd760e01b815260040160405180910390fd5b6113f9611e6c565b50604080516080810182527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28183019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed6060830152815281518083019092527f275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec82527f1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d60208381019190915281019190915290565b6040805180820182528681526020808201869052825180840190935286835282018490525f918291906114e2611e8c565b5f5b6002811015611699575f6114f98260066128cc565b905084826002811061150d5761150d6128a4565b6020020151518361151e835f612a5c565b600c811061152e5761152e6128a4565b6020020152848260028110611545576115456128a4565b6020020151602001518382600161155c9190612a5c565b600c811061156c5761156c6128a4565b6020020152838260028110611583576115836128a4565b6020020151515183611596836002612a5c565b600c81106115a6576115a66128a4565b60200201528382600281106115bd576115bd6128a4565b60200201515160016020020151836115d6836003612a5c565b600c81106115e6576115e66128a4565b60200201528382600281106115fd576115fd6128a4565b6020020151602001515f60028110611617576116176128a4565b602002015183611628836004612a5c565b600c8110611638576116386128a4565b602002015283826002811061164f5761164f6128a4565b60200201516020015160016002811061166a5761166a6128a4565b60200201518361167b836005612a5c565b600c811061168b5761168b6128a4565b6020020152506001016114e4565b506116a2611eab565b5f6020826101808560088cfa9151919c9115159b50909950505050505050505050565b6040805180820182528581526020808201859052825180840190935285835282018390525f916116f3611e8c565b5f5b60028110156118aa575f61170a8260066128cc565b905084826002811061171e5761171e6128a4565b6020020151518361172f835f612a5c565b600c811061173f5761173f6128a4565b6020020152848260028110611756576117566128a4565b6020020151602001518382600161176d9190612a5c565b600c811061177d5761177d6128a4565b6020020152838260028110611794576117946128a4565b60200201515151836117a7836002612a5c565b600c81106117b7576117b76128a4565b60200201528382600281106117ce576117ce6128a4565b60200201515160016020020151836117e7836003612a5c565b600c81106117f7576117f76128a4565b602002015283826002811061180e5761180e6128a4565b6020020151602001515f60028110611828576118286128a4565b602002015183611839836004612a5c565b600c8110611849576118496128a4565b6020020152838260028110611860576118606128a4565b60200201516020015160016002811061187b5761187b6128a4565b60200201518361188c836005612a5c565b600c811061189c5761189c6128a4565b6020020152506001016116f5565b506118b3611eab565b5f6020826101808560086107d05a03fa905080806118cd57fe5b50806118ec576040516324ccc79360e21b815260040160405180910390fd5b5051151598975050505050505050565b611904611d46565b5f84815260056020908152604080832063ffffffff808816855290835281842086519091168452825280832081516080810183528154818401908152600183015460608301528152600282018054845181870281018701909552808552919492938584019390929083018282801561199957602002820191905f5260205f20905b815481526020019060010190808311611985575b5050509190925250508151519192505f9115159050806119bd575081516020015115155b905080611a66575f6119dd8787875f015188604001518960200151611b85565b9050806119fd5760405163439cc0cd60e01b815260040160405180910390fd5b6040808601515f8981526005602090815283822063ffffffff808c1684529082528483208a5190911683528152929020815180518255830151600182015582820151805192939192611a559260028501920190611d70565b509050508460400151935050611a6a565b8192505b50509392505050565b604080518082019091525f80825260208201528151158015611a9757506020820151155b15611ab4575050604080518082019091525f808252602082015290565b6040518060400160405280835f015181526020015f516020612a705f395f51905f528460200151611ae59190612a49565b611afc905f516020612a705f395f51905f52612a36565b905292915050565b919050565b5f80805f516020612a705f395f51905f5260035f516020612a705f395f51905f52865f516020612a705f395f51905f52888909090890505f611b79827f0c19139cb84c680a6e14116da060561765e05aa45a1c72a34f082305b61f3f525f516020612a705f395f51905f52611bd3565b91959194509092505050565b5f5f611b908461065f565b5f88815260046020908152604080832063ffffffff808c168552925290912054919250611bc7908590839085908a811690611c4c16565b98975050505050505050565b5f5f611bdd611eab565b611be5611ec9565b602080825281810181905260408201819052606082018890526080820187905260a082018690528260c08360056107d05a03fa92508280611c2257fe5b5082611c415760405163d51edae360e01b815260040160405180910390fd5b505195945050505050565b5f83611c6b576040516329e7276760e11b815260040160405180910390fd5b83611c77868585611c81565b1495945050505050565b5f83515f03611c915750816104d1565b60208451611c9f9190612a49565b15611cbd576040516313717da960e21b815260040160405180910390fd5b8260205b85518111611d1e57611cd4600285612a49565b5f03611cf557815f528086015160205260405f209150600284049350611d0c565b808601515f528160205260405f2091506002840493505b611d17602082612a5c565b9050611cc1565b508215611d3e576040516363df817160e01b815260040160405180910390fd5b949350505050565b604080516080810182525f91810182815260608201929092529081905b8152602001606081525090565b828054828255905f5260205f20908101928215611da9579160200282015b82811115611da9578251825591602001919060010190611d8e565b50611db5929150611ee7565b5090565b60405180608001604052805f81526020015f8152602001611d6360405180604001604052805f81526020015f81525090565b60405180608001604052805f8152602001611e04611db9565b815260200160608152602001611e2b60405180604001604052805f81526020015f81525090565b905290565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b6040518060400160405280611e7f611efb565b8152602001611e2b611efb565b604051806101800160405280600c906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b5b80821115611db5575f8155600101611ee8565b60405180604001604052806002906020820280368337509192915050565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b0381118282101715611f4f57611f4f611f19565b60405290565b60405160a081016001600160401b0381118282101715611f4f57611f4f611f19565b604051606081016001600160401b0381118282101715611f4f57611f4f611f19565b604051608081016001600160401b0381118282101715611f4f57611f4f611f19565b604051601f8201601f191681016001600160401b0381118282101715611fe357611fe3611f19565b604052919050565b80356001600160a01b0381168114611b04575f5ffd5b803563ffffffff81168114611b04575f5ffd5b5f60408284031215612024575f5ffd5b61202c611f2d565b905061203782611feb565b815261204560208301612001565b602082015292915050565b5f60408284031215612060575f5ffd5b612068611f2d565b823581526020928301359281019290925250919050565b5f82601f83011261208e575f5ffd5b612096611f2d565b8060408401858111156120a7575f5ffd5b845b818110156120c15780358452602093840193016120a9565b509095945050505050565b5f608082840312156120dc575f5ffd5b6120e4611f2d565b90506120f0838361207f565b8152612045836040840161207f565b5f6001600160401b0382111561211757612117611f19565b5060051b60200190565b5f82601f830112612130575f5ffd5b813561214361213e826120ff565b611fbb565b8082825260208201915060208360051b860101925085831115612164575f5ffd5b602085015b83811015612181578035835260209283019201612169565b5095945050505050565b5f6060828403121561219b575f5ffd5b6121a3611f2d565b90506121af8383612050565b815260408201356001600160401b038111156121c9575f5ffd5b6121d584828501612121565b60208301525092915050565b5f61012082840312156121f2575f5ffd5b6121fa611f55565b905061220582612001565b81526020828101359082015261221e8360408401612050565b604082015261223083608084016120cc565b60608201526101008201356001600160401b0381111561224e575f5ffd5b8201601f8101841361225e575f5ffd5b803561226c61213e826120ff565b8082825260208201915060208360051b85010192508683111561228d575f5ffd5b602084015b8381101561239d5780356001600160401b038111156122af575f5ffd5b85016060818a03601f190112156122c4575f5ffd5b6122cc611f77565b6122d860208301612001565b815260408201356001600160401b038111156122f2575f5ffd5b82016020810190603f018b13612306575f5ffd5b80356001600160401b0381111561231f5761231f611f19565b612332601f8201601f1916602001611fbb565b8181528c6020838501011115612346575f5ffd5b816020840160208301375f6020838301015280602085015250505060608201356001600160401b03811115612379575f5ffd5b6123888b60208386010161218b565b60408301525084525060209283019201612292565b5060808501525091949350505050565b5f5f5f608084860312156123bf575f5ffd5b6123c98585612014565b925060408401356001600160401b038111156123e3575f5ffd5b6123ef868287016121e1565b92505060608401356001600160401b0381111561240a575f5ffd5b8401601f8101861361241a575f5ffd5b803561242861213e826120ff565b8082825260208201915060208360051b850101925088831115612449575f5ffd5b6020840193505b8284101561247a57833561ffff81168114612469575f5ffd5b825260209384019390910190612450565b809450505050509250925092565b5f5f60608385031215612499575f5ffd5b6124a38484612014565b915060408301356001600160401b038111156124bd575f5ffd5b6124c9858286016121e1565b9150509250929050565b602080825282518282018190525f918401906040840190835b818110156120c15783518352602093840193909201916001016124ec565b5f5f6040838503121561251b575f5ffd5b61252483612001565b946020939093013593505050565b5f5f5f5f6101208587031215612546575f5ffd5b843593506125578660208701612050565b925061256686606087016120cc565b91506125758660e08701612050565b905092959194509250565b5f5f60608385031215612591575f5ffd5b61259b8484612014565b91506125a960408401612001565b90509250929050565b5f5f5f608084860312156125c4575f5ffd5b6125ce8585612014565b92506125dc60408501612001565b929592945050506060919091013590565b5f8151808452602084019350602083015f5b8281101561261d5781518652602095860195909101906001016125ff565b5093949350505050565b60208082528251805183830152015160408201525f6020830151606080840152611d3e60808401826125ed565b5f60208284031215612664575f5ffd5b81356001600160401b03811115612679575f5ffd5b611d3e8482850161218b565b5f60408284031215612695575f5ffd5b6104e48383612014565b5f604082840312156126af575f5ffd5b50919050565b5f5f5f5f60c085870312156126c8575f5ffd5b6126d2868661269f565b93506126e060408601612001565b925060608501356001600160401b038111156126fa575f5ffd5b850160a0818803121561270b575f5ffd5b612713611f99565b813581526020808301359082015261272e8860408401612050565b604082015260808201356001600160401b0381111561274b575f5ffd5b61275789828501612121565b60608301525092506125759050866080870161269f565b5f5f6020838503121561277f575f5ffd5b82356001600160401b03811115612794575f5ffd5b8301601f810185136127a4575f5ffd5b80356001600160401b038111156127b9575f5ffd5b8560208284010111156127ca575f5ffd5b6020919091019590945092505050565b5f5f5f608084860312156127ec575f5ffd5b6127f68585612014565b925060408401356001600160401b03811115612810575f5ffd5b61281c868287016121e1565b92505060608401356001600160401b03811115612837575f5ffd5b61284386828701612121565b9150509250925092565b80518252602081015160208301525f6040820151612878604085018280518252602090810151910152565b50606082015160a06080850152611d3e60a08501826125ed565b602081525f6104e4602083018461284d565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176104e7576104e76128b8565b634e487b7160e01b5f52601260045260245ffd5b5f82612905576129056128e3565b500490565b60ff60f81b8360f81b1681525f82518060208501600185015e5f92016001019182525092915050565b5f60208284031215612943575f5ffd5b6104e482611feb565b5f6020828403121561295c575f5ffd5b6104e482612001565b6001600160a01b0361297685611feb565b16815263ffffffff61298a60208601612001565b16602082015263ffffffff83166040820152608060608201525f61130c608083018461284d565b60f884901b6001600160f81b0319168152818360018301375f910160010190815292915050565b805160208083015191908110156126af575f1960209190910360031b1b16919050565b63ffffffff81811683821601908111156104e7576104e76128b8565b5f60208284031215612a27575f5ffd5b815180151581146104d1575f5ffd5b818103818111156104e7576104e76128b8565b5f82612a5757612a576128e3565b500690565b808201808211156104e7576104e76128b856fe30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47a2646970667358221220da11acb3464947eba13b23f0e5f74b495a5d6bdfcb2790566fba66a4c783fd4164736f6c634300081e0033", } // BN254CertificateVerifierABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/BN254SignatureVerifier/binding.go b/pkg/bindings/BN254SignatureVerifier/binding.go index f4898f994c..9993c8dcbf 100644 --- a/pkg/bindings/BN254SignatureVerifier/binding.go +++ b/pkg/bindings/BN254SignatureVerifier/binding.go @@ -32,7 +32,7 @@ var ( // BN254SignatureVerifierMetaData contains all meta data concerning the BN254SignatureVerifier contract. var BN254SignatureVerifierMetaData = &bind.MetaData{ ABI: "[]", - Bin: "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212208abc0c24d34aef86cead2de597fb19fcedfef15a892898b49b7ac07905f47f5c64736f6c634300081e0033", + Bin: "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122009a35705c5909fec3cf6a454d9830af3ca54cb9091d6942aa4c6e6394676925164736f6c634300081e0033", } // BN254SignatureVerifierABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/BackingEigen/binding.go b/pkg/bindings/BackingEigen/binding.go index fad266f200..4f98bc16da 100644 --- a/pkg/bindings/BackingEigen/binding.go +++ b/pkg/bindings/BackingEigen/binding.go @@ -38,7 +38,7 @@ type ERC20VotesUpgradeableCheckpoint struct { // BackingEigenMetaData contains all meta data concerning the BackingEigen contract. var BackingEigenMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_EIGEN\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"CLOCK_MODE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"DOMAIN_SEPARATOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"EIGEN\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowance\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowedFrom\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowedTo\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"approve\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"balanceOf\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"burn\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"checkpoints\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"pos\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structERC20VotesUpgradeable.Checkpoint\",\"components\":[{\"name\":\"fromBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"votes\",\"type\":\"uint224\",\"internalType\":\"uint224\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"clock\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint48\",\"internalType\":\"uint48\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decimals\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decreaseAllowance\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegate\",\"inputs\":[{\"name\":\"delegatee\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateBySig\",\"inputs\":[{\"name\":\"delegatee\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegates\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"disableTransferRestrictions\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"eip712Domain\",\"inputs\":[],\"outputs\":[{\"name\":\"fields\",\"type\":\"bytes1\",\"internalType\":\"bytes1\"},{\"name\":\"name\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"verifyingContract\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"extensions\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPastTotalSupply\",\"inputs\":[{\"name\":\"timepoint\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPastVotes\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"timepoint\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getVotes\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"increaseAllowance\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isMinter\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"mint\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"name\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nonces\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"numCheckpoints\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"permit\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"deadline\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllowedFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isAllowedFrom\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllowedTo\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isAllowedTo\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setIsMinter\",\"inputs\":[{\"name\":\"minterAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"newStatus\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"symbol\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalSupply\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transfer\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferRestrictionsDisabledAfter\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Approval\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Backed\",\"inputs\":[],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DelegateChanged\",\"inputs\":[{\"name\":\"delegator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"fromDelegate\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"toDelegate\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DelegateVotesChanged\",\"inputs\":[{\"name\":\"delegate\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"previousBalance\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newBalance\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EIP712DomainChanged\",\"inputs\":[],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"IsMinterModified\",\"inputs\":[{\"name\":\"minterAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newStatus\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"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\":\"SetAllowedFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"isAllowedFrom\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SetAllowedTo\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"isAllowedTo\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Transfer\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransferRestrictionsDisabled\",\"inputs\":[],\"anonymous\":false}]", - Bin: "0x60a060405234801561000f575f5ffd5b50604051612d11380380612d1183398101604081905261002e91610105565b6001600160a01b038116608052610043610049565b50610132565b5f54610100900460ff16156100b45760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610103575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b5f60208284031215610115575f5ffd5b81516001600160a01b038116811461012b575f5ffd5b9392505050565b608051612bb261015f5f395f81816105e901528181610dae01528181610dd90152610e040152612bb25ff3fe608060405234801561000f575f5ffd5b506004361061023f575f3560e01c80637ecebe0011610135578063aa271e1a116100b4578063dd62ed3e11610079578063dd62ed3e14610579578063eb415f451461058c578063f1127ed814610594578063f2fde38b146105d1578063fdc371ce146105e4575f5ffd5b8063aa271e1a1461050a578063b8c255941461052d578063c3cda52014610540578063c4d66de814610553578063d505accf14610566575f5ffd5b806395d89b41116100fa57806395d89b41146104bf5780639ab24eb0146104c75780639aec4bae146104da578063a457c2d7146104e4578063a9059cbb146104f7575f5ffd5b80637ecebe001461044e57806384b0196e146104615780638da5cb5b1461047c5780638e539e8c1461048d57806391ddadf4146104a0575f5ffd5b806340c10f19116101c157806366eb399f1161018657806366eb399f146103c05780636fcfff45146103d357806370a08231146103fb578063715018a61461042357806378aa33ba1461042b575f5ffd5b806340c10f191461031a57806342966c681461032d5780634bf5d7e914610340578063587cde1e1461036a5780635c19a95c146103ad575f5ffd5b806323b872dd1161020757806323b872dd146102ca578063313ce567146102dd5780633644e515146102ec57806339509351146102f45780633a46b1a814610307575f5ffd5b80630455e6941461024357806306fdde031461027b578063095ea7b31461029057806318160ddd146102a35780631ffacdef146102b5575b5f5ffd5b610266610251366004612682565b6101316020525f908152604090205460ff1681565b60405190151581526020015b60405180910390f35b61028361060b565b60405161027291906126c9565b61026661029e3660046126db565b61069b565b6067545b604051908152602001610272565b6102c86102c3366004612703565b6106b4565b005b6102666102d836600461273c565b6106ca565b60405160128152602001610272565b6102a76106ed565b6102666103023660046126db565b6106fb565b6102a76103153660046126db565b61071c565b6102c86103283660046126db565b6107a4565b6102c861033b366004612776565b61081f565b60408051808201909152600e81526d06d6f64653d74696d657374616d760941b6020820152610283565b610395610378366004612682565b6001600160a01b039081165f90815260fe60205260409020541690565b6040516001600160a01b039091168152602001610272565b6102c86103bb366004612682565b61082c565b6102c86103ce366004612703565b610836565b6103e66103e1366004612682565b6108ae565b60405163ffffffff9091168152602001610272565b6102a7610409366004612682565b6001600160a01b03165f9081526065602052604090205490565b6102c86108cf565b610266610439366004612682565b6101326020525f908152604090205460ff1681565b6102a761045c366004612682565b6108e2565b6104696108ff565b604051610272979695949392919061278d565b6033546001600160a01b0316610395565b6102a761049b366004612776565b610998565b6104a86109ff565b60405165ffffffffffff9091168152602001610272565b610283610a09565b6102a76104d5366004612682565b610a18565b6102a76101305481565b6102666104f23660046126db565b610a95565b6102666105053660046126db565b610b0f565b610266610518366004612682565b6101336020525f908152604090205460ff1681565b6102c861053b366004612703565b610b1c565b6102c861054e366004612833565b610b2e565b6102c8610561366004612682565b610c63565b6102c8610574366004612887565b610ea5565b6102a76105873660046128ed565b611006565b6102c8611030565b6105a76105a236600461291e565b6110fe565b60408051825163ffffffff1681526020928301516001600160e01b03169281019290925201610272565b6102c86105df366004612682565b61117f565b6103957f000000000000000000000000000000000000000000000000000000000000000081565b60606068805461061a90612950565b80601f016020809104026020016040519081016040528092919081815260200182805461064690612950565b80156106915780601f1061066857610100808354040283529160200191610691565b820191905f5260205f20905b81548152906001019060200180831161067457829003601f168201915b5050505050905090565b5f336106a88185856111f5565b60019150505b92915050565b6106bc611318565b6106c68282611372565b5050565b5f336106d78582856113d2565b6106e285858561144a565b506001949350505050565b5f6106f6611604565b905090565b5f336106a881858561070d8383611006565b6107179190612996565b6111f5565b5f6107256109ff565b65ffffffffffff16821061077c5760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b60448201526064015b60405180910390fd5b6001600160a01b0383165f90815260ff6020526040902061079d908361160d565b9392505050565b335f908152610133602052604090205460ff166108155760405162461bcd60e51b815260206004820152602960248201527f4261636b696e67456967656e2e6d696e743a2063616c6c6572206973206e6f7460448201526810309036b4b73a32b960b91b6064820152608401610773565b6106c682826116ee565b6108293382611779565b50565b6108293382611792565b61083e611318565b816001600160a01b03167f0124b12503bddc2616c0f3f54fd23ed283f5ef0c1483a75409e42612176b8bde8260405161087b911515815260200190565b60405180910390a26001600160a01b03919091165f90815261013360205260409020805460ff1916911515919091179055565b6001600160a01b0381165f90815260ff60205260408120546106ae9061180b565b6108d7611318565b6108e05f611873565b565b6001600160a01b0381165f90815260cb60205260408120546106ae565b5f6060805f5f5f60606097545f5f1b14801561091b5750609854155b61095f5760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b6044820152606401610773565b6109676118c4565b61096f6118d3565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b5f6109a16109ff565b65ffffffffffff1682106109f35760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b6044820152606401610773565b6106ae6101008361160d565b5f6106f6426118e2565b60606069805461061a90612950565b6001600160a01b0381165f90815260ff60205260408120548015610a83576001600160a01b0383165f90815260ff6020526040902080545f198301908110610a6257610a626129bd565b5f9182526020909120015464010000000090046001600160e01b0316610a85565b5f5b6001600160e01b03169392505050565b5f3381610aa28286611006565b905083811015610b025760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610773565b6106e282868684036111f5565b5f336106a881858561144a565b610b24611318565b6106c68282611948565b83421115610b7e5760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e617475726520657870697265640000006044820152606401610773565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b0388169181019190915260608101869052608081018590525f90610bf790610bef9060a001604051602081830303815290604052805190602001206119a0565b8585856119cc565b9050610c02816119f2565b8614610c505760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e6365000000000000006044820152606401610773565b610c5a8188611792565b50505050505050565b5f54610100900460ff1615808015610c8157505f54600160ff909116105b80610c9a5750303b158015610c9a57505f5460ff166001145b610cfd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610773565b5f805460ff191660011790558015610d1e575f805461ff0019166101001790555b610d26611a19565b610d736040518060400160405280600d81526020016c2130b1b5b4b7339022b4b3b2b760991b815250604051806040016040528060068152602001653122a4a3a2a760d11b815250611a47565b610d7c82611873565b610da3604051806040016040528060068152602001653122a4a3a2a760d11b815250611a77565b5f1961013055610dd47f00000000000000000000000000000000000000000000000000000000000000006001611372565b610dff7f00000000000000000000000000000000000000000000000000000000000000006001611948565b610e357f00000000000000000000000000000000000000000000000000000000000000006b05686877afb5cbccbf7340006116ee565b6040517fb7c23c1e2e36f298e9879a88ecfcd07e28fbb439bcfa9c78ca1363ca14370d26905f90a180156106c6575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b83421115610ef55760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610773565b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610f238c6119f2565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090505f610f7d826119a0565b90505f610f8c828787876119cc565b9050896001600160a01b0316816001600160a01b031614610fef5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610773565b610ffa8a8a8a6111f5565b50505050505050505050565b6001600160a01b039182165f90815260666020908152604080832093909416825291909152205490565b611038611318565b5f1961013054146110ce5760405162461bcd60e51b815260206004820152605460248201527f4261636b696e67456967656e2e64697361626c655472616e736665725265737460448201527f72696374696f6e733a207472616e73666572207265737472696374696f6e7320606482015273185c9948185b1c9958591e48191a5cd8589b195960621b608482015260a401610773565b5f6101308190556040517f2b18986d3ba809db2f13a5d7bf17f60d357b37d9cbb55dd71cbbac8dc4060f649190a1565b604080518082019091525f80825260208201526001600160a01b0383165f90815260ff60205260409020805463ffffffff8416908110611140576111406129bd565b5f9182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b611187611318565b6001600160a01b0381166111ec5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610773565b61082981611873565b6001600160a01b0383166112575760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610773565b6001600160a01b0382166112b85760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610773565b6001600160a01b038381165f8181526066602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6033546001600160a01b031633146108e05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610773565b6001600160a01b0382165f8181526101316020908152604091829020805460ff191685151590811790915591519182527fcf20b1ecb604b0e8888d579c64e8a3b10e590d45c1c2dddb393bed284362227191015b60405180910390a25050565b5f6113dd8484611006565b90505f19811461144457818110156114375760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610773565b61144484848484036111f5565b50505050565b6001600160a01b0383166114ae5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610773565b6001600160a01b0382166115105760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610773565b61151b838383611ac0565b6001600160a01b0383165f90815260656020526040902054818110156115925760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610773565b6001600160a01b038085165f8181526065602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906115f19086815260200190565b60405180910390a3611444848484611b9c565b5f6106f6611bcd565b81545f9081816005811115611664575f61162684611c40565b61163090856129d1565b5f88815260209020909150869082015463ffffffff16111561165457809150611662565b61165f816001612996565b92505b505b808210156116af575f6116778383611d24565b5f88815260209020909150869082015463ffffffff16111561169b578091506116a9565b6116a6816001612996565b92505b50611664565b80156116d9575f8681526020902081015f19015464010000000090046001600160e01b03166116db565b5f5b6001600160e01b03169695505050505050565b6116f88282611d3e565b6067546001600160e01b03101561176a5760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b6064820152608401610773565b611444610100611e0f83611e1a565b6117838282611f86565b6114446101006120c983611e1a565b6001600160a01b038281165f81815260fe6020818152604080842080546065845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46114448284836120d4565b5f63ffffffff82111561186f5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401610773565b5090565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b60606099805461061a90612950565b6060609a805461061a90612950565b5f65ffffffffffff82111561186f5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203460448201526538206269747360d01b6064820152608401610773565b6001600160a01b0382165f8181526101326020908152604091829020805460ff191685151590811790915591519182527f72a561d1af7409467dae4f1e9fc52590a9335a1dda17727e2b6aa8c4db35109b91016113c6565b5f6106ae6119ac611604565b8360405161190160f01b8152600281019290925260228201526042902090565b5f5f5f6119db8787878761220e565b915091506119e8816122cb565b5095945050505050565b6001600160a01b0381165f90815260cb602052604090208054600181018255905b50919050565b5f54610100900460ff16611a3f5760405162461bcd60e51b8152600401610773906129e4565b6108e0612414565b5f54610100900460ff16611a6d5760405162461bcd60e51b8152600401610773906129e4565b6106c68282612443565b5f54610100900460ff16611a9d5760405162461bcd60e51b8152600401610773906129e4565b61082981604051806040016040528060018152602001603160f81b815250612482565b610130544211611b97576001600160a01b0383165f908152610131602052604090205460ff1680611b0957506001600160a01b0382165f908152610132602052604090205460ff165b80611b1b57506001600160a01b038316155b611b975760405162461bcd60e51b815260206004820152604160248201527f4261636b696e67456967656e2e5f6265666f7265546f6b656e5472616e73666560448201527f723a2066726f6d206f7220746f206d7573742062652077686974656c697374656064820152601960fa1b608482015260a401610773565b505050565b6001600160a01b038381165f90815260fe6020526040808220548584168352912054611b97929182169116836120d4565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f611bf76124cf565b611bff612527565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f815f03611c4f57505f919050565b5f6001611c5b84612557565b901c6001901b90506001818481611c7457611c74612a2f565b048201901c90506001818481611c8c57611c8c612a2f565b048201901c90506001818481611ca457611ca4612a2f565b048201901c90506001818481611cbc57611cbc612a2f565b048201901c90506001818481611cd457611cd4612a2f565b048201901c90506001818481611cec57611cec612a2f565b048201901c90506001818481611d0457611d04612a2f565b048201901c905061079d81828581611d1e57611d1e612a2f565b046125ea565b5f611d326002848418612a43565b61079d90848416612996565b6001600160a01b038216611d945760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610773565b611d9f5f8383611ac0565b8060675f828254611db09190612996565b90915550506001600160a01b0382165f818152606560209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36106c65f8383611b9c565b5f61079d8284612996565b82545f908190818115611e64575f8781526020902082015f190160408051808201909152905463ffffffff8116825264010000000090046001600160e01b03166020820152611e78565b604080518082019091525f80825260208201525b905080602001516001600160e01b03169350611e9884868863ffffffff16565b92505f82118015611ec05750611eac6109ff565b65ffffffffffff16815f015163ffffffff16145b15611f0357611ece836125ff565b5f8881526020902083015f190180546001600160e01b03929092166401000000000263ffffffff909216919091179055611f7c565b866040518060400160405280611f27611f1a6109ff565b65ffffffffffff1661180b565b63ffffffff168152602001611f3b866125ff565b6001600160e01b0390811690915282546001810184555f938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b5050935093915050565b6001600160a01b038216611fe65760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610773565b611ff1825f83611ac0565b6001600160a01b0382165f90815260656020526040902054818110156120645760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610773565b6001600160a01b0383165f8181526065602090815260408083208686039055606780548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3611b97835f84611b9c565b5f61079d82846129d1565b816001600160a01b0316836001600160a01b0316141580156120f557505f81115b15611b97576001600160a01b03831615612182576001600160a01b0383165f90815260ff60205260408120819061212f906120c985611e1a565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051612177929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615611b97576001600160a01b0382165f90815260ff6020526040812081906121b790611e0f85611e1a565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72483836040516121ff929190918252602082015260400190565b60405180910390a25050505050565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561224357505f905060036122c2565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612294573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b0381166122bc575f600192509250506122c2565b91505f90505b94509492505050565b5f8160048111156122de576122de612a62565b036122e65750565b60018160048111156122fa576122fa612a62565b036123475760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610773565b600281600481111561235b5761235b612a62565b036123a85760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610773565b60038160048111156123bc576123bc612a62565b036108295760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610773565b5f54610100900460ff1661243a5760405162461bcd60e51b8152600401610773906129e4565b6108e033611873565b5f54610100900460ff166124695760405162461bcd60e51b8152600401610773906129e4565b60686124758382612ac1565b506069611b978282612ac1565b5f54610100900460ff166124a85760405162461bcd60e51b8152600401610773906129e4565b60996124b48382612ac1565b50609a6124c18282612ac1565b50505f609781905560985550565b5f5f6124d96118c4565b8051909150156124f0578051602090910120919050565b60975480156124ff5792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b5f5f6125316118d3565b805190915015612548578051602090910120919050565b60985480156124ff5792915050565b5f80608083901c1561256b57608092831c92015b604083901c1561257d57604092831c92015b602083901c1561258f57602092831c92015b601083901c156125a157601092831c92015b600883901c156125b357600892831c92015b600483901c156125c557600492831c92015b600283901c156125d757600292831c92015b600183901c156106ae5760010192915050565b5f8183106125f8578161079d565b5090919050565b5f6001600160e01b0382111561186f5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401610773565b80356001600160a01b038116811461267d575f5ffd5b919050565b5f60208284031215612692575f5ffd5b61079d82612667565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61079d602083018461269b565b5f5f604083850312156126ec575f5ffd5b6126f583612667565b946020939093013593505050565b5f5f60408385031215612714575f5ffd5b61271d83612667565b915060208301358015158114612731575f5ffd5b809150509250929050565b5f5f5f6060848603121561274e575f5ffd5b61275784612667565b925061276560208501612667565b929592945050506040919091013590565b5f60208284031215612786575f5ffd5b5035919050565b60ff60f81b8816815260e060208201525f6127ab60e083018961269b565b82810360408401526127bd818961269b565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b818110156128125783518352602093840193909201916001016127f4565b50909b9a5050505050505050505050565b803560ff8116811461267d575f5ffd5b5f5f5f5f5f5f60c08789031215612848575f5ffd5b61285187612667565b9550602087013594506040870135935061286d60608801612823565b9598949750929560808101359460a0909101359350915050565b5f5f5f5f5f5f5f60e0888a03121561289d575f5ffd5b6128a688612667565b96506128b460208901612667565b955060408801359450606088013593506128d060808901612823565b9699959850939692959460a0840135945060c09093013592915050565b5f5f604083850312156128fe575f5ffd5b61290783612667565b915061291560208401612667565b90509250929050565b5f5f6040838503121561292f575f5ffd5b61293883612667565b9150602083013563ffffffff81168114612731575f5ffd5b600181811c9082168061296457607f821691505b602082108103611a1357634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156106ae576106ae612982565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b818103818111156106ae576106ae612982565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b5f52601260045260245ffd5b5f82612a5d57634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52602160045260245ffd5b601f821115611b9757805f5260205f20601f840160051c81016020851015612a9b5750805b601f840160051c820191505b81811015612aba575f8155600101612aa7565b5050505050565b815167ffffffffffffffff811115612adb57612adb6129a9565b612aef81612ae98454612950565b84612a76565b6020601f821160018114612b21575f8315612b0a5750848201515b5f19600385901b1c1916600184901b178455612aba565b5f84815260208120601f198516915b82811015612b505787850151825560209485019460019092019101612b30565b5084821015612b6d57868401515f19600387901b60f8161c191681555b50505050600190811b0190555056fea26469706673582212202b65c0f0414f6ef22efd02333f38dacaf689c6212f55c8f410b6b3d8607f907c64736f6c634300081e0033", + Bin: "0x60a060405234801561000f575f5ffd5b50604051612d11380380612d1183398101604081905261002e91610105565b6001600160a01b038116608052610043610049565b50610132565b5f54610100900460ff16156100b45760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610103575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b5f60208284031215610115575f5ffd5b81516001600160a01b038116811461012b575f5ffd5b9392505050565b608051612bb261015f5f395f81816105e901528181610dae01528181610dd90152610e040152612bb25ff3fe608060405234801561000f575f5ffd5b506004361061023f575f3560e01c80637ecebe0011610135578063aa271e1a116100b4578063dd62ed3e11610079578063dd62ed3e14610579578063eb415f451461058c578063f1127ed814610594578063f2fde38b146105d1578063fdc371ce146105e4575f5ffd5b8063aa271e1a1461050a578063b8c255941461052d578063c3cda52014610540578063c4d66de814610553578063d505accf14610566575f5ffd5b806395d89b41116100fa57806395d89b41146104bf5780639ab24eb0146104c75780639aec4bae146104da578063a457c2d7146104e4578063a9059cbb146104f7575f5ffd5b80637ecebe001461044e57806384b0196e146104615780638da5cb5b1461047c5780638e539e8c1461048d57806391ddadf4146104a0575f5ffd5b806340c10f19116101c157806366eb399f1161018657806366eb399f146103c05780636fcfff45146103d357806370a08231146103fb578063715018a61461042357806378aa33ba1461042b575f5ffd5b806340c10f191461031a57806342966c681461032d5780634bf5d7e914610340578063587cde1e1461036a5780635c19a95c146103ad575f5ffd5b806323b872dd1161020757806323b872dd146102ca578063313ce567146102dd5780633644e515146102ec57806339509351146102f45780633a46b1a814610307575f5ffd5b80630455e6941461024357806306fdde031461027b578063095ea7b31461029057806318160ddd146102a35780631ffacdef146102b5575b5f5ffd5b610266610251366004612682565b6101316020525f908152604090205460ff1681565b60405190151581526020015b60405180910390f35b61028361060b565b60405161027291906126c9565b61026661029e3660046126db565b61069b565b6067545b604051908152602001610272565b6102c86102c3366004612703565b6106b4565b005b6102666102d836600461273c565b6106ca565b60405160128152602001610272565b6102a76106ed565b6102666103023660046126db565b6106fb565b6102a76103153660046126db565b61071c565b6102c86103283660046126db565b6107a4565b6102c861033b366004612776565b61081f565b60408051808201909152600e81526d06d6f64653d74696d657374616d760941b6020820152610283565b610395610378366004612682565b6001600160a01b039081165f90815260fe60205260409020541690565b6040516001600160a01b039091168152602001610272565b6102c86103bb366004612682565b61082c565b6102c86103ce366004612703565b610836565b6103e66103e1366004612682565b6108ae565b60405163ffffffff9091168152602001610272565b6102a7610409366004612682565b6001600160a01b03165f9081526065602052604090205490565b6102c86108cf565b610266610439366004612682565b6101326020525f908152604090205460ff1681565b6102a761045c366004612682565b6108e2565b6104696108ff565b604051610272979695949392919061278d565b6033546001600160a01b0316610395565b6102a761049b366004612776565b610998565b6104a86109ff565b60405165ffffffffffff9091168152602001610272565b610283610a09565b6102a76104d5366004612682565b610a18565b6102a76101305481565b6102666104f23660046126db565b610a95565b6102666105053660046126db565b610b0f565b610266610518366004612682565b6101336020525f908152604090205460ff1681565b6102c861053b366004612703565b610b1c565b6102c861054e366004612833565b610b2e565b6102c8610561366004612682565b610c63565b6102c8610574366004612887565b610ea5565b6102a76105873660046128ed565b611006565b6102c8611030565b6105a76105a236600461291e565b6110fe565b60408051825163ffffffff1681526020928301516001600160e01b03169281019290925201610272565b6102c86105df366004612682565b61117f565b6103957f000000000000000000000000000000000000000000000000000000000000000081565b60606068805461061a90612950565b80601f016020809104026020016040519081016040528092919081815260200182805461064690612950565b80156106915780601f1061066857610100808354040283529160200191610691565b820191905f5260205f20905b81548152906001019060200180831161067457829003601f168201915b5050505050905090565b5f336106a88185856111f5565b60019150505b92915050565b6106bc611318565b6106c68282611372565b5050565b5f336106d78582856113d2565b6106e285858561144a565b506001949350505050565b5f6106f6611604565b905090565b5f336106a881858561070d8383611006565b6107179190612996565b6111f5565b5f6107256109ff565b65ffffffffffff16821061077c5760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b60448201526064015b60405180910390fd5b6001600160a01b0383165f90815260ff6020526040902061079d908361160d565b9392505050565b335f908152610133602052604090205460ff166108155760405162461bcd60e51b815260206004820152602960248201527f4261636b696e67456967656e2e6d696e743a2063616c6c6572206973206e6f7460448201526810309036b4b73a32b960b91b6064820152608401610773565b6106c682826116ee565b6108293382611779565b50565b6108293382611792565b61083e611318565b816001600160a01b03167f0124b12503bddc2616c0f3f54fd23ed283f5ef0c1483a75409e42612176b8bde8260405161087b911515815260200190565b60405180910390a26001600160a01b03919091165f90815261013360205260409020805460ff1916911515919091179055565b6001600160a01b0381165f90815260ff60205260408120546106ae9061180b565b6108d7611318565b6108e05f611873565b565b6001600160a01b0381165f90815260cb60205260408120546106ae565b5f6060805f5f5f60606097545f5f1b14801561091b5750609854155b61095f5760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b6044820152606401610773565b6109676118c4565b61096f6118d3565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b5f6109a16109ff565b65ffffffffffff1682106109f35760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b6044820152606401610773565b6106ae6101008361160d565b5f6106f6426118e2565b60606069805461061a90612950565b6001600160a01b0381165f90815260ff60205260408120548015610a83576001600160a01b0383165f90815260ff6020526040902080545f198301908110610a6257610a626129bd565b5f9182526020909120015464010000000090046001600160e01b0316610a85565b5f5b6001600160e01b03169392505050565b5f3381610aa28286611006565b905083811015610b025760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610773565b6106e282868684036111f5565b5f336106a881858561144a565b610b24611318565b6106c68282611948565b83421115610b7e5760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e617475726520657870697265640000006044820152606401610773565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b0388169181019190915260608101869052608081018590525f90610bf790610bef9060a001604051602081830303815290604052805190602001206119a0565b8585856119cc565b9050610c02816119f2565b8614610c505760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e6365000000000000006044820152606401610773565b610c5a8188611792565b50505050505050565b5f54610100900460ff1615808015610c8157505f54600160ff909116105b80610c9a5750303b158015610c9a57505f5460ff166001145b610cfd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610773565b5f805460ff191660011790558015610d1e575f805461ff0019166101001790555b610d26611a19565b610d736040518060400160405280600d81526020016c2130b1b5b4b7339022b4b3b2b760991b815250604051806040016040528060068152602001653122a4a3a2a760d11b815250611a47565b610d7c82611873565b610da3604051806040016040528060068152602001653122a4a3a2a760d11b815250611a77565b5f1961013055610dd47f00000000000000000000000000000000000000000000000000000000000000006001611372565b610dff7f00000000000000000000000000000000000000000000000000000000000000006001611948565b610e357f00000000000000000000000000000000000000000000000000000000000000006b05686877afb5cbccbf7340006116ee565b6040517fb7c23c1e2e36f298e9879a88ecfcd07e28fbb439bcfa9c78ca1363ca14370d26905f90a180156106c6575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b83421115610ef55760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610773565b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610f238c6119f2565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090505f610f7d826119a0565b90505f610f8c828787876119cc565b9050896001600160a01b0316816001600160a01b031614610fef5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610773565b610ffa8a8a8a6111f5565b50505050505050505050565b6001600160a01b039182165f90815260666020908152604080832093909416825291909152205490565b611038611318565b5f1961013054146110ce5760405162461bcd60e51b815260206004820152605460248201527f4261636b696e67456967656e2e64697361626c655472616e736665725265737460448201527f72696374696f6e733a207472616e73666572207265737472696374696f6e7320606482015273185c9948185b1c9958591e48191a5cd8589b195960621b608482015260a401610773565b5f6101308190556040517f2b18986d3ba809db2f13a5d7bf17f60d357b37d9cbb55dd71cbbac8dc4060f649190a1565b604080518082019091525f80825260208201526001600160a01b0383165f90815260ff60205260409020805463ffffffff8416908110611140576111406129bd565b5f9182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b611187611318565b6001600160a01b0381166111ec5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610773565b61082981611873565b6001600160a01b0383166112575760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610773565b6001600160a01b0382166112b85760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610773565b6001600160a01b038381165f8181526066602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6033546001600160a01b031633146108e05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610773565b6001600160a01b0382165f8181526101316020908152604091829020805460ff191685151590811790915591519182527fcf20b1ecb604b0e8888d579c64e8a3b10e590d45c1c2dddb393bed284362227191015b60405180910390a25050565b5f6113dd8484611006565b90505f19811461144457818110156114375760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610773565b61144484848484036111f5565b50505050565b6001600160a01b0383166114ae5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610773565b6001600160a01b0382166115105760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610773565b61151b838383611ac0565b6001600160a01b0383165f90815260656020526040902054818110156115925760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610773565b6001600160a01b038085165f8181526065602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906115f19086815260200190565b60405180910390a3611444848484611b9c565b5f6106f6611bcd565b81545f9081816005811115611664575f61162684611c40565b61163090856129d1565b5f88815260209020909150869082015463ffffffff16111561165457809150611662565b61165f816001612996565b92505b505b808210156116af575f6116778383611d24565b5f88815260209020909150869082015463ffffffff16111561169b578091506116a9565b6116a6816001612996565b92505b50611664565b80156116d9575f8681526020902081015f19015464010000000090046001600160e01b03166116db565b5f5b6001600160e01b03169695505050505050565b6116f88282611d3e565b6067546001600160e01b03101561176a5760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b6064820152608401610773565b611444610100611e0f83611e1a565b6117838282611f86565b6114446101006120c983611e1a565b6001600160a01b038281165f81815260fe6020818152604080842080546065845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46114448284836120d4565b5f63ffffffff82111561186f5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401610773565b5090565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b60606099805461061a90612950565b6060609a805461061a90612950565b5f65ffffffffffff82111561186f5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203460448201526538206269747360d01b6064820152608401610773565b6001600160a01b0382165f8181526101326020908152604091829020805460ff191685151590811790915591519182527f72a561d1af7409467dae4f1e9fc52590a9335a1dda17727e2b6aa8c4db35109b91016113c6565b5f6106ae6119ac611604565b8360405161190160f01b8152600281019290925260228201526042902090565b5f5f5f6119db8787878761220e565b915091506119e8816122cb565b5095945050505050565b6001600160a01b0381165f90815260cb602052604090208054600181018255905b50919050565b5f54610100900460ff16611a3f5760405162461bcd60e51b8152600401610773906129e4565b6108e0612414565b5f54610100900460ff16611a6d5760405162461bcd60e51b8152600401610773906129e4565b6106c68282612443565b5f54610100900460ff16611a9d5760405162461bcd60e51b8152600401610773906129e4565b61082981604051806040016040528060018152602001603160f81b815250612482565b610130544211611b97576001600160a01b0383165f908152610131602052604090205460ff1680611b0957506001600160a01b0382165f908152610132602052604090205460ff165b80611b1b57506001600160a01b038316155b611b975760405162461bcd60e51b815260206004820152604160248201527f4261636b696e67456967656e2e5f6265666f7265546f6b656e5472616e73666560448201527f723a2066726f6d206f7220746f206d7573742062652077686974656c697374656064820152601960fa1b608482015260a401610773565b505050565b6001600160a01b038381165f90815260fe6020526040808220548584168352912054611b97929182169116836120d4565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f611bf76124cf565b611bff612527565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f815f03611c4f57505f919050565b5f6001611c5b84612557565b901c6001901b90506001818481611c7457611c74612a2f565b048201901c90506001818481611c8c57611c8c612a2f565b048201901c90506001818481611ca457611ca4612a2f565b048201901c90506001818481611cbc57611cbc612a2f565b048201901c90506001818481611cd457611cd4612a2f565b048201901c90506001818481611cec57611cec612a2f565b048201901c90506001818481611d0457611d04612a2f565b048201901c905061079d81828581611d1e57611d1e612a2f565b046125ea565b5f611d326002848418612a43565b61079d90848416612996565b6001600160a01b038216611d945760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610773565b611d9f5f8383611ac0565b8060675f828254611db09190612996565b90915550506001600160a01b0382165f818152606560209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36106c65f8383611b9c565b5f61079d8284612996565b82545f908190818115611e64575f8781526020902082015f190160408051808201909152905463ffffffff8116825264010000000090046001600160e01b03166020820152611e78565b604080518082019091525f80825260208201525b905080602001516001600160e01b03169350611e9884868863ffffffff16565b92505f82118015611ec05750611eac6109ff565b65ffffffffffff16815f015163ffffffff16145b15611f0357611ece836125ff565b5f8881526020902083015f190180546001600160e01b03929092166401000000000263ffffffff909216919091179055611f7c565b866040518060400160405280611f27611f1a6109ff565b65ffffffffffff1661180b565b63ffffffff168152602001611f3b866125ff565b6001600160e01b0390811690915282546001810184555f938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b5050935093915050565b6001600160a01b038216611fe65760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610773565b611ff1825f83611ac0565b6001600160a01b0382165f90815260656020526040902054818110156120645760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610773565b6001600160a01b0383165f8181526065602090815260408083208686039055606780548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3611b97835f84611b9c565b5f61079d82846129d1565b816001600160a01b0316836001600160a01b0316141580156120f557505f81115b15611b97576001600160a01b03831615612182576001600160a01b0383165f90815260ff60205260408120819061212f906120c985611e1a565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051612177929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615611b97576001600160a01b0382165f90815260ff6020526040812081906121b790611e0f85611e1a565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72483836040516121ff929190918252602082015260400190565b60405180910390a25050505050565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561224357505f905060036122c2565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612294573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b0381166122bc575f600192509250506122c2565b91505f90505b94509492505050565b5f8160048111156122de576122de612a62565b036122e65750565b60018160048111156122fa576122fa612a62565b036123475760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610773565b600281600481111561235b5761235b612a62565b036123a85760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610773565b60038160048111156123bc576123bc612a62565b036108295760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610773565b5f54610100900460ff1661243a5760405162461bcd60e51b8152600401610773906129e4565b6108e033611873565b5f54610100900460ff166124695760405162461bcd60e51b8152600401610773906129e4565b60686124758382612ac1565b506069611b978282612ac1565b5f54610100900460ff166124a85760405162461bcd60e51b8152600401610773906129e4565b60996124b48382612ac1565b50609a6124c18282612ac1565b50505f609781905560985550565b5f5f6124d96118c4565b8051909150156124f0578051602090910120919050565b60975480156124ff5792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b5f5f6125316118d3565b805190915015612548578051602090910120919050565b60985480156124ff5792915050565b5f80608083901c1561256b57608092831c92015b604083901c1561257d57604092831c92015b602083901c1561258f57602092831c92015b601083901c156125a157601092831c92015b600883901c156125b357600892831c92015b600483901c156125c557600492831c92015b600283901c156125d757600292831c92015b600183901c156106ae5760010192915050565b5f8183106125f8578161079d565b5090919050565b5f6001600160e01b0382111561186f5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401610773565b80356001600160a01b038116811461267d575f5ffd5b919050565b5f60208284031215612692575f5ffd5b61079d82612667565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61079d602083018461269b565b5f5f604083850312156126ec575f5ffd5b6126f583612667565b946020939093013593505050565b5f5f60408385031215612714575f5ffd5b61271d83612667565b915060208301358015158114612731575f5ffd5b809150509250929050565b5f5f5f6060848603121561274e575f5ffd5b61275784612667565b925061276560208501612667565b929592945050506040919091013590565b5f60208284031215612786575f5ffd5b5035919050565b60ff60f81b8816815260e060208201525f6127ab60e083018961269b565b82810360408401526127bd818961269b565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b818110156128125783518352602093840193909201916001016127f4565b50909b9a5050505050505050505050565b803560ff8116811461267d575f5ffd5b5f5f5f5f5f5f60c08789031215612848575f5ffd5b61285187612667565b9550602087013594506040870135935061286d60608801612823565b9598949750929560808101359460a0909101359350915050565b5f5f5f5f5f5f5f60e0888a03121561289d575f5ffd5b6128a688612667565b96506128b460208901612667565b955060408801359450606088013593506128d060808901612823565b9699959850939692959460a0840135945060c09093013592915050565b5f5f604083850312156128fe575f5ffd5b61290783612667565b915061291560208401612667565b90509250929050565b5f5f6040838503121561292f575f5ffd5b61293883612667565b9150602083013563ffffffff81168114612731575f5ffd5b600181811c9082168061296457607f821691505b602082108103611a1357634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156106ae576106ae612982565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b818103818111156106ae576106ae612982565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b5f52601260045260245ffd5b5f82612a5d57634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52602160045260245ffd5b601f821115611b9757805f5260205f20601f840160051c81016020851015612a9b5750805b601f840160051c820191505b81811015612aba575f8155600101612aa7565b5050505050565b815167ffffffffffffffff811115612adb57612adb6129a9565b612aef81612ae98454612950565b84612a76565b6020601f821160018114612b21575f8315612b0a5750848201515b5f19600385901b1c1916600184901b178455612aba565b5f84815260208120601f198516915b82811015612b505787850151825560209485019460019092019101612b30565b5084821015612b6d57868401515f19600387901b60f8161c191681555b50505050600190811b0190555056fea2646970667358221220d0eeb84061c7e024d6e07caeab52d6bd090be9c2e61dcf10b8d3d372aab2efce64736f6c634300081e0033", } // BackingEigenABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/BeaconChainProofs/binding.go b/pkg/bindings/BeaconChainProofs/binding.go index c79dcf114d..f5a802c372 100644 --- a/pkg/bindings/BeaconChainProofs/binding.go +++ b/pkg/bindings/BeaconChainProofs/binding.go @@ -32,7 +32,7 @@ var ( // BeaconChainProofsMetaData contains all meta data concerning the BeaconChainProofs contract. var BeaconChainProofsMetaData = &bind.MetaData{ ABI: "[{\"type\":\"error\",\"name\":\"InvalidProof\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProofLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidValidatorFieldsLength\",\"inputs\":[]}]", - Bin: "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220da9f3713f090e9533103aff767c4c0b23e30d530dc2a365abc648e56fee6581f64736f6c634300081e0033", + Bin: "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212202ed6c0259a8a2116b71d180dd3fa1bbeee51af433dc586314be978e5fbc4094064736f6c634300081e0033", } // BeaconChainProofsABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/ECDSACertificateVerifier/binding.go b/pkg/bindings/ECDSACertificateVerifier/binding.go index 63a17e4083..4f9b2d5e63 100644 --- a/pkg/bindings/ECDSACertificateVerifier/binding.go +++ b/pkg/bindings/ECDSACertificateVerifier/binding.go @@ -57,7 +57,7 @@ type OperatorSet struct { // ECDSACertificateVerifierMetaData contains all meta data concerning the ECDSACertificateVerifier contract. var ECDSACertificateVerifierMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_operatorTableUpdater\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"},{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"calculateCertificateDigest\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateCertificateDigestBytes\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorCount\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorInfos\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalStakeWeights\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isReferenceTimestampSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorTableUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IndexOutOfBounds\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignatureLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OperatorCountZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RootDisabled\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignatureExpired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignersNotOrdered\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", - Bin: "0x60c060405234801561000f575f5ffd5b5060405161231938038061231983398101604081905261002e9161016d565b6001600160a01b03821660805280806100468161005b565b60a0525061005490506100a1565b5050610297565b5f5f829050601f8151111561008e578260405163305a27a960e01b8152600401610085919061023c565b60405180910390fd5b805161009982610271565b179392505050565b5f54610100900460ff16156101085760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610085565b5f5460ff90811614610157575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b634e487b7160e01b5f52604160045260245ffd5b5f5f6040838503121561017e575f5ffd5b82516001600160a01b0381168114610194575f5ffd5b60208401519092506001600160401b038111156101af575f5ffd5b8301601f810185136101bf575f5ffd5b80516001600160401b038111156101d8576101d8610159565b604051601f8201601f19908116603f011681016001600160401b038111828210171561020657610206610159565b60405281815282820160200187101561021d575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80516020808301519190811015610291575f198160200360031b1b821691505b50919050565b60805160a05161204c6102cd5f395f8181610342015261104601525f81816101ad015281816103760152610ee4015261204c5ff3fe608060405234801561000f575f5ffd5b5060043610610106575f3560e01c80637c85ac4c1161009e578063be86e0b21161006e578063be86e0b21461026e578063c0da24201461028f578063cd83a72b146102a2578063e49613fc146102c5578063f698da25146102e5575f5ffd5b80637c85ac4c146101fa5780637d1d1f5b1461021a57806380c7d3f31461023a578063848189201461025b575f5ffd5b80635ddb9b5b116100d95780635ddb9b5b1461016d5780636141879e1461019557806368d6e081146101a8578063702ca531146101e7575f5ffd5b8063184674341461010a57806323c2a3cb1461013057806354fd4d501461014357806356d482f514610158575b5f5ffd5b61011d61011836600461161c565b6102ed565b6040519081526020015b60405180910390f35b61011d61013e3660046116fc565b610308565b61014b61033b565b604051610127919061175c565b61016b6101663660046117cb565b61036b565b005b61018061017b36600461183d565b610582565b60405163ffffffff9091168152602001610127565b6101806101a336600461183d565b6105a8565b6101cf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610127565b61014b6101f536600461161c565b6105ce565b61020d6102083660046116fc565b610665565b60405161012791906118ac565b61022d61022836600461190f565b6107c3565b6040516101279190611964565b61024d610248366004611986565b610986565b604051610127929190611a0a565b6101cf61026936600461183d565b6109a4565b61028161027c366004611a37565b6109cd565b604051610127929190611b1d565b61028161029d366004611b3f565b610a6d565b6102b56102b03660046116fc565b610b6f565b6040519015158152602001610127565b6102d86102d3366004611bb5565b610ba5565b6040516101279190611bf0565b61011d610c9e565b5f6102f883836105ce565b8051906020012090505b92915050565b5f5f61031384610d5e565b5f90815260046020908152604080832063ffffffff8716845290915290205491505092915050565b60606103667f0000000000000000000000000000000000000000000000000000000000000000610dc1565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103b45760405163030c1b6b60e11b815260040160405180910390fd5b5f6103cc6103c73688900388018861183d565b610d5e565b5f8181526003602052604090205490915063ffffffff9081169086161161040657604051632f20889f60e01b815260040160405180910390fd5b5f81815260046020908152604080832063ffffffff8916845290915281208490555b8381101561048e5784848281811061044257610442611c02565b90506020028101906104549190611c16565b5f83815260056020908152604080832063ffffffff8b168452825280832085845290915290206104848282611c5f565b5050600101610428565b505f818152600360209081526040909120805463ffffffff191663ffffffff88161790556104be90830183611d62565b5f8281526001602090815260409182902080546001600160a01b0319166001600160a01b0394909416939093179092556104fd91908401908401611d7d565b5f828152600260209081526040808320805463ffffffff191663ffffffff958616179055600682528083209389168352929052819020805460ff19166001179055517f4f588da9ec57976194a79b5594f8f8782923d93013df2b9ed12fe125805011ef90610572908890889088908890611d96565b60405180910390a1505050505050565b5f5f61058d83610d5e565b5f9081526003602052604090205463ffffffff169392505050565b5f5f6105b383610d5e565b5f9081526002602052604090205463ffffffff169392505050565b604080517fda346acb3ce99e7c5132bf8cafb159ad8085970ebfdba78007ef0fe163063d1460208083019190915263ffffffff85168284015260608083018590528351808403820181526080909301909352815191012061062d610c9e565b60405161190160f01b602082015260228101919091526042810182905260620160405160208183030381529060405291505092915050565b60605f61067184610d5e565b5f81815260046020908152604080832063ffffffff8089168552925282205492935082166001600160401b038111156106ac576106ac611644565b6040519080825280602002602001820160405280156106f157816020015b604080518082019091525f8152606060208201528152602001906001900390816106ca5790505b5090505f5b8263ffffffff168110156107b9575f84815260056020908152604080832063ffffffff8a16845282528083208484528252918290208251808401845281546001600160a01b031681526001820180548551818602810186019096528086529194929385810193929083018282801561078b57602002820191905f5260205f20905b815481526020019060010190808311610777575b5050505050815250508282815181106107a6576107a6611c02565b60209081029190910101526001016106f6565b5095945050505050565b60605f6107d86103c73686900386018661183d565b5f81815260046020908152604080832063ffffffff881684529091529020549091508061081857604051631029081560e21b815260040160405180910390fd5b5f82815260056020908152604080832063ffffffff88168452825280832083805290915281206001015490816001600160401b0381111561085b5761085b611644565b604051908082528060200260200182016040528015610884578160200160208202803683370190505b5090505f5b8381101561097b575f85815260056020908152604080832063ffffffff8b16845282528083208484528252808320600101805482518185028101850190935280835291929091908301828280156108fd57602002820191905f5260205f20905b8154815260200190600101908083116108e9575b509394505f93505050505b81518110801561091757508481105b156109715781818151811061092e5761092e611c02565b602002602001015184828151811061094857610948611c02565b6020026020010181815161095c9190611ec9565b9052508061096981611edc565b915050610908565b5050600101610889565b509695505050505050565b6060805f5f6109958686610dfe565b909450925050505b9250929050565b5f5f6109af83610d5e565b5f908152600160205260409020546001600160a01b03169392505050565b5f60605f5f6109dc8787610dfe565b915091508451825114610a025760405163512509d360e11b815260040160405180910390fd5b5f5b8251811015610a5c57858181518110610a1f57610a1f611c02565b6020026020010151838281518110610a3957610a39611c02565b60200260200101511015610a5457505f93509150610a659050565b600101610a04565b50600193509150505b935093915050565b5f60605f5f610a7c8888610dfe565b90925090505f610a938961022860208b018b611d7d565b83519091508614610ab75760405163512509d360e11b815260040160405180910390fd5b5f5b8351811015610b5b575f612710898984818110610ad857610ad8611c02565b9050602002016020810190610aed9190611ef4565b61ffff16848481518110610b0357610b03611c02565b6020026020010151610b159190611c48565b610b1f9190611f29565b905080858381518110610b3457610b34611c02565b60200260200101511015610b52575f84965096505050505050610b66565b50600101610ab9565b506001945090925050505b94509492505050565b5f5f610b7a84610d5e565b5f90815260066020908152604080832063ffffffff8716845290915290205460ff1691505092915050565b604080518082019091525f8152606060208201525f610bc385610d5e565b5f81815260046020908152604080832063ffffffff891684529091529020549091508310610c0457604051634e23d03560e01b815260040160405180910390fd5b5f81815260056020908152604080832063ffffffff8816845282528083208684528252918290208251808401845281546001600160a01b0316815260018201805485518186028101860190965280865291949293858101939290830182828015610c8b57602002820191905f5260205f20905b815481526020019060010190808311610c77575b5050505050815250509150509392505050565b60408051808201909152600a81526922b4b3b2b72630bcb2b960b11b6020909101525f7f91ab3d17e3a50a9d89e63fd30b92be7f5336b03b287bb946787a83a9d62a27667f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea610d0b61103e565b8051602091820120604051610d43949392309101938452602084019290925260408301526001600160a01b0316606082015260800190565b60405160208183030381529060405280519060200120905090565b5f815f0151826020015163ffffffff16604051602001610da992919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b60405160208183030381529060405261030290611f3c565b60605f610dcd836110b3565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b6060805f610e146103c73687900387018761183d565b5f8181526002602052604090205490915063ffffffff161580610e6a57505f8181526002602090815260409091205463ffffffff1690610e5690860186611d7d565b610e609190611f5f565b63ffffffff164211155b610e875760405163640fcd6b60e11b815260040160405180910390fd5b5f81815260066020908152604082209190610ea490870187611d7d565b63ffffffff16815260208101919091526040015f205460ff16610eda57604051630cad17b760e31b815260040160405180910390fd5b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166364e1df84610f166020870187611d7d565b6040516001600160e01b031960e084901b16815263ffffffff919091166004820152602401602060405180830381865afa158015610f56573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f7a9190611f7b565b610f9757604051631b14174b60e01b815260040160405180910390fd5b5f610fb2610fa86020870187611d7d565b86602001356102ed565b90505f610fff82610fc66040890189611f9a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506110da92505050565b90505f6110138861022860208a018a611d7d565b5190505f61102f8561102860208b018b611d7d565b85856112e1565b99929850919650505050505050565b60605f61106a7f0000000000000000000000000000000000000000000000000000000000000000610dc1565b9050805f8151811061107e5761107e611c02565b016020908101516040516001600160f81b03199091169181019190915260210160405160208183030381529060405291505090565b5f60ff8216601f81111561030257604051632cd44ac360e21b815260040160405180910390fd5b60605f82511180156110f75750604182516110f59190611fdc565b155b61111457604051634be6321b60e01b815260040160405180910390fd5b5f604183516111239190611f29565b9050806001600160401b0381111561113d5761113d611644565b604051908082528060200260200182016040528015611166578160200160208202803683370190505b5091505f5b818110156112d957604080516041808252608082019092525f916020820181803683370190505090505f5b60418110156112015785816111ac856041611c48565b6111b69190611ec9565b815181106111c6576111c6611c02565b602001015160f81c60f81b8282815181106111e3576111e3611c02565b60200101906001600160f81b03191690815f1a905350600101611196565b505f5f61120e888461150b565b90925090505f81600481111561122657611226611fef565b1461124457604051638baa579f60e01b815260040160405180910390fd5b831580611285575085611258600186612003565b8151811061126857611268611c02565b60200260200101516001600160a01b0316826001600160a01b0316115b6112a257604051630b550c5760e41b815260040160405180910390fd5b818685815181106112b5576112b5611c02565b6001600160a01b03929092166020928302919091019091015250505060010161116b565b505092915050565b5f84815260046020908152604080832063ffffffff87168452909152902054606090826001600160401b0381111561131b5761131b611644565b604051908082528060200260200182016040528015611344578160200160208202803683370190505b5091505f5b8451811015611501575f85828151811061136557611365611c02565b602002602001015190505f5f905061139860405180604001604052805f6001600160a01b03168152602001606081525090565b5f5b85811015611461575f8b815260056020908152604080832063ffffffff8e16845282528083208484528252918290208251808401845281546001600160a01b031681526001820180548551818602810186019096528086529194929385810193929083018282801561142957602002820191905f5260205f20905b815481526020019060010190808311611415575b5050505050815250509150836001600160a01b0316825f01516001600160a01b0316036114595760019250611461565b60010161139a565b50816114805760405163439cc0cd60e01b815260040160405180910390fd5b60208101515f5b81518110801561149657508881105b156114f0578181815181106114ad576114ad611c02565b60200260200101518882815181106114c7576114c7611c02565b602002602001018181516114db9190611ec9565b905250806114e881611edc565b915050611487565b505060019093019250611349915050565b5050949350505050565b5f5f825160410361153f576020830151604084015160608501515f1a6115338782858561154a565b9450945050505061099d565b505f9050600261099d565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561157f57505f90506003610b66565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156115d0573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b0381166115f8575f60019250925050610b66565b965f9650945050505050565b803563ffffffff81168114611617575f5ffd5b919050565b5f5f6040838503121561162d575f5ffd5b61163683611604565b946020939093013593505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b038111828210171561168057611680611644565b604052919050565b6001600160a01b038116811461169c575f5ffd5b50565b5f604082840312156116af575f5ffd5b604080519081016001600160401b03811182821017156116d1576116d1611644565b60405290508082356116e281611688565b81526116f060208401611604565b60208201525092915050565b5f5f6060838503121561170d575f5ffd5b611717848461169f565b915061172560408401611604565b90509250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61176e602083018461172e565b9392505050565b5f60408284031215611785575f5ffd5b50919050565b5f5f83601f84011261179b575f5ffd5b5081356001600160401b038111156117b1575f5ffd5b6020830191508360208260051b850101111561099d575f5ffd5b5f5f5f5f5f60c086880312156117df575f5ffd5b6117e98787611775565b94506117f760408701611604565b935060608601356001600160401b03811115611811575f5ffd5b61181d8882890161178b565b909450925061183190508760808801611775565b90509295509295909350565b5f6040828403121561184d575f5ffd5b61176e838361169f565b80516001600160a01b03168252602080820151604082850181905281519085018190525f929190910190829060608601905b808310156107b95783518252602082019150602084019350600183019250611889565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b8281101561190357603f198786030184526118ee858351611857565b945060209384019391909101906001016118d2565b50929695505050505050565b5f5f60608385031215611920575f5ffd5b6117178484611775565b5f8151808452602084019350602083015f5b8281101561195a57815186526020958601959091019060010161193c565b5093949350505050565b602081525f61176e602083018461192a565b5f60608284031215611785575f5ffd5b5f5f60608385031215611997575f5ffd5b6119a18484611775565b915060408301356001600160401b038111156119bb575f5ffd5b6119c785828601611976565b9150509250929050565b5f8151808452602084019350602083015f5b8281101561195a5781516001600160a01b03168652602095860195909101906001016119e3565b604081525f611a1c604083018561192a565b8281036020840152611a2e81856119d1565b95945050505050565b5f5f5f60808486031215611a49575f5ffd5b611a538585611775565b925060408401356001600160401b03811115611a6d575f5ffd5b611a7986828701611976565b92505060608401356001600160401b03811115611a94575f5ffd5b8401601f81018613611aa4575f5ffd5b80356001600160401b03811115611abd57611abd611644565b8060051b611acd60208201611658565b91825260208184018101929081019089841115611ae8575f5ffd5b6020850194505b83851015611b0e57843580835260209586019590935090910190611aef565b80955050505050509250925092565b8215158152604060208201525f611b3760408301846119d1565b949350505050565b5f5f5f5f60808587031215611b52575f5ffd5b611b5c8686611775565b935060408501356001600160401b03811115611b76575f5ffd5b611b8287828801611976565b93505060608501356001600160401b03811115611b9d575f5ffd5b611ba98782880161178b565b95989497509550505050565b5f5f5f60808486031215611bc7575f5ffd5b611bd1858561169f565b9250611bdf60408501611604565b929592945050506060919091013590565b602081525f61176e6020830184611857565b634e487b7160e01b5f52603260045260245ffd5b5f8235603e19833603018112611c2a575f5ffd5b9190910192915050565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761030257610302611c34565b8135611c6a81611688565b81546001600160a01b0319166001600160a01b0391909116178155602082013536839003601e19018112611c9c575f5ffd5b820180356001600160401b03811115611cb3575f5ffd5b6020820191508060051b3603821315611cca575f5ffd5b600183016001600160401b03821115611ce557611ce5611644565b68010000000000000000821115611cfe57611cfe611644565b805482825580831015611d33575f828152602090208381019082015b80821015611d30575f8255600182019150611d1a565b50505b505f90815260208120905b82811015611d5a57833582820155602090930192600101611d3e565b505050505050565b5f60208284031215611d72575f5ffd5b813561176e81611688565b5f60208284031215611d8d575f5ffd5b61176e82611604565b5f608082018635611da681611688565b6001600160a01b0316835263ffffffff611dc260208901611604565b16602084015263ffffffff861660408401526080606084015283905260a0600584901b83018101908301855f603e1936839003015b87821015611eba57868503609f190184528235818112611e15575f5ffd5b89018035611e2281611688565b6001600160a01b03168652602081013536829003601e19018112611e44575f5ffd5b016020810190356001600160401b03811115611e5e575f5ffd5b8060051b803603831315611e70575f5ffd5b60406020890181905288018290526001600160fb1b03821115611e91575f5ffd5b808360608a01376060818901019750505050602083019250602084019350600182019150611df7565b50929998505050505050505050565b8082018082111561030257610302611c34565b5f60018201611eed57611eed611c34565b5060010190565b5f60208284031215611f04575f5ffd5b813561ffff8116811461176e575f5ffd5b634e487b7160e01b5f52601260045260245ffd5b5f82611f3757611f37611f15565b500490565b80516020808301519190811015611785575f1960209190910360031b1b16919050565b63ffffffff818116838216019081111561030257610302611c34565b5f60208284031215611f8b575f5ffd5b8151801515811461176e575f5ffd5b5f5f8335601e19843603018112611faf575f5ffd5b8301803591506001600160401b03821115611fc8575f5ffd5b60200191503681900382131561099d575f5ffd5b5f82611fea57611fea611f15565b500690565b634e487b7160e01b5f52602160045260245ffd5b8181038181111561030257610302611c3456fea26469706673582212205bbd0d358460597f090200a5d0b0d8d0463a87ae80efb5f0d3b1fbae760206cb64736f6c634300081e0033", + Bin: "0x60c060405234801561000f575f5ffd5b5060405161231938038061231983398101604081905261002e9161016d565b6001600160a01b03821660805280806100468161005b565b60a0525061005490506100a1565b5050610297565b5f5f829050601f8151111561008e578260405163305a27a960e01b8152600401610085919061023c565b60405180910390fd5b805161009982610271565b179392505050565b5f54610100900460ff16156101085760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610085565b5f5460ff90811614610157575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b634e487b7160e01b5f52604160045260245ffd5b5f5f6040838503121561017e575f5ffd5b82516001600160a01b0381168114610194575f5ffd5b60208401519092506001600160401b038111156101af575f5ffd5b8301601f810185136101bf575f5ffd5b80516001600160401b038111156101d8576101d8610159565b604051601f8201601f19908116603f011681016001600160401b038111828210171561020657610206610159565b60405281815282820160200187101561021d575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80516020808301519190811015610291575f198160200360031b1b821691505b50919050565b60805160a05161204c6102cd5f395f8181610342015261104601525f81816101ad015281816103760152610ee4015261204c5ff3fe608060405234801561000f575f5ffd5b5060043610610106575f3560e01c80637c85ac4c1161009e578063be86e0b21161006e578063be86e0b21461026e578063c0da24201461028f578063cd83a72b146102a2578063e49613fc146102c5578063f698da25146102e5575f5ffd5b80637c85ac4c146101fa5780637d1d1f5b1461021a57806380c7d3f31461023a578063848189201461025b575f5ffd5b80635ddb9b5b116100d95780635ddb9b5b1461016d5780636141879e1461019557806368d6e081146101a8578063702ca531146101e7575f5ffd5b8063184674341461010a57806323c2a3cb1461013057806354fd4d501461014357806356d482f514610158575b5f5ffd5b61011d61011836600461161c565b6102ed565b6040519081526020015b60405180910390f35b61011d61013e3660046116fc565b610308565b61014b61033b565b604051610127919061175c565b61016b6101663660046117cb565b61036b565b005b61018061017b36600461183d565b610582565b60405163ffffffff9091168152602001610127565b6101806101a336600461183d565b6105a8565b6101cf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610127565b61014b6101f536600461161c565b6105ce565b61020d6102083660046116fc565b610665565b60405161012791906118ac565b61022d61022836600461190f565b6107c3565b6040516101279190611964565b61024d610248366004611986565b610986565b604051610127929190611a0a565b6101cf61026936600461183d565b6109a4565b61028161027c366004611a37565b6109cd565b604051610127929190611b1d565b61028161029d366004611b3f565b610a6d565b6102b56102b03660046116fc565b610b6f565b6040519015158152602001610127565b6102d86102d3366004611bb5565b610ba5565b6040516101279190611bf0565b61011d610c9e565b5f6102f883836105ce565b8051906020012090505b92915050565b5f5f61031384610d5e565b5f90815260046020908152604080832063ffffffff8716845290915290205491505092915050565b60606103667f0000000000000000000000000000000000000000000000000000000000000000610dc1565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103b45760405163030c1b6b60e11b815260040160405180910390fd5b5f6103cc6103c73688900388018861183d565b610d5e565b5f8181526003602052604090205490915063ffffffff9081169086161161040657604051632f20889f60e01b815260040160405180910390fd5b5f81815260046020908152604080832063ffffffff8916845290915281208490555b8381101561048e5784848281811061044257610442611c02565b90506020028101906104549190611c16565b5f83815260056020908152604080832063ffffffff8b168452825280832085845290915290206104848282611c5f565b5050600101610428565b505f818152600360209081526040909120805463ffffffff191663ffffffff88161790556104be90830183611d62565b5f8281526001602090815260409182902080546001600160a01b0319166001600160a01b0394909416939093179092556104fd91908401908401611d7d565b5f828152600260209081526040808320805463ffffffff191663ffffffff958616179055600682528083209389168352929052819020805460ff19166001179055517f4f588da9ec57976194a79b5594f8f8782923d93013df2b9ed12fe125805011ef90610572908890889088908890611d96565b60405180910390a1505050505050565b5f5f61058d83610d5e565b5f9081526003602052604090205463ffffffff169392505050565b5f5f6105b383610d5e565b5f9081526002602052604090205463ffffffff169392505050565b604080517fda346acb3ce99e7c5132bf8cafb159ad8085970ebfdba78007ef0fe163063d1460208083019190915263ffffffff85168284015260608083018590528351808403820181526080909301909352815191012061062d610c9e565b60405161190160f01b602082015260228101919091526042810182905260620160405160208183030381529060405291505092915050565b60605f61067184610d5e565b5f81815260046020908152604080832063ffffffff8089168552925282205492935082166001600160401b038111156106ac576106ac611644565b6040519080825280602002602001820160405280156106f157816020015b604080518082019091525f8152606060208201528152602001906001900390816106ca5790505b5090505f5b8263ffffffff168110156107b9575f84815260056020908152604080832063ffffffff8a16845282528083208484528252918290208251808401845281546001600160a01b031681526001820180548551818602810186019096528086529194929385810193929083018282801561078b57602002820191905f5260205f20905b815481526020019060010190808311610777575b5050505050815250508282815181106107a6576107a6611c02565b60209081029190910101526001016106f6565b5095945050505050565b60605f6107d86103c73686900386018661183d565b5f81815260046020908152604080832063ffffffff881684529091529020549091508061081857604051631029081560e21b815260040160405180910390fd5b5f82815260056020908152604080832063ffffffff88168452825280832083805290915281206001015490816001600160401b0381111561085b5761085b611644565b604051908082528060200260200182016040528015610884578160200160208202803683370190505b5090505f5b8381101561097b575f85815260056020908152604080832063ffffffff8b16845282528083208484528252808320600101805482518185028101850190935280835291929091908301828280156108fd57602002820191905f5260205f20905b8154815260200190600101908083116108e9575b509394505f93505050505b81518110801561091757508481105b156109715781818151811061092e5761092e611c02565b602002602001015184828151811061094857610948611c02565b6020026020010181815161095c9190611ec9565b9052508061096981611edc565b915050610908565b5050600101610889565b509695505050505050565b6060805f5f6109958686610dfe565b909450925050505b9250929050565b5f5f6109af83610d5e565b5f908152600160205260409020546001600160a01b03169392505050565b5f60605f5f6109dc8787610dfe565b915091508451825114610a025760405163512509d360e11b815260040160405180910390fd5b5f5b8251811015610a5c57858181518110610a1f57610a1f611c02565b6020026020010151838281518110610a3957610a39611c02565b60200260200101511015610a5457505f93509150610a659050565b600101610a04565b50600193509150505b935093915050565b5f60605f5f610a7c8888610dfe565b90925090505f610a938961022860208b018b611d7d565b83519091508614610ab75760405163512509d360e11b815260040160405180910390fd5b5f5b8351811015610b5b575f612710898984818110610ad857610ad8611c02565b9050602002016020810190610aed9190611ef4565b61ffff16848481518110610b0357610b03611c02565b6020026020010151610b159190611c48565b610b1f9190611f29565b905080858381518110610b3457610b34611c02565b60200260200101511015610b52575f84965096505050505050610b66565b50600101610ab9565b506001945090925050505b94509492505050565b5f5f610b7a84610d5e565b5f90815260066020908152604080832063ffffffff8716845290915290205460ff1691505092915050565b604080518082019091525f8152606060208201525f610bc385610d5e565b5f81815260046020908152604080832063ffffffff891684529091529020549091508310610c0457604051634e23d03560e01b815260040160405180910390fd5b5f81815260056020908152604080832063ffffffff8816845282528083208684528252918290208251808401845281546001600160a01b0316815260018201805485518186028101860190965280865291949293858101939290830182828015610c8b57602002820191905f5260205f20905b815481526020019060010190808311610c77575b5050505050815250509150509392505050565b60408051808201909152600a81526922b4b3b2b72630bcb2b960b11b6020909101525f7f91ab3d17e3a50a9d89e63fd30b92be7f5336b03b287bb946787a83a9d62a27667f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea610d0b61103e565b8051602091820120604051610d43949392309101938452602084019290925260408301526001600160a01b0316606082015260800190565b60405160208183030381529060405280519060200120905090565b5f815f0151826020015163ffffffff16604051602001610da992919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b60405160208183030381529060405261030290611f3c565b60605f610dcd836110b3565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b6060805f610e146103c73687900387018761183d565b5f8181526002602052604090205490915063ffffffff161580610e6a57505f8181526002602090815260409091205463ffffffff1690610e5690860186611d7d565b610e609190611f5f565b63ffffffff164211155b610e875760405163640fcd6b60e11b815260040160405180910390fd5b5f81815260066020908152604082209190610ea490870187611d7d565b63ffffffff16815260208101919091526040015f205460ff16610eda57604051630cad17b760e31b815260040160405180910390fd5b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166364e1df84610f166020870187611d7d565b6040516001600160e01b031960e084901b16815263ffffffff919091166004820152602401602060405180830381865afa158015610f56573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f7a9190611f7b565b610f9757604051631b14174b60e01b815260040160405180910390fd5b5f610fb2610fa86020870187611d7d565b86602001356102ed565b90505f610fff82610fc66040890189611f9a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506110da92505050565b90505f6110138861022860208a018a611d7d565b5190505f61102f8561102860208b018b611d7d565b85856112e1565b99929850919650505050505050565b60605f61106a7f0000000000000000000000000000000000000000000000000000000000000000610dc1565b9050805f8151811061107e5761107e611c02565b016020908101516040516001600160f81b03199091169181019190915260210160405160208183030381529060405291505090565b5f60ff8216601f81111561030257604051632cd44ac360e21b815260040160405180910390fd5b60605f82511180156110f75750604182516110f59190611fdc565b155b61111457604051634be6321b60e01b815260040160405180910390fd5b5f604183516111239190611f29565b9050806001600160401b0381111561113d5761113d611644565b604051908082528060200260200182016040528015611166578160200160208202803683370190505b5091505f5b818110156112d957604080516041808252608082019092525f916020820181803683370190505090505f5b60418110156112015785816111ac856041611c48565b6111b69190611ec9565b815181106111c6576111c6611c02565b602001015160f81c60f81b8282815181106111e3576111e3611c02565b60200101906001600160f81b03191690815f1a905350600101611196565b505f5f61120e888461150b565b90925090505f81600481111561122657611226611fef565b1461124457604051638baa579f60e01b815260040160405180910390fd5b831580611285575085611258600186612003565b8151811061126857611268611c02565b60200260200101516001600160a01b0316826001600160a01b0316115b6112a257604051630b550c5760e41b815260040160405180910390fd5b818685815181106112b5576112b5611c02565b6001600160a01b03929092166020928302919091019091015250505060010161116b565b505092915050565b5f84815260046020908152604080832063ffffffff87168452909152902054606090826001600160401b0381111561131b5761131b611644565b604051908082528060200260200182016040528015611344578160200160208202803683370190505b5091505f5b8451811015611501575f85828151811061136557611365611c02565b602002602001015190505f5f905061139860405180604001604052805f6001600160a01b03168152602001606081525090565b5f5b85811015611461575f8b815260056020908152604080832063ffffffff8e16845282528083208484528252918290208251808401845281546001600160a01b031681526001820180548551818602810186019096528086529194929385810193929083018282801561142957602002820191905f5260205f20905b815481526020019060010190808311611415575b5050505050815250509150836001600160a01b0316825f01516001600160a01b0316036114595760019250611461565b60010161139a565b50816114805760405163439cc0cd60e01b815260040160405180910390fd5b60208101515f5b81518110801561149657508881105b156114f0578181815181106114ad576114ad611c02565b60200260200101518882815181106114c7576114c7611c02565b602002602001018181516114db9190611ec9565b905250806114e881611edc565b915050611487565b505060019093019250611349915050565b5050949350505050565b5f5f825160410361153f576020830151604084015160608501515f1a6115338782858561154a565b9450945050505061099d565b505f9050600261099d565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561157f57505f90506003610b66565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156115d0573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b0381166115f8575f60019250925050610b66565b965f9650945050505050565b803563ffffffff81168114611617575f5ffd5b919050565b5f5f6040838503121561162d575f5ffd5b61163683611604565b946020939093013593505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b038111828210171561168057611680611644565b604052919050565b6001600160a01b038116811461169c575f5ffd5b50565b5f604082840312156116af575f5ffd5b604080519081016001600160401b03811182821017156116d1576116d1611644565b60405290508082356116e281611688565b81526116f060208401611604565b60208201525092915050565b5f5f6060838503121561170d575f5ffd5b611717848461169f565b915061172560408401611604565b90509250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61176e602083018461172e565b9392505050565b5f60408284031215611785575f5ffd5b50919050565b5f5f83601f84011261179b575f5ffd5b5081356001600160401b038111156117b1575f5ffd5b6020830191508360208260051b850101111561099d575f5ffd5b5f5f5f5f5f60c086880312156117df575f5ffd5b6117e98787611775565b94506117f760408701611604565b935060608601356001600160401b03811115611811575f5ffd5b61181d8882890161178b565b909450925061183190508760808801611775565b90509295509295909350565b5f6040828403121561184d575f5ffd5b61176e838361169f565b80516001600160a01b03168252602080820151604082850181905281519085018190525f929190910190829060608601905b808310156107b95783518252602082019150602084019350600183019250611889565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b8281101561190357603f198786030184526118ee858351611857565b945060209384019391909101906001016118d2565b50929695505050505050565b5f5f60608385031215611920575f5ffd5b6117178484611775565b5f8151808452602084019350602083015f5b8281101561195a57815186526020958601959091019060010161193c565b5093949350505050565b602081525f61176e602083018461192a565b5f60608284031215611785575f5ffd5b5f5f60608385031215611997575f5ffd5b6119a18484611775565b915060408301356001600160401b038111156119bb575f5ffd5b6119c785828601611976565b9150509250929050565b5f8151808452602084019350602083015f5b8281101561195a5781516001600160a01b03168652602095860195909101906001016119e3565b604081525f611a1c604083018561192a565b8281036020840152611a2e81856119d1565b95945050505050565b5f5f5f60808486031215611a49575f5ffd5b611a538585611775565b925060408401356001600160401b03811115611a6d575f5ffd5b611a7986828701611976565b92505060608401356001600160401b03811115611a94575f5ffd5b8401601f81018613611aa4575f5ffd5b80356001600160401b03811115611abd57611abd611644565b8060051b611acd60208201611658565b91825260208184018101929081019089841115611ae8575f5ffd5b6020850194505b83851015611b0e57843580835260209586019590935090910190611aef565b80955050505050509250925092565b8215158152604060208201525f611b3760408301846119d1565b949350505050565b5f5f5f5f60808587031215611b52575f5ffd5b611b5c8686611775565b935060408501356001600160401b03811115611b76575f5ffd5b611b8287828801611976565b93505060608501356001600160401b03811115611b9d575f5ffd5b611ba98782880161178b565b95989497509550505050565b5f5f5f60808486031215611bc7575f5ffd5b611bd1858561169f565b9250611bdf60408501611604565b929592945050506060919091013590565b602081525f61176e6020830184611857565b634e487b7160e01b5f52603260045260245ffd5b5f8235603e19833603018112611c2a575f5ffd5b9190910192915050565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761030257610302611c34565b8135611c6a81611688565b81546001600160a01b0319166001600160a01b0391909116178155602082013536839003601e19018112611c9c575f5ffd5b820180356001600160401b03811115611cb3575f5ffd5b6020820191508060051b3603821315611cca575f5ffd5b600183016001600160401b03821115611ce557611ce5611644565b68010000000000000000821115611cfe57611cfe611644565b805482825580831015611d33575f828152602090208381019082015b80821015611d30575f8255600182019150611d1a565b50505b505f90815260208120905b82811015611d5a57833582820155602090930192600101611d3e565b505050505050565b5f60208284031215611d72575f5ffd5b813561176e81611688565b5f60208284031215611d8d575f5ffd5b61176e82611604565b5f608082018635611da681611688565b6001600160a01b0316835263ffffffff611dc260208901611604565b16602084015263ffffffff861660408401526080606084015283905260a0600584901b83018101908301855f603e1936839003015b87821015611eba57868503609f190184528235818112611e15575f5ffd5b89018035611e2281611688565b6001600160a01b03168652602081013536829003601e19018112611e44575f5ffd5b016020810190356001600160401b03811115611e5e575f5ffd5b8060051b803603831315611e70575f5ffd5b60406020890181905288018290526001600160fb1b03821115611e91575f5ffd5b808360608a01376060818901019750505050602083019250602084019350600182019150611df7565b50929998505050505050505050565b8082018082111561030257610302611c34565b5f60018201611eed57611eed611c34565b5060010190565b5f60208284031215611f04575f5ffd5b813561ffff8116811461176e575f5ffd5b634e487b7160e01b5f52601260045260245ffd5b5f82611f3757611f37611f15565b500490565b80516020808301519190811015611785575f1960209190910360031b1b16919050565b63ffffffff818116838216019081111561030257610302611c34565b5f60208284031215611f8b575f5ffd5b8151801515811461176e575f5ffd5b5f5f8335601e19843603018112611faf575f5ffd5b8301803591506001600160401b03821115611fc8575f5ffd5b60200191503681900382131561099d575f5ffd5b5f82611fea57611fea611f15565b500690565b634e487b7160e01b5f52602160045260245ffd5b8181038181111561030257610302611c3456fea26469706673582212208870133d4debe03fa2ff00e606020840c8d625c72a296e1f0a1cfccaff109bcf64736f6c634300081e0033", } // ECDSACertificateVerifierABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/Eigen/binding.go b/pkg/bindings/Eigen/binding.go index caa02c1ab3..1b700cb8fc 100644 --- a/pkg/bindings/Eigen/binding.go +++ b/pkg/bindings/Eigen/binding.go @@ -38,7 +38,7 @@ type ERC20VotesUpgradeableCheckpoint struct { // EigenMetaData contains all meta data concerning the Eigen contract. var EigenMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_bEIGEN\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"CLOCK_MODE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"DOMAIN_SEPARATOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowance\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowedFrom\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowedTo\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"approve\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bEIGEN\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"balanceOf\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"checkpoints\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"pos\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structERC20VotesUpgradeable.Checkpoint\",\"components\":[{\"name\":\"fromBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"votes\",\"type\":\"uint224\",\"internalType\":\"uint224\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"clock\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint48\",\"internalType\":\"uint48\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decimals\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decreaseAllowance\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegate\",\"inputs\":[{\"name\":\"delegatee\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateBySig\",\"inputs\":[{\"name\":\"delegatee\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegates\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"disableTransferRestrictions\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"eip712Domain\",\"inputs\":[],\"outputs\":[{\"name\":\"fields\",\"type\":\"bytes1\",\"internalType\":\"bytes1\"},{\"name\":\"name\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"verifyingContract\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"extensions\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPastTotalSupply\",\"inputs\":[{\"name\":\"timepoint\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPastVotes\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"timepoint\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getVotes\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"increaseAllowance\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minters\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"mintingAllowances\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"mintAllowedAfters\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"mint\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"mintAllowedAfter\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"mintingAllowance\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"multisend\",\"inputs\":[{\"name\":\"receivers\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"amounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"name\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nonces\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"numCheckpoints\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"permit\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"deadline\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllowedFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isAllowedFrom\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllowedTo\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"isAllowedTo\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"symbol\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalSupply\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transfer\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferRestrictionsDisabledAfter\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unwrap\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"wrap\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Approval\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DelegateChanged\",\"inputs\":[{\"name\":\"delegator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"fromDelegate\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"toDelegate\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DelegateVotesChanged\",\"inputs\":[{\"name\":\"delegate\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"previousBalance\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newBalance\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EIP712DomainChanged\",\"inputs\":[],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Mint\",\"inputs\":[{\"name\":\"minter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"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\":\"SetAllowedFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"isAllowedFrom\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SetAllowedTo\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"isAllowedTo\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TokenUnwrapped\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TokenWrapped\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Transfer\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransferRestrictionsDisabled\",\"inputs\":[],\"anonymous\":false},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]}]", - Bin: "0x60c060405234801561000f575f5ffd5b5060405161379b38038061379b83398101604081905261002e9161016a565b8061003881610058565b608052506001600160a01b03821660a05261005161009e565b5050610294565b5f5f829050601f8151111561008b578260405163305a27a960e01b81526004016100829190610239565b60405180910390fd5b80516100968261026e565b179392505050565b5f54610100900460ff16156101055760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610082565b5f5460ff90811614610154575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b634e487b7160e01b5f52604160045260245ffd5b5f5f6040838503121561017b575f5ffd5b82516001600160a01b0381168114610191575f5ffd5b60208401519092506001600160401b038111156101ac575f5ffd5b8301601f810185136101bc575f5ffd5b80516001600160401b038111156101d5576101d5610156565b604051601f8201601f19908116603f011681016001600160401b038111828210171561020357610203610156565b60405281815282820160200187101561021a575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b8051602080830151919081101561028e575f198160200360031b1b821691505b50919050565b60805160a0516134d16102ca5f395f818161034c01528181610852015281816114dd01526115fb01525f610a1401526134d15ff3fe608060405234801561000f575f5ffd5b5060043610610260575f3560e01c80637ecebe001161014b578063a9059cbb116100bf578063dd62ed3e11610084578063dd62ed3e146105cc578063de0e9a3e146105df578063ea598cb0146105f2578063eb415f4514610605578063f1127ed81461060d578063f2fde38b1461064a575f5ffd5b8063a9059cbb1461056d578063aad41a4114610580578063b8c2559414610593578063c3cda520146105a6578063d505accf146105b9575f5ffd5b806391ddadf41161011057806391ddadf41461050357806395d89b41146105225780639ab24eb01461052a5780639aec4bae1461053d578063a457c2d714610547578063a7d1195d1461055a575f5ffd5b80637ecebe001461049157806381b97161146104a457806384b0196e146104c45780638da5cb5b146104df5780638e539e8c146104f0575f5ffd5b80633a46b1a8116101e2578063587cde1e116101a7578063587cde1e146103d85780635c19a95c146104035780636fcfff451461041657806370a082311461043e578063715018a61461046657806378aa33ba1461046e575f5ffd5b80633a46b1a8146103345780633f4da4c6146103475780634bf5d7e91461038657806353957125146103b057806354fd4d50146103d0575f5ffd5b80631ffacdef116102285780631ffacdef146102e457806323b872dd146102f7578063313ce5671461030a5780633644e515146103195780633950935114610321575f5ffd5b80630455e6941461026457806306fdde031461029c578063095ea7b3146102b15780631249c58b146102c457806318160ddd146102ce575b5f5ffd5b610287610272366004612d08565b6101336020525f908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6102a461065d565b6040516102939190612d4f565b6102876102bf366004612d61565b6106ed565b6102cc610706565b005b6102d661084f565b604051908152602001610293565b6102cc6102f2366004612d96565b6108d5565b610287610305366004612dcb565b61093d565b60405160128152602001610293565b6102d6610960565b61028761032f366004612d61565b610969565b6102d6610342366004612d61565b61098a565b61036e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610293565b60408051808201909152600e81526d06d6f64653d74696d657374616d760941b60208201526102a4565b6102d66103be366004612d08565b6101306020525f908152604090205481565b6102a4610a0d565b61036e6103e6366004612d08565b6001600160a01b039081165f90815260fe60205260409020541690565b6102cc610411366004612d08565b610a38565b610429610424366004612d08565b610a45565b60405163ffffffff9091168152602001610293565b6102d661044c366004612d08565b6001600160a01b03165f9081526065602052604090205490565b6102cc610a66565b61028761047c366004612d08565b6101346020525f908152604090205460ff1681565b6102d661049f366004612d08565b610a79565b6102d66104b2366004612d08565b6101316020525f908152604090205481565b6104cc610a96565b6040516102939796959493929190612e05565b6033546001600160a01b031661036e565b6102d66104fe366004612e9b565b610b2f565b61050b610b96565b60405165ffffffffffff9091168152602001610293565b6102a4610ba0565b6102d6610538366004612d08565b610baf565b6102d66101325481565b610287610555366004612d61565b610c2c565b6102cc610568366004612f7a565b610ca6565b61028761057b366004612d61565b6110ba565b6102cc61058e3660046130bf565b6110c7565b6102cc6105a1366004612d96565b611197565b6102cc6105b436600461313b565b6111f7565b6102cc6105c736600461318f565b61132c565b6102d66105da3660046131f5565b61148d565b6102cc6105ed366004612e9b565b6114b7565b6102cc610600366004612e9b565b6115d9565b6102cc611700565b61062061061b366004613226565b6117c7565b60408051825163ffffffff1681526020928301516001600160e01b03169281019290925201610293565b6102cc610658366004612d08565b611848565b60606068805461066c90613258565b80601f016020809104026020016040519081016040528092919081815260200182805461069890613258565b80156106e35780601f106106ba576101008083540402835291602001916106e3565b820191905f5260205f20905b8154815290600101906020018083116106c657829003601f168201915b5050505050905090565b5f336106fa8185856118be565b60019150505b92915050565b335f908152610131602052604090205461077f5760405162461bcd60e51b815260206004820152602f60248201527f456967656e2e6d696e743a206d73672e73656e64657220686173206e6f206d6960448201526e6e74696e6720616c6c6f77616e636560881b60648201526084015b60405180910390fd5b335f908152610130602052604090205442116107f75760405162461bcd60e51b815260206004820152603160248201527f456967656e2e6d696e743a206d73672e73656e646572206973206e6f7420616c6044820152701b1bddd959081d1bc81b5a5b9d081e595d607a1b6064820152608401610776565b335f8181526101316020526040812080549190559061081690826119e1565b60405181815233907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885906020015b60405180910390a250565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108ac573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108d0919061328a565b905090565b6108dd611a77565b6001600160a01b0382165f8181526101336020908152604091829020805460ff191685151590811790915591519182527fcf20b1ecb604b0e8888d579c64e8a3b10e590d45c1c2dddb393bed284362227191015b60405180910390a25050565b5f3361094a858285611ad1565b610955858585611b43565b506001949350505050565b5f6108d0611cfd565b5f336106fa81858561097b838361148d565b61098591906132b5565b6118be565b5f610993610b96565b65ffffffffffff1682106109e55760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b6044820152606401610776565b6001600160a01b0383165f90815260ff60205260409020610a069083611d06565b9392505050565b60606108d07f0000000000000000000000000000000000000000000000000000000000000000611de7565b610a423382611e24565b50565b6001600160a01b0381165f90815260ff602052604081205461070090611e9d565b610a6e611a77565b610a775f611f05565b565b6001600160a01b0381165f90815260cb6020526040812054610700565b5f6060805f5f5f60606097545f5f1b148015610ab25750609854155b610af65760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b6044820152606401610776565b610afe611f56565b610b06611f65565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b5f610b38610b96565b65ffffffffffff168210610b8a5760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b6044820152606401610776565b61070061010083611d06565b5f6108d042611f74565b60606069805461066c90613258565b6001600160a01b0381165f90815260ff60205260408120548015610c1a576001600160a01b0383165f90815260ff6020526040902080545f198301908110610bf957610bf96132c8565b5f9182526020909120015464010000000090046001600160e01b0316610c1c565b5f5b6001600160e01b03169392505050565b5f3381610c39828661148d565b905083811015610c995760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610776565b61095582868684036118be565b5f54610100900460ff1615808015610cc457505f54600160ff909116105b80610cdd5750303b158015610cdd57505f5460ff166001145b610d405760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610776565b5f805460ff191660011790558015610d61575f805461ff0019166101001790555b610d69611fda565b610dad6040518060400160405280600581526020016422b4b3b2b760d91b8152506040518060400160405280600581526020016422a4a3a2a760d91b815250612008565b610db685611f05565b610ddc6040518060400160405280600581526020016422a4a3a2a760d91b81525061203c565b8251845114610e635760405162461bcd60e51b815260206004820152604760248201527f456967656e2e696e697469616c697a653a206d696e7465727320616e64206d6960448201527f6e74696e67416c6c6f77616e636573206d757374206265207468652073616d65606482015266040d8cadccee8d60cb1b608482015260a401610776565b8151845114610eea5760405162461bcd60e51b815260206004820152604760248201527f456967656e2e696e697469616c697a653a206d696e7465727320616e64206d6960448201527f6e74416c6c6f776564416674657273206d757374206265207468652073616d65606482015266040d8cadccee8d60cb1b608482015260a401610776565b5f5b845181101561106757838181518110610f0757610f076132c8565b60200260200101516101315f878481518110610f2557610f256132c8565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f2081905550828181518110610f6257610f626132c8565b60200260200101516101305f878481518110610f8057610f806132c8565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f208190555060016101335f878481518110610fc357610fc36132c8565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f205f6101000a81548160ff021916908315150217905550848181518110611012576110126132c8565b60200260200101516001600160a01b03167fcf20b1ecb604b0e8888d579c64e8a3b10e590d45c1c2dddb393bed28436222716001604051611057911515815260200190565b60405180910390a2600101610eec565b505f196101325580156110b3575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b5f336106fa818585611b43565b82811461113c5760405162461bcd60e51b815260206004820152603e60248201527f456967656e2e6d756c746973656e643a2072656365697665727320616e64206160448201527f6d6f756e7473206d757374206265207468652073616d65206c656e67746800006064820152608401610776565b5f5b838110156110b35761118f3386868481811061115c5761115c6132c8565b90506020020160208101906111719190612d08565b858585818110611183576111836132c8565b90506020020135611b43565b60010161113e565b61119f611a77565b6001600160a01b0382165f8181526101346020908152604091829020805460ff191685151590811790915591519182527f72a561d1af7409467dae4f1e9fc52590a9335a1dda17727e2b6aa8c4db35109b9101610931565b834211156112475760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e617475726520657870697265640000006044820152606401610776565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b0388169181019190915260608101869052608081018590525f906112c0906112b89060a00160405160208183030381529060405280519060200120612085565b8585856120b1565b90506112cb816120d7565b86146113195760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e6365000000000000006044820152606401610776565b6113238188611e24565b50505050505050565b8342111561137c5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610776565b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886113aa8c6120d7565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090505f61140482612085565b90505f611413828787876120b1565b9050896001600160a01b0316816001600160a01b0316146114765760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610776565b6114818a8a8a6118be565b50505050505050505050565b6001600160a01b039182165f90815260666020908152604080832093909416825291909152205490565b6114c133826120fe565b60405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303815f875af115801561152b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061154f91906132dc565b6115a75760405162461bcd60e51b8152602060048201526024808201527f456967656e2e756e777261703a2062454947454e207472616e736665722066616044820152631a5b195960e21b6064820152608401610776565b60405181815233907f7f8146ca1ae17ad17561461ef221d97c8160bfddcae0edb68f53ce8dc5ce4af390602001610844565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303815f875af1158015611649573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061166d91906132dc565b6116c45760405162461bcd60e51b815260206004820152602260248201527f456967656e2e777261703a2062454947454e207472616e73666572206661696c604482015261195960f21b6064820152608401610776565b6116ce33826119e1565b60405181815233907f2273a99739c31a37346636a3013c2cedebee7cd5b4c560faded39d298c1dd45c90602001610844565b611708611a77565b5f1961013254146117975760405162461bcd60e51b815260206004820152604d60248201527f456967656e2e64697361626c655472616e736665725265737472696374696f6e60448201527f733a207472616e73666572207265737472696374696f6e732061726520616c7260648201526c1958591e48191a5cd8589b1959609a1b608482015260a401610776565b5f6101328190556040517f2b18986d3ba809db2f13a5d7bf17f60d357b37d9cbb55dd71cbbac8dc4060f649190a1565b604080518082019091525f80825260208201526001600160a01b0383165f90815260ff60205260409020805463ffffffff8416908110611809576118096132c8565b5f9182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b611850611a77565b6001600160a01b0381166118b55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610776565b610a4281611f05565b6001600160a01b0383166119205760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610776565b6001600160a01b0382166119815760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610776565b6001600160a01b038381165f8181526066602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6119eb8282612117565b6001600160e01b036119fb61084f565b1115611a625760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b6064820152608401610776565b611a716101006121e8836121f3565b50505050565b6033546001600160a01b03163314610a775760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610776565b5f611adc848461148d565b90505f198114611a715781811015611b365760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610776565b611a7184848484036118be565b6001600160a01b038316611ba75760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610776565b6001600160a01b038216611c095760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610776565b611c1483838361235f565b6001600160a01b0383165f9081526065602052604090205481811015611c8b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610776565b6001600160a01b038085165f8181526065602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611cea9086815260200190565b60405180910390a3611a71848484612443565b5f6108d0612474565b81545f9081816005811115611d5d575f611d1f846124e7565b611d2990856132f7565b5f88815260209020909150869082015463ffffffff161115611d4d57809150611d5b565b611d588160016132b5565b92505b505b80821015611da8575f611d7083836125cb565b5f88815260209020909150869082015463ffffffff161115611d9457809150611da2565b611d9f8160016132b5565b92505b50611d5d565b8015611dd2575f8681526020902081015f19015464010000000090046001600160e01b0316611dd4565b5f5b6001600160e01b03169695505050505050565b60605f611df3836125e5565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b6001600160a01b038281165f81815260fe6020818152604080842080546065845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611a7182848361260c565b5f63ffffffff821115611f015760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401610776565b5090565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b60606099805461066c90613258565b6060609a805461066c90613258565b5f65ffffffffffff821115611f015760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203460448201526538206269747360d01b6064820152608401610776565b5f54610100900460ff166120005760405162461bcd60e51b81526004016107769061330a565b610a77612746565b5f54610100900460ff1661202e5760405162461bcd60e51b81526004016107769061330a565b6120388282612775565b5050565b5f54610100900460ff166120625760405162461bcd60e51b81526004016107769061330a565b610a4281604051806040016040528060018152602001603160f81b8152506127b4565b5f610700612091611cfd565b8360405161190160f01b8152600281019290925260228201526042902090565b5f5f5f6120c087878787612801565b915091506120cd816128be565b5095945050505050565b6001600160a01b0381165f90815260cb602052604090208054600181018255905b50919050565b6121088282612a07565b611a71610100612b4a836121f3565b6001600160a01b03821661216d5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610776565b6121785f838361235f565b8060675f82825461218991906132b5565b90915550506001600160a01b0382165f818152606560209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36120385f8383612443565b5f610a0682846132b5565b82545f90819081811561223d575f8781526020902082015f190160408051808201909152905463ffffffff8116825264010000000090046001600160e01b03166020820152612251565b604080518082019091525f80825260208201525b905080602001516001600160e01b0316935061227184868863ffffffff16565b92505f821180156122995750612285610b96565b65ffffffffffff16815f015163ffffffff16145b156122dc576122a783612b55565b5f8881526020902083015f190180546001600160e01b03929092166401000000000263ffffffff909216919091179055612355565b8660405180604001604052806123006122f3610b96565b65ffffffffffff16611e9d565b63ffffffff16815260200161231486612b55565b6001600160e01b0390811690915282546001810184555f938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b5050935093915050565b61013254421161243e576001600160a01b038316158061238657506001600160a01b038216155b806123a957506001600160a01b0383165f908152610133602052604090205460ff165b806123cc57506001600160a01b0382165f908152610134602052604090205460ff165b61243e5760405162461bcd60e51b815260206004820152603a60248201527f456967656e2e5f6265666f7265546f6b656e5472616e736665723a2066726f6d60448201527f206f7220746f206d7573742062652077686974656c69737465640000000000006064820152608401610776565b505050565b6001600160a01b038381165f90815260fe602052604080822054858416835291205461243e9291821691168361260c565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61249e612bbd565b6124a6612c15565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f815f036124f657505f919050565b5f600161250284612c45565b901c6001901b9050600181848161251b5761251b613355565b048201901c9050600181848161253357612533613355565b048201901c9050600181848161254b5761254b613355565b048201901c9050600181848161256357612563613355565b048201901c9050600181848161257b5761257b613355565b048201901c9050600181848161259357612593613355565b048201901c905060018184816125ab576125ab613355565b048201901c9050610a06818285816125c5576125c5613355565b04612cd8565b5f6125d96002848418613369565b610a06908484166132b5565b5f60ff8216601f81111561070057604051632cd44ac360e21b815260040160405180910390fd5b816001600160a01b0316836001600160a01b03161415801561262d57505f81115b1561243e576001600160a01b038316156126ba576001600160a01b0383165f90815260ff60205260408120819061266790612b4a856121f3565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72483836040516126af929190918252602082015260400190565b60405180910390a250505b6001600160a01b0382161561243e576001600160a01b0382165f90815260ff6020526040812081906126ef906121e8856121f3565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051612737929190918252602082015260400190565b60405180910390a25050505050565b5f54610100900460ff1661276c5760405162461bcd60e51b81526004016107769061330a565b610a7733611f05565b5f54610100900460ff1661279b5760405162461bcd60e51b81526004016107769061330a565b60686127a783826133cc565b50606961243e82826133cc565b5f54610100900460ff166127da5760405162461bcd60e51b81526004016107769061330a565b60996127e683826133cc565b50609a6127f382826133cc565b50505f609781905560985550565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561283657505f905060036128b5565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612887573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b0381166128af575f600192509250506128b5565b91505f90505b94509492505050565b5f8160048111156128d1576128d1613487565b036128d95750565b60018160048111156128ed576128ed613487565b0361293a5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610776565b600281600481111561294e5761294e613487565b0361299b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610776565b60038160048111156129af576129af613487565b03610a425760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610776565b6001600160a01b038216612a675760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610776565b612a72825f8361235f565b6001600160a01b0382165f9081526065602052604090205481811015612ae55760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610776565b6001600160a01b0383165f8181526065602090815260408083208686039055606780548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a361243e835f84612443565b5f610a0682846132f7565b5f6001600160e01b03821115611f015760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401610776565b5f5f612bc7611f56565b805190915015612bde578051602090910120919050565b6097548015612bed5792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b5f5f612c1f611f65565b805190915015612c36578051602090910120919050565b6098548015612bed5792915050565b5f80608083901c15612c5957608092831c92015b604083901c15612c6b57604092831c92015b602083901c15612c7d57602092831c92015b601083901c15612c8f57601092831c92015b600883901c15612ca157600892831c92015b600483901c15612cb357600492831c92015b600283901c15612cc557600292831c92015b600183901c156107005760010192915050565b5f818310612ce65781610a06565b5090919050565b80356001600160a01b0381168114612d03575f5ffd5b919050565b5f60208284031215612d18575f5ffd5b610a0682612ced565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f610a066020830184612d21565b5f5f60408385031215612d72575f5ffd5b612d7b83612ced565b946020939093013593505050565b8015158114610a42575f5ffd5b5f5f60408385031215612da7575f5ffd5b612db083612ced565b91506020830135612dc081612d89565b809150509250929050565b5f5f5f60608486031215612ddd575f5ffd5b612de684612ced565b9250612df460208501612ced565b929592945050506040919091013590565b60ff60f81b8816815260e060208201525f612e2360e0830189612d21565b8281036040840152612e358189612d21565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b81811015612e8a578351835260209384019390920191600101612e6c565b50909b9a5050505050505050505050565b5f60208284031215612eab575f5ffd5b5035919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612eef57612eef612eb2565b604052919050565b5f67ffffffffffffffff821115612f1057612f10612eb2565b5060051b60200190565b5f82601f830112612f29575f5ffd5b8135612f3c612f3782612ef7565b612ec6565b8082825260208201915060208360051b860101925085831115612f5d575f5ffd5b602085015b838110156120cd578035835260209283019201612f62565b5f5f5f5f60808587031215612f8d575f5ffd5b612f9685612ced565b9350602085013567ffffffffffffffff811115612fb1575f5ffd5b8501601f81018713612fc1575f5ffd5b8035612fcf612f3782612ef7565b8082825260208201915060208360051b850101925089831115612ff0575f5ffd5b6020840193505b828410156130195761300884612ced565b825260209384019390910190612ff7565b9550505050604085013567ffffffffffffffff811115613037575f5ffd5b61304387828801612f1a565b925050606085013567ffffffffffffffff81111561305f575f5ffd5b61306b87828801612f1a565b91505092959194509250565b5f5f83601f840112613087575f5ffd5b50813567ffffffffffffffff81111561309e575f5ffd5b6020830191508360208260051b85010111156130b8575f5ffd5b9250929050565b5f5f5f5f604085870312156130d2575f5ffd5b843567ffffffffffffffff8111156130e8575f5ffd5b6130f487828801613077565b909550935050602085013567ffffffffffffffff811115613113575f5ffd5b61311f87828801613077565b95989497509550505050565b803560ff81168114612d03575f5ffd5b5f5f5f5f5f5f60c08789031215613150575f5ffd5b61315987612ced565b955060208701359450604087013593506131756060880161312b565b9598949750929560808101359460a0909101359350915050565b5f5f5f5f5f5f5f60e0888a0312156131a5575f5ffd5b6131ae88612ced565b96506131bc60208901612ced565b955060408801359450606088013593506131d86080890161312b565b9699959850939692959460a0840135945060c09093013592915050565b5f5f60408385031215613206575f5ffd5b61320f83612ced565b915061321d60208401612ced565b90509250929050565b5f5f60408385031215613237575f5ffd5b61324083612ced565b9150602083013563ffffffff81168114612dc0575f5ffd5b600181811c9082168061326c57607f821691505b6020821081036120f857634e487b7160e01b5f52602260045260245ffd5b5f6020828403121561329a575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610700576107006132a1565b634e487b7160e01b5f52603260045260245ffd5b5f602082840312156132ec575f5ffd5b8151610a0681612d89565b81810381811115610700576107006132a1565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b5f52601260045260245ffd5b5f8261338357634e487b7160e01b5f52601260045260245ffd5b500490565b601f82111561243e57805f5260205f20601f840160051c810160208510156133ad5750805b601f840160051c820191505b818110156110b3575f81556001016133b9565b815167ffffffffffffffff8111156133e6576133e6612eb2565b6133fa816133f48454613258565b84613388565b6020601f82116001811461342c575f83156134155750848201515b5f19600385901b1c1916600184901b1784556110b3565b5f84815260208120601f198516915b8281101561345b578785015182556020948501946001909201910161343b565b508482101561347857868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b634e487b7160e01b5f52602160045260245ffdfea26469706673582212200061494d8167a8a7baa17e40e304b79a3113f30944ddd99d5c3d462abf5587ed64736f6c634300081e0033", + Bin: "0x60c060405234801561000f575f5ffd5b5060405161379b38038061379b83398101604081905261002e9161016a565b8061003881610058565b608052506001600160a01b03821660a05261005161009e565b5050610294565b5f5f829050601f8151111561008b578260405163305a27a960e01b81526004016100829190610239565b60405180910390fd5b80516100968261026e565b179392505050565b5f54610100900460ff16156101055760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610082565b5f5460ff90811614610154575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b634e487b7160e01b5f52604160045260245ffd5b5f5f6040838503121561017b575f5ffd5b82516001600160a01b0381168114610191575f5ffd5b60208401519092506001600160401b038111156101ac575f5ffd5b8301601f810185136101bc575f5ffd5b80516001600160401b038111156101d5576101d5610156565b604051601f8201601f19908116603f011681016001600160401b038111828210171561020357610203610156565b60405281815282820160200187101561021a575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b8051602080830151919081101561028e575f198160200360031b1b821691505b50919050565b60805160a0516134d16102ca5f395f818161034c01528181610852015281816114dd01526115fb01525f610a1401526134d15ff3fe608060405234801561000f575f5ffd5b5060043610610260575f3560e01c80637ecebe001161014b578063a9059cbb116100bf578063dd62ed3e11610084578063dd62ed3e146105cc578063de0e9a3e146105df578063ea598cb0146105f2578063eb415f4514610605578063f1127ed81461060d578063f2fde38b1461064a575f5ffd5b8063a9059cbb1461056d578063aad41a4114610580578063b8c2559414610593578063c3cda520146105a6578063d505accf146105b9575f5ffd5b806391ddadf41161011057806391ddadf41461050357806395d89b41146105225780639ab24eb01461052a5780639aec4bae1461053d578063a457c2d714610547578063a7d1195d1461055a575f5ffd5b80637ecebe001461049157806381b97161146104a457806384b0196e146104c45780638da5cb5b146104df5780638e539e8c146104f0575f5ffd5b80633a46b1a8116101e2578063587cde1e116101a7578063587cde1e146103d85780635c19a95c146104035780636fcfff451461041657806370a082311461043e578063715018a61461046657806378aa33ba1461046e575f5ffd5b80633a46b1a8146103345780633f4da4c6146103475780634bf5d7e91461038657806353957125146103b057806354fd4d50146103d0575f5ffd5b80631ffacdef116102285780631ffacdef146102e457806323b872dd146102f7578063313ce5671461030a5780633644e515146103195780633950935114610321575f5ffd5b80630455e6941461026457806306fdde031461029c578063095ea7b3146102b15780631249c58b146102c457806318160ddd146102ce575b5f5ffd5b610287610272366004612d08565b6101336020525f908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6102a461065d565b6040516102939190612d4f565b6102876102bf366004612d61565b6106ed565b6102cc610706565b005b6102d661084f565b604051908152602001610293565b6102cc6102f2366004612d96565b6108d5565b610287610305366004612dcb565b61093d565b60405160128152602001610293565b6102d6610960565b61028761032f366004612d61565b610969565b6102d6610342366004612d61565b61098a565b61036e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610293565b60408051808201909152600e81526d06d6f64653d74696d657374616d760941b60208201526102a4565b6102d66103be366004612d08565b6101306020525f908152604090205481565b6102a4610a0d565b61036e6103e6366004612d08565b6001600160a01b039081165f90815260fe60205260409020541690565b6102cc610411366004612d08565b610a38565b610429610424366004612d08565b610a45565b60405163ffffffff9091168152602001610293565b6102d661044c366004612d08565b6001600160a01b03165f9081526065602052604090205490565b6102cc610a66565b61028761047c366004612d08565b6101346020525f908152604090205460ff1681565b6102d661049f366004612d08565b610a79565b6102d66104b2366004612d08565b6101316020525f908152604090205481565b6104cc610a96565b6040516102939796959493929190612e05565b6033546001600160a01b031661036e565b6102d66104fe366004612e9b565b610b2f565b61050b610b96565b60405165ffffffffffff9091168152602001610293565b6102a4610ba0565b6102d6610538366004612d08565b610baf565b6102d66101325481565b610287610555366004612d61565b610c2c565b6102cc610568366004612f7a565b610ca6565b61028761057b366004612d61565b6110ba565b6102cc61058e3660046130bf565b6110c7565b6102cc6105a1366004612d96565b611197565b6102cc6105b436600461313b565b6111f7565b6102cc6105c736600461318f565b61132c565b6102d66105da3660046131f5565b61148d565b6102cc6105ed366004612e9b565b6114b7565b6102cc610600366004612e9b565b6115d9565b6102cc611700565b61062061061b366004613226565b6117c7565b60408051825163ffffffff1681526020928301516001600160e01b03169281019290925201610293565b6102cc610658366004612d08565b611848565b60606068805461066c90613258565b80601f016020809104026020016040519081016040528092919081815260200182805461069890613258565b80156106e35780601f106106ba576101008083540402835291602001916106e3565b820191905f5260205f20905b8154815290600101906020018083116106c657829003601f168201915b5050505050905090565b5f336106fa8185856118be565b60019150505b92915050565b335f908152610131602052604090205461077f5760405162461bcd60e51b815260206004820152602f60248201527f456967656e2e6d696e743a206d73672e73656e64657220686173206e6f206d6960448201526e6e74696e6720616c6c6f77616e636560881b60648201526084015b60405180910390fd5b335f908152610130602052604090205442116107f75760405162461bcd60e51b815260206004820152603160248201527f456967656e2e6d696e743a206d73672e73656e646572206973206e6f7420616c6044820152701b1bddd959081d1bc81b5a5b9d081e595d607a1b6064820152608401610776565b335f8181526101316020526040812080549190559061081690826119e1565b60405181815233907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885906020015b60405180910390a250565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108ac573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108d0919061328a565b905090565b6108dd611a77565b6001600160a01b0382165f8181526101336020908152604091829020805460ff191685151590811790915591519182527fcf20b1ecb604b0e8888d579c64e8a3b10e590d45c1c2dddb393bed284362227191015b60405180910390a25050565b5f3361094a858285611ad1565b610955858585611b43565b506001949350505050565b5f6108d0611cfd565b5f336106fa81858561097b838361148d565b61098591906132b5565b6118be565b5f610993610b96565b65ffffffffffff1682106109e55760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b6044820152606401610776565b6001600160a01b0383165f90815260ff60205260409020610a069083611d06565b9392505050565b60606108d07f0000000000000000000000000000000000000000000000000000000000000000611de7565b610a423382611e24565b50565b6001600160a01b0381165f90815260ff602052604081205461070090611e9d565b610a6e611a77565b610a775f611f05565b565b6001600160a01b0381165f90815260cb6020526040812054610700565b5f6060805f5f5f60606097545f5f1b148015610ab25750609854155b610af65760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b6044820152606401610776565b610afe611f56565b610b06611f65565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b5f610b38610b96565b65ffffffffffff168210610b8a5760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b6044820152606401610776565b61070061010083611d06565b5f6108d042611f74565b60606069805461066c90613258565b6001600160a01b0381165f90815260ff60205260408120548015610c1a576001600160a01b0383165f90815260ff6020526040902080545f198301908110610bf957610bf96132c8565b5f9182526020909120015464010000000090046001600160e01b0316610c1c565b5f5b6001600160e01b03169392505050565b5f3381610c39828661148d565b905083811015610c995760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610776565b61095582868684036118be565b5f54610100900460ff1615808015610cc457505f54600160ff909116105b80610cdd5750303b158015610cdd57505f5460ff166001145b610d405760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610776565b5f805460ff191660011790558015610d61575f805461ff0019166101001790555b610d69611fda565b610dad6040518060400160405280600581526020016422b4b3b2b760d91b8152506040518060400160405280600581526020016422a4a3a2a760d91b815250612008565b610db685611f05565b610ddc6040518060400160405280600581526020016422a4a3a2a760d91b81525061203c565b8251845114610e635760405162461bcd60e51b815260206004820152604760248201527f456967656e2e696e697469616c697a653a206d696e7465727320616e64206d6960448201527f6e74696e67416c6c6f77616e636573206d757374206265207468652073616d65606482015266040d8cadccee8d60cb1b608482015260a401610776565b8151845114610eea5760405162461bcd60e51b815260206004820152604760248201527f456967656e2e696e697469616c697a653a206d696e7465727320616e64206d6960448201527f6e74416c6c6f776564416674657273206d757374206265207468652073616d65606482015266040d8cadccee8d60cb1b608482015260a401610776565b5f5b845181101561106757838181518110610f0757610f076132c8565b60200260200101516101315f878481518110610f2557610f256132c8565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f2081905550828181518110610f6257610f626132c8565b60200260200101516101305f878481518110610f8057610f806132c8565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f208190555060016101335f878481518110610fc357610fc36132c8565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f205f6101000a81548160ff021916908315150217905550848181518110611012576110126132c8565b60200260200101516001600160a01b03167fcf20b1ecb604b0e8888d579c64e8a3b10e590d45c1c2dddb393bed28436222716001604051611057911515815260200190565b60405180910390a2600101610eec565b505f196101325580156110b3575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b5f336106fa818585611b43565b82811461113c5760405162461bcd60e51b815260206004820152603e60248201527f456967656e2e6d756c746973656e643a2072656365697665727320616e64206160448201527f6d6f756e7473206d757374206265207468652073616d65206c656e67746800006064820152608401610776565b5f5b838110156110b35761118f3386868481811061115c5761115c6132c8565b90506020020160208101906111719190612d08565b858585818110611183576111836132c8565b90506020020135611b43565b60010161113e565b61119f611a77565b6001600160a01b0382165f8181526101346020908152604091829020805460ff191685151590811790915591519182527f72a561d1af7409467dae4f1e9fc52590a9335a1dda17727e2b6aa8c4db35109b9101610931565b834211156112475760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e617475726520657870697265640000006044820152606401610776565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b0388169181019190915260608101869052608081018590525f906112c0906112b89060a00160405160208183030381529060405280519060200120612085565b8585856120b1565b90506112cb816120d7565b86146113195760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e6365000000000000006044820152606401610776565b6113238188611e24565b50505050505050565b8342111561137c5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610776565b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886113aa8c6120d7565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090505f61140482612085565b90505f611413828787876120b1565b9050896001600160a01b0316816001600160a01b0316146114765760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610776565b6114818a8a8a6118be565b50505050505050505050565b6001600160a01b039182165f90815260666020908152604080832093909416825291909152205490565b6114c133826120fe565b60405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303815f875af115801561152b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061154f91906132dc565b6115a75760405162461bcd60e51b8152602060048201526024808201527f456967656e2e756e777261703a2062454947454e207472616e736665722066616044820152631a5b195960e21b6064820152608401610776565b60405181815233907f7f8146ca1ae17ad17561461ef221d97c8160bfddcae0edb68f53ce8dc5ce4af390602001610844565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303815f875af1158015611649573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061166d91906132dc565b6116c45760405162461bcd60e51b815260206004820152602260248201527f456967656e2e777261703a2062454947454e207472616e73666572206661696c604482015261195960f21b6064820152608401610776565b6116ce33826119e1565b60405181815233907f2273a99739c31a37346636a3013c2cedebee7cd5b4c560faded39d298c1dd45c90602001610844565b611708611a77565b5f1961013254146117975760405162461bcd60e51b815260206004820152604d60248201527f456967656e2e64697361626c655472616e736665725265737472696374696f6e60448201527f733a207472616e73666572207265737472696374696f6e732061726520616c7260648201526c1958591e48191a5cd8589b1959609a1b608482015260a401610776565b5f6101328190556040517f2b18986d3ba809db2f13a5d7bf17f60d357b37d9cbb55dd71cbbac8dc4060f649190a1565b604080518082019091525f80825260208201526001600160a01b0383165f90815260ff60205260409020805463ffffffff8416908110611809576118096132c8565b5f9182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b611850611a77565b6001600160a01b0381166118b55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610776565b610a4281611f05565b6001600160a01b0383166119205760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610776565b6001600160a01b0382166119815760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610776565b6001600160a01b038381165f8181526066602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6119eb8282612117565b6001600160e01b036119fb61084f565b1115611a625760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b6064820152608401610776565b611a716101006121e8836121f3565b50505050565b6033546001600160a01b03163314610a775760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610776565b5f611adc848461148d565b90505f198114611a715781811015611b365760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610776565b611a7184848484036118be565b6001600160a01b038316611ba75760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610776565b6001600160a01b038216611c095760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610776565b611c1483838361235f565b6001600160a01b0383165f9081526065602052604090205481811015611c8b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610776565b6001600160a01b038085165f8181526065602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611cea9086815260200190565b60405180910390a3611a71848484612443565b5f6108d0612474565b81545f9081816005811115611d5d575f611d1f846124e7565b611d2990856132f7565b5f88815260209020909150869082015463ffffffff161115611d4d57809150611d5b565b611d588160016132b5565b92505b505b80821015611da8575f611d7083836125cb565b5f88815260209020909150869082015463ffffffff161115611d9457809150611da2565b611d9f8160016132b5565b92505b50611d5d565b8015611dd2575f8681526020902081015f19015464010000000090046001600160e01b0316611dd4565b5f5b6001600160e01b03169695505050505050565b60605f611df3836125e5565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b6001600160a01b038281165f81815260fe6020818152604080842080546065845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611a7182848361260c565b5f63ffffffff821115611f015760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401610776565b5090565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b60606099805461066c90613258565b6060609a805461066c90613258565b5f65ffffffffffff821115611f015760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203460448201526538206269747360d01b6064820152608401610776565b5f54610100900460ff166120005760405162461bcd60e51b81526004016107769061330a565b610a77612746565b5f54610100900460ff1661202e5760405162461bcd60e51b81526004016107769061330a565b6120388282612775565b5050565b5f54610100900460ff166120625760405162461bcd60e51b81526004016107769061330a565b610a4281604051806040016040528060018152602001603160f81b8152506127b4565b5f610700612091611cfd565b8360405161190160f01b8152600281019290925260228201526042902090565b5f5f5f6120c087878787612801565b915091506120cd816128be565b5095945050505050565b6001600160a01b0381165f90815260cb602052604090208054600181018255905b50919050565b6121088282612a07565b611a71610100612b4a836121f3565b6001600160a01b03821661216d5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610776565b6121785f838361235f565b8060675f82825461218991906132b5565b90915550506001600160a01b0382165f818152606560209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36120385f8383612443565b5f610a0682846132b5565b82545f90819081811561223d575f8781526020902082015f190160408051808201909152905463ffffffff8116825264010000000090046001600160e01b03166020820152612251565b604080518082019091525f80825260208201525b905080602001516001600160e01b0316935061227184868863ffffffff16565b92505f821180156122995750612285610b96565b65ffffffffffff16815f015163ffffffff16145b156122dc576122a783612b55565b5f8881526020902083015f190180546001600160e01b03929092166401000000000263ffffffff909216919091179055612355565b8660405180604001604052806123006122f3610b96565b65ffffffffffff16611e9d565b63ffffffff16815260200161231486612b55565b6001600160e01b0390811690915282546001810184555f938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b5050935093915050565b61013254421161243e576001600160a01b038316158061238657506001600160a01b038216155b806123a957506001600160a01b0383165f908152610133602052604090205460ff165b806123cc57506001600160a01b0382165f908152610134602052604090205460ff165b61243e5760405162461bcd60e51b815260206004820152603a60248201527f456967656e2e5f6265666f7265546f6b656e5472616e736665723a2066726f6d60448201527f206f7220746f206d7573742062652077686974656c69737465640000000000006064820152608401610776565b505050565b6001600160a01b038381165f90815260fe602052604080822054858416835291205461243e9291821691168361260c565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61249e612bbd565b6124a6612c15565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f815f036124f657505f919050565b5f600161250284612c45565b901c6001901b9050600181848161251b5761251b613355565b048201901c9050600181848161253357612533613355565b048201901c9050600181848161254b5761254b613355565b048201901c9050600181848161256357612563613355565b048201901c9050600181848161257b5761257b613355565b048201901c9050600181848161259357612593613355565b048201901c905060018184816125ab576125ab613355565b048201901c9050610a06818285816125c5576125c5613355565b04612cd8565b5f6125d96002848418613369565b610a06908484166132b5565b5f60ff8216601f81111561070057604051632cd44ac360e21b815260040160405180910390fd5b816001600160a01b0316836001600160a01b03161415801561262d57505f81115b1561243e576001600160a01b038316156126ba576001600160a01b0383165f90815260ff60205260408120819061266790612b4a856121f3565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72483836040516126af929190918252602082015260400190565b60405180910390a250505b6001600160a01b0382161561243e576001600160a01b0382165f90815260ff6020526040812081906126ef906121e8856121f3565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051612737929190918252602082015260400190565b60405180910390a25050505050565b5f54610100900460ff1661276c5760405162461bcd60e51b81526004016107769061330a565b610a7733611f05565b5f54610100900460ff1661279b5760405162461bcd60e51b81526004016107769061330a565b60686127a783826133cc565b50606961243e82826133cc565b5f54610100900460ff166127da5760405162461bcd60e51b81526004016107769061330a565b60996127e683826133cc565b50609a6127f382826133cc565b50505f609781905560985550565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561283657505f905060036128b5565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612887573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b0381166128af575f600192509250506128b5565b91505f90505b94509492505050565b5f8160048111156128d1576128d1613487565b036128d95750565b60018160048111156128ed576128ed613487565b0361293a5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610776565b600281600481111561294e5761294e613487565b0361299b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610776565b60038160048111156129af576129af613487565b03610a425760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610776565b6001600160a01b038216612a675760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610776565b612a72825f8361235f565b6001600160a01b0382165f9081526065602052604090205481811015612ae55760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610776565b6001600160a01b0383165f8181526065602090815260408083208686039055606780548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a361243e835f84612443565b5f610a0682846132f7565b5f6001600160e01b03821115611f015760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401610776565b5f5f612bc7611f56565b805190915015612bde578051602090910120919050565b6097548015612bed5792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b5f5f612c1f611f65565b805190915015612c36578051602090910120919050565b6098548015612bed5792915050565b5f80608083901c15612c5957608092831c92015b604083901c15612c6b57604092831c92015b602083901c15612c7d57602092831c92015b601083901c15612c8f57601092831c92015b600883901c15612ca157600892831c92015b600483901c15612cb357600492831c92015b600283901c15612cc557600292831c92015b600183901c156107005760010192915050565b5f818310612ce65781610a06565b5090919050565b80356001600160a01b0381168114612d03575f5ffd5b919050565b5f60208284031215612d18575f5ffd5b610a0682612ced565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f610a066020830184612d21565b5f5f60408385031215612d72575f5ffd5b612d7b83612ced565b946020939093013593505050565b8015158114610a42575f5ffd5b5f5f60408385031215612da7575f5ffd5b612db083612ced565b91506020830135612dc081612d89565b809150509250929050565b5f5f5f60608486031215612ddd575f5ffd5b612de684612ced565b9250612df460208501612ced565b929592945050506040919091013590565b60ff60f81b8816815260e060208201525f612e2360e0830189612d21565b8281036040840152612e358189612d21565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b81811015612e8a578351835260209384019390920191600101612e6c565b50909b9a5050505050505050505050565b5f60208284031215612eab575f5ffd5b5035919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612eef57612eef612eb2565b604052919050565b5f67ffffffffffffffff821115612f1057612f10612eb2565b5060051b60200190565b5f82601f830112612f29575f5ffd5b8135612f3c612f3782612ef7565b612ec6565b8082825260208201915060208360051b860101925085831115612f5d575f5ffd5b602085015b838110156120cd578035835260209283019201612f62565b5f5f5f5f60808587031215612f8d575f5ffd5b612f9685612ced565b9350602085013567ffffffffffffffff811115612fb1575f5ffd5b8501601f81018713612fc1575f5ffd5b8035612fcf612f3782612ef7565b8082825260208201915060208360051b850101925089831115612ff0575f5ffd5b6020840193505b828410156130195761300884612ced565b825260209384019390910190612ff7565b9550505050604085013567ffffffffffffffff811115613037575f5ffd5b61304387828801612f1a565b925050606085013567ffffffffffffffff81111561305f575f5ffd5b61306b87828801612f1a565b91505092959194509250565b5f5f83601f840112613087575f5ffd5b50813567ffffffffffffffff81111561309e575f5ffd5b6020830191508360208260051b85010111156130b8575f5ffd5b9250929050565b5f5f5f5f604085870312156130d2575f5ffd5b843567ffffffffffffffff8111156130e8575f5ffd5b6130f487828801613077565b909550935050602085013567ffffffffffffffff811115613113575f5ffd5b61311f87828801613077565b95989497509550505050565b803560ff81168114612d03575f5ffd5b5f5f5f5f5f5f60c08789031215613150575f5ffd5b61315987612ced565b955060208701359450604087013593506131756060880161312b565b9598949750929560808101359460a0909101359350915050565b5f5f5f5f5f5f5f60e0888a0312156131a5575f5ffd5b6131ae88612ced565b96506131bc60208901612ced565b955060408801359450606088013593506131d86080890161312b565b9699959850939692959460a0840135945060c09093013592915050565b5f5f60408385031215613206575f5ffd5b61320f83612ced565b915061321d60208401612ced565b90509250929050565b5f5f60408385031215613237575f5ffd5b61324083612ced565b9150602083013563ffffffff81168114612dc0575f5ffd5b600181811c9082168061326c57607f821691505b6020821081036120f857634e487b7160e01b5f52602260045260245ffd5b5f6020828403121561329a575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610700576107006132a1565b634e487b7160e01b5f52603260045260245ffd5b5f602082840312156132ec575f5ffd5b8151610a0681612d89565b81810381811115610700576107006132a1565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b5f52601260045260245ffd5b5f8261338357634e487b7160e01b5f52601260045260245ffd5b500490565b601f82111561243e57805f5260205f20601f840160051c810160208510156133ad5750805b601f840160051c820191505b818110156110b3575f81556001016133b9565b815167ffffffffffffffff8111156133e6576133e6612eb2565b6133fa816133f48454613258565b84613388565b6020601f82116001811461342c575f83156134155750848201515b5f19600385901b1c1916600184901b1784556110b3565b5f84815260208120601f198516915b8281101561345b578785015182556020948501946001909201910161343b565b508482101561347857868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b634e487b7160e01b5f52602160045260245ffdfea2646970667358221220139f8076160116bffae91ab9c53619b38a77772769caa771728ee4963d8a555e64736f6c634300081e0033", } // EigenABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/Endian/binding.go b/pkg/bindings/Endian/binding.go index 4c8beeba54..adcfb23d5c 100644 --- a/pkg/bindings/Endian/binding.go +++ b/pkg/bindings/Endian/binding.go @@ -32,7 +32,7 @@ var ( // EndianMetaData contains all meta data concerning the Endian contract. var EndianMetaData = &bind.MetaData{ ABI: "[]", - Bin: "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212206682c64d5f73bd2302a0beb6578258fa58ddbde0d84f2f84d2daa444516b7cc464736f6c634300081e0033", + Bin: "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220051f2f2cfe7637c2a91f4d75a624d465f9fa6cfa992affcd162612671bf57f9764736f6c634300081e0033", } // EndianABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/Merkle/binding.go b/pkg/bindings/Merkle/binding.go index 2e37506faa..342a0e0357 100644 --- a/pkg/bindings/Merkle/binding.go +++ b/pkg/bindings/Merkle/binding.go @@ -32,7 +32,7 @@ var ( // MerkleMetaData contains all meta data concerning the Merkle contract. var MerkleMetaData = &bind.MetaData{ ABI: "[{\"type\":\"error\",\"name\":\"EmptyRoot\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidIndex\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProofLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"LeavesNotPowerOfTwo\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoLeaves\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotEnoughLeaves\",\"inputs\":[]}]", - Bin: "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220453d11e2175509f3c5f766202c58b4b2caeb7616e1ce5339991b2c20aca6575864736f6c634300081e0033", + Bin: "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220d59da8641ede146e3c844faefb393dcc8a753d97dc94bdb0fcfe9e5e7484e7ef64736f6c634300081e0033", } // MerkleABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/OperatorSetLib/binding.go b/pkg/bindings/OperatorSetLib/binding.go index cdf9dede7e..31d6c09fce 100644 --- a/pkg/bindings/OperatorSetLib/binding.go +++ b/pkg/bindings/OperatorSetLib/binding.go @@ -32,7 +32,7 @@ var ( // OperatorSetLibMetaData contains all meta data concerning the OperatorSetLib contract. var OperatorSetLibMetaData = &bind.MetaData{ ABI: "[]", - Bin: "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220dbe841e665b6d57d4262f2520686a72aeee5bea5cfd6e25c5efe56c5f9840cee64736f6c634300081e0033", + Bin: "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122085b2452bf0f2a77203246c6256e1196dda1229bc8916f41d3cd62061d65f1a7464736f6c634300081e0033", } // OperatorSetLibABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/OperatorTableUpdater/binding.go b/pkg/bindings/OperatorTableUpdater/binding.go index 1ab4ee8179..11d61c406c 100644 --- a/pkg/bindings/OperatorTableUpdater/binding.go +++ b/pkg/bindings/OperatorTableUpdater/binding.go @@ -86,7 +86,7 @@ type OperatorSet struct { // OperatorTableUpdaterMetaData contains all meta data concerning the OperatorTableUpdater contract. var OperatorTableUpdaterMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_bn254CertificateVerifier\",\"type\":\"address\",\"internalType\":\"contractIBN254CertificateVerifier\"},{\"name\":\"_ecdsaCertificateVerifier\",\"type\":\"address\",\"internalType\":\"contractIECDSACertificateVerifier\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"GENERATOR_GLOBAL_TABLE_ROOT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"GENERATOR_MAX_STALENESS_PERIOD\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"GENERATOR_REFERENCE_TIMESTAMP\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"GLOBAL_TABLE_ROOT_CERT_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_BPS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"OPERATOR_INFO_LEAF_SALT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"OPERATOR_TABLE_LEAF_SALT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"bn254CertificateVerifier\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIBN254CertificateVerifier\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateOperatorInfoLeaf\",\"inputs\":[{\"name\":\"operatorInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"calculateOperatorTableLeaf\",\"inputs\":[{\"name\":\"operatorTableBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"confirmGlobalTableRoot\",\"inputs\":[{\"name\":\"globalTableRootCert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}]}]},{\"name\":\"globalTableRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"referenceBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"disableRoot\",\"inputs\":[{\"name\":\"globalTableRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"ecdsaCertificateVerifier\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIECDSACertificateVerifier\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCertificateVerifier\",\"inputs\":[{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentGlobalTableRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGenerator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGeneratorConfig\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGeneratorReferenceTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGlobalTableRootByTimestamp\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGlobalTableUpdateMessageHash\",\"inputs\":[{\"name\":\"globalTableRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"referenceBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getGlobalTableUpdateSignableDigest\",\"inputs\":[{\"name\":\"globalTableRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"referenceBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getLatestReferenceBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getLatestReferenceTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getReferenceBlockNumberByTimestamp\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getReferenceTimestampByBlockNumber\",\"inputs\":[{\"name\":\"referenceBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"globalRootConfirmationThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"initialPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_initialGenerator\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"_globalRootConfirmationThreshold\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"generatorInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorSetInfo\",\"components\":[{\"name\":\"operatorInfoTreeRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"numOperators\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"aggregatePubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"totalWeights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isRootValid\",\"inputs\":[{\"name\":\"globalTableRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isRootValidByTimestamp\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setGlobalRootConfirmationThreshold\",\"inputs\":[{\"name\":\"bps\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateGenerator\",\"inputs\":[{\"name\":\"generator\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"generatorInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorSetInfo\",\"components\":[{\"name\":\"operatorInfoTreeRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"numOperators\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"aggregatePubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"totalWeights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"globalTableRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"operatorSetIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorTableBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"GeneratorUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GlobalRootConfirmationThresholdUpdated\",\"inputs\":[{\"name\":\"bps\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GlobalRootDisabled\",\"inputs\":[{\"name\":\"globalTableRoot\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"NewGlobalTableRoot\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"globalTableRoot\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"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\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"CannotDisableGeneratorRoot\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateInvalid\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CurrentlyPaused\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EmptyRoot\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GlobalTableRootInFuture\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GlobalTableRootStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidConfirmationThreshold\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCurveType\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidGenerator\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidGlobalTableRoot\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidIndex\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidMessageHash\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidNewPausedStatus\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorSetProof\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProofLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidRoot\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyPauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyUnpauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TableUpdateForPastTimestamp\",\"inputs\":[]}]", - Bin: "0x60e060405234801561000f575f5ffd5b50604051612c1c380380612c1c83398101604081905261002e91610153565b8282826001600160a01b038116610058576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b0390811660805291821660a0521660c052610078610080565b50505061019d565b5f54610100900460ff16156100eb5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff9081161461013a575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610150575f5ffd5b50565b5f5f5f60608486031215610165575f5ffd5b83516101708161013c565b60208501519093506101818161013c565b60408501519092506101928161013c565b809150509250925092565b60805160a05160c051612a086102145f395f818161059501528181610a5d0152610e2201525f81816105fc0152818161092101528181610a1d01528181610ac901528181610d7d015281816110f7015281816113e0015261149201525f818161051c015281816115be015261186d0152612a085ff3fe608060405234801561000f575f5ffd5b506004361061024a575f3560e01c80636f728c5011610140578063ad0f9582116100bf578063c3be1e3311610084578063c3be1e3314610652578063c5916a3914610665578063eaaed9d51461068a578063f2fde38b1461069d578063fabc1cbc146106b0578063fd967f47146106c3575f5ffd5b8063ad0f958214610590578063b0cb3a24146105b7578063b8c14306146105f7578063c252aa221461061e578063c3621f0a1461063f575f5ffd5b80638da5cb5b116101055780638da5cb5b1461053e5780639ea947781461054f5780639f7e206f14610562578063a2c902f514610575578063a2f2e24d1461057d575f5ffd5b80636f728c50146104d5578063715018a6146105005780637551ba3414610508578063790961ea14610510578063886f119514610517575f5ffd5b806331a599d2116101cc578063595c6a6711610191578063595c6a67146104655780635ac86ab71461046d5780635c975abb14610490578063612abcb01461049857806364e1df84146104a0575f5ffd5b806331a599d2146103df5780633ef6cd7a14610404578063401c370f1461042b5780634624e6a31461043e578063538a379014610452575f5ffd5b80631e2ca260116102125780631e2ca260146103075780632370356c1461035057806323b7b5b21461036357806328522d791461038b57806330ef41b4146103ad575f5ffd5b806306f518751461024e578063121409ea14610263578063136439dd14610282578063193b79f3146102955780631bdc0deb146102d2575b5f5ffd5b61026161025c366004611aa0565b6106cc565b005b61026b608e81565b60405160ff90911681526020015b60405180910390f35b610261610290366004611b16565b6108a6565b6102bd6102a3366004611b3e565b63ffffffff9081165f908152609b60205260409020541690565b60405163ffffffff9091168152602001610279565b6102f97fcefe99cb2e240b5f07de5cd472a75fc6e345370b73588ab161cb25c4a259a86981565b604051908152602001610279565b6040805180820182525f80825260209182015281518083019092526098546001600160a01b0381168352600160a01b900463ffffffff16908201525b6040516102799190611b77565b61026161035e366004611b85565b6108e0565b6102bd610371366004611b3e565b63ffffffff9081165f908152609a60205260409020541690565b60975462010000900463ffffffff165f908152609960205260409020546102f9565b6103cf6103bb366004611b16565b5f908152609c602052604090205460ff1690565b6040519015158152602001610279565b60975462010000900463ffffffff9081165f908152609a6020526040902054166102bd565b6102f97f4491f5ee91595f938885ef73c9a1fa8a6d14ff9b9dab4aa24b8802bbb9bfc1cc81565b6102f9610439366004611b9e565b6108f4565b60975462010000900463ffffffff166102bd565b6102f9610460366004611c8d565b61099d565b6102616109ec565b6103cf61047b366004611d85565b606654600160ff9092169190911b9081161490565b6066546102f9565b6102bd600181565b6103cf6104ae366004611b3e565b63ffffffff165f908152609960209081526040808320548352609c90915290205460ff1690565b6104e86104e3366004611db3565b610a00565b6040516001600160a01b039091168152602001610279565b610261610a9f565b6102bd610ab0565b6102bd5f81565b6104e87f000000000000000000000000000000000000000000000000000000000000000081565b6033546001600160a01b03166104e8565b61026161055d366004611e10565b610b43565b610261610570366004611eab565b610e93565b61026b607581565b6102f961058b366004611ef6565b610ea5565b6104e87f000000000000000000000000000000000000000000000000000000000000000081565b6040805180820182525f8082526020918201528151808301909252609d546001600160a01b0381168352600160a01b900463ffffffff1690820152610343565b6104e87f000000000000000000000000000000000000000000000000000000000000000081565b60975461062c9061ffff1681565b60405161ffff9091168152602001610279565b61026161064d366004611b16565b610edb565b6102f9610660366004611b9e565b610f90565b6102f9610673366004611b3e565b63ffffffff165f9081526099602052604090205490565b610261610698366004611f34565b610ff8565b6102616106ab366004611fa0565b611247565b6102616106be366004611b16565b6112bd565b61062c61271081565b5f54610100900460ff16158080156106ea57505f54600160ff909116105b806107035750303b15801561070357505f5460ff166001145b61076b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff19166001179055801561078c575f805461ff0019166101001790555b6107958661132a565b61079e8561137b565b609d80546001600160c01b031916301790556107ba84836113b8565b6107c383611538565b7fcefe99cb2e240b5f07de5cd472a75fc6e345370b73588ab161cb25c4a259a8697fbb86fbc034f4e382929974bcd8419ed626b0ea647f962d89ba2fb6bd28785ab98190555f52609c6020527f38353ab40115e4013d688e07cff5857dde443bd05e72c49fcb5e684a9bb9efc4805460ff19166001179055609780544263ffffffff16620100000265ffffffff000019909116179055801561089e575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b6108ae6115a9565b60665481811681146108d35760405163c61dca5d60e01b815260040160405180910390fd5b6108dc8261137b565b5050565b6108e861164c565b6108f181611538565b50565b5f5f610901858585610f90565b6040516306119d0d60e21b815260016004820152602481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690631846743490604401602060405180830381865afa15801561096e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109929190611fbb565b9150505b9392505050565b5f6075826040516020016109b1919061200c565b60408051601f19818403018152908290526109cf9291602001612039565b604051602081830303815290604052805190602001209050919050565b6109f46115a9565b6109fe5f1961137b565b565b5f6002826002811115610a1557610a15612062565b03610a4157507f0000000000000000000000000000000000000000000000000000000000000000919050565b6001826002811115610a5557610a55612062565b03610a8157507f0000000000000000000000000000000000000000000000000000000000000000919050565b60405163fdea7c0960e01b815260040160405180910390fd5b919050565b610aa761164c565b6109fe5f61132a565b604051635ddb9b5b60e01b81525f906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635ddb9b5b90610aff90609890600401612076565b602060405180830381865afa158015610b1a573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b3e919061209d565b905090565b6001610b4e816116a6565b610b566116d1565b5f5f5f5f610b64878761172a565b5f8f8152609c60205260409020549397509195509350915060ff16610b9c5760405163504570e360e01b815260040160405180910390fd5b604080518082019091526098546001600160a01b0381168252600160a01b900463ffffffff166020820152610bd090611771565b610bd985611771565b03610bf757604051631fb1705560e21b815260040160405180910390fd5b610c0083610a00565b6001600160a01b031663cd83a72b858e6040518363ffffffff1660e01b8152600401610c2d9291906120b8565b602060405180830381865afa158015610c48573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c6c91906120d9565b15610c7a5750505050610e7f565b610c8383610a00565b6001600160a01b0316635ddb9b5b856040518263ffffffff1660e01b8152600401610cae9190611b77565b602060405180830381865afa158015610cc9573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ced919061209d565b63ffffffff168c63ffffffff1611610d185760405163207617df60e01b815260040160405180910390fd5b63ffffffff8c165f908152609960205260409020548b14610d4c5760405163639d09b560e11b815260040160405180910390fd5b610d628b8b8b8b610d5d8c8c610ea5565b6117d4565b6002836002811115610d7657610d76612062565b03610e07577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636738c40b858e610db585611839565b866040518563ffffffff1660e01b8152600401610dd594939291906120f8565b5f604051808303815f87803b158015610dec575f5ffd5b505af1158015610dfe573d5f5f3e3d5ffd5b50505050610e7a565b6001836002811115610e1b57610e1b612062565b03610a81577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166356d482f5858e610e5a85611855565b866040518563ffffffff1660e01b8152600401610dd59493929190612179565b505050505b610e89600160c955565b5050505050505050565b610e9b61164c565b6108dc82826113b8565b5f608e8383604051602001610ebc9392919061221e565b6040516020818303038152906040528051906020012090505b92915050565b610ee36115a9565b5f818152609c602052604090205460ff16610f115760405163504570e360e01b815260040160405180910390fd5b7fcefe99cb2e240b5f07de5cd472a75fc6e345370b73588ab161cb25c4a259a8698103610f51576040516319920afd60e11b815260040160405180910390fd5b5f818152609c6020526040808220805460ff191690555182917f8bd43de1250f58fe6ec9a78671a8b78dba70f0018656d157a3aeaabec389df3491a250565b604080517f4491f5ee91595f938885ef73c9a1fa8a6d14ff9b9dab4aa24b8802bbb9bfc1cc602082015290810184905263ffffffff8084166060830152821660808201525f9060a0016040516020818303038152906040528051906020012090509392505050565b5f611002816116a6565b61100a6116d1565b428363ffffffff16111561103157604051635a119db560e11b815260040160405180910390fd5b60975463ffffffff620100009091048116908416116110635760405163037fa86b60e31b815260040160405180910390fd5b61106e848484610f90565b85602001351461109157604051638b56642d60e01b815260040160405180910390fd5b6040805160018082528183019092525f91602080830190803683375050609754825192935061ffff16918391505f906110cc576110cc612245565b61ffff90921660209283029190910190910152604051625f5e5d60e21b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063017d797490611131906098908b908790600401612377565b6020604051808303815f875af115801561114d573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061117191906120d9565b90508061119157604051633042041f60e21b815260040160405180910390fd5b6097805463ffffffff80881662010000810265ffffffff000019909316929092179092555f818152609a602090815260408083208054958a1663ffffffff1996871681179091558352609b825280832080549095168417909455828252609981528382208a9055898252609c9052828120805460ff19166001179055915188927f010dcbe0d1e019c93357711f7bb6287d543b7ff7de74f29df3fb5ecceec8d36991a35050611240600160c955565b5050505050565b61124f61164c565b6001600160a01b0381166112b45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610762565b6108f18161132a565b6112c561186b565b606654801982198116146112ec5760405163c61dca5d60e01b815260040160405180910390fd5b606682905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b8160986113c58282612504565b5050604051635ddb9b5b60e01b81525f906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635ddb9b5b90611415908690600401612595565b602060405180830381865afa158015611430573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611454919061209d565b905063ffffffff81161561147b57604051636446f91760e01b815260040160405180910390fd5b604051636738c40b60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636738c40b906114cf9086906001908790609d906004016125a3565b5f604051808303815f87803b1580156114e6575f5ffd5b505af11580156114f8573d5f5f3e3d5ffd5b505050507f3463431b09dfd43dec7349f8f24acfa753fe4cf40a26235402d213373df158568360405161152b9190612595565b60405180910390a1505050565b61271061ffff8216111561155f576040516307336f0360e11b815260040160405180910390fd5b6097805461ffff191661ffff83169081179091556040519081527ff5d1836df8fcd7c1e54047e94ac8773d2855395603e2ef9ba5f5f16905f225929060200160405180910390a150565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa15801561160b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061162f91906120d9565b6109fe57604051631d77d47760e21b815260040160405180910390fd5b6033546001600160a01b031633146109fe5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610762565b606654600160ff83161b908116036108f15760405163840a48d560e01b815260040160405180910390fd5b600260c954036117235760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610762565b600260c955565b604080518082019091525f8082526020820152604080518082019091525f808252602082018190529060606117618587018761267c565b9299919850965090945092505050565b5f815f0151826020015163ffffffff166040516020016117bc92919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b604051602081830303815290604052610ed590612741565b61181c83838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508992508591505063ffffffff881661191c565b6112405760405163afa42ca760e01b815260040160405180910390fd5b611841611a16565b81806020019051810190610ed591906127c9565b606081806020019051810190610ed59190612878565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118c7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118eb9190612979565b6001600160a01b0316336001600160a01b0316146109fe5760405163794821ff60e01b815260040160405180910390fd5b5f8361193b576040516329e7276760e11b815260040160405180910390fd5b83611947868585611951565b1495945050505050565b5f83515f03611961575081610996565b6020845161196f9190612994565b1561198d576040516313717da960e21b815260040160405180910390fd5b8260205b855181116119ee576119a4600285612994565b5f036119c557815f528086015160205260405f2091506002840493506119dc565b808601515f528160205260405f2091506002840493505b6119e76020826129b3565b9050611991565b508215611a0e576040516363df817160e01b815260040160405180910390fd5b949350505050565b60405180608001604052805f81526020015f8152602001611a4860405180604001604052805f81526020015f81525090565b8152602001606081525090565b6001600160a01b03811681146108f1575f5ffd5b5f60408284031215611a79575f5ffd5b50919050565b803561ffff81168114610a9a575f5ffd5b5f60a08284031215611a79575f5ffd5b5f5f5f5f5f60c08688031215611ab4575f5ffd5b8535611abf81611a55565b945060208601359350611ad58760408801611a69565b9250611ae360808701611a7f565b915060a08601356001600160401b03811115611afd575f5ffd5b611b0988828901611a90565b9150509295509295909350565b5f60208284031215611b26575f5ffd5b5035919050565b63ffffffff811681146108f1575f5ffd5b5f60208284031215611b4e575f5ffd5b813561099681611b2d565b80516001600160a01b0316825260209081015163ffffffff16910152565b60408101610ed58284611b59565b5f60208284031215611b95575f5ffd5b61099682611a7f565b5f5f5f60608486031215611bb0575f5ffd5b833592506020840135611bc281611b2d565b91506040840135611bd281611b2d565b809150509250925092565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b0381118282101715611c1357611c13611bdd565b60405290565b604051608081016001600160401b0381118282101715611c1357611c13611bdd565b604051601f8201601f191681016001600160401b0381118282101715611c6357611c63611bdd565b604052919050565b5f6001600160401b03821115611c8357611c83611bdd565b5060051b60200190565b5f60208284031215611c9d575f5ffd5b81356001600160401b03811115611cb2575f5ffd5b82018084036060811215611cc4575f5ffd5b611ccc611bf1565b6040821215611cd9575f5ffd5b611ce1611bf1565b83358152602080850135908201528152604083013591506001600160401b03821115611d0b575f5ffd5b818301925085601f840112611d1e575f5ffd5b82359150611d33611d2e83611c6b565b611c3b565b8083825260208201915060208460051b860101935087841115611d54575f5ffd5b6020850194505b83851015611d76578435825260209485019490910190611d5b565b60208301525095945050505050565b5f60208284031215611d95575f5ffd5b813560ff81168114610996575f5ffd5b803560038110610a9a575f5ffd5b5f60208284031215611dc3575f5ffd5b61099682611da5565b5f5f83601f840112611ddc575f5ffd5b5081356001600160401b03811115611df2575f5ffd5b602083019150836020828501011115611e09575f5ffd5b9250929050565b5f5f5f5f5f5f5f60a0888a031215611e26575f5ffd5b8735611e3181611b2d565b9650602088013595506040880135611e4881611b2d565b945060608801356001600160401b03811115611e62575f5ffd5b611e6e8a828b01611dcc565b90955093505060808801356001600160401b03811115611e8c575f5ffd5b611e988a828b01611dcc565b989b979a50959850939692959293505050565b5f5f60608385031215611ebc575f5ffd5b611ec68484611a69565b915060408301356001600160401b03811115611ee0575f5ffd5b611eec85828601611a90565b9150509250929050565b5f5f60208385031215611f07575f5ffd5b82356001600160401b03811115611f1c575f5ffd5b611f2885828601611dcc565b90969095509350505050565b5f5f5f5f60808587031215611f47575f5ffd5b84356001600160401b03811115611f5c575f5ffd5b85016101208188031215611f6e575f5ffd5b9350602085013592506040850135611f8581611b2d565b91506060850135611f9581611b2d565b939692955090935050565b5f60208284031215611fb0575f5ffd5b813561099681611a55565b5f60208284031215611fcb575f5ffd5b5051919050565b5f8151808452602084019350602083015f5b82811015612002578151865260209586019590910190600101611fe4565b5093949350505050565b60208082528251805183830152015160408201525f6020830151606080840152611a0e6080840182611fd2565b60ff60f81b8360f81b1681525f82518060208501600185015e5f92016001019182525092915050565b634e487b7160e01b5f52602160045260245ffd5b60408101610ed58284546001600160a01b038116825260a01c63ffffffff16602090910152565b5f602082840312156120ad575f5ffd5b815161099681611b2d565b606081016120c68285611b59565b63ffffffff831660408301529392505050565b5f602082840312156120e9575f5ffd5b81518015158114610996575f5ffd5b6121028186611b59565b63ffffffff8416604082015260c06060820152825160c0820152602083015160e08201525f604084015161214461010084018280518252602090810151910152565b50606084015160a0610140840152612160610160840182611fd2565b9150506121706080830184611b59565b95945050505050565b5f60c082016121888388611b59565b63ffffffff8616604084015260c0606084015280855180835260e08501915060e08160051b8601019250602087015f5b828110156122095786850360df19018452815180516001600160a01b031686526020908101516040918701829052906121f390870182611fd2565b95505060209384019391909101906001016121b8565b50505050809150506121706080830184611b59565b60f884901b6001600160f81b0319168152818360018301375f910160010190815292915050565b634e487b7160e01b5f52603260045260245ffd5b5f5f8335601e1984360301811261226e575f5ffd5b83016020810192503590506001600160401b0381111561228c575f5ffd5b8060051b3603821315611e09575f5ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f8235605e198336030181126122d9575f5ffd5b90910192915050565b8183525f6001600160fb1b038311156122f9575f5ffd5b8260051b80836020870137939093016020019392505050565b80358252602080820135908301525f61232e6040830183612259565b606060408601526121706060860182846122e2565b5f8151808452602084019350602083015f5b8281101561200257815161ffff16865260209586019590910190600101612355565b61239a8185546001600160a01b038116825260a01c63ffffffff16602090910152565b608060408201525f6101a0820184356123b281611b2d565b63ffffffff166080840152602085013560a0840152604085013560c0840152606085013560e0840152604060808601610100850137604060c08601610140850137612401610100860186612259565b610120610180860152828184526101c0860190506101c08260051b8701019350825f5b838110156124e3578786036101bf1901835261244082866122c5565b803561244b81611b2d565b63ffffffff168752602081013536829003601e1901811261246a575f5ffd5b81016020810190356001600160401b03811115612485575f5ffd5b803603821315612493575f5ffd5b606060208a01526124a860608a01828461229d565b9150506124b860408301836122c5565b915087810360408901526124cc8183612312565b975050506020928301929190910190600101612424565b505050505082810360608401526124fa8185612343565b9695505050505050565b813561250f81611a55565b81546001600160a01b031981166001600160a01b03929092169182178355602084013561253b81611b2d565b6001600160c01b03199190911690911760a09190911b63ffffffff60a01b1617905550565b803561256b81611a55565b6001600160a01b03168252602081013561258481611b2d565b63ffffffff81166020840152505050565b60408101610ed58284612560565b6125ad8186612560565b63ffffffff841660408281019190915260c06060808401829052853591840191909152602085013560e0840152908401356101008301528301356101208201525f6125fb6080850185612259565b60a0610140850152612612610160850182846122e2565b925050506121706080830184546001600160a01b038116825260a01c63ffffffff16602090910152565b5f6040828403121561264c575f5ffd5b612654611bf1565b9050813561266181611a55565b8152602082013561267181611b2d565b602082015292915050565b5f5f5f5f60c0858703121561268f575f5ffd5b612699868661263c565b93506126a760408601611da5565b92506126b6866060870161263c565b915060a08501356001600160401b038111156126d0575f5ffd5b8501601f810187136126e0575f5ffd5b80356001600160401b038111156126f9576126f9611bdd565b61270c601f8201601f1916602001611c3b565b818152886020838501011115612720575f5ffd5b816020840160208301375f6020838301015280935050505092959194509250565b80516020808301519190811015611a79575f1960209190910360031b1b16919050565b5f82601f830112612773575f5ffd5b8151612781611d2e82611c6b565b8082825260208201915060208360051b8601019250858311156127a2575f5ffd5b602085015b838110156127bf5780518352602092830192016127a7565b5095945050505050565b5f602082840312156127d9575f5ffd5b81516001600160401b038111156127ee575f5ffd5b820180840360a0811215612800575f5ffd5b612808611c19565b82518152602080840151908201526040603f1983011215612827575f5ffd5b61282f611bf1565b604084810151825260608501516020830152820152608083015191506001600160401b0382111561285e575f5ffd5b61286a86838501612764565b606082015295945050505050565b5f60208284031215612888575f5ffd5b81516001600160401b0381111561289d575f5ffd5b8201601f810184136128ad575f5ffd5b80516128bb611d2e82611c6b565b8082825260208201915060208360051b8501019250868311156128dc575f5ffd5b602084015b8381101561296e5780516001600160401b038111156128fe575f5ffd5b85016040818a03601f19011215612913575f5ffd5b61291b611bf1565b602082015161292981611a55565b815260408201516001600160401b03811115612943575f5ffd5b6129528b602083860101612764565b60208301525080855250506020830192506020810190506128e1565b509695505050505050565b5f60208284031215612989575f5ffd5b815161099681611a55565b5f826129ae57634e487b7160e01b5f52601260045260245ffd5b500690565b80820180821115610ed557634e487b7160e01b5f52601160045260245ffdfea2646970667358221220240ad301da8b77f9c106ebe3947011bb74091956af5628b16f9becbfbcf9302864736f6c634300081e0033", + Bin: "0x60e060405234801561000f575f5ffd5b50604051612c1c380380612c1c83398101604081905261002e91610153565b8282826001600160a01b038116610058576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b0390811660805291821660a0521660c052610078610080565b50505061019d565b5f54610100900460ff16156100eb5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff9081161461013a575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610150575f5ffd5b50565b5f5f5f60608486031215610165575f5ffd5b83516101708161013c565b60208501519093506101818161013c565b60408501519092506101928161013c565b809150509250925092565b60805160a05160c051612a086102145f395f818161059501528181610a5d0152610e2201525f81816105fc0152818161092101528181610a1d01528181610ac901528181610d7d015281816110f7015281816113e0015261149201525f818161051c015281816115be015261186d0152612a085ff3fe608060405234801561000f575f5ffd5b506004361061024a575f3560e01c80636f728c5011610140578063ad0f9582116100bf578063c3be1e3311610084578063c3be1e3314610652578063c5916a3914610665578063eaaed9d51461068a578063f2fde38b1461069d578063fabc1cbc146106b0578063fd967f47146106c3575f5ffd5b8063ad0f958214610590578063b0cb3a24146105b7578063b8c14306146105f7578063c252aa221461061e578063c3621f0a1461063f575f5ffd5b80638da5cb5b116101055780638da5cb5b1461053e5780639ea947781461054f5780639f7e206f14610562578063a2c902f514610575578063a2f2e24d1461057d575f5ffd5b80636f728c50146104d5578063715018a6146105005780637551ba3414610508578063790961ea14610510578063886f119514610517575f5ffd5b806331a599d2116101cc578063595c6a6711610191578063595c6a67146104655780635ac86ab71461046d5780635c975abb14610490578063612abcb01461049857806364e1df84146104a0575f5ffd5b806331a599d2146103df5780633ef6cd7a14610404578063401c370f1461042b5780634624e6a31461043e578063538a379014610452575f5ffd5b80631e2ca260116102125780631e2ca260146103075780632370356c1461035057806323b7b5b21461036357806328522d791461038b57806330ef41b4146103ad575f5ffd5b806306f518751461024e578063121409ea14610263578063136439dd14610282578063193b79f3146102955780631bdc0deb146102d2575b5f5ffd5b61026161025c366004611aa0565b6106cc565b005b61026b608e81565b60405160ff90911681526020015b60405180910390f35b610261610290366004611b16565b6108a6565b6102bd6102a3366004611b3e565b63ffffffff9081165f908152609b60205260409020541690565b60405163ffffffff9091168152602001610279565b6102f97fcefe99cb2e240b5f07de5cd472a75fc6e345370b73588ab161cb25c4a259a86981565b604051908152602001610279565b6040805180820182525f80825260209182015281518083019092526098546001600160a01b0381168352600160a01b900463ffffffff16908201525b6040516102799190611b77565b61026161035e366004611b85565b6108e0565b6102bd610371366004611b3e565b63ffffffff9081165f908152609a60205260409020541690565b60975462010000900463ffffffff165f908152609960205260409020546102f9565b6103cf6103bb366004611b16565b5f908152609c602052604090205460ff1690565b6040519015158152602001610279565b60975462010000900463ffffffff9081165f908152609a6020526040902054166102bd565b6102f97f4491f5ee91595f938885ef73c9a1fa8a6d14ff9b9dab4aa24b8802bbb9bfc1cc81565b6102f9610439366004611b9e565b6108f4565b60975462010000900463ffffffff166102bd565b6102f9610460366004611c8d565b61099d565b6102616109ec565b6103cf61047b366004611d85565b606654600160ff9092169190911b9081161490565b6066546102f9565b6102bd600181565b6103cf6104ae366004611b3e565b63ffffffff165f908152609960209081526040808320548352609c90915290205460ff1690565b6104e86104e3366004611db3565b610a00565b6040516001600160a01b039091168152602001610279565b610261610a9f565b6102bd610ab0565b6102bd5f81565b6104e87f000000000000000000000000000000000000000000000000000000000000000081565b6033546001600160a01b03166104e8565b61026161055d366004611e10565b610b43565b610261610570366004611eab565b610e93565b61026b607581565b6102f961058b366004611ef6565b610ea5565b6104e87f000000000000000000000000000000000000000000000000000000000000000081565b6040805180820182525f8082526020918201528151808301909252609d546001600160a01b0381168352600160a01b900463ffffffff1690820152610343565b6104e87f000000000000000000000000000000000000000000000000000000000000000081565b60975461062c9061ffff1681565b60405161ffff9091168152602001610279565b61026161064d366004611b16565b610edb565b6102f9610660366004611b9e565b610f90565b6102f9610673366004611b3e565b63ffffffff165f9081526099602052604090205490565b610261610698366004611f34565b610ff8565b6102616106ab366004611fa0565b611247565b6102616106be366004611b16565b6112bd565b61062c61271081565b5f54610100900460ff16158080156106ea57505f54600160ff909116105b806107035750303b15801561070357505f5460ff166001145b61076b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff19166001179055801561078c575f805461ff0019166101001790555b6107958661132a565b61079e8561137b565b609d80546001600160c01b031916301790556107ba84836113b8565b6107c383611538565b7fcefe99cb2e240b5f07de5cd472a75fc6e345370b73588ab161cb25c4a259a8697fbb86fbc034f4e382929974bcd8419ed626b0ea647f962d89ba2fb6bd28785ab98190555f52609c6020527f38353ab40115e4013d688e07cff5857dde443bd05e72c49fcb5e684a9bb9efc4805460ff19166001179055609780544263ffffffff16620100000265ffffffff000019909116179055801561089e575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b6108ae6115a9565b60665481811681146108d35760405163c61dca5d60e01b815260040160405180910390fd5b6108dc8261137b565b5050565b6108e861164c565b6108f181611538565b50565b5f5f610901858585610f90565b6040516306119d0d60e21b815260016004820152602481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690631846743490604401602060405180830381865afa15801561096e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109929190611fbb565b9150505b9392505050565b5f6075826040516020016109b1919061200c565b60408051601f19818403018152908290526109cf9291602001612039565b604051602081830303815290604052805190602001209050919050565b6109f46115a9565b6109fe5f1961137b565b565b5f6002826002811115610a1557610a15612062565b03610a4157507f0000000000000000000000000000000000000000000000000000000000000000919050565b6001826002811115610a5557610a55612062565b03610a8157507f0000000000000000000000000000000000000000000000000000000000000000919050565b60405163fdea7c0960e01b815260040160405180910390fd5b919050565b610aa761164c565b6109fe5f61132a565b604051635ddb9b5b60e01b81525f906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635ddb9b5b90610aff90609890600401612076565b602060405180830381865afa158015610b1a573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b3e919061209d565b905090565b6001610b4e816116a6565b610b566116d1565b5f5f5f5f610b64878761172a565b5f8f8152609c60205260409020549397509195509350915060ff16610b9c5760405163504570e360e01b815260040160405180910390fd5b604080518082019091526098546001600160a01b0381168252600160a01b900463ffffffff166020820152610bd090611771565b610bd985611771565b03610bf757604051631fb1705560e21b815260040160405180910390fd5b610c0083610a00565b6001600160a01b031663cd83a72b858e6040518363ffffffff1660e01b8152600401610c2d9291906120b8565b602060405180830381865afa158015610c48573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c6c91906120d9565b15610c7a5750505050610e7f565b610c8383610a00565b6001600160a01b0316635ddb9b5b856040518263ffffffff1660e01b8152600401610cae9190611b77565b602060405180830381865afa158015610cc9573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ced919061209d565b63ffffffff168c63ffffffff1611610d185760405163207617df60e01b815260040160405180910390fd5b63ffffffff8c165f908152609960205260409020548b14610d4c5760405163639d09b560e11b815260040160405180910390fd5b610d628b8b8b8b610d5d8c8c610ea5565b6117d4565b6002836002811115610d7657610d76612062565b03610e07577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636738c40b858e610db585611839565b866040518563ffffffff1660e01b8152600401610dd594939291906120f8565b5f604051808303815f87803b158015610dec575f5ffd5b505af1158015610dfe573d5f5f3e3d5ffd5b50505050610e7a565b6001836002811115610e1b57610e1b612062565b03610a81577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166356d482f5858e610e5a85611855565b866040518563ffffffff1660e01b8152600401610dd59493929190612179565b505050505b610e89600160c955565b5050505050505050565b610e9b61164c565b6108dc82826113b8565b5f608e8383604051602001610ebc9392919061221e565b6040516020818303038152906040528051906020012090505b92915050565b610ee36115a9565b5f818152609c602052604090205460ff16610f115760405163504570e360e01b815260040160405180910390fd5b7fcefe99cb2e240b5f07de5cd472a75fc6e345370b73588ab161cb25c4a259a8698103610f51576040516319920afd60e11b815260040160405180910390fd5b5f818152609c6020526040808220805460ff191690555182917f8bd43de1250f58fe6ec9a78671a8b78dba70f0018656d157a3aeaabec389df3491a250565b604080517f4491f5ee91595f938885ef73c9a1fa8a6d14ff9b9dab4aa24b8802bbb9bfc1cc602082015290810184905263ffffffff8084166060830152821660808201525f9060a0016040516020818303038152906040528051906020012090509392505050565b5f611002816116a6565b61100a6116d1565b428363ffffffff16111561103157604051635a119db560e11b815260040160405180910390fd5b60975463ffffffff620100009091048116908416116110635760405163037fa86b60e31b815260040160405180910390fd5b61106e848484610f90565b85602001351461109157604051638b56642d60e01b815260040160405180910390fd5b6040805160018082528183019092525f91602080830190803683375050609754825192935061ffff16918391505f906110cc576110cc612245565b61ffff90921660209283029190910190910152604051625f5e5d60e21b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063017d797490611131906098908b908790600401612377565b6020604051808303815f875af115801561114d573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061117191906120d9565b90508061119157604051633042041f60e21b815260040160405180910390fd5b6097805463ffffffff80881662010000810265ffffffff000019909316929092179092555f818152609a602090815260408083208054958a1663ffffffff1996871681179091558352609b825280832080549095168417909455828252609981528382208a9055898252609c9052828120805460ff19166001179055915188927f010dcbe0d1e019c93357711f7bb6287d543b7ff7de74f29df3fb5ecceec8d36991a35050611240600160c955565b5050505050565b61124f61164c565b6001600160a01b0381166112b45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610762565b6108f18161132a565b6112c561186b565b606654801982198116146112ec5760405163c61dca5d60e01b815260040160405180910390fd5b606682905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b8160986113c58282612504565b5050604051635ddb9b5b60e01b81525f906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635ddb9b5b90611415908690600401612595565b602060405180830381865afa158015611430573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611454919061209d565b905063ffffffff81161561147b57604051636446f91760e01b815260040160405180910390fd5b604051636738c40b60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636738c40b906114cf9086906001908790609d906004016125a3565b5f604051808303815f87803b1580156114e6575f5ffd5b505af11580156114f8573d5f5f3e3d5ffd5b505050507f3463431b09dfd43dec7349f8f24acfa753fe4cf40a26235402d213373df158568360405161152b9190612595565b60405180910390a1505050565b61271061ffff8216111561155f576040516307336f0360e11b815260040160405180910390fd5b6097805461ffff191661ffff83169081179091556040519081527ff5d1836df8fcd7c1e54047e94ac8773d2855395603e2ef9ba5f5f16905f225929060200160405180910390a150565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa15801561160b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061162f91906120d9565b6109fe57604051631d77d47760e21b815260040160405180910390fd5b6033546001600160a01b031633146109fe5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610762565b606654600160ff83161b908116036108f15760405163840a48d560e01b815260040160405180910390fd5b600260c954036117235760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610762565b600260c955565b604080518082019091525f8082526020820152604080518082019091525f808252602082018190529060606117618587018761267c565b9299919850965090945092505050565b5f815f0151826020015163ffffffff166040516020016117bc92919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b604051602081830303815290604052610ed590612741565b61181c83838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508992508591505063ffffffff881661191c565b6112405760405163afa42ca760e01b815260040160405180910390fd5b611841611a16565b81806020019051810190610ed591906127c9565b606081806020019051810190610ed59190612878565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118c7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118eb9190612979565b6001600160a01b0316336001600160a01b0316146109fe5760405163794821ff60e01b815260040160405180910390fd5b5f8361193b576040516329e7276760e11b815260040160405180910390fd5b83611947868585611951565b1495945050505050565b5f83515f03611961575081610996565b6020845161196f9190612994565b1561198d576040516313717da960e21b815260040160405180910390fd5b8260205b855181116119ee576119a4600285612994565b5f036119c557815f528086015160205260405f2091506002840493506119dc565b808601515f528160205260405f2091506002840493505b6119e76020826129b3565b9050611991565b508215611a0e576040516363df817160e01b815260040160405180910390fd5b949350505050565b60405180608001604052805f81526020015f8152602001611a4860405180604001604052805f81526020015f81525090565b8152602001606081525090565b6001600160a01b03811681146108f1575f5ffd5b5f60408284031215611a79575f5ffd5b50919050565b803561ffff81168114610a9a575f5ffd5b5f60a08284031215611a79575f5ffd5b5f5f5f5f5f60c08688031215611ab4575f5ffd5b8535611abf81611a55565b945060208601359350611ad58760408801611a69565b9250611ae360808701611a7f565b915060a08601356001600160401b03811115611afd575f5ffd5b611b0988828901611a90565b9150509295509295909350565b5f60208284031215611b26575f5ffd5b5035919050565b63ffffffff811681146108f1575f5ffd5b5f60208284031215611b4e575f5ffd5b813561099681611b2d565b80516001600160a01b0316825260209081015163ffffffff16910152565b60408101610ed58284611b59565b5f60208284031215611b95575f5ffd5b61099682611a7f565b5f5f5f60608486031215611bb0575f5ffd5b833592506020840135611bc281611b2d565b91506040840135611bd281611b2d565b809150509250925092565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b0381118282101715611c1357611c13611bdd565b60405290565b604051608081016001600160401b0381118282101715611c1357611c13611bdd565b604051601f8201601f191681016001600160401b0381118282101715611c6357611c63611bdd565b604052919050565b5f6001600160401b03821115611c8357611c83611bdd565b5060051b60200190565b5f60208284031215611c9d575f5ffd5b81356001600160401b03811115611cb2575f5ffd5b82018084036060811215611cc4575f5ffd5b611ccc611bf1565b6040821215611cd9575f5ffd5b611ce1611bf1565b83358152602080850135908201528152604083013591506001600160401b03821115611d0b575f5ffd5b818301925085601f840112611d1e575f5ffd5b82359150611d33611d2e83611c6b565b611c3b565b8083825260208201915060208460051b860101935087841115611d54575f5ffd5b6020850194505b83851015611d76578435825260209485019490910190611d5b565b60208301525095945050505050565b5f60208284031215611d95575f5ffd5b813560ff81168114610996575f5ffd5b803560038110610a9a575f5ffd5b5f60208284031215611dc3575f5ffd5b61099682611da5565b5f5f83601f840112611ddc575f5ffd5b5081356001600160401b03811115611df2575f5ffd5b602083019150836020828501011115611e09575f5ffd5b9250929050565b5f5f5f5f5f5f5f60a0888a031215611e26575f5ffd5b8735611e3181611b2d565b9650602088013595506040880135611e4881611b2d565b945060608801356001600160401b03811115611e62575f5ffd5b611e6e8a828b01611dcc565b90955093505060808801356001600160401b03811115611e8c575f5ffd5b611e988a828b01611dcc565b989b979a50959850939692959293505050565b5f5f60608385031215611ebc575f5ffd5b611ec68484611a69565b915060408301356001600160401b03811115611ee0575f5ffd5b611eec85828601611a90565b9150509250929050565b5f5f60208385031215611f07575f5ffd5b82356001600160401b03811115611f1c575f5ffd5b611f2885828601611dcc565b90969095509350505050565b5f5f5f5f60808587031215611f47575f5ffd5b84356001600160401b03811115611f5c575f5ffd5b85016101208188031215611f6e575f5ffd5b9350602085013592506040850135611f8581611b2d565b91506060850135611f9581611b2d565b939692955090935050565b5f60208284031215611fb0575f5ffd5b813561099681611a55565b5f60208284031215611fcb575f5ffd5b5051919050565b5f8151808452602084019350602083015f5b82811015612002578151865260209586019590910190600101611fe4565b5093949350505050565b60208082528251805183830152015160408201525f6020830151606080840152611a0e6080840182611fd2565b60ff60f81b8360f81b1681525f82518060208501600185015e5f92016001019182525092915050565b634e487b7160e01b5f52602160045260245ffd5b60408101610ed58284546001600160a01b038116825260a01c63ffffffff16602090910152565b5f602082840312156120ad575f5ffd5b815161099681611b2d565b606081016120c68285611b59565b63ffffffff831660408301529392505050565b5f602082840312156120e9575f5ffd5b81518015158114610996575f5ffd5b6121028186611b59565b63ffffffff8416604082015260c06060820152825160c0820152602083015160e08201525f604084015161214461010084018280518252602090810151910152565b50606084015160a0610140840152612160610160840182611fd2565b9150506121706080830184611b59565b95945050505050565b5f60c082016121888388611b59565b63ffffffff8616604084015260c0606084015280855180835260e08501915060e08160051b8601019250602087015f5b828110156122095786850360df19018452815180516001600160a01b031686526020908101516040918701829052906121f390870182611fd2565b95505060209384019391909101906001016121b8565b50505050809150506121706080830184611b59565b60f884901b6001600160f81b0319168152818360018301375f910160010190815292915050565b634e487b7160e01b5f52603260045260245ffd5b5f5f8335601e1984360301811261226e575f5ffd5b83016020810192503590506001600160401b0381111561228c575f5ffd5b8060051b3603821315611e09575f5ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f8235605e198336030181126122d9575f5ffd5b90910192915050565b8183525f6001600160fb1b038311156122f9575f5ffd5b8260051b80836020870137939093016020019392505050565b80358252602080820135908301525f61232e6040830183612259565b606060408601526121706060860182846122e2565b5f8151808452602084019350602083015f5b8281101561200257815161ffff16865260209586019590910190600101612355565b61239a8185546001600160a01b038116825260a01c63ffffffff16602090910152565b608060408201525f6101a0820184356123b281611b2d565b63ffffffff166080840152602085013560a0840152604085013560c0840152606085013560e0840152604060808601610100850137604060c08601610140850137612401610100860186612259565b610120610180860152828184526101c0860190506101c08260051b8701019350825f5b838110156124e3578786036101bf1901835261244082866122c5565b803561244b81611b2d565b63ffffffff168752602081013536829003601e1901811261246a575f5ffd5b81016020810190356001600160401b03811115612485575f5ffd5b803603821315612493575f5ffd5b606060208a01526124a860608a01828461229d565b9150506124b860408301836122c5565b915087810360408901526124cc8183612312565b975050506020928301929190910190600101612424565b505050505082810360608401526124fa8185612343565b9695505050505050565b813561250f81611a55565b81546001600160a01b031981166001600160a01b03929092169182178355602084013561253b81611b2d565b6001600160c01b03199190911690911760a09190911b63ffffffff60a01b1617905550565b803561256b81611a55565b6001600160a01b03168252602081013561258481611b2d565b63ffffffff81166020840152505050565b60408101610ed58284612560565b6125ad8186612560565b63ffffffff841660408281019190915260c06060808401829052853591840191909152602085013560e0840152908401356101008301528301356101208201525f6125fb6080850185612259565b60a0610140850152612612610160850182846122e2565b925050506121706080830184546001600160a01b038116825260a01c63ffffffff16602090910152565b5f6040828403121561264c575f5ffd5b612654611bf1565b9050813561266181611a55565b8152602082013561267181611b2d565b602082015292915050565b5f5f5f5f60c0858703121561268f575f5ffd5b612699868661263c565b93506126a760408601611da5565b92506126b6866060870161263c565b915060a08501356001600160401b038111156126d0575f5ffd5b8501601f810187136126e0575f5ffd5b80356001600160401b038111156126f9576126f9611bdd565b61270c601f8201601f1916602001611c3b565b818152886020838501011115612720575f5ffd5b816020840160208301375f6020838301015280935050505092959194509250565b80516020808301519190811015611a79575f1960209190910360031b1b16919050565b5f82601f830112612773575f5ffd5b8151612781611d2e82611c6b565b8082825260208201915060208360051b8601019250858311156127a2575f5ffd5b602085015b838110156127bf5780518352602092830192016127a7565b5095945050505050565b5f602082840312156127d9575f5ffd5b81516001600160401b038111156127ee575f5ffd5b820180840360a0811215612800575f5ffd5b612808611c19565b82518152602080840151908201526040603f1983011215612827575f5ffd5b61282f611bf1565b604084810151825260608501516020830152820152608083015191506001600160401b0382111561285e575f5ffd5b61286a86838501612764565b606082015295945050505050565b5f60208284031215612888575f5ffd5b81516001600160401b0381111561289d575f5ffd5b8201601f810184136128ad575f5ffd5b80516128bb611d2e82611c6b565b8082825260208201915060208360051b8501019250868311156128dc575f5ffd5b602084015b8381101561296e5780516001600160401b038111156128fe575f5ffd5b85016040818a03601f19011215612913575f5ffd5b61291b611bf1565b602082015161292981611a55565b815260408201516001600160401b03811115612943575f5ffd5b6129528b602083860101612764565b60208301525080855250506020830192506020810190506128e1565b509695505050505050565b5f60208284031215612989575f5ffd5b815161099681611a55565b5f826129ae57634e487b7160e01b5f52601260045260245ffd5b500690565b80820180821115610ed557634e487b7160e01b5f52601160045260245ffdfea2646970667358221220078f1f0cf51e10e7917e5db37d5478bc60d07f3cb2e27c4eb86560d0e1489bf864736f6c634300081e0033", } // OperatorTableUpdaterABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/PauserRegistry/binding.go b/pkg/bindings/PauserRegistry/binding.go index b716416eb2..9e7efa1708 100644 --- a/pkg/bindings/PauserRegistry/binding.go +++ b/pkg/bindings/PauserRegistry/binding.go @@ -32,7 +32,7 @@ var ( // PauserRegistryMetaData contains all meta data concerning the PauserRegistry contract. var PauserRegistryMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_pausers\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_unpauser\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isPauser\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setIsPauser\",\"inputs\":[{\"name\":\"newPauser\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"canPause\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setUnpauser\",\"inputs\":[{\"name\":\"newUnpauser\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpauser\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"PauserStatusChanged\",\"inputs\":[{\"name\":\"pauser\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"canPause\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"UnpauserChanged\",\"inputs\":[{\"name\":\"previousUnpauser\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newUnpauser\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"InputAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyUnpauser\",\"inputs\":[]}]", - Bin: "0x608060405234801561000f575f5ffd5b506040516105c83803806105c883398101604081905261002e916101c2565b5f5b825181101561006b5761006383828151811061004e5761004e61029e565b6020026020010151600161007c60201b60201c565b600101610030565b5061007581610103565b50506102b2565b6001600160a01b0382166100a3576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b0382165f8181526020818152604091829020805460ff19168515159081179091558251938452908301527f65d3a1fd4c13f05cba164f80d03ce90fb4b5e21946bfc3ab7dbd434c2d0b9152910160405180910390a15050565b6001600160a01b03811661012a576040516339b190bb60e11b815260040160405180910390fd5b600154604080516001600160a01b03928316815291831660208301527f06b4167a2528887a1e97a366eefe8549bfbf1ea3e6ac81cb2564a934d20e8892910160405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b634e487b7160e01b5f52604160045260245ffd5b80516001600160a01b03811681146101bd575f5ffd5b919050565b5f5f604083850312156101d3575f5ffd5b82516001600160401b038111156101e8575f5ffd5b8301601f810185136101f8575f5ffd5b80516001600160401b0381111561021157610211610193565b604051600582901b90603f8201601f191681016001600160401b038111828210171561023f5761023f610193565b60405291825260208184018101929081018884111561025c575f5ffd5b6020850194505b8385101561028257610274856101a7565b815260209485019401610263565b50945061029592505050602084016101a7565b90509250929050565b634e487b7160e01b5f52603260045260245ffd5b610309806102bf5f395ff3fe608060405234801561000f575f5ffd5b506004361061004a575f3560e01c806346fbf68e1461004e5780638568520614610085578063ce5484281461009a578063eab66d7a146100ad575b5f5ffd5b61007061005c36600461027a565b5f6020819052908152604090205460ff1681565b60405190151581526020015b60405180910390f35b61009861009336600461029a565b6100d8565b005b6100986100a836600461027a565b610111565b6001546100c0906001600160a01b031681565b6040516001600160a01b03909116815260200161007c565b6001546001600160a01b031633146101035760405163794821ff60e01b815260040160405180910390fd5b61010d8282610148565b5050565b6001546001600160a01b0316331461013c5760405163794821ff60e01b815260040160405180910390fd5b610145816101cf565b50565b6001600160a01b03821661016f576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b0382165f8181526020818152604091829020805460ff19168515159081179091558251938452908301527f65d3a1fd4c13f05cba164f80d03ce90fb4b5e21946bfc3ab7dbd434c2d0b9152910160405180910390a15050565b6001600160a01b0381166101f6576040516339b190bb60e11b815260040160405180910390fd5b600154604080516001600160a01b03928316815291831660208301527f06b4167a2528887a1e97a366eefe8549bfbf1ea3e6ac81cb2564a934d20e8892910160405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b80356001600160a01b0381168114610275575f5ffd5b919050565b5f6020828403121561028a575f5ffd5b6102938261025f565b9392505050565b5f5f604083850312156102ab575f5ffd5b6102b48361025f565b9150602083013580151581146102c8575f5ffd5b80915050925092905056fea26469706673582212205fbfc4bf9fde16fd8b6bb6cfaee6c9267e9bc7fe7ddce99f07e29deb6da1681c64736f6c634300081e0033", + Bin: "0x608060405234801561000f575f5ffd5b506040516105c83803806105c883398101604081905261002e916101c2565b5f5b825181101561006b5761006383828151811061004e5761004e61029e565b6020026020010151600161007c60201b60201c565b600101610030565b5061007581610103565b50506102b2565b6001600160a01b0382166100a3576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b0382165f8181526020818152604091829020805460ff19168515159081179091558251938452908301527f65d3a1fd4c13f05cba164f80d03ce90fb4b5e21946bfc3ab7dbd434c2d0b9152910160405180910390a15050565b6001600160a01b03811661012a576040516339b190bb60e11b815260040160405180910390fd5b600154604080516001600160a01b03928316815291831660208301527f06b4167a2528887a1e97a366eefe8549bfbf1ea3e6ac81cb2564a934d20e8892910160405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b634e487b7160e01b5f52604160045260245ffd5b80516001600160a01b03811681146101bd575f5ffd5b919050565b5f5f604083850312156101d3575f5ffd5b82516001600160401b038111156101e8575f5ffd5b8301601f810185136101f8575f5ffd5b80516001600160401b0381111561021157610211610193565b604051600582901b90603f8201601f191681016001600160401b038111828210171561023f5761023f610193565b60405291825260208184018101929081018884111561025c575f5ffd5b6020850194505b8385101561028257610274856101a7565b815260209485019401610263565b50945061029592505050602084016101a7565b90509250929050565b634e487b7160e01b5f52603260045260245ffd5b610309806102bf5f395ff3fe608060405234801561000f575f5ffd5b506004361061004a575f3560e01c806346fbf68e1461004e5780638568520614610085578063ce5484281461009a578063eab66d7a146100ad575b5f5ffd5b61007061005c36600461027a565b5f6020819052908152604090205460ff1681565b60405190151581526020015b60405180910390f35b61009861009336600461029a565b6100d8565b005b6100986100a836600461027a565b610111565b6001546100c0906001600160a01b031681565b6040516001600160a01b03909116815260200161007c565b6001546001600160a01b031633146101035760405163794821ff60e01b815260040160405180910390fd5b61010d8282610148565b5050565b6001546001600160a01b0316331461013c5760405163794821ff60e01b815260040160405180910390fd5b610145816101cf565b50565b6001600160a01b03821661016f576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b0382165f8181526020818152604091829020805460ff19168515159081179091558251938452908301527f65d3a1fd4c13f05cba164f80d03ce90fb4b5e21946bfc3ab7dbd434c2d0b9152910160405180910390a15050565b6001600160a01b0381166101f6576040516339b190bb60e11b815260040160405180910390fd5b600154604080516001600160a01b03928316815291831660208301527f06b4167a2528887a1e97a366eefe8549bfbf1ea3e6ac81cb2564a934d20e8892910160405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b80356001600160a01b0381168114610275575f5ffd5b919050565b5f6020828403121561028a575f5ffd5b6102938261025f565b9392505050565b5f5f604083850312156102ab575f5ffd5b6102b48361025f565b9150602083013580151581146102c8575f5ffd5b80915050925092905056fea264697066735822122071501aecbae4787d0072f2be51247cdaa33b40643b53eb978af689d95167caa464736f6c634300081e0033", } // PauserRegistryABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/PermissionController/binding.go b/pkg/bindings/PermissionController/binding.go index 8f6ba46e7c..6c6d3c00f7 100644 --- a/pkg/bindings/PermissionController/binding.go +++ b/pkg/bindings/PermissionController/binding.go @@ -32,7 +32,7 @@ var ( // PermissionControllerMetaData contains all meta data concerning the PermissionController contract. var PermissionControllerMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"acceptAdmin\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addPendingAdmin\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"admin\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"canCall\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"caller\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"selector\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAdmins\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAppointeePermissions\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"appointee\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"\",\"type\":\"bytes4[]\",\"internalType\":\"bytes4[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAppointees\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"selector\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPendingAdmins\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isAdmin\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"caller\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isPendingAdmin\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"pendingAdmin\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeAdmin\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"admin\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeAppointee\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"appointee\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"selector\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removePendingAdmin\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"admin\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAppointee\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"appointee\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"selector\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"AdminRemoved\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"admin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"AdminSet\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"admin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"AppointeeRemoved\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"appointee\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"target\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"selector\",\"type\":\"bytes4\",\"indexed\":false,\"internalType\":\"bytes4\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"AppointeeSet\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"appointee\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"target\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"selector\",\"type\":\"bytes4\",\"indexed\":false,\"internalType\":\"bytes4\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PendingAdminAdded\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"admin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PendingAdminRemoved\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"admin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AdminAlreadyPending\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"AdminAlreadySet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"AdminNotPending\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"AdminNotSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"AppointeeAlreadySet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"AppointeeNotSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CannotHaveZeroAdmins\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotAdmin\",\"inputs\":[]}]", - Bin: "0x6080604052348015600e575f5ffd5b5060156019565b60d3565b5f54610100900460ff161560835760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff9081161460d1575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b610f40806100e05f395ff3fe608060405234801561000f575f5ffd5b50600436106100cb575f3560e01c80639100674511610088578063ad8aca7711610063578063ad8aca77146101b0578063df595cb8146101c3578063eb5a4e87146101d6578063fddbdefd146101e9575f5ffd5b80639100674514610167578063950d806e1461018a578063ad5f22101461019d575f5ffd5b806306641201146100cf578063268959e5146100e45780634f906cf9146100f7578063628806ef1461010a5780636bddfa1f1461011d578063882a3b3814610146575b5f5ffd5b6100e26100dd366004610cfa565b6101fc565b005b6100e26100f2366004610d4b565b61031d565b6100e2610105366004610d4b565b6103f8565b6100e2610118366004610d7c565b61049b565b61013061012b366004610d7c565b610529565b60405161013d9190610dd8565b60405180910390f35b610159610154366004610d4b565b610552565b60405161013d929190610dea565b61017a610175366004610d4b565b6106b3565b604051901515815260200161013d565b6100e2610198366004610cfa565b610723565b6101306101ab366004610d7c565b610834565b61017a6101be366004610d4b565b6108da565b61017a6101d1366004610cfa565b6108fb565b6100e26101e4366004610d4b565b610950565b6101306101f7366004610e4c565b610a1e565b8361020781336106b3565b61022457604051637bfa4b9f60e01b815260040160405180910390fd5b6001600160a01b0385165f908152600160205260408120906102468585610a5c565b6001600160a01b0387165f908152600484016020526040902090915061026c9082610a89565b6102895760405163262118cd60e01b815260040160405180910390fd5b6001600160a01b0386165f90815260048301602052604090206102ac9082610aa0565b505f81815260058301602052604090206102c69087610aab565b50856001600160a01b0316876001600160a01b03167f18242326b6b862126970679759169f01f646bd55ec5bfcab85ba9f337a74e0c6878760405161030c929190610e8c565b60405180910390a350505050505050565b8161032881336106b3565b61034557604051637bfa4b9f60e01b815260040160405180910390fd5b6001600160a01b0383165f9081526001602081905260409091206002019061036c82610abf565b1161038a576040516310ce892b60e31b815260040160405180910390fd5b6103948184610aab565b6103b157604051630716d81b60e51b815260040160405180910390fd5b6040516001600160a01b0384811682528516907fdb9d5d31320daf5bc7181d565b6da4d12e30f0f4d5aa324a992426c14a1d19ce906020015b60405180910390a250505050565b8161040381336106b3565b61042057604051637bfa4b9f60e01b815260040160405180910390fd5b6001600160a01b0383165f9081526001602052604090206104418184610aab565b61045e5760405163bed8295f60e01b815260040160405180910390fd5b6040516001600160a01b0384811682528516907fd706ed7ae044d795b49e54c9f519f663053951011985f663a862cd9ee72a9ac7906020016103ea565b6001600160a01b0381165f9081526001602052604090206104bc8133610aab565b6104d95760405163bed8295f60e01b815260040160405180910390fd5b6104e66002820133610ac8565b506040513381526001600160a01b038316907fbf265e8326285a2747e33e54d5945f7111f2b5edb826eb8c08d4677779b3ff979060200160405180910390a25050565b6001600160a01b0381165f90815260016020526040902060609061054c90610adc565b92915050565b6001600160a01b038083165f90815260016020908152604080832093851683526004909301905290812060609182919061058b82610abf565b90505f8167ffffffffffffffff8111156105a7576105a7610eaf565b6040519080825280602002602001820160405280156105d0578160200160208202803683370190505b5090505f8267ffffffffffffffff8111156105ed576105ed610eaf565b604051908082528060200260200182016040528015610616578160200160208202803683370190505b5090505f5b838110156106a5576106496106308683610ae8565b606081901c9160a09190911b6001600160e01b03191690565b84838151811061065b5761065b610ec3565b6020026020010184848151811061067457610674610ec3565b6001600160e01b0319909316602093840291909101909201919091526001600160a01b03909116905260010161061b565b509097909650945050505050565b6001600160a01b0382165f9081526001602052604081206106d690600201610abf565b5f036106f857816001600160a01b0316836001600160a01b031614905061054c565b6001600160a01b0383165f90815260016020526040902061071c9060020183610af3565b9392505050565b8361072e81336106b3565b61074b57604051637bfa4b9f60e01b815260040160405180910390fd5b6001600160a01b0385165f9081526001602052604081209061076d8585610a5c565b6001600160a01b0387165f90815260048401602052604090209091506107939082610a89565b156107b15760405163ad8efeb760e01b815260040160405180910390fd5b6001600160a01b0386165f90815260048301602052604090206107d49082610b14565b505f81815260058301602052604090206107ee9087610ac8565b50856001600160a01b0316876001600160a01b03167f037f03a2ad6b967df4a01779b6d2b4c85950df83925d9e31362b519422fc0169878760405161030c929190610e8c565b6001600160a01b0381165f90815260016020526040902060609061085a90600201610abf565b5f036108b2576040805160018082528183019092525f916020808301908036833701905050905082815f8151811061089457610894610ec3565b6001600160a01b039092166020928302919091019091015292915050565b6001600160a01b0382165f90815260016020526040902061054c90600201610adc565b919050565b6001600160a01b0382165f90815260016020526040812061071c9083610af3565b5f61090685856106b3565b8061094757506109476109198484610a5c565b6001600160a01b038088165f908152600160209081526040808320938a168352600490930190522090610a89565b95945050505050565b8161095b81336106b3565b61097857604051637bfa4b9f60e01b815260040160405180910390fd5b6001600160a01b0383165f90815260016020526040902061099c6002820184610af3565b156109ba5760405163130160e560e31b815260040160405180910390fd5b6109c48184610ac8565b6109e1576040516319abede360e11b815260040160405180910390fd5b6040516001600160a01b0384811682528516907fb14b9a3d448c5b04f0e5b087b6f5193390db7955482a6ffb841e7b3ba61a460c906020016103ea565b60605f610a2b8484610a5c565b6001600160a01b0386165f908152600160209081526040808320848452600501909152902090915061094790610adc565b60609190911b6bffffffffffffffffffffffff191660a09190911c6bffffffff0000000000000000161790565b5f818152600183016020526040812054151561071c565b5f61071c8383610b1f565b5f61071c836001600160a01b038416610b1f565b5f61054c825490565b5f61071c836001600160a01b038416610c02565b60605f61071c83610c4e565b5f61071c8383610ca7565b6001600160a01b0381165f908152600183016020526040812054151561071c565b5f61071c8383610c02565b5f8181526001830160205260408120548015610bf9575f610b41600183610ed7565b85549091505f90610b5490600190610ed7565b9050818114610bb3575f865f018281548110610b7257610b72610ec3565b905f5260205f200154905080875f018481548110610b9257610b92610ec3565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080610bc457610bc4610ef6565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f90556001935050505061054c565b5f91505061054c565b5f818152600183016020526040812054610c4757508154600181810184555f84815260208082209093018490558454848252828601909352604090209190915561054c565b505f61054c565b6060815f01805480602002602001604051908101604052809291908181526020018280548015610c9b57602002820191905f5260205f20905b815481526020019060010190808311610c87575b50505050509050919050565b5f825f018281548110610cbc57610cbc610ec3565b905f5260205f200154905092915050565b80356001600160a01b03811681146108d5575f5ffd5b80356001600160e01b0319811681146108d5575f5ffd5b5f5f5f5f60808587031215610d0d575f5ffd5b610d1685610ccd565b9350610d2460208601610ccd565b9250610d3260408601610ccd565b9150610d4060608601610ce3565b905092959194509250565b5f5f60408385031215610d5c575f5ffd5b610d6583610ccd565b9150610d7360208401610ccd565b90509250929050565b5f60208284031215610d8c575f5ffd5b61071c82610ccd565b5f8151808452602084019350602083015f5b82811015610dce5781516001600160a01b0316865260209586019590910190600101610da7565b5093949350505050565b602081525f61071c6020830184610d95565b604081525f610dfc6040830185610d95565b82810360208401528084518083526020830191506020860192505f5b81811015610e405783516001600160e01b031916835260209384019390920191600101610e18565b50909695505050505050565b5f5f5f60608486031215610e5e575f5ffd5b610e6784610ccd565b9250610e7560208501610ccd565b9150610e8360408501610ce3565b90509250925092565b6001600160a01b039290921682526001600160e01b031916602082015260400190565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b8181038181111561054c57634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603160045260245ffdfea2646970667358221220dd650b83bee83e06b0a5e74e02601ad7567945febdeb94d505c6ccb7cb59e28c64736f6c634300081e0033", + Bin: "0x6080604052348015600e575f5ffd5b5060156019565b60d3565b5f54610100900460ff161560835760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff9081161460d1575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b610f40806100e05f395ff3fe608060405234801561000f575f5ffd5b50600436106100cb575f3560e01c80639100674511610088578063ad8aca7711610063578063ad8aca77146101b0578063df595cb8146101c3578063eb5a4e87146101d6578063fddbdefd146101e9575f5ffd5b80639100674514610167578063950d806e1461018a578063ad5f22101461019d575f5ffd5b806306641201146100cf578063268959e5146100e45780634f906cf9146100f7578063628806ef1461010a5780636bddfa1f1461011d578063882a3b3814610146575b5f5ffd5b6100e26100dd366004610cfa565b6101fc565b005b6100e26100f2366004610d4b565b61031d565b6100e2610105366004610d4b565b6103f8565b6100e2610118366004610d7c565b61049b565b61013061012b366004610d7c565b610529565b60405161013d9190610dd8565b60405180910390f35b610159610154366004610d4b565b610552565b60405161013d929190610dea565b61017a610175366004610d4b565b6106b3565b604051901515815260200161013d565b6100e2610198366004610cfa565b610723565b6101306101ab366004610d7c565b610834565b61017a6101be366004610d4b565b6108da565b61017a6101d1366004610cfa565b6108fb565b6100e26101e4366004610d4b565b610950565b6101306101f7366004610e4c565b610a1e565b8361020781336106b3565b61022457604051637bfa4b9f60e01b815260040160405180910390fd5b6001600160a01b0385165f908152600160205260408120906102468585610a5c565b6001600160a01b0387165f908152600484016020526040902090915061026c9082610a89565b6102895760405163262118cd60e01b815260040160405180910390fd5b6001600160a01b0386165f90815260048301602052604090206102ac9082610aa0565b505f81815260058301602052604090206102c69087610aab565b50856001600160a01b0316876001600160a01b03167f18242326b6b862126970679759169f01f646bd55ec5bfcab85ba9f337a74e0c6878760405161030c929190610e8c565b60405180910390a350505050505050565b8161032881336106b3565b61034557604051637bfa4b9f60e01b815260040160405180910390fd5b6001600160a01b0383165f9081526001602081905260409091206002019061036c82610abf565b1161038a576040516310ce892b60e31b815260040160405180910390fd5b6103948184610aab565b6103b157604051630716d81b60e51b815260040160405180910390fd5b6040516001600160a01b0384811682528516907fdb9d5d31320daf5bc7181d565b6da4d12e30f0f4d5aa324a992426c14a1d19ce906020015b60405180910390a250505050565b8161040381336106b3565b61042057604051637bfa4b9f60e01b815260040160405180910390fd5b6001600160a01b0383165f9081526001602052604090206104418184610aab565b61045e5760405163bed8295f60e01b815260040160405180910390fd5b6040516001600160a01b0384811682528516907fd706ed7ae044d795b49e54c9f519f663053951011985f663a862cd9ee72a9ac7906020016103ea565b6001600160a01b0381165f9081526001602052604090206104bc8133610aab565b6104d95760405163bed8295f60e01b815260040160405180910390fd5b6104e66002820133610ac8565b506040513381526001600160a01b038316907fbf265e8326285a2747e33e54d5945f7111f2b5edb826eb8c08d4677779b3ff979060200160405180910390a25050565b6001600160a01b0381165f90815260016020526040902060609061054c90610adc565b92915050565b6001600160a01b038083165f90815260016020908152604080832093851683526004909301905290812060609182919061058b82610abf565b90505f8167ffffffffffffffff8111156105a7576105a7610eaf565b6040519080825280602002602001820160405280156105d0578160200160208202803683370190505b5090505f8267ffffffffffffffff8111156105ed576105ed610eaf565b604051908082528060200260200182016040528015610616578160200160208202803683370190505b5090505f5b838110156106a5576106496106308683610ae8565b606081901c9160a09190911b6001600160e01b03191690565b84838151811061065b5761065b610ec3565b6020026020010184848151811061067457610674610ec3565b6001600160e01b0319909316602093840291909101909201919091526001600160a01b03909116905260010161061b565b509097909650945050505050565b6001600160a01b0382165f9081526001602052604081206106d690600201610abf565b5f036106f857816001600160a01b0316836001600160a01b031614905061054c565b6001600160a01b0383165f90815260016020526040902061071c9060020183610af3565b9392505050565b8361072e81336106b3565b61074b57604051637bfa4b9f60e01b815260040160405180910390fd5b6001600160a01b0385165f9081526001602052604081209061076d8585610a5c565b6001600160a01b0387165f90815260048401602052604090209091506107939082610a89565b156107b15760405163ad8efeb760e01b815260040160405180910390fd5b6001600160a01b0386165f90815260048301602052604090206107d49082610b14565b505f81815260058301602052604090206107ee9087610ac8565b50856001600160a01b0316876001600160a01b03167f037f03a2ad6b967df4a01779b6d2b4c85950df83925d9e31362b519422fc0169878760405161030c929190610e8c565b6001600160a01b0381165f90815260016020526040902060609061085a90600201610abf565b5f036108b2576040805160018082528183019092525f916020808301908036833701905050905082815f8151811061089457610894610ec3565b6001600160a01b039092166020928302919091019091015292915050565b6001600160a01b0382165f90815260016020526040902061054c90600201610adc565b919050565b6001600160a01b0382165f90815260016020526040812061071c9083610af3565b5f61090685856106b3565b8061094757506109476109198484610a5c565b6001600160a01b038088165f908152600160209081526040808320938a168352600490930190522090610a89565b95945050505050565b8161095b81336106b3565b61097857604051637bfa4b9f60e01b815260040160405180910390fd5b6001600160a01b0383165f90815260016020526040902061099c6002820184610af3565b156109ba5760405163130160e560e31b815260040160405180910390fd5b6109c48184610ac8565b6109e1576040516319abede360e11b815260040160405180910390fd5b6040516001600160a01b0384811682528516907fb14b9a3d448c5b04f0e5b087b6f5193390db7955482a6ffb841e7b3ba61a460c906020016103ea565b60605f610a2b8484610a5c565b6001600160a01b0386165f908152600160209081526040808320848452600501909152902090915061094790610adc565b60609190911b6bffffffffffffffffffffffff191660a09190911c6bffffffff0000000000000000161790565b5f818152600183016020526040812054151561071c565b5f61071c8383610b1f565b5f61071c836001600160a01b038416610b1f565b5f61054c825490565b5f61071c836001600160a01b038416610c02565b60605f61071c83610c4e565b5f61071c8383610ca7565b6001600160a01b0381165f908152600183016020526040812054151561071c565b5f61071c8383610c02565b5f8181526001830160205260408120548015610bf9575f610b41600183610ed7565b85549091505f90610b5490600190610ed7565b9050818114610bb3575f865f018281548110610b7257610b72610ec3565b905f5260205f200154905080875f018481548110610b9257610b92610ec3565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080610bc457610bc4610ef6565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f90556001935050505061054c565b5f91505061054c565b5f818152600183016020526040812054610c4757508154600181810184555f84815260208082209093018490558454848252828601909352604090209190915561054c565b505f61054c565b6060815f01805480602002602001604051908101604052809291908181526020018280548015610c9b57602002820191905f5260205f20905b815481526020019060010190808311610c87575b50505050509050919050565b5f825f018281548110610cbc57610cbc610ec3565b905f5260205f200154905092915050565b80356001600160a01b03811681146108d5575f5ffd5b80356001600160e01b0319811681146108d5575f5ffd5b5f5f5f5f60808587031215610d0d575f5ffd5b610d1685610ccd565b9350610d2460208601610ccd565b9250610d3260408601610ccd565b9150610d4060608601610ce3565b905092959194509250565b5f5f60408385031215610d5c575f5ffd5b610d6583610ccd565b9150610d7360208401610ccd565b90509250929050565b5f60208284031215610d8c575f5ffd5b61071c82610ccd565b5f8151808452602084019350602083015f5b82811015610dce5781516001600160a01b0316865260209586019590910190600101610da7565b5093949350505050565b602081525f61071c6020830184610d95565b604081525f610dfc6040830185610d95565b82810360208401528084518083526020830191506020860192505f5b81811015610e405783516001600160e01b031916835260209384019390920191600101610e18565b50909695505050505050565b5f5f5f60608486031215610e5e575f5ffd5b610e6784610ccd565b9250610e7560208501610ccd565b9150610e8360408501610ce3565b90509250925092565b6001600160a01b039290921682526001600160e01b031916602082015260400190565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b8181038181111561054c57634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603160045260245ffdfea26469706673582212206e3572db81ec5d7a9054035a23c796cbd433cdb537e79424f8576d0ec7504bab64736f6c634300081e0033", } // PermissionControllerABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/ProtocolRegistry/binding.go b/pkg/bindings/ProtocolRegistry/binding.go index ce5d70cfb2..2f2bb019f7 100644 --- a/pkg/bindings/ProtocolRegistry/binding.go +++ b/pkg/bindings/ProtocolRegistry/binding.go @@ -38,7 +38,7 @@ type IProtocolRegistryTypesDeploymentConfig struct { // ProtocolRegistryMetaData contains all meta data concerning the ProtocolRegistry contract. var ProtocolRegistryMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"DEFAULT_ADMIN_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PAUSER_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"configure\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"config\",\"type\":\"tuple\",\"internalType\":\"structIProtocolRegistryTypes.DeploymentConfig\",\"components\":[{\"name\":\"pausable\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"deprecated\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getAddress\",\"inputs\":[{\"name\":\"name\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllDeployments\",\"inputs\":[],\"outputs\":[{\"name\":\"names\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"addresses\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"configs\",\"type\":\"tuple[]\",\"internalType\":\"structIProtocolRegistryTypes.DeploymentConfig[]\",\"components\":[{\"name\":\"pausable\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"deprecated\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDeployment\",\"inputs\":[{\"name\":\"name\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"config\",\"type\":\"tuple\",\"internalType\":\"structIProtocolRegistryTypes.DeploymentConfig\",\"components\":[{\"name\":\"pausable\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"deprecated\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRoleAdmin\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRoleMember\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRoleMemberCount\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"grantRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"hasRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialAdmin\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"pauserMultisig\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"majorVersion\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"revokeRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"ship\",\"inputs\":[{\"name\":\"addresses\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"configs\",\"type\":\"tuple[]\",\"internalType\":\"structIProtocolRegistryTypes.DeploymentConfig[]\",\"components\":[{\"name\":\"pausable\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"deprecated\",\"type\":\"bool\",\"internalType\":\"bool\"}]},{\"name\":\"names\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"semanticVersion\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"supportsInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalDeployments\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"DeploymentConfigured\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"config\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIProtocolRegistryTypes.DeploymentConfig\",\"components\":[{\"name\":\"pausable\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"deprecated\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DeploymentShipped\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"config\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIProtocolRegistryTypes.DeploymentConfig\",\"components\":[{\"name\":\"pausable\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"deprecated\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RoleAdminChanged\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"previousAdminRole\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"newAdminRole\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RoleGranted\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RoleRevoked\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SemanticVersionUpdated\",\"inputs\":[{\"name\":\"previousSemanticVersion\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"semanticVersion\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]}]", - Bin: "0x6080604052348015600e575f5ffd5b5060156019565b60d3565b5f54610100900460ff161560835760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff9081161460d1575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611955806100e05f395ff3fe608060405234801561000f575f5ffd5b5060043610610127575f3560e01c8063a217fddf116100a9578063d34663891161006e578063d346638914610286578063d547741f14610299578063e63ab1e9146102ac578063fb35b4e4146102b7578063fc434a8a146102bf575f5ffd5b8063a217fddf14610230578063a8091d9714610237578063af05a5c514610258578063bf40fac114610260578063ca15c87314610273575f5ffd5b806354fd4d50116100ef57806354fd4d50146101be578063595c6a67146101d35780638eec00b8146101db5780639010d07c146101f257806391d148541461021d575f5ffd5b806301ffc9a71461012b578063248a9ca3146101535780632f2ff15d1461018357806336568abe14610198578063485cc955146101ab575b5f5ffd5b61013e610139366004611288565b6102d2565b60405190151581526020015b60405180910390f35b6101756101613660046112af565b5f9081526065602052604090206001015490565b60405190815260200161014a565b6101966101913660046112e1565b6102fc565b005b6101966101a63660046112e1565b610325565b6101966101b936600461130b565b6103a8565b6101c66104c5565b60405161014a9190611361565b6101966104d7565b6101e36105b7565b60405161014a939291906113c6565b610205610200366004611483565b61078a565b6040516001600160a01b03909116815260200161014a565b61013e61022b3660046112e1565b6107a8565b6101755f81565b61024a6102453660046114e0565b6107d2565b60405161014a92919061151e565b6101c661087e565b61020561026e3660046114e0565b6108d5565b6101756102813660046112af565b61091a565b610196610294366004611549565b610930565b6101966102a73660046112e1565b6109a6565b610175600160f81b81565b6101756109ca565b6101966102cd3660046115c5565b6109d5565b5f6001600160e01b03198216635a05180f60e01b14806102f657506102f682610a72565b92915050565b5f8281526065602052604090206001015461031681610aa6565b6103208383610ab3565b505050565b6001600160a01b038116331461039a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6103a48282610ad4565b5050565b5f54610100900460ff16158080156103c657505f54600160ff909116105b806103df5750303b1580156103df57505f5460ff166001145b6104425760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610391565b5f805460ff191660011790558015610463575f805461ff0019166101001790555b61046d5f84610ab3565b61047b600160f81b83610ab3565b8015610320575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a1505050565b60606104d260c954610af5565b905090565b600160f81b6104e581610aa6565b5f6104ee6109ca565b90505f5b81811015610320575f61050660ca83610b32565b6001600160a01b0381165f90815260cd602090815260409182902082518084019093525460ff80821615801580865261010090930490911615159284019290925292945090925061055957508060200151155b156105ad57816001600160a01b031663595c6a676040518163ffffffff1660e01b81526004015f604051808303815f87803b158015610596575f5ffd5b505af11580156105a8573d5f5f3e3d5ffd5b505050505b50506001016104f2565b60608060605f6105c56109ca565b9050806001600160401b038111156105df576105df6116c0565b60405190808252806020026020018201604052801561061257816020015b60608152602001906001900390816105fd5790505b509350806001600160401b0381111561062d5761062d6116c0565b604051908082528060200260200182016040528015610656578160200160208202803683370190505b509250806001600160401b03811115610671576106716116c0565b6040519080825280602002602001820160405280156106b557816020015b604080518082019091525f808252602082015281526020019060019003908161068f5790505b5091505f5b81811015610783575f806106cf60ca84610b32565b90925090506106dd82610af5565b8784815181106106ef576106ef6116d4565b60200260200101819052508086848151811061070d5761070d6116d4565b6001600160a01b039283166020918202929092018101919091529082165f90815260cd825260409081902081518083019092525460ff8082161515835261010090910416151591810191909152855186908590811061076e5761076e6116d4565b602090810291909101015250506001016106ba565b5050909192565b5f8281526097602052604081206107a19083610b4d565b9392505050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b604080518082019091525f808252602082018190529061083761082f61082c86868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610b5892505050565b90565b60ca90610b95565b6001600160a01b0381165f90815260cd602090815260409182902082518084019093525460ff808216151584526101009091041615159082015290925090505b9250929050565b60605f61088c60c954610af5565b9050805f815181106108a0576108a06116d4565b016020908101516040516001600160f81b03199091169181019190915260210160405160208183030381529060405291505090565b5f6107a161082f61082c85858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610b5892505050565b5f8181526097602052604081206102f690610ba0565b5f61093a81610aa6565b6001600160a01b0383165f90815260cd60205260409020829061095d82826116f5565b905050826001600160a01b03167f6c5879ec82f910f6d12844857cfb8eb474dcecc9aa5b8257c7a77dcb42990e9d83604051610999919061173b565b60405180910390a2505050565b5f828152606560205260409020600101546109c081610aa6565b6103208383610ad4565b5f6104d260ca610ba9565b5f6109df81610aa6565b6109e98383610bb3565b5f5b88811015610a6657610a5e8a8a83818110610a0857610a086116d4565b9050602002016020810190610a1d919061176b565b898984818110610a2f57610a2f6116d4565b905060400201888885818110610a4757610a476116d4565b9050602002810190610a599190611784565b610c36565b6001016109eb565b50505050505050505050565b5f6001600160e01b03198216637965db0b60e01b14806102f657506301ffc9a760e01b6001600160e01b03198316146102f6565b610ab08133610cf1565b50565b610abd8282610d4a565b5f8281526097602052604090206103209082610dcf565b610ade8282610de3565b5f8281526097602052604090206103209082610e49565b60605f610b0183610e5d565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f808080610b408686610e84565b9097909650945050505050565b5f6107a18383610ead565b5f5f829050601f81511115610b82578260405163305a27a960e01b81526004016103919190611361565b8051610b8d826117c6565b179392505050565b5f6107a18383610ed3565b5f6102f6825490565b5f6102f682610f42565b5f610bbf60c954610af5565b9050610bff83838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610b5892505050565b60c9556040517f769656e5cb3218f54758f85bd184d41e987639374d6cb9e244439cc9d1abe1e2906104b8908390869086906117ec565b610c83610c7a61082c84848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610b5892505050565b60ca9086610f4c565b506001600160a01b0384165f90815260cd602052604090208390610ca782826116f5565b905050836001600160a01b03167f4e81e5495dbc85919bf1b9c12a9a4bb6d546f75d3f92fa0a36867fc29a51467c84604051610ce3919061173b565b60405180910390a250505050565b610cfb82826107a8565b6103a457610d0881610f69565b610d13836020610f7b565b604051602001610d24929190611847565b60408051601f198184030181529082905262461bcd60e51b825261039191600401611361565b610d5482826107a8565b6103a4575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610d8b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f6107a1836001600160a01b038416611110565b610ded82826107a8565b156103a4575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f6107a1836001600160a01b03841661115c565b5f60ff8216601f8111156102f657604051632cd44ac360e21b815260040160405180910390fd5b5f8080610e918585610b4d565b5f81815260029690960160205260409095205494959350505050565b5f825f018281548110610ec257610ec26116d4565b905f5260205f200154905092915050565b5f81815260028301602052604081205480151580610ef65750610ef6848461123f565b6107a15760405162461bcd60e51b815260206004820152601e60248201527f456e756d657261626c654d61703a206e6f6e6578697374656e74206b657900006044820152606401610391565b5f6102f682610ba0565b5f610f6184846001600160a01b03851661124a565b949350505050565b60606102f66001600160a01b03831660145b60605f610f898360026118b9565b610f949060026118d0565b6001600160401b03811115610fab57610fab6116c0565b6040519080825280601f01601f191660200182016040528015610fd5576020820181803683370190505b509050600360fc1b815f81518110610fef57610fef6116d4565b60200101906001600160f81b03191690815f1a905350600f60fb1b8160018151811061101d5761101d6116d4565b60200101906001600160f81b03191690815f1a9053505f61103f8460026118b9565b61104a9060016118d0565b90505b60018111156110c1576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061107e5761107e6116d4565b1a60f81b828281518110611094576110946116d4565b60200101906001600160f81b03191690815f1a90535060049490941c936110ba816118e3565b905061104d565b5083156107a15760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610391565b5f81815260018301602052604081205461115557508154600181810184555f8481526020808220909301849055845484825282860190935260409020919091556102f6565b505f6102f6565b5f8181526001830160205260408120548015611236575f61117e6001836118f8565b85549091505f90611191906001906118f8565b90508181146111f0575f865f0182815481106111af576111af6116d4565b905f5260205f200154905080875f0184815481106111cf576111cf6116d4565b5f918252602080832090910192909255918252600188019052604090208390555b85548690806112015761120161190b565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f9055600193505050506102f6565b5f9150506102f6565b5f6107a18383611266565b5f8281526002840160205260408120829055610f61848461127d565b5f81815260018301602052604081205415156107a1565b5f6107a18383611110565b5f60208284031215611298575f5ffd5b81356001600160e01b0319811681146107a1575f5ffd5b5f602082840312156112bf575f5ffd5b5035919050565b80356001600160a01b03811681146112dc575f5ffd5b919050565b5f5f604083850312156112f2575f5ffd5b82359150611302602084016112c6565b90509250929050565b5f5f6040838503121561131c575f5ffd5b611325836112c6565b9150611302602084016112c6565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6107a16020830184611333565b5f8151808452602084019350602083015f5b828110156113bc576113a68683518051151582526020908101511515910152565b6040959095019460209190910190600101611385565b5093949350505050565b5f606082016060835280865180835260808501915060808160051b8601019250602088015f5b8281101561141d57607f19878603018452611408858351611333565b945060209384019391909101906001016113ec565b5050505082810360208401528085518083526020830191506020870192505f5b818110156114645783516001600160a01b031683526020938401939092019160010161143d565b505083810360408501526114788186611373565b979650505050505050565b5f5f60408385031215611494575f5ffd5b50508035926020909101359150565b5f5f83601f8401126114b3575f5ffd5b5081356001600160401b038111156114c9575f5ffd5b602083019150836020828501011115610877575f5ffd5b5f5f602083850312156114f1575f5ffd5b82356001600160401b03811115611506575f5ffd5b611512858286016114a3565b90969095509350505050565b6001600160a01b0383168152606081016107a160208301848051151582526020908101511515910152565b5f5f828403606081121561155b575f5ffd5b611564846112c6565b92506040601f1982011215611577575f5ffd5b506020830190509250929050565b5f5f83601f840112611595575f5ffd5b5081356001600160401b038111156115ab575f5ffd5b6020830191508360208260051b8501011115610877575f5ffd5b5f5f5f5f5f5f5f5f6080898b0312156115dc575f5ffd5b88356001600160401b038111156115f1575f5ffd5b6115fd8b828c01611585565b90995097505060208901356001600160401b0381111561161b575f5ffd5b8901601f81018b1361162b575f5ffd5b80356001600160401b03811115611640575f5ffd5b8b60208260061b8401011115611654575f5ffd5b6020919091019650945060408901356001600160401b03811115611676575f5ffd5b6116828b828c01611585565b90955093505060608901356001600160401b038111156116a0575f5ffd5b6116ac8b828c016114a3565b999c989b5096995094979396929594505050565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b8015158114610ab0575f5ffd5b8135611700816116e8565b815460ff19811691151560ff1691821783556020840135611720816116e8565b61ffff199190911690911790151560081b61ff001617905550565b60408101823561174a816116e8565b15158252602083013561175c816116e8565b80151560208401525092915050565b5f6020828403121561177b575f5ffd5b6107a1826112c6565b5f5f8335601e19843603018112611799575f5ffd5b8301803591506001600160401b038211156117b2575f5ffd5b602001915036819003821315610877575f5ffd5b805160208083015191908110156117e6575f198160200360031b1b821691505b50919050565b604081525f6117fe6040830186611333565b8281036020840152838152838560208301375f602085830101526020601f19601f860116820101915050949350505050565b5f81518060208401855e5f93019283525090919050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f6118786017830185611830565b7001034b99036b4b9b9b4b733903937b6329607d1b815261189c6011820185611830565b95945050505050565b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176102f6576102f66118a5565b808201808211156102f6576102f66118a5565b5f816118f1576118f16118a5565b505f190190565b818103818111156102f6576102f66118a5565b634e487b7160e01b5f52603160045260245ffdfea2646970667358221220a47383a6fc434b202a40d8ea6bc81334170b0fcf44b93b2046959eeb229e602a64736f6c634300081e0033", + Bin: "0x6080604052348015600e575f5ffd5b5060156019565b60d3565b5f54610100900460ff161560835760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff9081161460d1575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611955806100e05f395ff3fe608060405234801561000f575f5ffd5b5060043610610127575f3560e01c8063a217fddf116100a9578063d34663891161006e578063d346638914610286578063d547741f14610299578063e63ab1e9146102ac578063fb35b4e4146102b7578063fc434a8a146102bf575f5ffd5b8063a217fddf14610230578063a8091d9714610237578063af05a5c514610258578063bf40fac114610260578063ca15c87314610273575f5ffd5b806354fd4d50116100ef57806354fd4d50146101be578063595c6a67146101d35780638eec00b8146101db5780639010d07c146101f257806391d148541461021d575f5ffd5b806301ffc9a71461012b578063248a9ca3146101535780632f2ff15d1461018357806336568abe14610198578063485cc955146101ab575b5f5ffd5b61013e610139366004611288565b6102d2565b60405190151581526020015b60405180910390f35b6101756101613660046112af565b5f9081526065602052604090206001015490565b60405190815260200161014a565b6101966101913660046112e1565b6102fc565b005b6101966101a63660046112e1565b610325565b6101966101b936600461130b565b6103a8565b6101c66104c5565b60405161014a9190611361565b6101966104d7565b6101e36105b7565b60405161014a939291906113c6565b610205610200366004611483565b61078a565b6040516001600160a01b03909116815260200161014a565b61013e61022b3660046112e1565b6107a8565b6101755f81565b61024a6102453660046114e0565b6107d2565b60405161014a92919061151e565b6101c661087e565b61020561026e3660046114e0565b6108d5565b6101756102813660046112af565b61091a565b610196610294366004611549565b610930565b6101966102a73660046112e1565b6109a6565b610175600160f81b81565b6101756109ca565b6101966102cd3660046115c5565b6109d5565b5f6001600160e01b03198216635a05180f60e01b14806102f657506102f682610a72565b92915050565b5f8281526065602052604090206001015461031681610aa6565b6103208383610ab3565b505050565b6001600160a01b038116331461039a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6103a48282610ad4565b5050565b5f54610100900460ff16158080156103c657505f54600160ff909116105b806103df5750303b1580156103df57505f5460ff166001145b6104425760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610391565b5f805460ff191660011790558015610463575f805461ff0019166101001790555b61046d5f84610ab3565b61047b600160f81b83610ab3565b8015610320575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a1505050565b60606104d260c954610af5565b905090565b600160f81b6104e581610aa6565b5f6104ee6109ca565b90505f5b81811015610320575f61050660ca83610b32565b6001600160a01b0381165f90815260cd602090815260409182902082518084019093525460ff80821615801580865261010090930490911615159284019290925292945090925061055957508060200151155b156105ad57816001600160a01b031663595c6a676040518163ffffffff1660e01b81526004015f604051808303815f87803b158015610596575f5ffd5b505af11580156105a8573d5f5f3e3d5ffd5b505050505b50506001016104f2565b60608060605f6105c56109ca565b9050806001600160401b038111156105df576105df6116c0565b60405190808252806020026020018201604052801561061257816020015b60608152602001906001900390816105fd5790505b509350806001600160401b0381111561062d5761062d6116c0565b604051908082528060200260200182016040528015610656578160200160208202803683370190505b509250806001600160401b03811115610671576106716116c0565b6040519080825280602002602001820160405280156106b557816020015b604080518082019091525f808252602082015281526020019060019003908161068f5790505b5091505f5b81811015610783575f806106cf60ca84610b32565b90925090506106dd82610af5565b8784815181106106ef576106ef6116d4565b60200260200101819052508086848151811061070d5761070d6116d4565b6001600160a01b039283166020918202929092018101919091529082165f90815260cd825260409081902081518083019092525460ff8082161515835261010090910416151591810191909152855186908590811061076e5761076e6116d4565b602090810291909101015250506001016106ba565b5050909192565b5f8281526097602052604081206107a19083610b4d565b9392505050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b604080518082019091525f808252602082018190529061083761082f61082c86868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610b5892505050565b90565b60ca90610b95565b6001600160a01b0381165f90815260cd602090815260409182902082518084019093525460ff808216151584526101009091041615159082015290925090505b9250929050565b60605f61088c60c954610af5565b9050805f815181106108a0576108a06116d4565b016020908101516040516001600160f81b03199091169181019190915260210160405160208183030381529060405291505090565b5f6107a161082f61082c85858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610b5892505050565b5f8181526097602052604081206102f690610ba0565b5f61093a81610aa6565b6001600160a01b0383165f90815260cd60205260409020829061095d82826116f5565b905050826001600160a01b03167f6c5879ec82f910f6d12844857cfb8eb474dcecc9aa5b8257c7a77dcb42990e9d83604051610999919061173b565b60405180910390a2505050565b5f828152606560205260409020600101546109c081610aa6565b6103208383610ad4565b5f6104d260ca610ba9565b5f6109df81610aa6565b6109e98383610bb3565b5f5b88811015610a6657610a5e8a8a83818110610a0857610a086116d4565b9050602002016020810190610a1d919061176b565b898984818110610a2f57610a2f6116d4565b905060400201888885818110610a4757610a476116d4565b9050602002810190610a599190611784565b610c36565b6001016109eb565b50505050505050505050565b5f6001600160e01b03198216637965db0b60e01b14806102f657506301ffc9a760e01b6001600160e01b03198316146102f6565b610ab08133610cf1565b50565b610abd8282610d4a565b5f8281526097602052604090206103209082610dcf565b610ade8282610de3565b5f8281526097602052604090206103209082610e49565b60605f610b0183610e5d565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f808080610b408686610e84565b9097909650945050505050565b5f6107a18383610ead565b5f5f829050601f81511115610b82578260405163305a27a960e01b81526004016103919190611361565b8051610b8d826117c6565b179392505050565b5f6107a18383610ed3565b5f6102f6825490565b5f6102f682610f42565b5f610bbf60c954610af5565b9050610bff83838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610b5892505050565b60c9556040517f769656e5cb3218f54758f85bd184d41e987639374d6cb9e244439cc9d1abe1e2906104b8908390869086906117ec565b610c83610c7a61082c84848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610b5892505050565b60ca9086610f4c565b506001600160a01b0384165f90815260cd602052604090208390610ca782826116f5565b905050836001600160a01b03167f4e81e5495dbc85919bf1b9c12a9a4bb6d546f75d3f92fa0a36867fc29a51467c84604051610ce3919061173b565b60405180910390a250505050565b610cfb82826107a8565b6103a457610d0881610f69565b610d13836020610f7b565b604051602001610d24929190611847565b60408051601f198184030181529082905262461bcd60e51b825261039191600401611361565b610d5482826107a8565b6103a4575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610d8b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f6107a1836001600160a01b038416611110565b610ded82826107a8565b156103a4575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f6107a1836001600160a01b03841661115c565b5f60ff8216601f8111156102f657604051632cd44ac360e21b815260040160405180910390fd5b5f8080610e918585610b4d565b5f81815260029690960160205260409095205494959350505050565b5f825f018281548110610ec257610ec26116d4565b905f5260205f200154905092915050565b5f81815260028301602052604081205480151580610ef65750610ef6848461123f565b6107a15760405162461bcd60e51b815260206004820152601e60248201527f456e756d657261626c654d61703a206e6f6e6578697374656e74206b657900006044820152606401610391565b5f6102f682610ba0565b5f610f6184846001600160a01b03851661124a565b949350505050565b60606102f66001600160a01b03831660145b60605f610f898360026118b9565b610f949060026118d0565b6001600160401b03811115610fab57610fab6116c0565b6040519080825280601f01601f191660200182016040528015610fd5576020820181803683370190505b509050600360fc1b815f81518110610fef57610fef6116d4565b60200101906001600160f81b03191690815f1a905350600f60fb1b8160018151811061101d5761101d6116d4565b60200101906001600160f81b03191690815f1a9053505f61103f8460026118b9565b61104a9060016118d0565b90505b60018111156110c1576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061107e5761107e6116d4565b1a60f81b828281518110611094576110946116d4565b60200101906001600160f81b03191690815f1a90535060049490941c936110ba816118e3565b905061104d565b5083156107a15760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610391565b5f81815260018301602052604081205461115557508154600181810184555f8481526020808220909301849055845484825282860190935260409020919091556102f6565b505f6102f6565b5f8181526001830160205260408120548015611236575f61117e6001836118f8565b85549091505f90611191906001906118f8565b90508181146111f0575f865f0182815481106111af576111af6116d4565b905f5260205f200154905080875f0184815481106111cf576111cf6116d4565b5f918252602080832090910192909255918252600188019052604090208390555b85548690806112015761120161190b565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f9055600193505050506102f6565b5f9150506102f6565b5f6107a18383611266565b5f8281526002840160205260408120829055610f61848461127d565b5f81815260018301602052604081205415156107a1565b5f6107a18383611110565b5f60208284031215611298575f5ffd5b81356001600160e01b0319811681146107a1575f5ffd5b5f602082840312156112bf575f5ffd5b5035919050565b80356001600160a01b03811681146112dc575f5ffd5b919050565b5f5f604083850312156112f2575f5ffd5b82359150611302602084016112c6565b90509250929050565b5f5f6040838503121561131c575f5ffd5b611325836112c6565b9150611302602084016112c6565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6107a16020830184611333565b5f8151808452602084019350602083015f5b828110156113bc576113a68683518051151582526020908101511515910152565b6040959095019460209190910190600101611385565b5093949350505050565b5f606082016060835280865180835260808501915060808160051b8601019250602088015f5b8281101561141d57607f19878603018452611408858351611333565b945060209384019391909101906001016113ec565b5050505082810360208401528085518083526020830191506020870192505f5b818110156114645783516001600160a01b031683526020938401939092019160010161143d565b505083810360408501526114788186611373565b979650505050505050565b5f5f60408385031215611494575f5ffd5b50508035926020909101359150565b5f5f83601f8401126114b3575f5ffd5b5081356001600160401b038111156114c9575f5ffd5b602083019150836020828501011115610877575f5ffd5b5f5f602083850312156114f1575f5ffd5b82356001600160401b03811115611506575f5ffd5b611512858286016114a3565b90969095509350505050565b6001600160a01b0383168152606081016107a160208301848051151582526020908101511515910152565b5f5f828403606081121561155b575f5ffd5b611564846112c6565b92506040601f1982011215611577575f5ffd5b506020830190509250929050565b5f5f83601f840112611595575f5ffd5b5081356001600160401b038111156115ab575f5ffd5b6020830191508360208260051b8501011115610877575f5ffd5b5f5f5f5f5f5f5f5f6080898b0312156115dc575f5ffd5b88356001600160401b038111156115f1575f5ffd5b6115fd8b828c01611585565b90995097505060208901356001600160401b0381111561161b575f5ffd5b8901601f81018b1361162b575f5ffd5b80356001600160401b03811115611640575f5ffd5b8b60208260061b8401011115611654575f5ffd5b6020919091019650945060408901356001600160401b03811115611676575f5ffd5b6116828b828c01611585565b90955093505060608901356001600160401b038111156116a0575f5ffd5b6116ac8b828c016114a3565b999c989b5096995094979396929594505050565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b8015158114610ab0575f5ffd5b8135611700816116e8565b815460ff19811691151560ff1691821783556020840135611720816116e8565b61ffff199190911690911790151560081b61ff001617905550565b60408101823561174a816116e8565b15158252602083013561175c816116e8565b80151560208401525092915050565b5f6020828403121561177b575f5ffd5b6107a1826112c6565b5f5f8335601e19843603018112611799575f5ffd5b8301803591506001600160401b038211156117b2575f5ffd5b602001915036819003821315610877575f5ffd5b805160208083015191908110156117e6575f198160200360031b1b821691505b50919050565b604081525f6117fe6040830186611333565b8281036020840152838152838560208301375f602085830101526020601f19601f860116820101915050949350505050565b5f81518060208401855e5f93019283525090919050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f6118786017830185611830565b7001034b99036b4b9b9b4b733903937b6329607d1b815261189c6011820185611830565b95945050505050565b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176102f6576102f66118a5565b808201808211156102f6576102f66118a5565b5f816118f1576118f16118a5565b505f190190565b818103818111156102f6576102f66118a5565b634e487b7160e01b5f52603160045260245ffdfea2646970667358221220edb6de478bdf3c2193a1dcec03841ab888059eb629b24632faa34cd3556629f764736f6c634300081e0033", } // ProtocolRegistryABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/ReleaseManager/binding.go b/pkg/bindings/ReleaseManager/binding.go index 2219009ec4..27168a1c13 100644 --- a/pkg/bindings/ReleaseManager/binding.go +++ b/pkg/bindings/ReleaseManager/binding.go @@ -50,7 +50,7 @@ type OperatorSet struct { // ReleaseManagerMetaData contains all meta data concerning the ReleaseManager contract. var ReleaseManagerMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_permissionController\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getLatestRelease\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIReleaseManagerTypes.Release\",\"components\":[{\"name\":\"artifacts\",\"type\":\"tuple[]\",\"internalType\":\"structIReleaseManagerTypes.Artifact[]\",\"components\":[{\"name\":\"digest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"registry\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"upgradeByTime\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getLatestUpgradeByTime\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMetadataURI\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRelease\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"releaseId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIReleaseManagerTypes.Release\",\"components\":[{\"name\":\"artifacts\",\"type\":\"tuple[]\",\"internalType\":\"structIReleaseManagerTypes.Artifact[]\",\"components\":[{\"name\":\"digest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"registry\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"upgradeByTime\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalReleases\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isValidRelease\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"releaseId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"permissionController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"publishMetadataURI\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"publishRelease\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"release\",\"type\":\"tuple\",\"internalType\":\"structIReleaseManagerTypes.Release\",\"components\":[{\"name\":\"artifacts\",\"type\":\"tuple[]\",\"internalType\":\"structIReleaseManagerTypes.Artifact[]\",\"components\":[{\"name\":\"digest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"registry\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"upgradeByTime\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"releaseId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MetadataURIPublished\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":true,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"metadataURI\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ReleasePublished\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":true,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"releaseId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"release\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIReleaseManagerTypes.Release\",\"components\":[{\"name\":\"artifacts\",\"type\":\"tuple[]\",\"internalType\":\"structIReleaseManagerTypes.Artifact[]\",\"components\":[{\"name\":\"digest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"registry\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"upgradeByTime\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"InvalidMetadataURI\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidPermissions\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidUpgradeByTime\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"MustPublishMetadataURI\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoReleases\",\"inputs\":[]}]", - Bin: "0x60a060405234801561000f575f5ffd5b5060405161146238038061146283398101604081905261002e91610105565b6001600160a01b038116608052610043610049565b50610132565b5f54610100900460ff16156100b45760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610103575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b5f60208284031215610115575f5ffd5b81516001600160a01b038116811461012b575f5ffd5b9392505050565b6080516113126101505f395f818160c2015261095a01526113125ff3fe608060405234801561000f575f5ffd5b5060043610610090575f3560e01c806366f409f71161006357806366f409f7146101345780637c09ea8214610155578063a9e0ed6814610168578063b053b56d14610190578063d30eeb88146101b0575f5ffd5b80633acab5fc146100945780634657e26a146100bd5780634840a67c146100fc578063517e406814610111575b5f5ffd5b6100a76100a2366004610a6f565b6101d1565b6040516100b49190610b5b565b60405180910390f35b6100e47f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b4565b61010f61010a366004610b8a565b610335565b005b61012461011f366004610a6f565b6103f8565b60405190151581526020016100b4565b610147610142366004610c09565b61043a565b6040519081526020016100b4565b610147610163366004610c23565b61045d565b61017b610176366004610c09565b6105b9565b60405163ffffffff90911681526020016100b4565b6101a361019e366004610c09565b61063f565b6040516100b49190610c6f565b6101c36101be366004610c09565b6106e8565b6040516100b4929190610c81565b60408051808201909152606081525f602082015260015f6101f185610890565b81526020019081526020015f20828154811061020f5761020f610ca1565b905f5260205f2090600202016040518060400160405290815f8201805480602002602001604051908101604052809291908181526020015f905b82821015610312578382905f5260205f2090600202016040518060400160405290815f820154815260200160018201805461028390610cb5565b80601f01602080910402602001604051908101604052809291908181526020018280546102af90610cb5565b80156102fa5780601f106102d1576101008083540402835291602001916102fa565b820191905f5260205f20905b8154815290600101906020018083116102dd57829003601f168201915b50505050508152505081526020019060010190610249565b505050908252506001919091015463ffffffff1660209091015290505b92915050565b6103426020840184610ce7565b61034b816108f3565b5f82900361036c57604051630eec403f60e41b815260040160405180910390fd5b828260025f610388610383368a90038a018a610c09565b610890565b81526020019081526020015f2091826103a2929190610d57565b50836040516103b19190610e11565b60405180910390207f209e95fbe8dd14c5e1fbf791ee0a83234f45f20cb85504c7068d5ca0d622458884846040516103ea929190610e70565b60405180910390a250505050565b5f5f6104038461043a565b90505f811161042557604051637a31a0a160e11b815260040160405180910390fd5b610430600182610e97565b9092149392505050565b5f60015f61044784610890565b815260208101919091526040015f205492915050565b5f61046b6020840184610ce7565b610474816108f3565b5f60018161048a61038336899003890189610c09565b81526020019081526020015f20905060025f6104b0878036038101906103839190610c09565b81526020019081526020015f2080546104c890610cb5565b90505f036104e95760405163413e6e5760e11b815260040160405180910390fd5b6104f96040850160208601610eaa565b63ffffffff1615806105205750426105176040860160208701610eaa565b63ffffffff1610155b61053d5760405163325ec75f60e01b815260040160405180910390fd5b80546001810182555f82815260209020909350849060028502016105618282610fe8565b505082856040516105729190610e11565b60405180910390207f2decd15222f7c4a8c3d4d2e14dcfdc5a0b52eb2d4b81796bfd010ee5cd972fd3866040516105a99190611173565b60405180910390a3505092915050565b5f5f60015f6105c785610890565b81526020019081526020015f2090505f8180549050116105fa57604051637a31a0a160e11b815260040160405180910390fd5b80545f9061060a90600190610e97565b905081818154811061061e5761061e610ca1565b5f91825260209091206001600290920201015463ffffffff16949350505050565b606060025f61064d84610890565b81526020019081526020015f20805461066590610cb5565b80601f016020809104026020016040519081016040528092919081815260200182805461069190610cb5565b80156106dc5780601f106106b3576101008083540402835291602001916106dc565b820191905f5260205f20905b8154815290600101906020018083116106bf57829003601f168201915b50505050509050919050565b60408051808201909152606081525f60208201819052905f60015f61070c86610890565b81526020019081526020015f2090505f81805490501161073f57604051637a31a0a160e11b815260040160405180910390fd5b80545f9061074f90600190610e97565b90508082828154811061076457610764610ca1565b905f5260205f209060020201806040518060400160405290815f8201805480602002602001604051908101604052809291908181526020015f905b82821015610868578382905f5260205f2090600202016040518060400160405290815f82015481526020016001820180546107d990610cb5565b80601f016020809104026020016040519081016040528092919081815260200182805461080590610cb5565b80156108505780601f1061082757610100808354040283529160200191610850565b820191905f5260205f20905b81548152906001019060200180831161083357829003601f168201915b5050505050815250508152602001906001019061079f565b505050908252506001919091015463ffffffff16602090910152919791965090945050505050565b5f815f0151826020015163ffffffff166040516020016108db92919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b60405160208183030381529060405261032f9061129a565b6108fc8161091c565b6109195760405163932d94f760e01b815260040160405180910390fd5b50565b604051631beb2b9760e31b81526001600160a01b0382811660048301523360248301523060448301525f80356001600160e01b0319166064840152917f00000000000000000000000000000000000000000000000000000000000000009091169063df595cb890608401602060405180830381865afa1580156109a1573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061032f91906112bd565b634e487b7160e01b5f52604160045260245ffd5b80356001600160a01b03811681146109ef575f5ffd5b919050565b63ffffffff81168114610919575f5ffd5b80356109ef816109f4565b5f60408284031215610a20575f5ffd5b6040516040810181811067ffffffffffffffff82111715610a4357610a436109c5565b604052905080610a52836109d9565b81526020830135610a62816109f4565b6020919091015292915050565b5f5f60608385031215610a80575f5ffd5b610a8a8484610a10565b946040939093013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f6040830182516040855281815180845260608701915060608160051b88010193506020830192505f5b81811015610b3857605f198886030183528351805186526020810151905060406020870152610b226040870182610a98565b9550506020938401939290920191600101610af0565b505050506020830151610b53602086018263ffffffff169052565b509392505050565b602081525f610b6d6020830184610ac6565b9392505050565b5f60408284031215610b84575f5ffd5b50919050565b5f5f5f60608486031215610b9c575f5ffd5b610ba68585610b74565b9250604084013567ffffffffffffffff811115610bc1575f5ffd5b8401601f81018613610bd1575f5ffd5b803567ffffffffffffffff811115610be7575f5ffd5b866020828401011115610bf8575f5ffd5b939660209190910195509293505050565b5f60408284031215610c19575f5ffd5b610b6d8383610a10565b5f5f60608385031215610c34575f5ffd5b610c3e8484610b74565b9150604083013567ffffffffffffffff811115610c59575f5ffd5b610c6585828601610b74565b9150509250929050565b602081525f610b6d6020830184610a98565b828152604060208201525f610c996040830184610ac6565b949350505050565b634e487b7160e01b5f52603260045260245ffd5b600181811c90821680610cc957607f821691505b602082108103610b8457634e487b7160e01b5f52602260045260245ffd5b5f60208284031215610cf7575f5ffd5b610b6d826109d9565b5b81811015610d14575f8155600101610d01565b5050565b601f821115610d5257805f5260205f20601f840160051c81016020851015610d3d5750805b610d4f601f850160051c830182610d00565b50505b505050565b67ffffffffffffffff831115610d6f57610d6f6109c5565b610d8383610d7d8354610cb5565b83610d18565b5f601f841160018114610db4575f8515610d9d5750838201355b5f19600387901b1c1916600186901b178355610d4f565b5f83815260208120601f198716915b82811015610de35786850135825560209485019460019092019101610dc3565b5086821015610dff575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6001600160a01b03610e22836109d9565b1681525f6020830135610e34816109f4565b63ffffffff16602083015250604001919050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b602081525f610c99602083018486610e48565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561032f5761032f610e83565b5f60208284031215610eba575f5ffd5b8135610b6d816109f4565b5f8235603e19833603018112610ed9575f5ffd5b9190910192915050565b81358155600181016020830135601e19843603018112610f01575f5ffd5b8301803567ffffffffffffffff81118015610f1a575f5ffd5b813603602084011315610f2b575f5ffd5b5f905050610f4381610f3d8554610cb5565b85610d18565b5f601f821160018114610f77575f8315610f605750838201602001355b5f19600385901b1c1916600184901b178555610fd3565b5f85815260208120601f198516915b82811015610fa857602085880181013583559485019460019092019101610f86565b5084821015610fc7575f1960f88660031b161c19602085880101351681555b505060018360011b0185555b50505050505050565b5f813561032f816109f4565b8135601e19833603018112610ffb575f5ffd5b8201803567ffffffffffffffff811115611013575f5ffd5b6020820191508060051b360382131561102a575f5ffd5b68010000000000000000811115611043576110436109c5565b825481845580821015611107576001600160ff1b038116811461106857611068610e83565b6001600160ff1b038216821461108057611080610e83565b835f5260205f208160011b81018360011b820191505b80821015611104575f82556001820180546110b090610cb5565b80156110f757601f8111600181146110ca575f83556110f5565b5f838152602090206110e7601f840160051c820160018301610d00565b505f83815260208120818555555b505b5050600282019150611096565b50505b505f8381526020812083915b838110156111445761112e6111288487610ec5565b83610ee3565b6020929092019160029190910190600101611113565b5050505050610d1461115860208401610fdc565b6001830163ffffffff821663ffffffff198254161781555050565b602081525f606082018335601e1985360301811261118f575f5ffd5b840180356020820167ffffffffffffffff8211156111ab575f5ffd5b8160051b8036038213156111bd575f5ffd5b604060208801529382905260809386018401935f908701605e1936869003015b8483101561127757888703607f1901825283358181126111fb575f5ffd5b860160208101358852604081013536829003603e1901811261121b575f5ffd5b0160408101906020013567ffffffffffffffff811115611239575f5ffd5b803603821315611247575f5ffd5b604060208a015261125c60408a018284610e48565b985050506020840193506020820191506001830192506111dd565b50505050505061128960208501610a05565b63ffffffff81166040850152610b53565b80516020808301519190811015610b84575f1960209190910360031b1b16919050565b5f602082840312156112cd575f5ffd5b81518015158114610b6d575f5ffdfea2646970667358221220a0dc8b14f16eeefb9026f29c70a2440dc94429f85af267781cee6901cfe7ae5264736f6c634300081e0033", + Bin: "0x60a060405234801561000f575f5ffd5b5060405161146238038061146283398101604081905261002e91610105565b6001600160a01b038116608052610043610049565b50610132565b5f54610100900460ff16156100b45760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610103575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b5f60208284031215610115575f5ffd5b81516001600160a01b038116811461012b575f5ffd5b9392505050565b6080516113126101505f395f818160c2015261095a01526113125ff3fe608060405234801561000f575f5ffd5b5060043610610090575f3560e01c806366f409f71161006357806366f409f7146101345780637c09ea8214610155578063a9e0ed6814610168578063b053b56d14610190578063d30eeb88146101b0575f5ffd5b80633acab5fc146100945780634657e26a146100bd5780634840a67c146100fc578063517e406814610111575b5f5ffd5b6100a76100a2366004610a6f565b6101d1565b6040516100b49190610b5b565b60405180910390f35b6100e47f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b4565b61010f61010a366004610b8a565b610335565b005b61012461011f366004610a6f565b6103f8565b60405190151581526020016100b4565b610147610142366004610c09565b61043a565b6040519081526020016100b4565b610147610163366004610c23565b61045d565b61017b610176366004610c09565b6105b9565b60405163ffffffff90911681526020016100b4565b6101a361019e366004610c09565b61063f565b6040516100b49190610c6f565b6101c36101be366004610c09565b6106e8565b6040516100b4929190610c81565b60408051808201909152606081525f602082015260015f6101f185610890565b81526020019081526020015f20828154811061020f5761020f610ca1565b905f5260205f2090600202016040518060400160405290815f8201805480602002602001604051908101604052809291908181526020015f905b82821015610312578382905f5260205f2090600202016040518060400160405290815f820154815260200160018201805461028390610cb5565b80601f01602080910402602001604051908101604052809291908181526020018280546102af90610cb5565b80156102fa5780601f106102d1576101008083540402835291602001916102fa565b820191905f5260205f20905b8154815290600101906020018083116102dd57829003601f168201915b50505050508152505081526020019060010190610249565b505050908252506001919091015463ffffffff1660209091015290505b92915050565b6103426020840184610ce7565b61034b816108f3565b5f82900361036c57604051630eec403f60e41b815260040160405180910390fd5b828260025f610388610383368a90038a018a610c09565b610890565b81526020019081526020015f2091826103a2929190610d57565b50836040516103b19190610e11565b60405180910390207f209e95fbe8dd14c5e1fbf791ee0a83234f45f20cb85504c7068d5ca0d622458884846040516103ea929190610e70565b60405180910390a250505050565b5f5f6104038461043a565b90505f811161042557604051637a31a0a160e11b815260040160405180910390fd5b610430600182610e97565b9092149392505050565b5f60015f61044784610890565b815260208101919091526040015f205492915050565b5f61046b6020840184610ce7565b610474816108f3565b5f60018161048a61038336899003890189610c09565b81526020019081526020015f20905060025f6104b0878036038101906103839190610c09565b81526020019081526020015f2080546104c890610cb5565b90505f036104e95760405163413e6e5760e11b815260040160405180910390fd5b6104f96040850160208601610eaa565b63ffffffff1615806105205750426105176040860160208701610eaa565b63ffffffff1610155b61053d5760405163325ec75f60e01b815260040160405180910390fd5b80546001810182555f82815260209020909350849060028502016105618282610fe8565b505082856040516105729190610e11565b60405180910390207f2decd15222f7c4a8c3d4d2e14dcfdc5a0b52eb2d4b81796bfd010ee5cd972fd3866040516105a99190611173565b60405180910390a3505092915050565b5f5f60015f6105c785610890565b81526020019081526020015f2090505f8180549050116105fa57604051637a31a0a160e11b815260040160405180910390fd5b80545f9061060a90600190610e97565b905081818154811061061e5761061e610ca1565b5f91825260209091206001600290920201015463ffffffff16949350505050565b606060025f61064d84610890565b81526020019081526020015f20805461066590610cb5565b80601f016020809104026020016040519081016040528092919081815260200182805461069190610cb5565b80156106dc5780601f106106b3576101008083540402835291602001916106dc565b820191905f5260205f20905b8154815290600101906020018083116106bf57829003601f168201915b50505050509050919050565b60408051808201909152606081525f60208201819052905f60015f61070c86610890565b81526020019081526020015f2090505f81805490501161073f57604051637a31a0a160e11b815260040160405180910390fd5b80545f9061074f90600190610e97565b90508082828154811061076457610764610ca1565b905f5260205f209060020201806040518060400160405290815f8201805480602002602001604051908101604052809291908181526020015f905b82821015610868578382905f5260205f2090600202016040518060400160405290815f82015481526020016001820180546107d990610cb5565b80601f016020809104026020016040519081016040528092919081815260200182805461080590610cb5565b80156108505780601f1061082757610100808354040283529160200191610850565b820191905f5260205f20905b81548152906001019060200180831161083357829003601f168201915b5050505050815250508152602001906001019061079f565b505050908252506001919091015463ffffffff16602090910152919791965090945050505050565b5f815f0151826020015163ffffffff166040516020016108db92919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b60405160208183030381529060405261032f9061129a565b6108fc8161091c565b6109195760405163932d94f760e01b815260040160405180910390fd5b50565b604051631beb2b9760e31b81526001600160a01b0382811660048301523360248301523060448301525f80356001600160e01b0319166064840152917f00000000000000000000000000000000000000000000000000000000000000009091169063df595cb890608401602060405180830381865afa1580156109a1573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061032f91906112bd565b634e487b7160e01b5f52604160045260245ffd5b80356001600160a01b03811681146109ef575f5ffd5b919050565b63ffffffff81168114610919575f5ffd5b80356109ef816109f4565b5f60408284031215610a20575f5ffd5b6040516040810181811067ffffffffffffffff82111715610a4357610a436109c5565b604052905080610a52836109d9565b81526020830135610a62816109f4565b6020919091015292915050565b5f5f60608385031215610a80575f5ffd5b610a8a8484610a10565b946040939093013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f6040830182516040855281815180845260608701915060608160051b88010193506020830192505f5b81811015610b3857605f198886030183528351805186526020810151905060406020870152610b226040870182610a98565b9550506020938401939290920191600101610af0565b505050506020830151610b53602086018263ffffffff169052565b509392505050565b602081525f610b6d6020830184610ac6565b9392505050565b5f60408284031215610b84575f5ffd5b50919050565b5f5f5f60608486031215610b9c575f5ffd5b610ba68585610b74565b9250604084013567ffffffffffffffff811115610bc1575f5ffd5b8401601f81018613610bd1575f5ffd5b803567ffffffffffffffff811115610be7575f5ffd5b866020828401011115610bf8575f5ffd5b939660209190910195509293505050565b5f60408284031215610c19575f5ffd5b610b6d8383610a10565b5f5f60608385031215610c34575f5ffd5b610c3e8484610b74565b9150604083013567ffffffffffffffff811115610c59575f5ffd5b610c6585828601610b74565b9150509250929050565b602081525f610b6d6020830184610a98565b828152604060208201525f610c996040830184610ac6565b949350505050565b634e487b7160e01b5f52603260045260245ffd5b600181811c90821680610cc957607f821691505b602082108103610b8457634e487b7160e01b5f52602260045260245ffd5b5f60208284031215610cf7575f5ffd5b610b6d826109d9565b5b81811015610d14575f8155600101610d01565b5050565b601f821115610d5257805f5260205f20601f840160051c81016020851015610d3d5750805b610d4f601f850160051c830182610d00565b50505b505050565b67ffffffffffffffff831115610d6f57610d6f6109c5565b610d8383610d7d8354610cb5565b83610d18565b5f601f841160018114610db4575f8515610d9d5750838201355b5f19600387901b1c1916600186901b178355610d4f565b5f83815260208120601f198716915b82811015610de35786850135825560209485019460019092019101610dc3565b5086821015610dff575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6001600160a01b03610e22836109d9565b1681525f6020830135610e34816109f4565b63ffffffff16602083015250604001919050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b602081525f610c99602083018486610e48565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561032f5761032f610e83565b5f60208284031215610eba575f5ffd5b8135610b6d816109f4565b5f8235603e19833603018112610ed9575f5ffd5b9190910192915050565b81358155600181016020830135601e19843603018112610f01575f5ffd5b8301803567ffffffffffffffff81118015610f1a575f5ffd5b813603602084011315610f2b575f5ffd5b5f905050610f4381610f3d8554610cb5565b85610d18565b5f601f821160018114610f77575f8315610f605750838201602001355b5f19600385901b1c1916600184901b178555610fd3565b5f85815260208120601f198516915b82811015610fa857602085880181013583559485019460019092019101610f86565b5084821015610fc7575f1960f88660031b161c19602085880101351681555b505060018360011b0185555b50505050505050565b5f813561032f816109f4565b8135601e19833603018112610ffb575f5ffd5b8201803567ffffffffffffffff811115611013575f5ffd5b6020820191508060051b360382131561102a575f5ffd5b68010000000000000000811115611043576110436109c5565b825481845580821015611107576001600160ff1b038116811461106857611068610e83565b6001600160ff1b038216821461108057611080610e83565b835f5260205f208160011b81018360011b820191505b80821015611104575f82556001820180546110b090610cb5565b80156110f757601f8111600181146110ca575f83556110f5565b5f838152602090206110e7601f840160051c820160018301610d00565b505f83815260208120818555555b505b5050600282019150611096565b50505b505f8381526020812083915b838110156111445761112e6111288487610ec5565b83610ee3565b6020929092019160029190910190600101611113565b5050505050610d1461115860208401610fdc565b6001830163ffffffff821663ffffffff198254161781555050565b602081525f606082018335601e1985360301811261118f575f5ffd5b840180356020820167ffffffffffffffff8211156111ab575f5ffd5b8160051b8036038213156111bd575f5ffd5b604060208801529382905260809386018401935f908701605e1936869003015b8483101561127757888703607f1901825283358181126111fb575f5ffd5b860160208101358852604081013536829003603e1901811261121b575f5ffd5b0160408101906020013567ffffffffffffffff811115611239575f5ffd5b803603821315611247575f5ffd5b604060208a015261125c60408a018284610e48565b985050506020840193506020820191506001830192506111dd565b50505050505061128960208501610a05565b63ffffffff81166040850152610b53565b80516020808301519190811015610b84575f1960209190910360031b1b16919050565b5f602082840312156112cd575f5ffd5b81518015158114610b6d575f5ffdfea264697066735822122005612e05e63b4f904e703ae970fa68ac728005f1ec5704420bf10d481e10d8da64736f6c634300081e0033", } // ReleaseManagerABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/TaskMailbox/binding.go b/pkg/bindings/TaskMailbox/binding.go index 4df57d68d5..c9b75fb2ba 100644 --- a/pkg/bindings/TaskMailbox/binding.go +++ b/pkg/bindings/TaskMailbox/binding.go @@ -121,7 +121,7 @@ type OperatorSet struct { // TaskMailboxMetaData contains all meta data concerning the TaskMailbox contract. var TaskMailboxMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_bn254CertificateVerifier\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_ecdsaCertificateVerifier\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_maxTaskSLA\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"BN254_CERTIFICATE_VERIFIER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ECDSA_CERTIFICATE_VERIFIER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_TASK_SLA\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"createTask\",\"inputs\":[{\"name\":\"taskParams\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.TaskParams\",\"components\":[{\"name\":\"refundCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"executorOperatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"payload\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"feeSplit\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"feeSplitCollector\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBN254CertificateBytes\",\"inputs\":[{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getECDSACertificateBytes\",\"inputs\":[{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getExecutorOperatorSetTaskConfig\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.ExecutorOperatorSetTaskConfig\",\"components\":[{\"name\":\"taskHook\",\"type\":\"address\",\"internalType\":\"contractIAVSTaskHook\"},{\"name\":\"taskSLA\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"feeToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"feeCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"consensus\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Consensus\",\"components\":[{\"name\":\"consensusType\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.ConsensusType\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"taskMetadata\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMessageHash\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"result\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getTaskInfo\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Task\",\"components\":[{\"name\":\"creator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"creationTime\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"avsFee\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"refundCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"feeSplit\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.TaskStatus\"},{\"name\":\"isFeeRefunded\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"operatorTableReferenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"executorOperatorSetTaskConfig\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.ExecutorOperatorSetTaskConfig\",\"components\":[{\"name\":\"taskHook\",\"type\":\"address\",\"internalType\":\"contractIAVSTaskHook\"},{\"name\":\"taskSLA\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"feeToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"feeCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"consensus\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Consensus\",\"components\":[{\"name\":\"consensusType\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.ConsensusType\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"taskMetadata\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"payload\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"executorCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"result\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTaskResult\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTaskStatus\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.TaskStatus\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_feeSplit\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"_feeSplitCollector\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isExecutorOperatorSetRegistered\",\"inputs\":[{\"name\":\"operatorSetKey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"isRegistered\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"refundFee\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registerExecutorOperatorSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"isRegistered\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setExecutorOperatorSetTaskConfig\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"config\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.ExecutorOperatorSetTaskConfig\",\"components\":[{\"name\":\"taskHook\",\"type\":\"address\",\"internalType\":\"contractIAVSTaskHook\"},{\"name\":\"taskSLA\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"feeToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"feeCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"consensus\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Consensus\",\"components\":[{\"name\":\"consensusType\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.ConsensusType\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"taskMetadata\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setFeeSplit\",\"inputs\":[{\"name\":\"_feeSplit\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setFeeSplitCollector\",\"inputs\":[{\"name\":\"_feeSplitCollector\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"submitResult\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"executorCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"result\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"ExecutorOperatorSetRegistered\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"isRegistered\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ExecutorOperatorSetTaskConfigSet\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"config\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structITaskMailboxTypes.ExecutorOperatorSetTaskConfig\",\"components\":[{\"name\":\"taskHook\",\"type\":\"address\",\"internalType\":\"contractIAVSTaskHook\"},{\"name\":\"taskSLA\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"feeToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"feeCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"consensus\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Consensus\",\"components\":[{\"name\":\"consensusType\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.ConsensusType\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"taskMetadata\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeeRefunded\",\"inputs\":[{\"name\":\"refundCollector\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"taskHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"avsFee\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeeSplitCollectorSet\",\"inputs\":[{\"name\":\"feeSplitCollector\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeeSplitSet\",\"inputs\":[{\"name\":\"feeSplit\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"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\":\"TaskCreated\",\"inputs\":[{\"name\":\"creator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"taskHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorTableReferenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"refundCollector\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"avsFee\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"taskDeadline\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"payload\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TaskVerified\",\"inputs\":[{\"name\":\"aggregator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"taskHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"executorCert\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"result\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EmptyCertificateSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExecutorOperatorSetNotRegistered\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExecutorOperatorSetTaskConfigNotSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FeeAlreadyRefunded\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidConsensusType\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidConsensusValue\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCurveType\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidFeeReceiver\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidFeeSplit\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidMessageHash\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorSetOwner\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidReferenceTimestamp\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidTaskCreator\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidTaskStatus\",\"inputs\":[{\"name\":\"expected\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.TaskStatus\"},{\"name\":\"actual\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.TaskStatus\"}]},{\"type\":\"error\",\"name\":\"OnlyRefundCollector\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"PayloadIsEmpty\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TaskSLAExceedsMaximum\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ThresholdNotMet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TimestampAtCreation\",\"inputs\":[]}]", - Bin: "0x60e060405234801561000f575f5ffd5b50604051615afb380380615afb83398101604081905261002e91610135565b6001600160a01b03808416608052821660a0526001600160601b03811660c05261005661005e565b505050610185565b5f54610100900460ff16156100c95760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610118575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b80516001600160a01b0381168114610130575f5ffd5b919050565b5f5f5f60608486031215610147575f5ffd5b6101508461011a565b925061015e6020850161011a565b60408501519092506001600160601b038116811461017a575f5ffd5b809150509250925092565b60805160a05160c05161591b6101e05f395f81816103450152612ece01525f81816102650152818161323d015281816138120152613a3501525f81816103aa015281816131fd015281816137400152613962015261591b5ff3fe608060405234801561000f575f5ffd5b5060043610610153575f3560e01c8063678fbdb3116100bf578063b869416611610079578063b86941661461032d578063d3e043aa14610340578063f2fde38b1461037f578063f741e81a14610392578063f7424fc9146103a5578063fa2c0b37146103cc575f5ffd5b8063678fbdb3146102bb5780636bf6fad5146102ce578063708c0db9146102ee578063715018a6146103015780638da5cb5b14610309578063a5fabc811461031a575f5ffd5b8063468c07a011610110578063468c07a01461021857806349acd8841461022d5780634ad52e021461024057806354743ad21461026057806362fee037146102875780636373ea691461029a575f5ffd5b80631270a892146101575780631a20c505146101805780631ae370eb146101b15780631fb66f5d146101c45780632bf6cc79146101e557806337eaa10414610205575b5f5ffd5b61016a6101653660046141bb565b6103fe565b6040516101779190614270565b60405180910390f35b609b54610199906201000090046001600160a01b031681565b6040516001600160a01b039091168152602001610177565b61016a6101bf3660046144cd565b610427565b6101d76101d236600461460c565b61043a565b604051908152602001610177565b6101f86101f3366004614681565b610de3565b60405161017791906146c0565b6101d76102133660046146ce565b61128f565b61022b610226366004614720565b6112c2565b005b61022b61023b366004614748565b6112d6565b61025361024e366004614681565b611521565b6040516101779190614864565b6101997f000000000000000000000000000000000000000000000000000000000000000081565b61016a610295366004614681565b611aba565b609b546102a89061ffff1681565b60405161ffff9091168152602001610177565b61022b6102c93660046149af565b611fb7565b6102e16102dc3660046149ca565b611fc8565b60405161017791906149e4565b61022b6102fc3660046149f6565b6121dc565b61022b61230d565b6033546001600160a01b0316610199565b61022b610328366004614a3e565b612320565b61022b61033b366004614681565b612bfe565b6103677f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160601b039091168152602001610177565b61022b61038d3660046149af565b612e30565b61022b6103a0366004614b30565b612ea6565b6101997f000000000000000000000000000000000000000000000000000000000000000081565b6103ee6103da366004614681565b60996020525f908152604090205460ff1681565b6040519015158152602001610177565b6060816040516020016104119190614c5b565b6040516020818303038152906040529050919050565b6060816040516020016104119190614ddf565b5f6104436130db565b5f8260400151511161046857604051636b1a1b6960e11b815260040160405180910390fd5b60995f6104788460200151613134565b815260208101919091526040015f205460ff166104a85760405163c292b29760e01b815260040160405180910390fd5b5f609a5f6104b98560200151613134565b815260208082019290925260409081015f20815160e08101835281546001600160a01b038082168352600160a01b918290046001600160601b03169583019590955260018301549485169382019390935292909160608401910460ff16600281111561052757610527614698565b600281111561053857610538614698565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff16600181111561057957610579614698565b600181111561058a5761058a614698565b815260200160018201805461059e90614df1565b80601f01602080910402602001604051908101604052809291908181526020018280546105ca90614df1565b80156106155780601f106105ec57610100808354040283529160200191610615565b820191905f5260205f20905b8154815290600101906020018083116105f857829003601f168201915b505050505081525050815260200160058201805461063290614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461065e90614df1565b80156106a95780601f10610680576101008083540402835291602001916106a9565b820191905f5260205f20905b81548152906001019060200180831161068c57829003601f168201915b50505050508152505090506106bd81613197565b6106da576040516314b0a41d60e11b815260040160405180910390fd5b5f6106e882606001516131e0565b90505f816001600160a01b0316635ddb9b5b86602001516040518263ffffffff1660e01b815260040161071b9190614e47565b602060405180830381865afa158015610736573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061075a9190614e55565b90505f826001600160a01b0316636141879e87602001516040518263ffffffff1660e01b815260040161078d9190614e47565b602060405180830381865afa1580156107a8573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107cc9190614e55565b905063ffffffff8116158061080857506107e68183614e84565b63ffffffff1684602001516001600160601b0316426108059190614ea0565b11155b6108255760405163640fcd6b60e11b815260040160405180910390fd5b508251604051630a3fc61360e31b81526001600160a01b03909116906351fe3098906108579033908990600401614eee565b5f6040518083038186803b15801561086d575f5ffd5b505afa15801561087f573d5f5f3e3d5ffd5b50508451604051637036693f60e11b81525f93506001600160a01b03909116915063e06cd27e906108b4908990600401614f11565b602060405180830381865afa1580156108cf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108f39190614f23565b90505f60975430468960405160200161090f9493929190614f3e565b60405160208183030381529060405280519060200120905060975460016109369190614ea0565b609755604080516101c08101909152338152602081016109554261327a565b6001600160601b03908116825260208a81018051516001600160a01b039081168386015292871660408501528b5190921660608401529051015163ffffffff166080820152609b5461ffff1660a082015260c001600181525f602080830182905263ffffffff80881660408086019190915260608086018c90528d8201516080808801919091528251808601845286815260a0808901919091528351808701855287815260c09889015289875260988652958390208851958901516001600160601b03908116600160a01b9081026001600160a01b03988916178355948a0151938a0151168402928616929092176001830155870151600282018054968901519789015161ffff16600160c01b0261ffff60c01b19989095169093026001600160c01b0319909616941693909317939093179384168117835560e0850151919391929160ff60d01b1990911662ffffff60c01b1990911617600160d01b836003811115610ac457610ac4614698565b02179055506101008201516002808301805461012086015163ffffffff16600160e01b026001600160e01b03941515600160d81b02949094166001600160d81b039091161792909217909155610140830151805160208201516001600160601b0316600160a01b9081026001600160a01b0392831617600386019081556040840151600487018054919094166001600160a01b031982168117855560608601519596929594936001600160a81b031990921617918490811115610b8957610b89614698565b021790555060808201516002820180546001600160a01b0319166001600160a01b0390921691909117905560a08201518051600383018054909190829060ff191660018381811115610bdd57610bdd614698565b021790555060208201516001820190610bf69082614fbf565b50505060c08201516005820190610c0d9082614fbf565b5050506101608201516009820190610c259082614fbf565b50610180820151600a820190610c3b9082614fbf565b506101a0820151600b820190610c519082614fbf565b50505060408501516001600160a01b031615801590610c7857505f826001600160601b0316115b15610cf35760808501516001600160a01b0316610ca857604051633480121760e21b815260040160405180910390fd5b86516001600160a01b0316610cd057604051633480121760e21b815260040160405180910390fd5b6040850151610cf3906001600160a01b031633306001600160601b0386166132e5565b8451604051629c5c4560e41b8152600481018390526001600160a01b03909116906309c5c450906024015f604051808303815f87803b158015610d34575f5ffd5b505af1158015610d46573d5f5f3e3d5ffd5b5050505086602001515f01516001600160a01b031681336001600160a01b03167f33add0b01e02278be5459fbfa3274aee699ec47f4ee7236b59e7a2c8b5000c268a6020015160200151878c5f0151888c602001516001600160601b031642610daf9190614ea0565b8f60400151604051610dc696959493929190615079565b60405180910390a4945050505050610dde6001606555565b919050565b5f81815260986020908152604080832081516101c08101835281546001600160a01b038082168352600160a01b918290046001600160601b03908116968401969096526001840154808216958401959095529381900490941660608201526002820154928316608082015292820463ffffffff1660a0840152600160c01b820461ffff1660c084015283929160e0830190600160d01b900460ff166003811115610e8f57610e8f614698565b6003811115610ea057610ea0614698565b8152600282810154600160d81b810460ff9081161515602080860191909152600160e01b90920463ffffffff16604080860191909152805160e0810182526003870180546001600160a01b038082168452600160a01b918290046001600160601b03169684019690965260048901549586169383019390935260609687019691959094918601939290910490911690811115610f3e57610f3e614698565b6002811115610f4f57610f4f614698565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff166001811115610f9057610f90614698565b6001811115610fa157610fa1614698565b8152602001600182018054610fb590614df1565b80601f0160208091040260200160405190810160405280929190818152602001828054610fe190614df1565b801561102c5780601f106110035761010080835404028352916020019161102c565b820191905f5260205f20905b81548152906001019060200180831161100f57829003601f168201915b505050505081525050815260200160058201805461104990614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461107590614df1565b80156110c05780601f10611097576101008083540402835291602001916110c0565b820191905f5260205f20905b8154815290600101906020018083116110a357829003601f168201915b50505050508152505081526020016009820180546110dd90614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461110990614df1565b80156111545780601f1061112b57610100808354040283529160200191611154565b820191905f5260205f20905b81548152906001019060200180831161113757829003601f168201915b50505050508152602001600a8201805461116d90614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461119990614df1565b80156111e45780601f106111bb576101008083540402835291602001916111e4565b820191905f5260205f20905b8154815290600101906020018083116111c757829003601f168201915b50505050508152602001600b820180546111fd90614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461122990614df1565b80156112745780601f1061124b57610100808354040283529160200191611274565b820191905f5260205f20905b81548152906001019060200180831161125757829003601f168201915b505050505081525050905061128881613357565b9392505050565b5f82826040516020016112a39291906150d2565b6040516020818303038152906040528051906020012090505b92915050565b6112ca6133b2565b6112d38161340c565b50565b5f609a5f6112e385613134565b815260208082019290925260409081015f20815160e08101835281546001600160a01b038082168352600160a01b918290046001600160601b03169583019590955260018301549485169382019390935292909160608401910460ff16600281111561135157611351614698565b600281111561136257611362614698565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff1660018111156113a3576113a3614698565b60018111156113b4576113b4614698565b81526020016001820180546113c890614df1565b80601f01602080910402602001604051908101604052809291908181526020018280546113f490614df1565b801561143f5780601f106114165761010080835404028352916020019161143f565b820191905f5260205f20905b81548152906001019060200180831161142257829003601f168201915b505050505081525050815260200160058201805461145c90614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461148890614df1565b80156114d35780601f106114aa576101008083540402835291602001916114d3565b820191905f5260205f20905b8154815290600101906020018083116114b657829003601f168201915b50505050508152505090506114e781613197565b611504576040516314b0a41d60e11b815260040160405180910390fd5b61151283826060015161347d565b61151c838361351e565b505050565b611529613f9b565b5f82815260986020908152604080832081516101c08101835281546001600160a01b038082168352600160a01b918290046001600160601b03908116968401969096526001840154808216958401959095529381900490941660608201526002820154928316608082015292820463ffffffff1660a0840152600160c01b820461ffff1660c08401529060e0830190600160d01b900460ff1660038111156115d3576115d3614698565b60038111156115e4576115e4614698565b8152600282810154600160d81b810460ff9081161515602080860191909152600160e01b90920463ffffffff16604080860191909152805160e0810182526003870180546001600160a01b038082168452600160a01b918290046001600160601b0316968401969096526004890154958616938301939093526060968701969195909491860193929091049091169081111561168257611682614698565b600281111561169357611693614698565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff1660018111156116d4576116d4614698565b60018111156116e5576116e5614698565b81526020016001820180546116f990614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461172590614df1565b80156117705780601f1061174757610100808354040283529160200191611770565b820191905f5260205f20905b81548152906001019060200180831161175357829003601f168201915b505050505081525050815260200160058201805461178d90614df1565b80601f01602080910402602001604051908101604052809291908181526020018280546117b990614df1565b80156118045780601f106117db57610100808354040283529160200191611804565b820191905f5260205f20905b8154815290600101906020018083116117e757829003601f168201915b505050505081525050815260200160098201805461182190614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461184d90614df1565b80156118985780601f1061186f57610100808354040283529160200191611898565b820191905f5260205f20905b81548152906001019060200180831161187b57829003601f168201915b50505050508152602001600a820180546118b190614df1565b80601f01602080910402602001604051908101604052809291908181526020018280546118dd90614df1565b80156119285780601f106118ff57610100808354040283529160200191611928565b820191905f5260205f20905b81548152906001019060200180831161190b57829003601f168201915b50505050508152602001600b8201805461194190614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461196d90614df1565b80156119b85780601f1061198f576101008083540402835291602001916119b8565b820191905f5260205f20905b81548152906001019060200180831161199b57829003601f168201915b5050505050815250509050604051806101c00160405280825f01516001600160a01b0316815260200182602001516001600160601b0316815260200182604001516001600160a01b0316815260200182606001516001600160601b0316815260200182608001516001600160a01b031681526020018260a0015163ffffffff1681526020018260c0015161ffff168152602001611a5483613357565b6003811115611a6557611a65614698565b81526020018261010001511515815260200182610120015163ffffffff168152602001826101400151815260200182610160015181526020018261018001518152602001826101a00151815250915050919050565b5f81815260986020908152604080832081516101c08101835281546001600160a01b038082168352600160a01b918290046001600160601b0390811696840196909652600184015480821695840195909552938190049094166060808301919091526002830154938416608083015293830463ffffffff1660a0820152600160c01b830461ffff1660c08201529293929160e0830190600160d01b900460ff166003811115611b6b57611b6b614698565b6003811115611b7c57611b7c614698565b8152600282810154600160d81b810460ff9081161515602080860191909152600160e01b90920463ffffffff16604080860191909152805160e0810182526003870180546001600160a01b038082168452600160a01b918290046001600160601b03169684019690965260048901549586169383019390935260609687019691959094918601939290910490911690811115611c1a57611c1a614698565b6002811115611c2b57611c2b614698565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff166001811115611c6c57611c6c614698565b6001811115611c7d57611c7d614698565b8152602001600182018054611c9190614df1565b80601f0160208091040260200160405190810160405280929190818152602001828054611cbd90614df1565b8015611d085780601f10611cdf57610100808354040283529160200191611d08565b820191905f5260205f20905b815481529060010190602001808311611ceb57829003601f168201915b5050505050815250508152602001600582018054611d2590614df1565b80601f0160208091040260200160405190810160405280929190818152602001828054611d5190614df1565b8015611d9c5780601f10611d7357610100808354040283529160200191611d9c565b820191905f5260205f20905b815481529060010190602001808311611d7f57829003601f168201915b5050505050815250508152602001600982018054611db990614df1565b80601f0160208091040260200160405190810160405280929190818152602001828054611de590614df1565b8015611e305780601f10611e0757610100808354040283529160200191611e30565b820191905f5260205f20905b815481529060010190602001808311611e1357829003601f168201915b50505050508152602001600a82018054611e4990614df1565b80601f0160208091040260200160405190810160405280929190818152602001828054611e7590614df1565b8015611ec05780601f10611e9757610100808354040283529160200191611ec0565b820191905f5260205f20905b815481529060010190602001808311611ea357829003601f168201915b50505050508152602001600b82018054611ed990614df1565b80601f0160208091040260200160405190810160405280929190818152602001828054611f0590614df1565b8015611f505780601f10611f2757610100808354040283529160200191611f50565b820191905f5260205f20905b815481529060010190602001808311611f3357829003601f168201915b50505050508152505090505f611f6582613357565b90506002816003811115611f7b57611f7b614698565b146002829091611fa957604051634091b18960e11b8152600401611fa09291906150ea565b60405180910390fd5b5050506101a0015192915050565b611fbf6133b2565b6112d3816135af565b611fd061400e565b609a5f611fdc84613134565b815260208082019290925260409081015f20815160e08101835281546001600160a01b038082168352600160a01b918290046001600160601b03169583019590955260018301549485169382019390935292909160608401910460ff16600281111561204a5761204a614698565b600281111561205b5761205b614698565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff16600181111561209c5761209c614698565b60018111156120ad576120ad614698565b81526020016001820180546120c190614df1565b80601f01602080910402602001604051908101604052809291908181526020018280546120ed90614df1565b80156121385780601f1061210f57610100808354040283529160200191612138565b820191905f5260205f20905b81548152906001019060200180831161211b57829003601f168201915b505050505081525050815260200160058201805461215590614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461218190614df1565b80156121cc5780601f106121a3576101008083540402835291602001916121cc565b820191905f5260205f20905b8154815290600101906020018083116121af57829003601f168201915b5050505050815250509050919050565b5f54610100900460ff16158080156121fa57505f54600160ff909116105b806122135750303b15801561221357505f5460ff166001145b6122765760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401611fa0565b5f805460ff191660011790558015612297575f805461ff0019166101001790555b61229f613629565b6122a7613657565b6122b084613685565b6122b98361340c565b6122c2826135af565b8015612307575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6123156133b2565b61231e5f613685565b565b6123286130db565b5f83815260986020908152604080832081516101c08101835281546001600160a01b038082168352600160a01b918290046001600160601b03908116968401969096526001840154808216958401959095529381900490941660608201526002820154928316608082015292820463ffffffff1660a0840152600160c01b820461ffff1660c084015292916127cc91849060e0830190600160d01b900460ff1660038111156123d9576123d9614698565b60038111156123ea576123ea614698565b8152600282810154600160d81b810460ff9081161515602080860191909152600160e01b90920463ffffffff16604080860191909152805160e0810182526003870180546001600160a01b038082168452600160a01b918290046001600160601b0316968401969096526004890154958616938301939093526060968701969195909491860193929091049091169081111561248857612488614698565b600281111561249957612499614698565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff1660018111156124da576124da614698565b60018111156124eb576124eb614698565b81526020016001820180546124ff90614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461252b90614df1565b80156125765780601f1061254d57610100808354040283529160200191612576565b820191905f5260205f20905b81548152906001019060200180831161255957829003601f168201915b505050505081525050815260200160058201805461259390614df1565b80601f01602080910402602001604051908101604052809291908181526020018280546125bf90614df1565b801561260a5780601f106125e15761010080835404028352916020019161260a565b820191905f5260205f20905b8154815290600101906020018083116125ed57829003601f168201915b505050505081525050815260200160098201805461262790614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461265390614df1565b801561269e5780601f106126755761010080835404028352916020019161269e565b820191905f5260205f20905b81548152906001019060200180831161268157829003601f168201915b50505050508152602001600a820180546126b790614df1565b80601f01602080910402602001604051908101604052809291908181526020018280546126e390614df1565b801561272e5780601f106127055761010080835404028352916020019161272e565b820191905f5260205f20905b81548152906001019060200180831161271157829003601f168201915b50505050508152602001600b8201805461274790614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461277390614df1565b80156127be5780601f10612795576101008083540402835291602001916127be565b820191905f5260205f20905b8154815290600101906020018083116127a157829003601f168201915b505050505081525050613357565b905060018160038111156127e2576127e2614698565b14600182909161280757604051634091b18960e11b8152600401611fa09291906150ea565b50508154600160a01b90046001600160601b0316421161283a5760405163015a4b7560e51b815260040160405180910390fd5b600382015460405163ba33565d60e01b81526001600160a01b039091169063ba33565d90612872903390899089908990600401615105565b5f6040518083038186803b158015612888575f5ffd5b505afa15801561289a573d5f5f3e3d5ffd5b50506040805180820182526001808701546001600160a01b03168252600287015463ffffffff600160a01b91829004166020840152600488015484518086019095526006890180549497506129d6965060ff929091048216949390928492919091169081111561290c5761290c614698565b600181111561291d5761291d614698565b815260200160018201805461293190614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461295d90614df1565b80156129a85780601f1061297f576101008083540402835291602001916129a8565b820191905f5260205f20905b81548152906001019060200180831161298b57829003601f168201915b5050509190925250505060028601548490600160e01b900463ffffffff166129d08b8a61128f565b8a6136d6565b60028301805460ff60d01b1916600160d11b179055600a83016129f98682614fbf565b50600b8301612a088582614fbf565b5060048301546001600160a01b031615801590612a3857506001830154600160a01b90046001600160601b031615155b15612b2757600283015460018401545f91612a879161271091612a7891600160c01b90910461ffff16906001600160601b03600160a01b9091041661513d565b612a829190615154565b61327a565b90506001600160601b03811615612ac757609b546004850154612ac7916001600160a01b039182169162010000909104166001600160601b038416613af8565b60018401545f90612ae9908390600160a01b90046001600160601b0316615173565b90506001600160601b03811615612b245760058501546004860154612b24916001600160a01b0391821691166001600160601b038416613af8565b50505b6003830154604051637041233f60e11b8152336004820152602481018890526001600160a01b039091169063e082467e906044015f604051808303815f87803b158015612b72575f5ffd5b505af1158015612b84573d5f5f3e3d5ffd5b505050600184015460028501546040516001600160a01b039092169250889133917f659f23b2e7edf490e5fd6561c5148691ed0375ed7ddd3ab1bcfcfdbec4f209a991612be99163ffffffff600160a01b9091041690600a8a0190600b8b0190615211565b60405180910390a450505061151c6001606555565b612c066130db565b5f81815260986020526040902060028101546001600160a01b03163314612c40576040516370f43cb760e01b815260040160405180910390fd5b6002810154600160d81b900460ff1615612c6d57604051633e3d786960e01b815260040160405180910390fd5b604080516101c08101825282546001600160a01b038082168352600160a01b918290046001600160601b03908116602085015260018601548083169585019590955293829004909316606083015260028401549283166080830152820463ffffffff1660a0820152600160c01b820461ffff1660c08201525f91612d0e9190849060e0830190600160d01b900460ff1660038111156123d9576123d9614698565b90506003816003811115612d2457612d24614698565b146003829091612d4957604051634091b18960e11b8152600401611fa09291906150ea565b505060028201805460ff60d81b1916600160d81b17905560048201546001600160a01b031615801590612d8f57506001820154600160a01b90046001600160601b031615155b15612dcb57600282015460018301546004840154612dcb926001600160a01b0391821692911690600160a01b90046001600160601b0316613af8565b60028201546001830154604051600160a01b9091046001600160601b0316815284916001600160a01b0316907fe3ed40d31808582f7a92a30beacc0ec788d5091407ec6c10c1b999b3f317aea39060200160405180910390a350506112d36001606555565b612e386133b2565b6001600160a01b038116612e9d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611fa0565b6112d381613685565b612eaf81613197565b612ecc576040516314b0a41d60e11b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160601b031681602001516001600160601b03161115612f235760405163a7cf966560e01b815260040160405180910390fd5b612f308160a00151613b28565b612f3e82826060015161347d565b80609a5f612f4b85613134565b815260208082019290925260409081015f208351928401516001600160601b0316600160a01b9081026001600160a01b0394851617825591840151600182018054919094166001600160a01b03198216811785556060860151929492936001600160a81b03199092161790836002811115612fc857612fc8614698565b021790555060808201516002820180546001600160a01b0319166001600160a01b0390921691909117905560a08201518051600383018054909190829060ff19166001838181111561301c5761301c614698565b0217905550602082015160018201906130359082614fbf565b50505060c0820151600582019061304c9082614fbf565b50905050816020015163ffffffff16825f01516001600160a01b0316336001600160a01b03167f7cd76abd4025a20959a1b20f7c1536e3894a0735cd8de0215dde803ddea7f2d2846040516130a191906149e4565b60405180910390a460995f6130b584613134565b815260208101919091526040015f205460ff166130d7576130d782600161351e565b5050565b60026065540361312d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611fa0565b6002606555565b5f815f0151826020015163ffffffff1660405160200161317f92919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b6040516020818303038152906040526112bc90615241565b5f80826060015160028111156131af576131af614698565b141580156131c6575081516001600160a01b031615155b80156112bc575050602001516001600160601b0316151590565b5f60028260028111156131f5576131f5614698565b0361322157507f0000000000000000000000000000000000000000000000000000000000000000919050565b600182600281111561323557613235614698565b0361326157507f0000000000000000000000000000000000000000000000000000000000000000919050565b60405163fdea7c0960e01b815260040160405180910390fd5b5f6001600160601b038211156132e15760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201526536206269747360d01b6064820152608401611fa0565b5090565b6040516001600160a01b03808516602483015283166044820152606481018290526123079085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613be7565b6001606555565b5f60018260e00151600381111561337057613370614698565b14801561339d57508161014001516020015182602001516133919190615264565b6001600160601b031642115b156133aa57506003919050565b5060e0015190565b6033546001600160a01b0316331461231e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611fa0565b61271061ffff8216111561343357604051630601f69760e01b815260040160405180910390fd5b609b805461ffff191661ffff83169081179091556040519081527f886b2cfcb151fd8b19ed902cc88f4a06dd9fe351a4a9ab93f33fe84abc157edf9060200160405180910390a150565b5f613487826131e0565b6040516304240c4960e51b815290915033906001600160a01b038316906384818920906134b8908790600401614e47565b602060405180830381865afa1580156134d3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906134f79190615283565b6001600160a01b03161461151c576040516342ecfee960e11b815260040160405180910390fd5b8060995f61352b85613134565b81526020019081526020015f205f6101000a81548160ff021916908315150217905550816020015163ffffffff16825f01516001600160a01b0316336001600160a01b03167f48b63f21a1eb9dd6880e196de6d7db3fbd0c282b74f1298dcb4cf53472298f39846040516135a3911515815260200190565b60405180910390a45050565b6001600160a01b0381166135d657604051630863a45360e11b815260040160405180910390fd5b609b805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040517f262aa27c244f6f0088cb3092548a0adcaddedf459070a9ccab2dc6a07abe701d905f90a250565b5f54610100900460ff1661364f5760405162461bcd60e51b8152600401611fa09061529e565b61231e613cba565b5f54610100900460ff1661367d5760405162461bcd60e51b8152600401611fa09061529e565b61231e613ce9565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f855160018111156136ea576136ea614698565b0361389257600286600281111561370357613703614698565b036137c0575f8180602001905181019061371d9190615549565b905061372a818585613d0f565b6040516280b71560e41b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063080b715090613777908890859060040161561b565b5f604051808303815f875af1158015613792573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526137b9919081019061563a565b5050613af0565b60018660028111156137d4576137d4614698565b03613261575f818060200190518101906137ee919061566b565b90506137fb818585613d99565b6040516380c7d3f360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906380c7d3f39061384990889085906004016156e4565b5f60405180830381865afa158015613863573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261388a9190810190615767565b505050613af0565b6001855160018111156138a7576138a7614698565b03613ad7575f85602001518060200190518101906138c591906157c0565b6040805160018082528183019092529192505f91906020808301908036833701905050905081815f815181106138fd576138fd6157db565b61ffff909216602092830291909101909101525f600289600281111561392557613925614698565b036139e3575f8480602001905181019061393f9190615549565b905061394c818888613d0f565b604051625f5e5d60e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063017d79749061399b908b908590889060040161582d565b6020604051808303815f875af11580156139b7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906139db919061585e565b915050613ab9565b60018960028111156139f7576139f7614698565b03613261575f84806020019051810190613a11919061566b565b9050613a1e818888613d99565b604051630606d12160e51b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c0da242090613a6e908b9085908890600401615879565b5f60405180830381865afa158015613a88573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052613aaf9190810190615898565b509150613ab99050565b8061388a576040516359fa4a9360e01b815260040160405180910390fd5b6040516347d3772160e11b815260040160405180910390fd5b505050505050565b6040516001600160a01b03831660248201526044810182905261151c90849063a9059cbb60e01b90606401613319565b5f81516001811115613b3c57613b3c614698565b03613b6557602081015151156112d357604051631501e04760e21b815260040160405180910390fd5b600181516001811115613b7a57613b7a614698565b03613ad757806020015151602014613ba557604051631501e04760e21b815260040160405180910390fd5b5f8160200151806020019051810190613bbe91906157c0565b905061271061ffff821611156130d757604051631501e04760e21b815260040160405180910390fd5b5f613c3b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613e119092919063ffffffff16565b905080515f1480613c5b575080806020019051810190613c5b919061585e565b61151c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401611fa0565b5f54610100900460ff16613ce05760405162461bcd60e51b8152600401611fa09061529e565b61231e33613685565b5f54610100900460ff166133505760405162461bcd60e51b8152600401611fa09061529e565b8163ffffffff16835f015163ffffffff1614613d3e57604051634534032960e01b815260040160405180910390fd5b80836020015114613d6257604051638b56642d60e01b815260040160405180910390fd5b604083015151158015613d7b5750604083015160200151155b1561151c57604051637a8a1dbd60e11b815260040160405180910390fd5b8163ffffffff16835f015163ffffffff1614613dc857604051634534032960e01b815260040160405180910390fd5b80836020015114613dec57604051638b56642d60e01b815260040160405180910390fd5b5f8360400151511161151c57604051637a8a1dbd60e11b815260040160405180910390fd5b6060613e1f84845f85613e27565b949350505050565b606082471015613e885760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401611fa0565b5f5f866001600160a01b03168587604051613ea391906158cf565b5f6040518083038185875af1925050503d805f8114613edd576040519150601f19603f3d011682016040523d82523d5f602084013e613ee2565b606091505b5091509150613ef387838387613efe565b979650505050505050565b60608315613f6c5782515f03613f65576001600160a01b0385163b613f655760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611fa0565b5081613e1f565b613e1f8383815115613f815781518083602001fd5b8060405162461bcd60e51b8152600401611fa09190614270565b604080516101c0810182525f80825260208201819052918101829052606081018290526080810182905260a0810182905260c081018290529060e082019081525f602082018190526040820152606001613ff361400e565b81526020016060815260200160608152602001606081525090565b6040805160e0810182525f8082526020820181905291810182905290606082019081525f602082015260400161404261404f565b8152602001606081525090565b60408051808201909152805f614042565b634e487b7160e01b5f52604160045260245ffd5b604051606081016001600160401b038111828210171561409657614096614060565b60405290565b604080519081016001600160401b038111828210171561409657614096614060565b60405160a081016001600160401b038111828210171561409657614096614060565b60405160e081016001600160401b038111828210171561409657614096614060565b604051601f8201601f191681016001600160401b038111828210171561412a5761412a614060565b604052919050565b63ffffffff811681146112d3575f5ffd5b5f6001600160401b0382111561415b5761415b614060565b50601f01601f191660200190565b5f82601f830112614178575f5ffd5b813561418b61418682614143565b614102565b81815284602083860101111561419f575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f602082840312156141cb575f5ffd5b81356001600160401b038111156141e0575f5ffd5b8201606081850312156141f1575f5ffd5b6141f9614074565b813561420481614132565b81526020828101359082015260408201356001600160401b03811115614228575f5ffd5b61423486828501614169565b604083015250949350505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6112886020830184614242565b5f60408284031215614292575f5ffd5b61429a61409c565b823581526020928301359281019290925250919050565b5f82601f8301126142c0575f5ffd5b6142ca6040614102565b8060408401858111156142db575f5ffd5b845b818110156142f55780358452602093840193016142dd565b509095945050505050565b5f6001600160401b0382111561431857614318614060565b5060051b60200190565b5f82601f830112614331575f5ffd5b813561433f61418682614300565b8082825260208201915060208360051b860101925085831115614360575f5ffd5b602085015b838110156144c35780356001600160401b03811115614382575f5ffd5b86016060818903601f19011215614397575f5ffd5b61439f614074565b60208201356143ad81614132565b815260408201356001600160401b038111156143c7575f5ffd5b6143d68a602083860101614169565b60208301525060608201356001600160401b038111156143f4575f5ffd5b6020818401019250506060828a03121561440c575f5ffd5b61441461409c565b61441e8a84614282565b815260408301356001600160401b03811115614438575f5ffd5b80840193505089601f84011261444c575f5ffd5b823561445a61418682614300565b8082825260208201915060208360051b87010192508c83111561447b575f5ffd5b6020860195505b8286101561449d578535825260209586019590910190614482565b806020850152505050806040830152508085525050602083019250602081019050614365565b5095945050505050565b5f602082840312156144dd575f5ffd5b81356001600160401b038111156144f2575f5ffd5b8201808403610120811215614505575f5ffd5b61450d6140be565b823561451881614132565b8152602083810135908201526145318660408501614282565b60408201526080607f1983011215614547575f5ffd5b61454f61409c565b915061455e86608085016142b1565b825261456d8660c085016142b1565b602083015281606082015261010083013591506001600160401b03821115614593575f5ffd5b61459f86838501614322565b608082015295945050505050565b6001600160a01b03811681146112d3575f5ffd5b8035610dde816145ad565b5f604082840312156145dc575f5ffd5b6145e461409c565b905081356145f1816145ad565b8152602082013561460181614132565b602082015292915050565b5f6020828403121561461c575f5ffd5b81356001600160401b03811115614631575f5ffd5b820160808185031215614642575f5ffd5b61464a614074565b8135614655816145ad565b815261466485602084016145cc565b602082015260608201356001600160401b03811115614228575f5ffd5b5f60208284031215614691575f5ffd5b5035919050565b634e487b7160e01b5f52602160045260245ffd5b600481106146bc576146bc614698565b9052565b602081016112bc82846146ac565b5f5f604083850312156146df575f5ffd5b8235915060208301356001600160401b038111156146fb575f5ffd5b61470785828601614169565b9150509250929050565b61ffff811681146112d3575f5ffd5b5f60208284031215614730575f5ffd5b813561128881614711565b80151581146112d3575f5ffd5b5f5f60608385031215614759575f5ffd5b61476384846145cc565b915060408301356147738161473b565b809150509250929050565b600381106146bc576146bc614698565b5f8151600281106147a1576147a1614698565b80845250602082015160406020850152613e1f6040850182614242565b80516001600160a01b031682526020808201516001600160601b0316908301526040808201515f916147fa908501826001600160a01b03169052565b50606082015161480d606085018261477e565b50608082015161482860808501826001600160a01b03169052565b5060a082015160e060a085015261484260e085018261478e565b905060c083015184820360c086015261485b8282614242565b95945050505050565b6020815261487e6020820183516001600160a01b03169052565b5f602083015161489960408401826001600160601b03169052565b5060408301516001600160a01b03811660608401525060608301516001600160601b03811660808401525060808301516001600160a01b03811660a08401525060a083015163ffffffff811660c08401525060c083015161ffff811660e08401525060e083015161490e6101008401826146ac565b506101008301518015156101208401525061012083015163ffffffff8116610140840152506101408301516101c06101608401526149506101e08401826147be565b9050610160840151601f198483030161018085015261496f8282614242565b915050610180840151601f19848303016101a085015261498f8282614242565b9150506101a0840151601f19848303016101c085015261485b8282614242565b5f602082840312156149bf575f5ffd5b8135611288816145ad565b5f604082840312156149da575f5ffd5b61128883836145cc565b602081525f61128860208301846147be565b5f5f5f60608486031215614a08575f5ffd5b8335614a13816145ad565b92506020840135614a2381614711565b91506040840135614a33816145ad565b809150509250925092565b5f5f5f60608486031215614a50575f5ffd5b8335925060208401356001600160401b03811115614a6c575f5ffd5b614a7886828701614169565b92505060408401356001600160401b03811115614a93575f5ffd5b614a9f86828701614169565b9150509250925092565b6001600160601b03811681146112d3575f5ffd5b8035610dde81614aa9565b803560038110610dde575f5ffd5b5f60408284031215614ae6575f5ffd5b614aee61409c565b9050813560028110614afe575f5ffd5b815260208201356001600160401b03811115614b18575f5ffd5b614b2484828501614169565b60208301525092915050565b5f5f60608385031215614b41575f5ffd5b614b4b84846145cc565b915060408301356001600160401b03811115614b65575f5ffd5b830160e08186031215614b76575f5ffd5b614b7e6140e0565b614b87826145c1565b8152614b9560208301614abd565b6020820152614ba6604083016145c1565b6040820152614bb760608301614ac8565b6060820152614bc8608083016145c1565b608082015260a08201356001600160401b03811115614be5575f5ffd5b614bf187828501614ad6565b60a08301525060c08201356001600160401b03811115614c0f575f5ffd5b614c1b87828501614169565b60c08301525080925050509250929050565b63ffffffff8151168252602081015160208301525f604082015160606040850152613e1f6060850182614242565b602081525f6112886020830184614c2d565b805f5b6002811015612307578151845260209384019390910190600101614c70565b5f610120830163ffffffff8351168452602083015160208501526040830151614cc5604086018280518252602090810151910152565b506060830151614cd9608086018251614c6d565b60200151614cea60c0860182614c6d565b506080830151610120610100860152818151808452610140870191506101408160051b88010193506020830192505f5b81811015614dd35761013f19888603018352835163ffffffff8151168652602081015160606020880152614d516060880182614242565b905060408201519150868103604088015260608101614d7b82845180518252602090810151910152565b6020928301516060604084015280518083529301925f92608001905b80841015614dba5784518252602082019150602085019450600184019350614d97565b5097505050602094850194939093019250600101614d1a565b50929695505050505050565b602081525f6112886020830184614c8f565b600181811c90821680614e0557607f821691505b602082108103614e2357634e487b7160e01b5f52602260045260245ffd5b50919050565b80516001600160a01b0316825260209081015163ffffffff16910152565b604081016112bc8284614e29565b5f60208284031215614e65575f5ffd5b815161128881614132565b634e487b7160e01b5f52601160045260245ffd5b63ffffffff81811683821601908111156112bc576112bc614e70565b808201808211156112bc576112bc614e70565b80516001600160a01b031682526020808201515f91614ed490850182614e29565b50604082015160806060850152613e1f6080850182614242565b6001600160a01b03831681526040602082018190525f90613e1f90830184614eb3565b602081525f6112886020830184614eb3565b5f60208284031215614f33575f5ffd5b815161128881614aa9565b84815260018060a01b0384166020820152826040820152608060608201525f614f6a6080830184614eb3565b9695505050505050565b601f82111561151c57805f5260205f20601f840160051c81016020851015614f995750805b601f840160051c820191505b81811015614fb8575f8155600101614fa5565b5050505050565b81516001600160401b03811115614fd857614fd8614060565b614fec81614fe68454614df1565b84614f74565b6020601f82116001811461501e575f83156150075750848201515b5f19600385901b1c1916600184901b178455614fb8565b5f84815260208120601f198516915b8281101561504d578785015182556020948501946001909201910161502d565b508482101561506a57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b63ffffffff8716815263ffffffff8616602082015260018060a01b03851660408201526001600160601b038416606082015282608082015260c060a08201525f6150c660c0830184614242565b98975050505050505050565b828152604060208201525f613e1f6040830184614242565b604081016150f882856146ac565b61128860208301846146ac565b60018060a01b0385168152836020820152608060408201525f61512b6080830185614242565b8281036060840152613ef38185614242565b80820281158282048414176112bc576112bc614e70565b5f8261516e57634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160601b0382811682821603908111156112bc576112bc614e70565b5f815461519e81614df1565b8085526001821680156151b857600181146151d457615208565b60ff1983166020870152602082151560051b8701019350615208565b845f5260205f205f5b838110156151ff5781546020828a0101526001820191506020810190506151dd565b87016020019450505b50505092915050565b63ffffffff84168152606060208201525f61522f6060830185615192565b8281036040840152614f6a8185615192565b80516020808301519190811015614e23575f1960209190910360031b1b16919050565b6001600160601b0381811683821601908111156112bc576112bc614e70565b5f60208284031215615293575f5ffd5b8151611288816145ad565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b5f604082840312156152f9575f5ffd5b61530161409c565b825181526020928301519281019290925250919050565b5f82601f830112615327575f5ffd5b6153316040614102565b806040840185811115615342575f5ffd5b845b818110156142f5578051845260209384019301615344565b5f82601f83011261536b575f5ffd5b815161537961418682614143565b81815284602083860101111561538d575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f82601f8301126153b8575f5ffd5b81516153c661418682614300565b8082825260208201915060208360051b8601019250858311156153e7575f5ffd5b602085015b838110156144c35780518352602092830192016153ec565b5f82601f830112615413575f5ffd5b815161542161418682614300565b8082825260208201915060208360051b860101925085831115615442575f5ffd5b602085015b838110156144c35780516001600160401b03811115615464575f5ffd5b86016060818903601f19011215615479575f5ffd5b615481614074565b602082015161548f81614132565b815260408201516001600160401b038111156154a9575f5ffd5b6154b88a60208386010161535c565b60208301525060608201516001600160401b038111156154d6575f5ffd5b6020818401019250506060828a0312156154ee575f5ffd5b6154f661409c565b6155008a846152e9565b815260408301516001600160401b0381111561551a575f5ffd5b6155268b8286016153a9565b602083015250806040830152508085525050602083019250602081019050615447565b5f60208284031215615559575f5ffd5b81516001600160401b0381111561556e575f5ffd5b8201808403610120811215615581575f5ffd5b6155896140be565b825161559481614132565b8152602083810151908201526155ad86604085016152e9565b60408201526080607f19830112156155c3575f5ffd5b6155cb61409c565b91506155da8660808501615318565b82526155e98660c08501615318565b602083015281606082015261010083015191506001600160401b0382111561560f575f5ffd5b61459f86838501615404565b6156258184614e29565b606060408201525f613e1f6060830184614c8f565b5f6020828403121561564a575f5ffd5b81516001600160401b0381111561565f575f5ffd5b613e1f848285016153a9565b5f6020828403121561567b575f5ffd5b81516001600160401b03811115615690575f5ffd5b8201606081850312156156a1575f5ffd5b6156a9614074565b81516156b481614132565b81526020828101519082015260408201516001600160401b038111156156d8575f5ffd5b6142348682850161535c565b6156ee8184614e29565b606060408201525f613e1f6060830184614c2d565b5f82601f830112615712575f5ffd5b815161572061418682614300565b8082825260208201915060208360051b860101925085831115615741575f5ffd5b602085015b838110156144c3578051615759816145ad565b835260209283019201615746565b5f5f60408385031215615778575f5ffd5b82516001600160401b0381111561578d575f5ffd5b615799858286016153a9565b92505060208301516001600160401b038111156157b4575f5ffd5b61470785828601615703565b5f602082840312156157d0575f5ffd5b815161128881614711565b634e487b7160e01b5f52603260045260245ffd5b5f8151808452602084019350602083015f5b8281101561582357815161ffff16865260209586019590910190600101615801565b5093949350505050565b6158378185614e29565b608060408201525f61584c6080830185614c8f565b8281036060840152614f6a81856157ef565b5f6020828403121561586e575f5ffd5b81516112888161473b565b6158838185614e29565b608060408201525f61584c6080830185614c2d565b5f5f604083850312156158a9575f5ffd5b82516158b48161473b565b60208401519092506001600160401b038111156157b4575f5ffd5b5f82518060208501845e5f92019182525091905056fea2646970667358221220fc43bc7a63963e8e0e62261114c349f143c492fd1e9722c063db39d29089c3ca64736f6c634300081e0033", + Bin: "0x60e060405234801561000f575f5ffd5b50604051615afb380380615afb83398101604081905261002e91610135565b6001600160a01b03808416608052821660a0526001600160601b03811660c05261005661005e565b505050610185565b5f54610100900460ff16156100c95760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610118575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b80516001600160a01b0381168114610130575f5ffd5b919050565b5f5f5f60608486031215610147575f5ffd5b6101508461011a565b925061015e6020850161011a565b60408501519092506001600160601b038116811461017a575f5ffd5b809150509250925092565b60805160a05160c05161591b6101e05f395f81816103450152612ece01525f81816102650152818161323d015281816138120152613a3501525f81816103aa015281816131fd015281816137400152613962015261591b5ff3fe608060405234801561000f575f5ffd5b5060043610610153575f3560e01c8063678fbdb3116100bf578063b869416611610079578063b86941661461032d578063d3e043aa14610340578063f2fde38b1461037f578063f741e81a14610392578063f7424fc9146103a5578063fa2c0b37146103cc575f5ffd5b8063678fbdb3146102bb5780636bf6fad5146102ce578063708c0db9146102ee578063715018a6146103015780638da5cb5b14610309578063a5fabc811461031a575f5ffd5b8063468c07a011610110578063468c07a01461021857806349acd8841461022d5780634ad52e021461024057806354743ad21461026057806362fee037146102875780636373ea691461029a575f5ffd5b80631270a892146101575780631a20c505146101805780631ae370eb146101b15780631fb66f5d146101c45780632bf6cc79146101e557806337eaa10414610205575b5f5ffd5b61016a6101653660046141bb565b6103fe565b6040516101779190614270565b60405180910390f35b609b54610199906201000090046001600160a01b031681565b6040516001600160a01b039091168152602001610177565b61016a6101bf3660046144cd565b610427565b6101d76101d236600461460c565b61043a565b604051908152602001610177565b6101f86101f3366004614681565b610de3565b60405161017791906146c0565b6101d76102133660046146ce565b61128f565b61022b610226366004614720565b6112c2565b005b61022b61023b366004614748565b6112d6565b61025361024e366004614681565b611521565b6040516101779190614864565b6101997f000000000000000000000000000000000000000000000000000000000000000081565b61016a610295366004614681565b611aba565b609b546102a89061ffff1681565b60405161ffff9091168152602001610177565b61022b6102c93660046149af565b611fb7565b6102e16102dc3660046149ca565b611fc8565b60405161017791906149e4565b61022b6102fc3660046149f6565b6121dc565b61022b61230d565b6033546001600160a01b0316610199565b61022b610328366004614a3e565b612320565b61022b61033b366004614681565b612bfe565b6103677f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160601b039091168152602001610177565b61022b61038d3660046149af565b612e30565b61022b6103a0366004614b30565b612ea6565b6101997f000000000000000000000000000000000000000000000000000000000000000081565b6103ee6103da366004614681565b60996020525f908152604090205460ff1681565b6040519015158152602001610177565b6060816040516020016104119190614c5b565b6040516020818303038152906040529050919050565b6060816040516020016104119190614ddf565b5f6104436130db565b5f8260400151511161046857604051636b1a1b6960e11b815260040160405180910390fd5b60995f6104788460200151613134565b815260208101919091526040015f205460ff166104a85760405163c292b29760e01b815260040160405180910390fd5b5f609a5f6104b98560200151613134565b815260208082019290925260409081015f20815160e08101835281546001600160a01b038082168352600160a01b918290046001600160601b03169583019590955260018301549485169382019390935292909160608401910460ff16600281111561052757610527614698565b600281111561053857610538614698565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff16600181111561057957610579614698565b600181111561058a5761058a614698565b815260200160018201805461059e90614df1565b80601f01602080910402602001604051908101604052809291908181526020018280546105ca90614df1565b80156106155780601f106105ec57610100808354040283529160200191610615565b820191905f5260205f20905b8154815290600101906020018083116105f857829003601f168201915b505050505081525050815260200160058201805461063290614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461065e90614df1565b80156106a95780601f10610680576101008083540402835291602001916106a9565b820191905f5260205f20905b81548152906001019060200180831161068c57829003601f168201915b50505050508152505090506106bd81613197565b6106da576040516314b0a41d60e11b815260040160405180910390fd5b5f6106e882606001516131e0565b90505f816001600160a01b0316635ddb9b5b86602001516040518263ffffffff1660e01b815260040161071b9190614e47565b602060405180830381865afa158015610736573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061075a9190614e55565b90505f826001600160a01b0316636141879e87602001516040518263ffffffff1660e01b815260040161078d9190614e47565b602060405180830381865afa1580156107a8573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107cc9190614e55565b905063ffffffff8116158061080857506107e68183614e84565b63ffffffff1684602001516001600160601b0316426108059190614ea0565b11155b6108255760405163640fcd6b60e11b815260040160405180910390fd5b508251604051630a3fc61360e31b81526001600160a01b03909116906351fe3098906108579033908990600401614eee565b5f6040518083038186803b15801561086d575f5ffd5b505afa15801561087f573d5f5f3e3d5ffd5b50508451604051637036693f60e11b81525f93506001600160a01b03909116915063e06cd27e906108b4908990600401614f11565b602060405180830381865afa1580156108cf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108f39190614f23565b90505f60975430468960405160200161090f9493929190614f3e565b60405160208183030381529060405280519060200120905060975460016109369190614ea0565b609755604080516101c08101909152338152602081016109554261327a565b6001600160601b03908116825260208a81018051516001600160a01b039081168386015292871660408501528b5190921660608401529051015163ffffffff166080820152609b5461ffff1660a082015260c001600181525f602080830182905263ffffffff80881660408086019190915260608086018c90528d8201516080808801919091528251808601845286815260a0808901919091528351808701855287815260c09889015289875260988652958390208851958901516001600160601b03908116600160a01b9081026001600160a01b03988916178355948a0151938a0151168402928616929092176001830155870151600282018054968901519789015161ffff16600160c01b0261ffff60c01b19989095169093026001600160c01b0319909616941693909317939093179384168117835560e0850151919391929160ff60d01b1990911662ffffff60c01b1990911617600160d01b836003811115610ac457610ac4614698565b02179055506101008201516002808301805461012086015163ffffffff16600160e01b026001600160e01b03941515600160d81b02949094166001600160d81b039091161792909217909155610140830151805160208201516001600160601b0316600160a01b9081026001600160a01b0392831617600386019081556040840151600487018054919094166001600160a01b031982168117855560608601519596929594936001600160a81b031990921617918490811115610b8957610b89614698565b021790555060808201516002820180546001600160a01b0319166001600160a01b0390921691909117905560a08201518051600383018054909190829060ff191660018381811115610bdd57610bdd614698565b021790555060208201516001820190610bf69082614fbf565b50505060c08201516005820190610c0d9082614fbf565b5050506101608201516009820190610c259082614fbf565b50610180820151600a820190610c3b9082614fbf565b506101a0820151600b820190610c519082614fbf565b50505060408501516001600160a01b031615801590610c7857505f826001600160601b0316115b15610cf35760808501516001600160a01b0316610ca857604051633480121760e21b815260040160405180910390fd5b86516001600160a01b0316610cd057604051633480121760e21b815260040160405180910390fd5b6040850151610cf3906001600160a01b031633306001600160601b0386166132e5565b8451604051629c5c4560e41b8152600481018390526001600160a01b03909116906309c5c450906024015f604051808303815f87803b158015610d34575f5ffd5b505af1158015610d46573d5f5f3e3d5ffd5b5050505086602001515f01516001600160a01b031681336001600160a01b03167f33add0b01e02278be5459fbfa3274aee699ec47f4ee7236b59e7a2c8b5000c268a6020015160200151878c5f0151888c602001516001600160601b031642610daf9190614ea0565b8f60400151604051610dc696959493929190615079565b60405180910390a4945050505050610dde6001606555565b919050565b5f81815260986020908152604080832081516101c08101835281546001600160a01b038082168352600160a01b918290046001600160601b03908116968401969096526001840154808216958401959095529381900490941660608201526002820154928316608082015292820463ffffffff1660a0840152600160c01b820461ffff1660c084015283929160e0830190600160d01b900460ff166003811115610e8f57610e8f614698565b6003811115610ea057610ea0614698565b8152600282810154600160d81b810460ff9081161515602080860191909152600160e01b90920463ffffffff16604080860191909152805160e0810182526003870180546001600160a01b038082168452600160a01b918290046001600160601b03169684019690965260048901549586169383019390935260609687019691959094918601939290910490911690811115610f3e57610f3e614698565b6002811115610f4f57610f4f614698565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff166001811115610f9057610f90614698565b6001811115610fa157610fa1614698565b8152602001600182018054610fb590614df1565b80601f0160208091040260200160405190810160405280929190818152602001828054610fe190614df1565b801561102c5780601f106110035761010080835404028352916020019161102c565b820191905f5260205f20905b81548152906001019060200180831161100f57829003601f168201915b505050505081525050815260200160058201805461104990614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461107590614df1565b80156110c05780601f10611097576101008083540402835291602001916110c0565b820191905f5260205f20905b8154815290600101906020018083116110a357829003601f168201915b50505050508152505081526020016009820180546110dd90614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461110990614df1565b80156111545780601f1061112b57610100808354040283529160200191611154565b820191905f5260205f20905b81548152906001019060200180831161113757829003601f168201915b50505050508152602001600a8201805461116d90614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461119990614df1565b80156111e45780601f106111bb576101008083540402835291602001916111e4565b820191905f5260205f20905b8154815290600101906020018083116111c757829003601f168201915b50505050508152602001600b820180546111fd90614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461122990614df1565b80156112745780601f1061124b57610100808354040283529160200191611274565b820191905f5260205f20905b81548152906001019060200180831161125757829003601f168201915b505050505081525050905061128881613357565b9392505050565b5f82826040516020016112a39291906150d2565b6040516020818303038152906040528051906020012090505b92915050565b6112ca6133b2565b6112d38161340c565b50565b5f609a5f6112e385613134565b815260208082019290925260409081015f20815160e08101835281546001600160a01b038082168352600160a01b918290046001600160601b03169583019590955260018301549485169382019390935292909160608401910460ff16600281111561135157611351614698565b600281111561136257611362614698565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff1660018111156113a3576113a3614698565b60018111156113b4576113b4614698565b81526020016001820180546113c890614df1565b80601f01602080910402602001604051908101604052809291908181526020018280546113f490614df1565b801561143f5780601f106114165761010080835404028352916020019161143f565b820191905f5260205f20905b81548152906001019060200180831161142257829003601f168201915b505050505081525050815260200160058201805461145c90614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461148890614df1565b80156114d35780601f106114aa576101008083540402835291602001916114d3565b820191905f5260205f20905b8154815290600101906020018083116114b657829003601f168201915b50505050508152505090506114e781613197565b611504576040516314b0a41d60e11b815260040160405180910390fd5b61151283826060015161347d565b61151c838361351e565b505050565b611529613f9b565b5f82815260986020908152604080832081516101c08101835281546001600160a01b038082168352600160a01b918290046001600160601b03908116968401969096526001840154808216958401959095529381900490941660608201526002820154928316608082015292820463ffffffff1660a0840152600160c01b820461ffff1660c08401529060e0830190600160d01b900460ff1660038111156115d3576115d3614698565b60038111156115e4576115e4614698565b8152600282810154600160d81b810460ff9081161515602080860191909152600160e01b90920463ffffffff16604080860191909152805160e0810182526003870180546001600160a01b038082168452600160a01b918290046001600160601b0316968401969096526004890154958616938301939093526060968701969195909491860193929091049091169081111561168257611682614698565b600281111561169357611693614698565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff1660018111156116d4576116d4614698565b60018111156116e5576116e5614698565b81526020016001820180546116f990614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461172590614df1565b80156117705780601f1061174757610100808354040283529160200191611770565b820191905f5260205f20905b81548152906001019060200180831161175357829003601f168201915b505050505081525050815260200160058201805461178d90614df1565b80601f01602080910402602001604051908101604052809291908181526020018280546117b990614df1565b80156118045780601f106117db57610100808354040283529160200191611804565b820191905f5260205f20905b8154815290600101906020018083116117e757829003601f168201915b505050505081525050815260200160098201805461182190614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461184d90614df1565b80156118985780601f1061186f57610100808354040283529160200191611898565b820191905f5260205f20905b81548152906001019060200180831161187b57829003601f168201915b50505050508152602001600a820180546118b190614df1565b80601f01602080910402602001604051908101604052809291908181526020018280546118dd90614df1565b80156119285780601f106118ff57610100808354040283529160200191611928565b820191905f5260205f20905b81548152906001019060200180831161190b57829003601f168201915b50505050508152602001600b8201805461194190614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461196d90614df1565b80156119b85780601f1061198f576101008083540402835291602001916119b8565b820191905f5260205f20905b81548152906001019060200180831161199b57829003601f168201915b5050505050815250509050604051806101c00160405280825f01516001600160a01b0316815260200182602001516001600160601b0316815260200182604001516001600160a01b0316815260200182606001516001600160601b0316815260200182608001516001600160a01b031681526020018260a0015163ffffffff1681526020018260c0015161ffff168152602001611a5483613357565b6003811115611a6557611a65614698565b81526020018261010001511515815260200182610120015163ffffffff168152602001826101400151815260200182610160015181526020018261018001518152602001826101a00151815250915050919050565b5f81815260986020908152604080832081516101c08101835281546001600160a01b038082168352600160a01b918290046001600160601b0390811696840196909652600184015480821695840195909552938190049094166060808301919091526002830154938416608083015293830463ffffffff1660a0820152600160c01b830461ffff1660c08201529293929160e0830190600160d01b900460ff166003811115611b6b57611b6b614698565b6003811115611b7c57611b7c614698565b8152600282810154600160d81b810460ff9081161515602080860191909152600160e01b90920463ffffffff16604080860191909152805160e0810182526003870180546001600160a01b038082168452600160a01b918290046001600160601b03169684019690965260048901549586169383019390935260609687019691959094918601939290910490911690811115611c1a57611c1a614698565b6002811115611c2b57611c2b614698565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff166001811115611c6c57611c6c614698565b6001811115611c7d57611c7d614698565b8152602001600182018054611c9190614df1565b80601f0160208091040260200160405190810160405280929190818152602001828054611cbd90614df1565b8015611d085780601f10611cdf57610100808354040283529160200191611d08565b820191905f5260205f20905b815481529060010190602001808311611ceb57829003601f168201915b5050505050815250508152602001600582018054611d2590614df1565b80601f0160208091040260200160405190810160405280929190818152602001828054611d5190614df1565b8015611d9c5780601f10611d7357610100808354040283529160200191611d9c565b820191905f5260205f20905b815481529060010190602001808311611d7f57829003601f168201915b5050505050815250508152602001600982018054611db990614df1565b80601f0160208091040260200160405190810160405280929190818152602001828054611de590614df1565b8015611e305780601f10611e0757610100808354040283529160200191611e30565b820191905f5260205f20905b815481529060010190602001808311611e1357829003601f168201915b50505050508152602001600a82018054611e4990614df1565b80601f0160208091040260200160405190810160405280929190818152602001828054611e7590614df1565b8015611ec05780601f10611e9757610100808354040283529160200191611ec0565b820191905f5260205f20905b815481529060010190602001808311611ea357829003601f168201915b50505050508152602001600b82018054611ed990614df1565b80601f0160208091040260200160405190810160405280929190818152602001828054611f0590614df1565b8015611f505780601f10611f2757610100808354040283529160200191611f50565b820191905f5260205f20905b815481529060010190602001808311611f3357829003601f168201915b50505050508152505090505f611f6582613357565b90506002816003811115611f7b57611f7b614698565b146002829091611fa957604051634091b18960e11b8152600401611fa09291906150ea565b60405180910390fd5b5050506101a0015192915050565b611fbf6133b2565b6112d3816135af565b611fd061400e565b609a5f611fdc84613134565b815260208082019290925260409081015f20815160e08101835281546001600160a01b038082168352600160a01b918290046001600160601b03169583019590955260018301549485169382019390935292909160608401910460ff16600281111561204a5761204a614698565b600281111561205b5761205b614698565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff16600181111561209c5761209c614698565b60018111156120ad576120ad614698565b81526020016001820180546120c190614df1565b80601f01602080910402602001604051908101604052809291908181526020018280546120ed90614df1565b80156121385780601f1061210f57610100808354040283529160200191612138565b820191905f5260205f20905b81548152906001019060200180831161211b57829003601f168201915b505050505081525050815260200160058201805461215590614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461218190614df1565b80156121cc5780601f106121a3576101008083540402835291602001916121cc565b820191905f5260205f20905b8154815290600101906020018083116121af57829003601f168201915b5050505050815250509050919050565b5f54610100900460ff16158080156121fa57505f54600160ff909116105b806122135750303b15801561221357505f5460ff166001145b6122765760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401611fa0565b5f805460ff191660011790558015612297575f805461ff0019166101001790555b61229f613629565b6122a7613657565b6122b084613685565b6122b98361340c565b6122c2826135af565b8015612307575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6123156133b2565b61231e5f613685565b565b6123286130db565b5f83815260986020908152604080832081516101c08101835281546001600160a01b038082168352600160a01b918290046001600160601b03908116968401969096526001840154808216958401959095529381900490941660608201526002820154928316608082015292820463ffffffff1660a0840152600160c01b820461ffff1660c084015292916127cc91849060e0830190600160d01b900460ff1660038111156123d9576123d9614698565b60038111156123ea576123ea614698565b8152600282810154600160d81b810460ff9081161515602080860191909152600160e01b90920463ffffffff16604080860191909152805160e0810182526003870180546001600160a01b038082168452600160a01b918290046001600160601b0316968401969096526004890154958616938301939093526060968701969195909491860193929091049091169081111561248857612488614698565b600281111561249957612499614698565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff1660018111156124da576124da614698565b60018111156124eb576124eb614698565b81526020016001820180546124ff90614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461252b90614df1565b80156125765780601f1061254d57610100808354040283529160200191612576565b820191905f5260205f20905b81548152906001019060200180831161255957829003601f168201915b505050505081525050815260200160058201805461259390614df1565b80601f01602080910402602001604051908101604052809291908181526020018280546125bf90614df1565b801561260a5780601f106125e15761010080835404028352916020019161260a565b820191905f5260205f20905b8154815290600101906020018083116125ed57829003601f168201915b505050505081525050815260200160098201805461262790614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461265390614df1565b801561269e5780601f106126755761010080835404028352916020019161269e565b820191905f5260205f20905b81548152906001019060200180831161268157829003601f168201915b50505050508152602001600a820180546126b790614df1565b80601f01602080910402602001604051908101604052809291908181526020018280546126e390614df1565b801561272e5780601f106127055761010080835404028352916020019161272e565b820191905f5260205f20905b81548152906001019060200180831161271157829003601f168201915b50505050508152602001600b8201805461274790614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461277390614df1565b80156127be5780601f10612795576101008083540402835291602001916127be565b820191905f5260205f20905b8154815290600101906020018083116127a157829003601f168201915b505050505081525050613357565b905060018160038111156127e2576127e2614698565b14600182909161280757604051634091b18960e11b8152600401611fa09291906150ea565b50508154600160a01b90046001600160601b0316421161283a5760405163015a4b7560e51b815260040160405180910390fd5b600382015460405163ba33565d60e01b81526001600160a01b039091169063ba33565d90612872903390899089908990600401615105565b5f6040518083038186803b158015612888575f5ffd5b505afa15801561289a573d5f5f3e3d5ffd5b50506040805180820182526001808701546001600160a01b03168252600287015463ffffffff600160a01b91829004166020840152600488015484518086019095526006890180549497506129d6965060ff929091048216949390928492919091169081111561290c5761290c614698565b600181111561291d5761291d614698565b815260200160018201805461293190614df1565b80601f016020809104026020016040519081016040528092919081815260200182805461295d90614df1565b80156129a85780601f1061297f576101008083540402835291602001916129a8565b820191905f5260205f20905b81548152906001019060200180831161298b57829003601f168201915b5050509190925250505060028601548490600160e01b900463ffffffff166129d08b8a61128f565b8a6136d6565b60028301805460ff60d01b1916600160d11b179055600a83016129f98682614fbf565b50600b8301612a088582614fbf565b5060048301546001600160a01b031615801590612a3857506001830154600160a01b90046001600160601b031615155b15612b2757600283015460018401545f91612a879161271091612a7891600160c01b90910461ffff16906001600160601b03600160a01b9091041661513d565b612a829190615154565b61327a565b90506001600160601b03811615612ac757609b546004850154612ac7916001600160a01b039182169162010000909104166001600160601b038416613af8565b60018401545f90612ae9908390600160a01b90046001600160601b0316615173565b90506001600160601b03811615612b245760058501546004860154612b24916001600160a01b0391821691166001600160601b038416613af8565b50505b6003830154604051637041233f60e11b8152336004820152602481018890526001600160a01b039091169063e082467e906044015f604051808303815f87803b158015612b72575f5ffd5b505af1158015612b84573d5f5f3e3d5ffd5b505050600184015460028501546040516001600160a01b039092169250889133917f659f23b2e7edf490e5fd6561c5148691ed0375ed7ddd3ab1bcfcfdbec4f209a991612be99163ffffffff600160a01b9091041690600a8a0190600b8b0190615211565b60405180910390a450505061151c6001606555565b612c066130db565b5f81815260986020526040902060028101546001600160a01b03163314612c40576040516370f43cb760e01b815260040160405180910390fd5b6002810154600160d81b900460ff1615612c6d57604051633e3d786960e01b815260040160405180910390fd5b604080516101c08101825282546001600160a01b038082168352600160a01b918290046001600160601b03908116602085015260018601548083169585019590955293829004909316606083015260028401549283166080830152820463ffffffff1660a0820152600160c01b820461ffff1660c08201525f91612d0e9190849060e0830190600160d01b900460ff1660038111156123d9576123d9614698565b90506003816003811115612d2457612d24614698565b146003829091612d4957604051634091b18960e11b8152600401611fa09291906150ea565b505060028201805460ff60d81b1916600160d81b17905560048201546001600160a01b031615801590612d8f57506001820154600160a01b90046001600160601b031615155b15612dcb57600282015460018301546004840154612dcb926001600160a01b0391821692911690600160a01b90046001600160601b0316613af8565b60028201546001830154604051600160a01b9091046001600160601b0316815284916001600160a01b0316907fe3ed40d31808582f7a92a30beacc0ec788d5091407ec6c10c1b999b3f317aea39060200160405180910390a350506112d36001606555565b612e386133b2565b6001600160a01b038116612e9d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611fa0565b6112d381613685565b612eaf81613197565b612ecc576040516314b0a41d60e11b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160601b031681602001516001600160601b03161115612f235760405163a7cf966560e01b815260040160405180910390fd5b612f308160a00151613b28565b612f3e82826060015161347d565b80609a5f612f4b85613134565b815260208082019290925260409081015f208351928401516001600160601b0316600160a01b9081026001600160a01b0394851617825591840151600182018054919094166001600160a01b03198216811785556060860151929492936001600160a81b03199092161790836002811115612fc857612fc8614698565b021790555060808201516002820180546001600160a01b0319166001600160a01b0390921691909117905560a08201518051600383018054909190829060ff19166001838181111561301c5761301c614698565b0217905550602082015160018201906130359082614fbf565b50505060c0820151600582019061304c9082614fbf565b50905050816020015163ffffffff16825f01516001600160a01b0316336001600160a01b03167f7cd76abd4025a20959a1b20f7c1536e3894a0735cd8de0215dde803ddea7f2d2846040516130a191906149e4565b60405180910390a460995f6130b584613134565b815260208101919091526040015f205460ff166130d7576130d782600161351e565b5050565b60026065540361312d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611fa0565b6002606555565b5f815f0151826020015163ffffffff1660405160200161317f92919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b6040516020818303038152906040526112bc90615241565b5f80826060015160028111156131af576131af614698565b141580156131c6575081516001600160a01b031615155b80156112bc575050602001516001600160601b0316151590565b5f60028260028111156131f5576131f5614698565b0361322157507f0000000000000000000000000000000000000000000000000000000000000000919050565b600182600281111561323557613235614698565b0361326157507f0000000000000000000000000000000000000000000000000000000000000000919050565b60405163fdea7c0960e01b815260040160405180910390fd5b5f6001600160601b038211156132e15760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201526536206269747360d01b6064820152608401611fa0565b5090565b6040516001600160a01b03808516602483015283166044820152606481018290526123079085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613be7565b6001606555565b5f60018260e00151600381111561337057613370614698565b14801561339d57508161014001516020015182602001516133919190615264565b6001600160601b031642115b156133aa57506003919050565b5060e0015190565b6033546001600160a01b0316331461231e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611fa0565b61271061ffff8216111561343357604051630601f69760e01b815260040160405180910390fd5b609b805461ffff191661ffff83169081179091556040519081527f886b2cfcb151fd8b19ed902cc88f4a06dd9fe351a4a9ab93f33fe84abc157edf9060200160405180910390a150565b5f613487826131e0565b6040516304240c4960e51b815290915033906001600160a01b038316906384818920906134b8908790600401614e47565b602060405180830381865afa1580156134d3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906134f79190615283565b6001600160a01b03161461151c576040516342ecfee960e11b815260040160405180910390fd5b8060995f61352b85613134565b81526020019081526020015f205f6101000a81548160ff021916908315150217905550816020015163ffffffff16825f01516001600160a01b0316336001600160a01b03167f48b63f21a1eb9dd6880e196de6d7db3fbd0c282b74f1298dcb4cf53472298f39846040516135a3911515815260200190565b60405180910390a45050565b6001600160a01b0381166135d657604051630863a45360e11b815260040160405180910390fd5b609b805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040517f262aa27c244f6f0088cb3092548a0adcaddedf459070a9ccab2dc6a07abe701d905f90a250565b5f54610100900460ff1661364f5760405162461bcd60e51b8152600401611fa09061529e565b61231e613cba565b5f54610100900460ff1661367d5760405162461bcd60e51b8152600401611fa09061529e565b61231e613ce9565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f855160018111156136ea576136ea614698565b0361389257600286600281111561370357613703614698565b036137c0575f8180602001905181019061371d9190615549565b905061372a818585613d0f565b6040516280b71560e41b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063080b715090613777908890859060040161561b565b5f604051808303815f875af1158015613792573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526137b9919081019061563a565b5050613af0565b60018660028111156137d4576137d4614698565b03613261575f818060200190518101906137ee919061566b565b90506137fb818585613d99565b6040516380c7d3f360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906380c7d3f39061384990889085906004016156e4565b5f60405180830381865afa158015613863573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261388a9190810190615767565b505050613af0565b6001855160018111156138a7576138a7614698565b03613ad7575f85602001518060200190518101906138c591906157c0565b6040805160018082528183019092529192505f91906020808301908036833701905050905081815f815181106138fd576138fd6157db565b61ffff909216602092830291909101909101525f600289600281111561392557613925614698565b036139e3575f8480602001905181019061393f9190615549565b905061394c818888613d0f565b604051625f5e5d60e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063017d79749061399b908b908590889060040161582d565b6020604051808303815f875af11580156139b7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906139db919061585e565b915050613ab9565b60018960028111156139f7576139f7614698565b03613261575f84806020019051810190613a11919061566b565b9050613a1e818888613d99565b604051630606d12160e51b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c0da242090613a6e908b9085908890600401615879565b5f60405180830381865afa158015613a88573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052613aaf9190810190615898565b509150613ab99050565b8061388a576040516359fa4a9360e01b815260040160405180910390fd5b6040516347d3772160e11b815260040160405180910390fd5b505050505050565b6040516001600160a01b03831660248201526044810182905261151c90849063a9059cbb60e01b90606401613319565b5f81516001811115613b3c57613b3c614698565b03613b6557602081015151156112d357604051631501e04760e21b815260040160405180910390fd5b600181516001811115613b7a57613b7a614698565b03613ad757806020015151602014613ba557604051631501e04760e21b815260040160405180910390fd5b5f8160200151806020019051810190613bbe91906157c0565b905061271061ffff821611156130d757604051631501e04760e21b815260040160405180910390fd5b5f613c3b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613e119092919063ffffffff16565b905080515f1480613c5b575080806020019051810190613c5b919061585e565b61151c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401611fa0565b5f54610100900460ff16613ce05760405162461bcd60e51b8152600401611fa09061529e565b61231e33613685565b5f54610100900460ff166133505760405162461bcd60e51b8152600401611fa09061529e565b8163ffffffff16835f015163ffffffff1614613d3e57604051634534032960e01b815260040160405180910390fd5b80836020015114613d6257604051638b56642d60e01b815260040160405180910390fd5b604083015151158015613d7b5750604083015160200151155b1561151c57604051637a8a1dbd60e11b815260040160405180910390fd5b8163ffffffff16835f015163ffffffff1614613dc857604051634534032960e01b815260040160405180910390fd5b80836020015114613dec57604051638b56642d60e01b815260040160405180910390fd5b5f8360400151511161151c57604051637a8a1dbd60e11b815260040160405180910390fd5b6060613e1f84845f85613e27565b949350505050565b606082471015613e885760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401611fa0565b5f5f866001600160a01b03168587604051613ea391906158cf565b5f6040518083038185875af1925050503d805f8114613edd576040519150601f19603f3d011682016040523d82523d5f602084013e613ee2565b606091505b5091509150613ef387838387613efe565b979650505050505050565b60608315613f6c5782515f03613f65576001600160a01b0385163b613f655760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611fa0565b5081613e1f565b613e1f8383815115613f815781518083602001fd5b8060405162461bcd60e51b8152600401611fa09190614270565b604080516101c0810182525f80825260208201819052918101829052606081018290526080810182905260a0810182905260c081018290529060e082019081525f602082018190526040820152606001613ff361400e565b81526020016060815260200160608152602001606081525090565b6040805160e0810182525f8082526020820181905291810182905290606082019081525f602082015260400161404261404f565b8152602001606081525090565b60408051808201909152805f614042565b634e487b7160e01b5f52604160045260245ffd5b604051606081016001600160401b038111828210171561409657614096614060565b60405290565b604080519081016001600160401b038111828210171561409657614096614060565b60405160a081016001600160401b038111828210171561409657614096614060565b60405160e081016001600160401b038111828210171561409657614096614060565b604051601f8201601f191681016001600160401b038111828210171561412a5761412a614060565b604052919050565b63ffffffff811681146112d3575f5ffd5b5f6001600160401b0382111561415b5761415b614060565b50601f01601f191660200190565b5f82601f830112614178575f5ffd5b813561418b61418682614143565b614102565b81815284602083860101111561419f575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f602082840312156141cb575f5ffd5b81356001600160401b038111156141e0575f5ffd5b8201606081850312156141f1575f5ffd5b6141f9614074565b813561420481614132565b81526020828101359082015260408201356001600160401b03811115614228575f5ffd5b61423486828501614169565b604083015250949350505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6112886020830184614242565b5f60408284031215614292575f5ffd5b61429a61409c565b823581526020928301359281019290925250919050565b5f82601f8301126142c0575f5ffd5b6142ca6040614102565b8060408401858111156142db575f5ffd5b845b818110156142f55780358452602093840193016142dd565b509095945050505050565b5f6001600160401b0382111561431857614318614060565b5060051b60200190565b5f82601f830112614331575f5ffd5b813561433f61418682614300565b8082825260208201915060208360051b860101925085831115614360575f5ffd5b602085015b838110156144c35780356001600160401b03811115614382575f5ffd5b86016060818903601f19011215614397575f5ffd5b61439f614074565b60208201356143ad81614132565b815260408201356001600160401b038111156143c7575f5ffd5b6143d68a602083860101614169565b60208301525060608201356001600160401b038111156143f4575f5ffd5b6020818401019250506060828a03121561440c575f5ffd5b61441461409c565b61441e8a84614282565b815260408301356001600160401b03811115614438575f5ffd5b80840193505089601f84011261444c575f5ffd5b823561445a61418682614300565b8082825260208201915060208360051b87010192508c83111561447b575f5ffd5b6020860195505b8286101561449d578535825260209586019590910190614482565b806020850152505050806040830152508085525050602083019250602081019050614365565b5095945050505050565b5f602082840312156144dd575f5ffd5b81356001600160401b038111156144f2575f5ffd5b8201808403610120811215614505575f5ffd5b61450d6140be565b823561451881614132565b8152602083810135908201526145318660408501614282565b60408201526080607f1983011215614547575f5ffd5b61454f61409c565b915061455e86608085016142b1565b825261456d8660c085016142b1565b602083015281606082015261010083013591506001600160401b03821115614593575f5ffd5b61459f86838501614322565b608082015295945050505050565b6001600160a01b03811681146112d3575f5ffd5b8035610dde816145ad565b5f604082840312156145dc575f5ffd5b6145e461409c565b905081356145f1816145ad565b8152602082013561460181614132565b602082015292915050565b5f6020828403121561461c575f5ffd5b81356001600160401b03811115614631575f5ffd5b820160808185031215614642575f5ffd5b61464a614074565b8135614655816145ad565b815261466485602084016145cc565b602082015260608201356001600160401b03811115614228575f5ffd5b5f60208284031215614691575f5ffd5b5035919050565b634e487b7160e01b5f52602160045260245ffd5b600481106146bc576146bc614698565b9052565b602081016112bc82846146ac565b5f5f604083850312156146df575f5ffd5b8235915060208301356001600160401b038111156146fb575f5ffd5b61470785828601614169565b9150509250929050565b61ffff811681146112d3575f5ffd5b5f60208284031215614730575f5ffd5b813561128881614711565b80151581146112d3575f5ffd5b5f5f60608385031215614759575f5ffd5b61476384846145cc565b915060408301356147738161473b565b809150509250929050565b600381106146bc576146bc614698565b5f8151600281106147a1576147a1614698565b80845250602082015160406020850152613e1f6040850182614242565b80516001600160a01b031682526020808201516001600160601b0316908301526040808201515f916147fa908501826001600160a01b03169052565b50606082015161480d606085018261477e565b50608082015161482860808501826001600160a01b03169052565b5060a082015160e060a085015261484260e085018261478e565b905060c083015184820360c086015261485b8282614242565b95945050505050565b6020815261487e6020820183516001600160a01b03169052565b5f602083015161489960408401826001600160601b03169052565b5060408301516001600160a01b03811660608401525060608301516001600160601b03811660808401525060808301516001600160a01b03811660a08401525060a083015163ffffffff811660c08401525060c083015161ffff811660e08401525060e083015161490e6101008401826146ac565b506101008301518015156101208401525061012083015163ffffffff8116610140840152506101408301516101c06101608401526149506101e08401826147be565b9050610160840151601f198483030161018085015261496f8282614242565b915050610180840151601f19848303016101a085015261498f8282614242565b9150506101a0840151601f19848303016101c085015261485b8282614242565b5f602082840312156149bf575f5ffd5b8135611288816145ad565b5f604082840312156149da575f5ffd5b61128883836145cc565b602081525f61128860208301846147be565b5f5f5f60608486031215614a08575f5ffd5b8335614a13816145ad565b92506020840135614a2381614711565b91506040840135614a33816145ad565b809150509250925092565b5f5f5f60608486031215614a50575f5ffd5b8335925060208401356001600160401b03811115614a6c575f5ffd5b614a7886828701614169565b92505060408401356001600160401b03811115614a93575f5ffd5b614a9f86828701614169565b9150509250925092565b6001600160601b03811681146112d3575f5ffd5b8035610dde81614aa9565b803560038110610dde575f5ffd5b5f60408284031215614ae6575f5ffd5b614aee61409c565b9050813560028110614afe575f5ffd5b815260208201356001600160401b03811115614b18575f5ffd5b614b2484828501614169565b60208301525092915050565b5f5f60608385031215614b41575f5ffd5b614b4b84846145cc565b915060408301356001600160401b03811115614b65575f5ffd5b830160e08186031215614b76575f5ffd5b614b7e6140e0565b614b87826145c1565b8152614b9560208301614abd565b6020820152614ba6604083016145c1565b6040820152614bb760608301614ac8565b6060820152614bc8608083016145c1565b608082015260a08201356001600160401b03811115614be5575f5ffd5b614bf187828501614ad6565b60a08301525060c08201356001600160401b03811115614c0f575f5ffd5b614c1b87828501614169565b60c08301525080925050509250929050565b63ffffffff8151168252602081015160208301525f604082015160606040850152613e1f6060850182614242565b602081525f6112886020830184614c2d565b805f5b6002811015612307578151845260209384019390910190600101614c70565b5f610120830163ffffffff8351168452602083015160208501526040830151614cc5604086018280518252602090810151910152565b506060830151614cd9608086018251614c6d565b60200151614cea60c0860182614c6d565b506080830151610120610100860152818151808452610140870191506101408160051b88010193506020830192505f5b81811015614dd35761013f19888603018352835163ffffffff8151168652602081015160606020880152614d516060880182614242565b905060408201519150868103604088015260608101614d7b82845180518252602090810151910152565b6020928301516060604084015280518083529301925f92608001905b80841015614dba5784518252602082019150602085019450600184019350614d97565b5097505050602094850194939093019250600101614d1a565b50929695505050505050565b602081525f6112886020830184614c8f565b600181811c90821680614e0557607f821691505b602082108103614e2357634e487b7160e01b5f52602260045260245ffd5b50919050565b80516001600160a01b0316825260209081015163ffffffff16910152565b604081016112bc8284614e29565b5f60208284031215614e65575f5ffd5b815161128881614132565b634e487b7160e01b5f52601160045260245ffd5b63ffffffff81811683821601908111156112bc576112bc614e70565b808201808211156112bc576112bc614e70565b80516001600160a01b031682526020808201515f91614ed490850182614e29565b50604082015160806060850152613e1f6080850182614242565b6001600160a01b03831681526040602082018190525f90613e1f90830184614eb3565b602081525f6112886020830184614eb3565b5f60208284031215614f33575f5ffd5b815161128881614aa9565b84815260018060a01b0384166020820152826040820152608060608201525f614f6a6080830184614eb3565b9695505050505050565b601f82111561151c57805f5260205f20601f840160051c81016020851015614f995750805b601f840160051c820191505b81811015614fb8575f8155600101614fa5565b5050505050565b81516001600160401b03811115614fd857614fd8614060565b614fec81614fe68454614df1565b84614f74565b6020601f82116001811461501e575f83156150075750848201515b5f19600385901b1c1916600184901b178455614fb8565b5f84815260208120601f198516915b8281101561504d578785015182556020948501946001909201910161502d565b508482101561506a57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b63ffffffff8716815263ffffffff8616602082015260018060a01b03851660408201526001600160601b038416606082015282608082015260c060a08201525f6150c660c0830184614242565b98975050505050505050565b828152604060208201525f613e1f6040830184614242565b604081016150f882856146ac565b61128860208301846146ac565b60018060a01b0385168152836020820152608060408201525f61512b6080830185614242565b8281036060840152613ef38185614242565b80820281158282048414176112bc576112bc614e70565b5f8261516e57634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160601b0382811682821603908111156112bc576112bc614e70565b5f815461519e81614df1565b8085526001821680156151b857600181146151d457615208565b60ff1983166020870152602082151560051b8701019350615208565b845f5260205f205f5b838110156151ff5781546020828a0101526001820191506020810190506151dd565b87016020019450505b50505092915050565b63ffffffff84168152606060208201525f61522f6060830185615192565b8281036040840152614f6a8185615192565b80516020808301519190811015614e23575f1960209190910360031b1b16919050565b6001600160601b0381811683821601908111156112bc576112bc614e70565b5f60208284031215615293575f5ffd5b8151611288816145ad565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b5f604082840312156152f9575f5ffd5b61530161409c565b825181526020928301519281019290925250919050565b5f82601f830112615327575f5ffd5b6153316040614102565b806040840185811115615342575f5ffd5b845b818110156142f5578051845260209384019301615344565b5f82601f83011261536b575f5ffd5b815161537961418682614143565b81815284602083860101111561538d575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f82601f8301126153b8575f5ffd5b81516153c661418682614300565b8082825260208201915060208360051b8601019250858311156153e7575f5ffd5b602085015b838110156144c35780518352602092830192016153ec565b5f82601f830112615413575f5ffd5b815161542161418682614300565b8082825260208201915060208360051b860101925085831115615442575f5ffd5b602085015b838110156144c35780516001600160401b03811115615464575f5ffd5b86016060818903601f19011215615479575f5ffd5b615481614074565b602082015161548f81614132565b815260408201516001600160401b038111156154a9575f5ffd5b6154b88a60208386010161535c565b60208301525060608201516001600160401b038111156154d6575f5ffd5b6020818401019250506060828a0312156154ee575f5ffd5b6154f661409c565b6155008a846152e9565b815260408301516001600160401b0381111561551a575f5ffd5b6155268b8286016153a9565b602083015250806040830152508085525050602083019250602081019050615447565b5f60208284031215615559575f5ffd5b81516001600160401b0381111561556e575f5ffd5b8201808403610120811215615581575f5ffd5b6155896140be565b825161559481614132565b8152602083810151908201526155ad86604085016152e9565b60408201526080607f19830112156155c3575f5ffd5b6155cb61409c565b91506155da8660808501615318565b82526155e98660c08501615318565b602083015281606082015261010083015191506001600160401b0382111561560f575f5ffd5b61459f86838501615404565b6156258184614e29565b606060408201525f613e1f6060830184614c8f565b5f6020828403121561564a575f5ffd5b81516001600160401b0381111561565f575f5ffd5b613e1f848285016153a9565b5f6020828403121561567b575f5ffd5b81516001600160401b03811115615690575f5ffd5b8201606081850312156156a1575f5ffd5b6156a9614074565b81516156b481614132565b81526020828101519082015260408201516001600160401b038111156156d8575f5ffd5b6142348682850161535c565b6156ee8184614e29565b606060408201525f613e1f6060830184614c2d565b5f82601f830112615712575f5ffd5b815161572061418682614300565b8082825260208201915060208360051b860101925085831115615741575f5ffd5b602085015b838110156144c3578051615759816145ad565b835260209283019201615746565b5f5f60408385031215615778575f5ffd5b82516001600160401b0381111561578d575f5ffd5b615799858286016153a9565b92505060208301516001600160401b038111156157b4575f5ffd5b61470785828601615703565b5f602082840312156157d0575f5ffd5b815161128881614711565b634e487b7160e01b5f52603260045260245ffd5b5f8151808452602084019350602083015f5b8281101561582357815161ffff16865260209586019590910190600101615801565b5093949350505050565b6158378185614e29565b608060408201525f61584c6080830185614c8f565b8281036060840152614f6a81856157ef565b5f6020828403121561586e575f5ffd5b81516112888161473b565b6158838185614e29565b608060408201525f61584c6080830185614c2d565b5f5f604083850312156158a9575f5ffd5b82516158b48161473b565b60208401519092506001600160401b038111156157b4575f5ffd5b5f82518060208501845e5f92019182525091905056fea2646970667358221220b88b1b9d03ea541e8f55c0a1cdbd896955ef8d6874cbc54eaff82856ac36059f64736f6c634300081e0033", } // TaskMailboxABI is the input ABI used to generate the binding from. From db3b2ee5f980eeaa3b7b91afc20ba9a37cca87be Mon Sep 17 00:00:00 2001 From: Yash Patil <40046473+ypatil12@users.noreply.github.com> Date: Mon, 1 Dec 2025 16:43:49 -0500 Subject: [PATCH 8/8] chore: bindings --- pkg/bindings/AVSDirectory/binding.go | 2 +- pkg/bindings/AllocationManager/binding.go | 2 +- pkg/bindings/AllocationManagerView/binding.go | 2 +- pkg/bindings/CrossChainRegistry/binding.go | 2 +- pkg/bindings/DelegationManager/binding.go | 2 +- pkg/bindings/EigenPod/binding.go | 2 +- pkg/bindings/EigenPodManager/binding.go | 2 +- pkg/bindings/EigenStrategy/binding.go | 2 +- pkg/bindings/KeyRegistrar/binding.go | 2 +- pkg/bindings/RewardsCoordinator/binding.go | 2 +- pkg/bindings/SlashingLib/binding.go | 2 +- pkg/bindings/Snapshots/binding.go | 2 +- pkg/bindings/StrategyBase/binding.go | 2 +- pkg/bindings/StrategyBaseTVLLimits/binding.go | 2 +- pkg/bindings/StrategyFactory/binding.go | 2 +- pkg/bindings/StrategyManager/binding.go | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pkg/bindings/AVSDirectory/binding.go b/pkg/bindings/AVSDirectory/binding.go index ec270ce33b..37bc2f9e16 100644 --- a/pkg/bindings/AVSDirectory/binding.go +++ b/pkg/bindings/AVSDirectory/binding.go @@ -39,7 +39,7 @@ type ISignatureUtilsMixinTypesSignatureWithSaltAndExpiry struct { // AVSDirectoryMetaData contains all meta data concerning the AVSDirectory contract. var AVSDirectoryMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_delegation\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"OPERATOR_AVS_REGISTRATION_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"OPERATOR_SET_FORCE_DEREGISTRATION_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"OPERATOR_SET_REGISTRATION_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"avsOperatorStatus\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumIAVSDirectoryTypes.OperatorAVSRegistrationStatus\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateOperatorAVSRegistrationDigestHash\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"cancelSalt\",\"inputs\":[{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deregisterOperatorFromAVS\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"initialPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"operatorSaltIsSpent\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"isSpent\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerOperatorToAVS\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSignature\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtilsMixinTypes.SignatureWithSaltAndExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateAVSMetadataURI\",\"inputs\":[{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"AVSMetadataURIUpdated\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"metadataURI\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorAVSRegistrationStatusUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"status\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enumIAVSDirectoryTypes.OperatorAVSRegistrationStatus\"}],\"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\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"CurrentlyPaused\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidNewPausedStatus\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyPauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyUnpauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OperatorAlreadyRegisteredToAVS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OperatorNotRegisteredToAVS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OperatorNotRegisteredToEigenLayer\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SaltSpent\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignatureExpired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]}]", - Bin: "0x60e060405234801561000f575f5ffd5b5060405161185938038061185983398101604081905261002e916101b3565b808084846001600160a01b038116610059576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b039081166080521660a0526100748161008a565b60c0525061008290506100d0565b5050506102e4565b5f5f829050601f815111156100bd578260405163305a27a960e01b81526004016100b49190610289565b60405180910390fd5b80516100c8826102be565b179392505050565b5f54610100900460ff16156101375760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b60648201526084016100b4565b5f5460ff90811614610186575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b038116811461019c575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b5f5f5f606084860312156101c5575f5ffd5b83516101d081610188565b60208501519093506101e181610188565b60408501519092506001600160401b038111156101fc575f5ffd5b8401601f8101861361020c575f5ffd5b80516001600160401b038111156102255761022561019f565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102535761025361019f565b60405281815282820160200188101561026a575f5ffd5b8160208401602083015e5f602083830101528093505050509250925092565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b805160208083015191908110156102de575f198160200360031b1b821691505b50919050565b60805160a05160c05161152f61032a5f395f81816104240152610d4d01525f8181610360015261053901525f818161023c01528181610ac90152610dbc015261152f5ff3fe608060405234801561000f575f5ffd5b5060043610610148575f3560e01c8063a1060c88116100bf578063dce974b911610079578063dce974b914610334578063df5cf7231461035b578063ec76f44214610382578063f2fde38b146103b5578063f698da25146103c8578063fabc1cbc146103d0575f5ffd5b8063a1060c881461029a578063a364f4da146102ad578063a98fb355146102c0578063c825fe68146102d3578063cd6dc687146102fa578063d79aceab1461030d575f5ffd5b80635ac86ab7116101105780635ac86ab7146101fa5780635c975abb1461021d578063715018a61461022f578063886f1195146102375780638da5cb5b146102765780639926ee7d14610287575f5ffd5b8063136439dd1461014c578063374823b51461016157806349075da3146101a357806354fd4d50146101dd578063595c6a67146101f2575b5f5ffd5b61015f61015a3660046110dc565b6103e3565b005b61018e61016f366004611107565b609960209081525f928352604080842090915290825290205460ff1681565b60405190151581526020015b60405180910390f35b6101d06101b1366004611131565b609860209081525f928352604080842090915290825290205460ff1681565b60405161019a919061117c565b6101e561041d565b60405161019a91906111d0565b61015f61044d565b61018e6102083660046111e9565b606654600160ff9092169190911b9081161490565b6066545b60405190815260200161019a565b61015f610461565b61025e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161019a565b6033546001600160a01b031661025e565b61015f610295366004611277565b610472565b6102216102a8366004611364565b610673565b61015f6102bb3660046113a7565b6106f2565b61015f6102ce3660046113c2565b6107b9565b6102217f809c5ac049c45b7a7f050a20f00c16cf63797efbf8b1eb8d749fdfa39ff8f92981565b61015f610308366004611107565b610800565b6102217fda2c89bafdd34776a2b8bb9c83c82f419e20cc8c67207f70edd58249b92661bd81565b6102217f4ee65f64218c67b68da66fd0db16560040a6b973290b9e71912d661ee53fe49581565b61025e7f000000000000000000000000000000000000000000000000000000000000000081565b61015f6103903660046110dc565b335f90815260996020908152604080832093835292905220805460ff19166001179055565b61015f6103c33660046113a7565b61091c565b610221610995565b61015f6103de3660046110dc565b610a4e565b6103eb610ab4565b60665481811681146104105760405163c61dca5d60e01b815260040160405180910390fd5b61041982610b57565b5050565b60606104487f0000000000000000000000000000000000000000000000000000000000000000610b94565b905090565b610455610ab4565b61045f5f19610b57565b565b610469610bd1565b61045f5f610c2b565b5f61047c81610c7c565b6001335f9081526098602090815260408083206001600160a01b038816845290915290205460ff1660018111156104b5576104b5611168565b036104d357604051631aa528bb60e11b815260040160405180910390fd5b6001600160a01b0383165f90815260996020908152604080832085830151845290915290205460ff161561051a57604051630d4c4c9160e21b815260040160405180910390fd5b6040516336b87bd760e11b81526001600160a01b0384811660048301527f00000000000000000000000000000000000000000000000000000000000000001690636d70f7ae90602401602060405180830381865afa15801561057e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105a29190611430565b6105bf57604051639f88c8af60e01b815260040160405180910390fd5b6105e3836105d7853386602001518760400151610673565b84516040860151610ca7565b6001600160a01b0383165f81815260996020908152604080832086830151845282528083208054600160ff19918216811790925533808652609885528386208787529094529382902080549094168117909355519092917ff0952b1c65271d819d39983d2abb044b9cace59bcc4d4dd389f586ebdcb15b4191610666919061117c565b60405180910390a3505050565b604080517fda2c89bafdd34776a2b8bb9c83c82f419e20cc8c67207f70edd58249b92661bd60208201526001600160a01b038087169282019290925290841660608201526080810183905260a081018290525f906106e99060c00160405160208183030381529060405280519060200120610cff565b95945050505050565b5f6106fc81610c7c565b6001335f9081526098602090815260408083206001600160a01b038716845290915290205460ff16600181111561073557610735611168565b14610753576040516352df45c960e01b815260040160405180910390fd5b335f8181526098602090815260408083206001600160a01b0387168085529252808320805460ff191690555190917ff0952b1c65271d819d39983d2abb044b9cace59bcc4d4dd389f586ebdcb15b41916107ad919061117c565b60405180910390a35050565b336001600160a01b03167fa89c1dc243d8908a96dd84944bcc97d6bc6ac00dd78e20621576be6a3c94371383836040516107f492919061144f565b60405180910390a25050565b5f54610100900460ff161580801561081e57505f54600160ff909116105b806108375750303b15801561083757505f5460ff166001145b61089f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff1916600117905580156108c0575f805461ff0019166101001790555b6108c982610b57565b6108d283610c2b565b8015610917575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b610924610bd1565b6001600160a01b0381166109895760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610896565b61099281610c2b565b50565b60408051808201909152600a81526922b4b3b2b72630bcb2b960b11b6020909101525f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea610a02610d45565b805160209182012060408051928301949094529281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b610a56610dba565b60665480198219811614610a7d5760405163c61dca5d60e01b815260040160405180910390fd5b606682905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c906020016107f4565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa158015610b16573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b3a9190611430565b61045f57604051631d77d47760e21b815260040160405180910390fd5b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b60605f610ba083610e6b565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b6033546001600160a01b0316331461045f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610896565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b606654600160ff83161b908116036109925760405163840a48d560e01b815260040160405180910390fd5b42811015610cc857604051630819bdcd60e01b815260040160405180910390fd5b610cdc6001600160a01b0385168484610e98565b610cf957604051638baa579f60e01b815260040160405180910390fd5b50505050565b5f610d08610995565b60405161190160f01b6020820152602281019190915260428101839052606201604051602081830303815290604052805190602001209050919050565b60605f610d717f0000000000000000000000000000000000000000000000000000000000000000610b94565b9050805f81518110610d8557610d8561147d565b016020908101516040516001600160f81b03199091169181019190915260210160405160208183030381529060405291505090565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e16573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e3a9190611491565b6001600160a01b0316336001600160a01b03161461045f5760405163794821ff60e01b815260040160405180910390fd5b5f60ff8216601f811115610e9257604051632cd44ac360e21b815260040160405180910390fd5b92915050565b5f5f5f610ea58585610ef6565b90925090505f816004811115610ebd57610ebd611168565b148015610edb5750856001600160a01b0316826001600160a01b0316145b80610eec5750610eec868686610f38565b9695505050505050565b5f5f8251604103610f2a576020830151604084015160608501515f1a610f1e8782858561101f565b94509450505050610f31565b505f905060025b9250929050565b5f5f5f856001600160a01b0316631626ba7e60e01b8686604051602401610f609291906114ac565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051610f9e91906114cc565b5f60405180830381855afa9150503d805f8114610fd6576040519150601f19603f3d011682016040523d82523d5f602084013e610fdb565b606091505b5091509150818015610fef57506020815110155b8015610eec57508051630b135d3f60e11b9061101490830160209081019084016114e2565b149695505050505050565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561105457505f905060036110d3565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156110a5573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b0381166110cd575f600192509250506110d3565b91505f90505b94509492505050565b5f602082840312156110ec575f5ffd5b5035919050565b6001600160a01b0381168114610992575f5ffd5b5f5f60408385031215611118575f5ffd5b8235611123816110f3565b946020939093013593505050565b5f5f60408385031215611142575f5ffd5b823561114d816110f3565b9150602083013561115d816110f3565b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b602081016002831061119c57634e487b7160e01b5f52602160045260245ffd5b91905290565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6111e260208301846111a2565b9392505050565b5f602082840312156111f9575f5ffd5b813560ff811681146111e2575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff8111828210171561124057611240611209565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561126f5761126f611209565b604052919050565b5f5f60408385031215611288575f5ffd5b8235611293816110f3565b9150602083013567ffffffffffffffff8111156112ae575f5ffd5b8301606081860312156112bf575f5ffd5b6112c761121d565b813567ffffffffffffffff8111156112dd575f5ffd5b8201601f810187136112ed575f5ffd5b803567ffffffffffffffff81111561130757611307611209565b61131a601f8201601f1916602001611246565b81815288602083850101111561132e575f5ffd5b816020840160208301375f6020928201830152835283810135908301525060409182013591810191909152919491935090915050565b5f5f5f5f60808587031215611377575f5ffd5b8435611382816110f3565b93506020850135611392816110f3565b93969395505050506040820135916060013590565b5f602082840312156113b7575f5ffd5b81356111e2816110f3565b5f5f602083850312156113d3575f5ffd5b823567ffffffffffffffff8111156113e9575f5ffd5b8301601f810185136113f9575f5ffd5b803567ffffffffffffffff81111561140f575f5ffd5b856020828401011115611420575f5ffd5b6020919091019590945092505050565b5f60208284031215611440575f5ffd5b815180151581146111e2575f5ffd5b60208152816020820152818360408301375f818301604090810191909152601f909201601f19160101919050565b634e487b7160e01b5f52603260045260245ffd5b5f602082840312156114a1575f5ffd5b81516111e2816110f3565b828152604060208201525f6114c460408301846111a2565b949350505050565b5f82518060208501845e5f920191825250919050565b5f602082840312156114f2575f5ffd5b505191905056fea264697066735822122064697c4fdcc50736b33bd46e800e17ba533956006c6510b66a7dabda26daab2a64736f6c634300081e0033", + Bin: "0x60e060405234801561000f575f5ffd5b5060405161185938038061185983398101604081905261002e916101b3565b808084846001600160a01b038116610059576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b039081166080521660a0526100748161008a565b60c0525061008290506100d0565b5050506102e4565b5f5f829050601f815111156100bd578260405163305a27a960e01b81526004016100b49190610289565b60405180910390fd5b80516100c8826102be565b179392505050565b5f54610100900460ff16156101375760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b60648201526084016100b4565b5f5460ff90811614610186575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b038116811461019c575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b5f5f5f606084860312156101c5575f5ffd5b83516101d081610188565b60208501519093506101e181610188565b60408501519092506001600160401b038111156101fc575f5ffd5b8401601f8101861361020c575f5ffd5b80516001600160401b038111156102255761022561019f565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102535761025361019f565b60405281815282820160200188101561026a575f5ffd5b8160208401602083015e5f602083830101528093505050509250925092565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b805160208083015191908110156102de575f198160200360031b1b821691505b50919050565b60805160a05160c05161152f61032a5f395f81816104240152610d4d01525f8181610360015261053901525f818161023c01528181610ac90152610dbc015261152f5ff3fe608060405234801561000f575f5ffd5b5060043610610148575f3560e01c8063a1060c88116100bf578063dce974b911610079578063dce974b914610334578063df5cf7231461035b578063ec76f44214610382578063f2fde38b146103b5578063f698da25146103c8578063fabc1cbc146103d0575f5ffd5b8063a1060c881461029a578063a364f4da146102ad578063a98fb355146102c0578063c825fe68146102d3578063cd6dc687146102fa578063d79aceab1461030d575f5ffd5b80635ac86ab7116101105780635ac86ab7146101fa5780635c975abb1461021d578063715018a61461022f578063886f1195146102375780638da5cb5b146102765780639926ee7d14610287575f5ffd5b8063136439dd1461014c578063374823b51461016157806349075da3146101a357806354fd4d50146101dd578063595c6a67146101f2575b5f5ffd5b61015f61015a3660046110dc565b6103e3565b005b61018e61016f366004611107565b609960209081525f928352604080842090915290825290205460ff1681565b60405190151581526020015b60405180910390f35b6101d06101b1366004611131565b609860209081525f928352604080842090915290825290205460ff1681565b60405161019a919061117c565b6101e561041d565b60405161019a91906111d0565b61015f61044d565b61018e6102083660046111e9565b606654600160ff9092169190911b9081161490565b6066545b60405190815260200161019a565b61015f610461565b61025e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161019a565b6033546001600160a01b031661025e565b61015f610295366004611277565b610472565b6102216102a8366004611364565b610673565b61015f6102bb3660046113a7565b6106f2565b61015f6102ce3660046113c2565b6107b9565b6102217f809c5ac049c45b7a7f050a20f00c16cf63797efbf8b1eb8d749fdfa39ff8f92981565b61015f610308366004611107565b610800565b6102217fda2c89bafdd34776a2b8bb9c83c82f419e20cc8c67207f70edd58249b92661bd81565b6102217f4ee65f64218c67b68da66fd0db16560040a6b973290b9e71912d661ee53fe49581565b61025e7f000000000000000000000000000000000000000000000000000000000000000081565b61015f6103903660046110dc565b335f90815260996020908152604080832093835292905220805460ff19166001179055565b61015f6103c33660046113a7565b61091c565b610221610995565b61015f6103de3660046110dc565b610a4e565b6103eb610ab4565b60665481811681146104105760405163c61dca5d60e01b815260040160405180910390fd5b61041982610b57565b5050565b60606104487f0000000000000000000000000000000000000000000000000000000000000000610b94565b905090565b610455610ab4565b61045f5f19610b57565b565b610469610bd1565b61045f5f610c2b565b5f61047c81610c7c565b6001335f9081526098602090815260408083206001600160a01b038816845290915290205460ff1660018111156104b5576104b5611168565b036104d357604051631aa528bb60e11b815260040160405180910390fd5b6001600160a01b0383165f90815260996020908152604080832085830151845290915290205460ff161561051a57604051630d4c4c9160e21b815260040160405180910390fd5b6040516336b87bd760e11b81526001600160a01b0384811660048301527f00000000000000000000000000000000000000000000000000000000000000001690636d70f7ae90602401602060405180830381865afa15801561057e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105a29190611430565b6105bf57604051639f88c8af60e01b815260040160405180910390fd5b6105e3836105d7853386602001518760400151610673565b84516040860151610ca7565b6001600160a01b0383165f81815260996020908152604080832086830151845282528083208054600160ff19918216811790925533808652609885528386208787529094529382902080549094168117909355519092917ff0952b1c65271d819d39983d2abb044b9cace59bcc4d4dd389f586ebdcb15b4191610666919061117c565b60405180910390a3505050565b604080517fda2c89bafdd34776a2b8bb9c83c82f419e20cc8c67207f70edd58249b92661bd60208201526001600160a01b038087169282019290925290841660608201526080810183905260a081018290525f906106e99060c00160405160208183030381529060405280519060200120610cff565b95945050505050565b5f6106fc81610c7c565b6001335f9081526098602090815260408083206001600160a01b038716845290915290205460ff16600181111561073557610735611168565b14610753576040516352df45c960e01b815260040160405180910390fd5b335f8181526098602090815260408083206001600160a01b0387168085529252808320805460ff191690555190917ff0952b1c65271d819d39983d2abb044b9cace59bcc4d4dd389f586ebdcb15b41916107ad919061117c565b60405180910390a35050565b336001600160a01b03167fa89c1dc243d8908a96dd84944bcc97d6bc6ac00dd78e20621576be6a3c94371383836040516107f492919061144f565b60405180910390a25050565b5f54610100900460ff161580801561081e57505f54600160ff909116105b806108375750303b15801561083757505f5460ff166001145b61089f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff1916600117905580156108c0575f805461ff0019166101001790555b6108c982610b57565b6108d283610c2b565b8015610917575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b610924610bd1565b6001600160a01b0381166109895760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610896565b61099281610c2b565b50565b60408051808201909152600a81526922b4b3b2b72630bcb2b960b11b6020909101525f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea610a02610d45565b805160209182012060408051928301949094529281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b610a56610dba565b60665480198219811614610a7d5760405163c61dca5d60e01b815260040160405180910390fd5b606682905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c906020016107f4565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa158015610b16573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b3a9190611430565b61045f57604051631d77d47760e21b815260040160405180910390fd5b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b60605f610ba083610e6b565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b6033546001600160a01b0316331461045f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610896565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b606654600160ff83161b908116036109925760405163840a48d560e01b815260040160405180910390fd5b42811015610cc857604051630819bdcd60e01b815260040160405180910390fd5b610cdc6001600160a01b0385168484610e98565b610cf957604051638baa579f60e01b815260040160405180910390fd5b50505050565b5f610d08610995565b60405161190160f01b6020820152602281019190915260428101839052606201604051602081830303815290604052805190602001209050919050565b60605f610d717f0000000000000000000000000000000000000000000000000000000000000000610b94565b9050805f81518110610d8557610d8561147d565b016020908101516040516001600160f81b03199091169181019190915260210160405160208183030381529060405291505090565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e16573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e3a9190611491565b6001600160a01b0316336001600160a01b03161461045f5760405163794821ff60e01b815260040160405180910390fd5b5f60ff8216601f811115610e9257604051632cd44ac360e21b815260040160405180910390fd5b92915050565b5f5f5f610ea58585610ef6565b90925090505f816004811115610ebd57610ebd611168565b148015610edb5750856001600160a01b0316826001600160a01b0316145b80610eec5750610eec868686610f38565b9695505050505050565b5f5f8251604103610f2a576020830151604084015160608501515f1a610f1e8782858561101f565b94509450505050610f31565b505f905060025b9250929050565b5f5f5f856001600160a01b0316631626ba7e60e01b8686604051602401610f609291906114ac565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051610f9e91906114cc565b5f60405180830381855afa9150503d805f8114610fd6576040519150601f19603f3d011682016040523d82523d5f602084013e610fdb565b606091505b5091509150818015610fef57506020815110155b8015610eec57508051630b135d3f60e11b9061101490830160209081019084016114e2565b149695505050505050565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561105457505f905060036110d3565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156110a5573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b0381166110cd575f600192509250506110d3565b91505f90505b94509492505050565b5f602082840312156110ec575f5ffd5b5035919050565b6001600160a01b0381168114610992575f5ffd5b5f5f60408385031215611118575f5ffd5b8235611123816110f3565b946020939093013593505050565b5f5f60408385031215611142575f5ffd5b823561114d816110f3565b9150602083013561115d816110f3565b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b602081016002831061119c57634e487b7160e01b5f52602160045260245ffd5b91905290565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6111e260208301846111a2565b9392505050565b5f602082840312156111f9575f5ffd5b813560ff811681146111e2575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff8111828210171561124057611240611209565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561126f5761126f611209565b604052919050565b5f5f60408385031215611288575f5ffd5b8235611293816110f3565b9150602083013567ffffffffffffffff8111156112ae575f5ffd5b8301606081860312156112bf575f5ffd5b6112c761121d565b813567ffffffffffffffff8111156112dd575f5ffd5b8201601f810187136112ed575f5ffd5b803567ffffffffffffffff81111561130757611307611209565b61131a601f8201601f1916602001611246565b81815288602083850101111561132e575f5ffd5b816020840160208301375f6020928201830152835283810135908301525060409182013591810191909152919491935090915050565b5f5f5f5f60808587031215611377575f5ffd5b8435611382816110f3565b93506020850135611392816110f3565b93969395505050506040820135916060013590565b5f602082840312156113b7575f5ffd5b81356111e2816110f3565b5f5f602083850312156113d3575f5ffd5b823567ffffffffffffffff8111156113e9575f5ffd5b8301601f810185136113f9575f5ffd5b803567ffffffffffffffff81111561140f575f5ffd5b856020828401011115611420575f5ffd5b6020919091019590945092505050565b5f60208284031215611440575f5ffd5b815180151581146111e2575f5ffd5b60208152816020820152818360408301375f818301604090810191909152601f909201601f19160101919050565b634e487b7160e01b5f52603260045260245ffd5b5f602082840312156114a1575f5ffd5b81516111e2816110f3565b828152604060208201525f6114c460408301846111a2565b949350505050565b5f82518060208501845e5f920191825250919050565b5f602082840312156114f2575f5ffd5b505191905056fea26469706673582212208c5d16c5bfd901fcabd7227c688591bcedfb540680c462b67a42ce12289dd0fd64736f6c634300081e0033", } // AVSDirectoryABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/AllocationManager/binding.go b/pkg/bindings/AllocationManager/binding.go index 486a9ad3d7..6de05a0a69 100644 --- a/pkg/bindings/AllocationManager/binding.go +++ b/pkg/bindings/AllocationManager/binding.go @@ -88,7 +88,7 @@ type OperatorSet struct { // AllocationManagerMetaData contains all meta data concerning the AllocationManager contract. var AllocationManagerMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_allocationManagerView\",\"type\":\"address\",\"internalType\":\"contractIAllocationManagerView\"},{\"name\":\"_delegation\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"},{\"name\":\"_eigenStrategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"_permissionController\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"},{\"name\":\"_DEALLOCATION_DELAY\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_ALLOCATION_CONFIGURATION_DELAY\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"ALLOCATION_CONFIGURATION_DELAY\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DEALLOCATION_DELAY\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addStrategiesToOperatorSet\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"clearDeallocationQueue\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"numToClear\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createOperatorSets\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"params\",\"type\":\"tuple[]\",\"internalType\":\"structIAllocationManagerTypes.CreateSetParams[]\",\"components\":[{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createOperatorSets\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"params\",\"type\":\"tuple[]\",\"internalType\":\"structIAllocationManagerTypes.CreateSetParamsV2[]\",\"components\":[{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"slasher\",\"type\":\"address\",\"internalType\":\"address\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createRedistributingOperatorSets\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"params\",\"type\":\"tuple[]\",\"internalType\":\"structIAllocationManagerTypes.CreateSetParams[]\",\"components\":[{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}]},{\"name\":\"redistributionRecipients\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createRedistributingOperatorSets\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"params\",\"type\":\"tuple[]\",\"internalType\":\"structIAllocationManagerTypes.CreateSetParamsV2[]\",\"components\":[{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"slasher\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"name\":\"redistributionRecipients\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deregisterFromOperatorSets\",\"inputs\":[{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structIAllocationManagerTypes.DeregisterParams\",\"components\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSetIds\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"eigenStrategy\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAVSRegistrar\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAVSRegistrar\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocatableMagnitude\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"allocatableMagnitude\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocatedSets\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"operatorSets\",\"type\":\"tuple[]\",\"internalType\":\"structOperatorSet[]\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocatedStake\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[{\"name\":\"slashableStake\",\"type\":\"uint256[][]\",\"internalType\":\"uint256[][]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocatedStrategies\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocation\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"allocation\",\"type\":\"tuple\",\"internalType\":\"structIAllocationManagerTypes.Allocation\",\"components\":[{\"name\":\"currentMagnitude\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"pendingDiff\",\"type\":\"int128\",\"internalType\":\"int128\"},{\"name\":\"effectBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocationDelay\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocations\",\"inputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"allocations\",\"type\":\"tuple[]\",\"internalType\":\"structIAllocationManagerTypes.Allocation[]\",\"components\":[{\"name\":\"currentMagnitude\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"pendingDiff\",\"type\":\"int128\",\"internalType\":\"int128\"},{\"name\":\"effectBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getEncumberedMagnitude\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"encumberedMagnitude\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMaxMagnitude\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"maxMagnitude\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMaxMagnitudes\",\"inputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"maxMagnitudes\",\"type\":\"uint64[]\",\"internalType\":\"uint64[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMaxMagnitudes\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[{\"name\":\"maxMagnitudes\",\"type\":\"uint64[]\",\"internalType\":\"uint64[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMaxMagnitudesAtBlock\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"maxMagnitudes\",\"type\":\"uint64[]\",\"internalType\":\"uint64[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMemberCount\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"memberCount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMembers\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMinimumSlashableStake\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"slashableStake\",\"type\":\"uint256[][]\",\"internalType\":\"uint256[][]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetCount\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"count\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPendingSlasher\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"pendingSlasher\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"effectBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRedistributionRecipient\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRegisteredSets\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"operatorSets\",\"type\":\"tuple[]\",\"internalType\":\"structOperatorSet[]\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getSlashCount\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"slashCount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getSlasher\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStrategiesInOperatorSet\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStrategyAllocations\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"operatorSets\",\"type\":\"tuple[]\",\"internalType\":\"structOperatorSet[]\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"allocations\",\"type\":\"tuple[]\",\"internalType\":\"structIAllocationManagerTypes.Allocation[]\",\"components\":[{\"name\":\"currentMagnitude\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"pendingDiff\",\"type\":\"int128\",\"internalType\":\"int128\"},{\"name\":\"effectBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isMemberOfOperatorSet\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"result\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isOperatorRedistributable\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"result\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isOperatorSet\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"result\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isOperatorSlashable\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isRedistributingOperatorSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"migrateSlashers\",\"inputs\":[{\"name\":\"operatorSets\",\"type\":\"tuple[]\",\"internalType\":\"structOperatorSet[]\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"modifyAllocations\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"params\",\"type\":\"tuple[]\",\"internalType\":\"structIAllocationManagerTypes.AllocateParams[]\",\"components\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"newMagnitudes\",\"type\":\"uint64[]\",\"internalType\":\"uint64[]\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"permissionController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerForOperatorSets\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structIAllocationManagerTypes.RegisterParams\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSetIds\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeStrategiesFromOperatorSet\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAVSRegistrar\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"registrar\",\"type\":\"address\",\"internalType\":\"contractIAVSRegistrar\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllocationDelay\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delay\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slashOperator\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structIAllocationManagerTypes.SlashingParams\",\"components\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"wadsToSlash\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"description\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateAVSMetadataURI\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateSlasher\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"slasher\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"viewImplementation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"AVSMetadataURIUpdated\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"metadataURI\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"AVSRegistrarSet\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"registrar\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIAVSRegistrar\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"AllocationDelaySet\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"delay\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"effectBlock\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"AllocationUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"magnitude\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"effectBlock\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EncumberedMagnitudeUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"encumberedMagnitude\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MaxMagnitudeUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"maxMagnitude\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorAddedToOperatorSet\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorRemovedFromOperatorSet\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetCreated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSlashed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"strategies\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"contractIStrategy[]\"},{\"name\":\"wadSlashed\",\"type\":\"uint256[]\",\"indexed\":false,\"internalType\":\"uint256[]\"},{\"name\":\"description\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RedistributionAddressSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"redistributionRecipient\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlasherMigrated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"slasher\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlasherUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"slasher\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"effectBlock\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyAddedToOperatorSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyRemovedFromOperatorSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AlreadyMemberOfSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CurrentlyPaused\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"Empty\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InsufficientMagnitude\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidAVSRegistrar\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCaller\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidNewPausedStatus\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperator\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidPermissions\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidRedistributionRecipient\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSnapshotOrdering\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidStrategy\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidWadToSlash\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ModificationAlreadyPending\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NonexistentAVSMetadata\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotMemberOfSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyPauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyUnpauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OperatorNotSlashable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OperatorSetAlreadyMigrated\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SameMagnitude\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlasherNotSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StrategiesMustBeInAscendingOrder\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StrategyAlreadyInOperatorSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StrategyNotInOperatorSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UninitializedAllocationDelay\",\"inputs\":[]}]", - Bin: "0x610160604052348015610010575f5ffd5b5060405161599e38038061599e83398101604081905261002f91610192565b868387878585896001600160a01b03811661005d576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b0390811660805293841660a05291831660c05263ffffffff90811660e052166101005290811661012052166101405261009b6100a7565b50505050505050610221565b5f54610100900460ff16156101125760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610161575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610177575f5ffd5b50565b805163ffffffff8116811461018d575f5ffd5b919050565b5f5f5f5f5f5f5f60e0888a0312156101a8575f5ffd5b87516101b381610163565b60208901519097506101c481610163565b60408901519096506101d581610163565b60608901519095506101e681610163565b60808901519094506101f781610163565b925061020560a0890161017a565b915061021360c0890161017a565b905092959891949750929550565b60805160a05160c05160e05161010051610120516101405161569261030c5f395f81816103860152818161093f01528181610a1f01528181610a4e01528181610a9801528181610ac301528181610d1f01528181610fc3015281816120f301526123ce01525f81816105800152818161198a015261374501525f81816106b701528181613439015261362701525f818161047b015281816112f3015261171401525f818161084d01526132cb01525f818161088201528181610ec501528181610f1301528181611c1d0152612ebb01525f81816106de0152818161261d0152613c0201526156925ff3fe608060405234801561000f575f5ffd5b506004361061037d575f3560e01c80636cfb4481116101d4578063b66bd98911610109578063d7794857116100a9578063f231bd0811610079578063f231bd08146108a4578063f605ce0814610679578063fabc1cbc146108b7578063fe4b84df146108ca575f5ffd5b8063d779485714610811578063db4df76114610848578063dc2af6921461086f578063df5cf7231461087d575f5ffd5b8063c221d8ae116100e4578063c221d8ae146107c5578063d1a83f54146107d8578063d3d96ff4146107eb578063d4a3fcce146107fe575f5ffd5b8063b66bd98914610775578063b9fbaed114610788578063ba1a84e5146107b7575f5ffd5b806394d7d00c11610174578063a9333ec81161014f578063a9333ec814610679578063a98218211461074f578063adc2e3d914610762578063b2447af7146105d0575f5ffd5b806394d7d00c1461071b578063952899ee14610729578063957dc50b1461073c575f5ffd5b806379ae50cd116101af57806379ae50cd146104305780637bc1ef61146106b2578063886f1195146106d95780638ce6485414610700575f5ffd5b80636cfb4481146106795780636e3492b51461069f5780636e875dba14610560575f5ffd5b80633dff8e7d116102b557806350feea20116102555780635ac86ab7116102255780635ac86ab7146106285780635c975abb1461064b578063670d3ba2146106535780636c9d7c5814610666575f5ffd5b806350feea20146105ec578063547afb87146105ff57806356c483e61461060d578063595c6a6714610620575f5ffd5b80634657e26a116102905780634657e26a1461057b5780634a10ffe5146105a25780634b5046ef146105bd5780634cfd2939146105d0575f5ffd5b80633dff8e7d1461052c57806340120dab1461053f5780634177a87c14610560575f5ffd5b8063261f84e0116103205780632bab2c4a116102fb5780632bab2c4a146104d2578063304c10cd146104e557806332a879e4146104f8578063363520571461050b575f5ffd5b8063261f84e0146104635780632981eb77146104765780632b453a9a146104b2575f5ffd5b80631352c3e61161035b5780631352c3e6146103f8578063136439dd1461041b57806315fe502814610430578063260dc75814610450575f5ffd5b80630b156bb6146103815780630f3df50e146103c557806310e1b9b8146103d8575b5f5ffd5b6103a87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6103a86103d33660046143aa565b6108dd565b6103eb6103e63660046143c4565b61091e565b6040516103bc919061440b565b61040b61040636600461443e565b610963565b60405190151581526020016103bc565b61042e610429366004614472565b6109de565b005b61044361043e366004614489565b610a18565b6040516103bc9190614507565b61040b61045e3660046143aa565b610a48565b61042e610471366004614559565b610a72565b61049d7f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016103bc565b6104c56104c036600461463e565b610a91565b6040516103bc91906146e1565b6104c56104e0366004614744565b610abc565b6103a86104f3366004614489565b610aef565b61042e6105063660046147c8565b610b1e565b61051e610519366004614848565b610b46565b6040516103bc92919061489a565b61042e61053a366004614990565b610c9b565b61055261054d3660046149dc565b610d17565b6040516103bc929190614a69565b61056e61043e3660046143aa565b6040516103bc9190614a8d565b6103a87f000000000000000000000000000000000000000000000000000000000000000081565b6105b06104c0366004614ad8565b6040516103bc9190614b1f565b61042e6105cb3660046147c8565b610d4a565b6105de61045e3660046143aa565b6040519081526020016103bc565b61042e6105fa366004614b5f565b610de6565b6105b06104c0366004614559565b61042e61061b366004614bbd565b610eba565b61042e610fa9565b61040b610636366004614be7565b606654600160ff9092169190911b9081161490565b6066546105de565b61040b61066136600461443e565b610fbd565b61042e610674366004614c07565b610fe7565b6106876106613660046149dc565b6040516001600160401b0390911681526020016103bc565b61042e6106ad366004614c48565b61107d565b61049d7f000000000000000000000000000000000000000000000000000000000000000081565b6103a87f000000000000000000000000000000000000000000000000000000000000000081565b61070e6104c0366004614c79565b6040516103bc9190614cbc565b6105b06104e0366004614cce565b61042e610737366004614d25565b611438565b61042e61074a366004614ece565b6118c9565b61042e61075d366004614f5e565b611b54565b61042e610770366004614fdc565b611be9565b61042e610783366004614b5f565b611f15565b61079b610796366004614489565b612052565b60408051921515835263ffffffff9091166020830152016103bc565b6105de61045e366004614489565b61056e6107d336600461443e565b6120ec565b61042e6107e636600461501e565b612117565b61042e6107f93660046149dc565b612230565b6103a861080c3660046143aa565b612340565b61082461081f3660046143aa565b6123c7565b604080516001600160a01b03909316835263ffffffff9091166020830152016103bc565b6103a87f000000000000000000000000000000000000000000000000000000000000000081565b61040b61045e366004614489565b6103a87f000000000000000000000000000000000000000000000000000000000000000081565b61040b6108b23660046143aa565b6123f7565b61042e6108c5366004614472565b612416565b61042e6108d8366004614472565b612483565b5f5f60a65f6108eb85612594565b815260208101919091526040015f20546001600160a01b0316905080156109125780610917565b620e16e45b9392505050565b604080516060810182525f80825260208201819052918101919091526109177f00000000000000000000000000000000000000000000000000000000000000006125f7565b6001600160a01b0382165f908152609e6020526040812081908161098685612594565b815260208082019290925260409081015f2081518083019092525460ff8116151580835261010090910463ffffffff16928201929092529150806109d45750806020015163ffffffff164311155b9150505b92915050565b6109e6612608565b6066548181168114610a0b5760405163c61dca5d60e01b815260040160405180910390fd5b610a14826126ab565b5050565b6060610a437f00000000000000000000000000000000000000000000000000000000000000006125f7565b919050565b5f610a437f00000000000000000000000000000000000000000000000000000000000000006125f7565b82610a7c816126e8565b610a8b8461053a858588612711565b50505050565b60606109177f00000000000000000000000000000000000000000000000000000000000000006125f7565b6060610ae77f00000000000000000000000000000000000000000000000000000000000000006125f7565b949350505050565b6001600160a01b038082165f908152609760205260408120549091168015610b175780610917565b5090919050565b84610b28816126e8565b610b3e86610b3787878a612711565b8585612117565b505050505050565b5f60606001610b5481612888565b5f6040518060400160405280876001600160a01b03168152602001866020016020810190610b82919061507d565b63ffffffff1690529050610b996060860186615096565b9050610ba86040870187615096565b905014610bc8576040516343714afd60e01b815260040160405180910390fd5b60208082015182516001600160a01b03165f90815260989092526040909120610bfa9163ffffffff908116906128b316565b610c1757604051631fb1705560e21b815260040160405180910390fd5b610c2d610c276020870187614489565b82610963565b610c4a5760405163ebbff49760e01b815260040160405180910390fd5b610c5381612340565b6001600160a01b0316336001600160a01b031614610c84576040516348f5c3ed60e01b815260040160405180910390fd5b610c8e85826128ca565b9350935050509250929050565b81610ca5816126e8565b6001600160a01b0383165f90815260a4602052604090205460ff16610cdd576040516348f7dbb960e01b815260040160405180910390fd5b5f5b8251811015610a8b57610d0f84848381518110610cfe57610cfe6150db565b6020026020010151620e16e4613025565b600101610cdf565b606080610d437f00000000000000000000000000000000000000000000000000000000000000006125f7565b9250929050565b5f610d5481612888565b838214610d74576040516343714afd60e01b815260040160405180910390fd5b5f5b84811015610ddd57610dd587878784818110610d9457610d946150db565b9050602002016020810190610da99190614489565b868685818110610dbb57610dbb6150db565b9050602002016020810190610dd091906150ef565b613197565b600101610d76565b50505050505050565b83610df0816126e8565b6040805180820182526001600160a01b03871680825263ffffffff80881660208085018290525f93845260989052939091209192610e2f92916128b316565b610e4c57604051631fb1705560e21b815260040160405180910390fd5b5f5b83811015610ddd57610eb282868684818110610e6c57610e6c6150db565b9050602002016020810190610e819190614489565b610ead60405180604001604052808c6001600160a01b031681526020018b63ffffffff168152506123f7565b61329b565b600101610e4e565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480610f9957610ef4836126e8565b6040516336b87bd760e11b81526001600160a01b0384811660048301527f00000000000000000000000000000000000000000000000000000000000000001690636d70f7ae90602401602060405180830381865afa158015610f58573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f7c9190615110565b610f995760405163ccea9e6f60e01b815260040160405180910390fd5b610fa483838361337b565b505050565b610fb1612608565b610fbb5f196126ab565b565b5f6109d87f00000000000000000000000000000000000000000000000000000000000000006125f7565b8151610ff2816126e8565b60208084015184516001600160a01b03165f908152609890925260409091206110249163ffffffff908116906128b316565b61104157604051631fb1705560e21b815260040160405180910390fd5b5f61104b84612340565b6001600160a01b0316036110725760405163255b0f4160e01b815260040160405180910390fd5b610fa483835f61354b565b600261108881612888565b61109d6110986020840184614489565b613707565b806110b657506110b66110986040840160208501614489565b6110d3576040516348f5c3ed60e01b815260040160405180910390fd5b5f5b6110e26040840184615096565b90508110156113a4575f604051806040016040528085602001602081019061110a9190614489565b6001600160a01b031681526020016111256040870187615096565b85818110611135576111356150db565b905060200201602081019061114a919061507d565b63ffffffff168152509050611197816020015163ffffffff1660985f8760200160208101906111799190614489565b6001600160a01b0316815260208101919091526040015f20906128b3565b6111b457604051631fb1705560e21b815260040160405180910390fd5b609e5f6111c46020870187614489565b6001600160a01b03166001600160a01b031681526020019081526020015f205f6111ed83612594565b815260208101919091526040015f205460ff1661121d576040516325131d4f60e01b815260040160405180910390fd5b61125761122982612594565b609c5f6112396020890189614489565b6001600160a01b0316815260208101919091526040015f20906137b0565b5061128f6112686020860186614489565b609a5f61127485612594565b81526020019081526020015f206137bb90919063ffffffff16565b5061129d6020850185614489565b6001600160a01b03167fad34c3070be1dffbcaa499d000ba2b8d9848aefcac3059df245dd95c4ece14fe826040516112d5919061512f565b60405180910390a2604080518082019091525f8152602081016113187f000000000000000000000000000000000000000000000000000000000000000043615151565b63ffffffff169052609e5f6113306020880188614489565b6001600160a01b03166001600160a01b031681526020019081526020015f205f61135984612594565b81526020808201929092526040015f2082518154939092015163ffffffff166101000264ffffffff00199215159290921664ffffffffff1990931692909217179055506001016110d5565b506113b86104f36040840160208501614489565b6001600160a01b031663303ca9566113d36020850185614489565b6113e36040860160208701614489565b6113f06040870187615096565b6040518563ffffffff1660e01b815260040161140f94939291906151a6565b5f604051808303815f87803b158015611426575f5ffd5b505af1158015610b3e573d5f5f3e3d5ffd5b5f61144281612888565b61144b836126e8565b5f5f5f61145786612052565b91509150816114795760405163fa55fc8160e01b815260040160405180910390fd5b91505f90505b83518110156118c25783818151811061149a5761149a6150db565b602002602001015160400151518482815181106114b9576114b96150db565b60200260200101516020015151146114e4576040516343714afd60e01b815260040160405180910390fd5b5f8482815181106114f7576114f76150db565b602090810291909101810151518082015181516001600160a01b03165f908152609890935260409092209092506115379163ffffffff908116906128b316565b61155457604051631fb1705560e21b815260040160405180910390fd5b5f61155f8783610963565b90505f5b868481518110611575576115756150db565b602002602001015160200151518110156118b7575f87858151811061159c5761159c6150db565b60200260200101516020015182815181106115b9576115b96150db565b602002602001015190506115d0898261ffff613197565b5f5f6115e58b6115df88612594565b856137cf565b91509150806040015163ffffffff165f1461161357604051630d8fcbe360e41b815260040160405180910390fd5b5f6116208785848961393b565b9050611665825f01518c8a8151811061163b5761163b6150db565b6020026020010151604001518781518110611658576116586150db565b6020026020010151613973565b600f0b602083018190525f0361168e57604051634606179360e11b815260040160405180910390fd5b5f8260200151600f0b12156117d25780156117545761170f6116af88612594565b6001600160a01b03808f165f90815260a360209081526040808320938a16835292905220908154600160801b90819004600f0b5f818152600180860160205260409091209390935583546001600160801b03908116939091011602179055565b6117397f000000000000000000000000000000000000000000000000000000000000000043615151565b611744906001615151565b63ffffffff16604083015261183f565b6117668360200151836020015161398a565b6001600160401b031660208401528a518b9089908110611788576117886150db565b60200260200101516040015185815181106117a5576117a56150db565b6020908102919091018101516001600160401b031683525f9083015263ffffffff4316604083015261183f565b5f8260200151600f0b131561183f576117f38360200151836020015161398a565b6001600160401b03908116602085018190528451909116101561182957604051636c9be0bf60e01b815260040160405180910390fd5b6118338943615151565b63ffffffff1660408301525b6118548c61184c89612594565b8686866139a9565b7f1487af5418c47ee5ea45ef4a93398668120890774a9e13487e61e9dc3baf76dd8c8886611889865f0151876020015161398a565b866040015160405161189f9594939291906151d2565b60405180910390a15050600190920191506115639050565b50505060010161147f565b5050505050565b5f5b8151811015610a14576119488282815181106118e9576118e96150db565b60200260200101516020015163ffffffff1660985f858581518110611910576119106150db565b60200260200101515f01516001600160a01b03166001600160a01b031681526020019081526020015f206128b390919063ffffffff16565b15611b4c575f6001600160a01b031661197983838151811061196c5761196c6150db565b6020026020010151612340565b6001600160a01b031603611b4c575f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fddbdefd8484815181106119c9576119c96150db565b6020908102919091010151516040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152633635205760e01b60448201526064015f60405180830381865afa158015611a29573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611a509190810190615223565b90505f81515f1480611a8c57505f6001600160a01b0316825f81518110611a7957611a796150db565b60200260200101516001600160a01b0316145b15611ab557838381518110611aa357611aa36150db565b60200260200101515f01519050611ad2565b815f81518110611ac757611ac76150db565b602002602001015190505b611af7848481518110611ae757611ae76150db565b602002602001015182600161354b565b7ff0c8fc7d71f647bd3a88ac369112517f6a4b8038e71913f2d20f71f877dfc725848481518110611b2a57611b2a6150db565b602002602001015182604051611b419291906152b2565b60405180910390a150505b6001016118cb565b82611b5e816126e8565b6001600160a01b0384165f90815260a4602052604090205460ff16611ba0576001600160a01b0384165f90815260a460205260409020805460ff191660011790555b836001600160a01b03167fa89c1dc243d8908a96dd84944bcc97d6bc6ac00dd78e20621576be6a3c9437138484604051611bdb929190615300565b60405180910390a250505050565b6002611bf481612888565b82611bfe816126e8565b6040516336b87bd760e11b81526001600160a01b0385811660048301527f00000000000000000000000000000000000000000000000000000000000000001690636d70f7ae90602401602060405180830381865afa158015611c62573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611c869190615110565b611ca35760405163ccea9e6f60e01b815260040160405180910390fd5b5f5b611cb26020850185615096565b9050811015611e7a57604080518082019091525f9080611cd56020880188614489565b6001600160a01b03168152602001868060200190611cf39190615096565b85818110611d0357611d036150db565b9050602002016020810190611d18919061507d565b63ffffffff90811690915260208083015183516001600160a01b03165f90815260989092526040909120929350611d549291908116906128b316565b611d7157604051631fb1705560e21b815260040160405180910390fd5b611d7b8682610963565b15611d9957604051636c6c6e2760e11b815260040160405180910390fd5b611dc2611da582612594565b6001600160a01b0388165f908152609c6020526040902090613be1565b50611dee86609a5f611dd385612594565b81526020019081526020015f20613bec90919063ffffffff16565b50856001600160a01b03167f43232edf9071753d2321e5fa7e018363ee248e5f2142e6c08edd3265bfb4895e82604051611e28919061512f565b60405180910390a26001600160a01b0386165f908152609e60205260408120600191611e5384612594565b815260208101919091526040015f20805460ff191691151591909117905550600101611ca5565b50611e8b6104f36020850185614489565b6001600160a01b031663c63fd50285611ea76020870187614489565b611eb46020880188615096565b611ec160408a018a615313565b6040518763ffffffff1660e01b8152600401611ee296959493929190615355565b5f604051808303815f87803b158015611ef9575f5ffd5b505af1158015611f0b573d5f5f3e3d5ffd5b5050505050505050565b83611f1f816126e8565b6040805180820182526001600160a01b03871680825263ffffffff80881660208085018290525f93845260989052939091209192611f5e92916128b316565b611f7b57604051631fb1705560e21b815260040160405180910390fd5b5f611f8582612594565b90505f5b84811015611f0b57611fce868683818110611fa657611fa66150db565b9050602002016020810190611fbb9190614489565b5f848152609960205260409020906137bb565b611feb576040516331bc342760e11b815260040160405180910390fd5b7f7b4b073d80dcac55a11177d8459ad9f664ceeb91f71f27167bb14f8152a7eeee8387878481811061201f5761201f6150db565b90506020020160208101906120349190614489565b6040516120429291906152b2565b60405180910390a1600101611f89565b6001600160a01b0381165f908152609b602090815260408083208151608081018352905463ffffffff80821680845260ff600160201b8404161515958401869052650100000000008304821694840194909452600160481b9091041660608201819052849391929190158015906120d35750826060015163ffffffff164310155b156120e2575050604081015160015b9590945092505050565b60606109d87f00000000000000000000000000000000000000000000000000000000000000006125f7565b83612121816126e8565b83518214612142576040516343714afd60e01b815260040160405180910390fd5b6001600160a01b0385165f90815260a4602052604090205460ff1661217a576040516348f7dbb960e01b815260040160405180910390fd5b5f5b8451811015610b3e575f848483818110612198576121986150db565b90506020020160208101906121ad9190614489565b90506001600160a01b0381166121d6576040516339b190bb60e11b815260040160405180910390fd5b620e16e3196001600160a01b03821601612203576040516364be1a3f60e11b815260040160405180910390fd5b61222787878481518110612219576122196150db565b602002602001015183613025565b5060010161217c565b8161223a816126e8565b60405163b526578760e01b81526001600160a01b03848116600483015283169063b526578790602401602060405180830381865afa15801561227e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a29190615110565b6122bf57604051631d0b13c160e31b815260040160405180910390fd5b6001600160a01b038381165f90815260976020526040902080546001600160a01b0319169184169190911790557f2ae945c40c44dc0ec263f95609c3fdc6952e0aefa22d6374e44f2c997acedf858361231781610aef565b604080516001600160a01b039384168152929091166020830152015b60405180910390a1505050565b5f5f60a75f61234e85612594565b815260208082019290925260409081015f20815160608101835281546001600160a01b0390811680835260019093015490811694820194909452600160a01b90930463ffffffff16918301829052919250158015906123b75750816040015163ffffffff164310155b1561091757506020015192915050565b5f5f6123f27f00000000000000000000000000000000000000000000000000000000000000006125f7565b915091565b5f620e16e4612405836108dd565b6001600160a01b0316141592915050565b61241e613c00565b606654801982198116146124455760405163c61dca5d60e01b815260040160405180910390fd5b606682905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b5f54610100900460ff16158080156124a157505f54600160ff909116105b806124ba5750303b1580156124ba57505f5460ff166001145b6125225760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff191660011790558015612543575f805461ff0019166101001790555b61254c826126ab565b8015610a14575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b5f815f0151826020015163ffffffff166040516020016125df92919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b6040516020818303038152906040526109d8906153a1565b613cb180610fa48363ffffffff8316565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa15801561266a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061268e9190615110565b610fbb57604051631d77d47760e21b815260040160405180910390fd5b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b6126f181613707565b61270e5760405163932d94f760e01b815260040160405180910390fd5b50565b60605f836001600160401b0381111561272c5761272c6142ba565b60405190808252806020026020018201604052801561278e57816020015b61277b60405180606001604052805f63ffffffff168152602001606081526020015f6001600160a01b031681525090565b81526020019060019003908161274a5790505b5090505f5b8481101561287f5760405180606001604052808787848181106127b8576127b86150db565b90506020028101906127ca91906153c4565b6127d890602081019061507d565b63ffffffff1681526020018787848181106127f5576127f56150db565b905060200281019061280791906153c4565b612815906020810190615096565b808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152505050908252506001600160a01b038616602090910152825183908390811061286c5761286c6150db565b6020908102919091010152600101612793565b50949350505050565b606654600160ff83161b9081160361270e5760405163840a48d560e01b815260040160405180910390fd5b5f8181526001830160205260408120541515610917565b5f6060816128db6040860186615096565b90506001600160401b038111156128f4576128f46142ba565b60405190808252806020026020018201604052801561291d578160200160208202803683370190505b50905061292d6040860186615096565b90506001600160401b03811115612946576129466142ba565b60405190808252806020026020018201604052801561296f578160200160208202803683370190505b50915060a55f61297e86612594565b81526020019081526020015f205f8154612997906153e2565b918290555092505f5b6129ad6040870187615096565b9050811015612fb757801580612a4057506129cb6040870187615096565b6129d66001846153fa565b8181106129e5576129e56150db565b90506020020160208101906129fa9190614489565b6001600160a01b0316612a106040880188615096565b83818110612a2057612a206150db565b9050602002016020810190612a359190614489565b6001600160a01b0316115b612a5d57604051639f1c805360e01b815260040160405180910390fd5b612a6a6060870187615096565b82818110612a7a57612a7a6150db565b905060200201355f108015612aba5750670de0b6b3a7640000612aa06060880188615096565b83818110612ab057612ab06150db565b9050602002013511155b612ad757604051631353603160e01b815260040160405180910390fd5b612b33612ae76040880188615096565b83818110612af757612af76150db565b9050602002016020810190612b0c9190614489565b60995f612b1889612594565b81526020019081526020015f20613ccf90919063ffffffff16565b612b50576040516331bc342760e11b815260040160405180910390fd5b5f80612ba2612b6260208a018a614489565b612b6b89612594565b612b7860408c018c615096565b87818110612b8857612b886150db565b9050602002016020810190612b9d9190614489565b6137cf565b805191935091506001600160401b03165f03612bbf575050612faf565b5f612bfa612bd060608b018b615096565b86818110612be057612be06150db565b85516001600160401b031692602090910201359050613cf0565b8351909150612c156001600160401b03808416908316613d06565b868681518110612c2757612c276150db565b60200260200101818152505081835f01818151612c44919061540d565b6001600160401b0316905250835182908590612c6190839061540d565b6001600160401b0316905250602084018051839190612c8190839061540d565b6001600160401b031690525060208301515f600f9190910b1215612d99575f612ce4612cb060608d018d615096565b88818110612cc057612cc06150db565b905060200201358560200151612cd59061542c565b6001600160801b031690613cf0565b9050806001600160401b031684602001818151612d019190615450565b600f0b9052507f1487af5418c47ee5ea45ef4a93398668120890774a9e13487e61e9dc3baf76dd612d3560208d018d614489565b8b612d4360408f018f615096565b8a818110612d5357612d536150db565b9050602002016020810190612d689190614489565b612d79885f0151896020015161398a565b8860400151604051612d8f9594939291906151d2565b60405180910390a1505b612deb612da960208c018c614489565b612db28b612594565b612dbf60408e018e615096565b89818110612dcf57612dcf6150db565b9050602002016020810190612de49190614489565b87876139a9565b7f1487af5418c47ee5ea45ef4a93398668120890774a9e13487e61e9dc3baf76dd612e1960208c018c614489565b8a612e2760408e018e615096565b89818110612e3757612e376150db565b9050602002016020810190612e4c9190614489565b8651604051612e60949392919043906151d2565b60405180910390a1612eb1612e7860208c018c614489565b612e8560408d018d615096565b88818110612e9557612e956150db565b9050602002016020810190612eaa9190614489565b8651613d1a565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016635ae679a7612eed60208d018d614489565b8b8b8e8060400190612eff9190615096565b8b818110612f0f57612f0f6150db565b9050602002016020810190612f249190614489565b89516040516001600160e01b031960e088901b168152612f4c9594939291899160040161547d565b6020604051808303815f875af1158015612f68573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612f8c91906154d0565b878681518110612f9e57612f9e6150db565b602002602001018181525050505050505b6001016129a0565b507f80969ad29428d6797ee7aad084f9e4a42a82fc506dcd2ca3b6fb431f85ccebe5612fe66020870187614489565b85612ff46040890189615096565b8561300260808c018c615313565b60405161301597969594939291906154e7565b60405180910390a1509250929050565b6040805180820182526001600160a01b038516808252845163ffffffff90811660208085018290525f938452609890529390912091926130669291613be116565b61308357604051631fb1705560e21b815260040160405180910390fd5b7f31629285ead2335ae0933f86ed2ae63321f7af77b4e6eaabc42c057880977e6c816040516130b2919061512f565b60405180910390a16001600160a01b038216620e16e414801590613147578260a65f6130dd85612594565b81526020019081526020015f205f6101000a8154816001600160a01b0302191690836001600160a01b031602179055507f90a6fa2a9b79b910872ebca540cf3bd8be827f586e6420c30d8836e30012907e828460405161313e9291906152b2565b60405180910390a15b5f5b8460200151518110156131865761317e8386602001518381518110613170576131706150db565b60200260200101518461329b565b600101613149565b506118c2828560400151600161354b565b6001600160a01b038381165f90815260a360209081526040808320938616835292905290812054600f81810b600160801b909204900b035b5f811180156131e157508261ffff1682105b156118c2576001600160a01b038086165f90815260a360209081526040808320938816835292905290812061321590613d9c565b90505f5f6132248884896137cf565b91509150806040015163ffffffff16431015613242575050506118c2565b61324f88848985856139a9565b6001600160a01b038089165f90815260a360209081526040808320938b1683529290522061327c90613dee565b50613286856153e2565b94506132918461557d565b93505050506131cf565b801561331d576001600160a01b03821673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac01480159061330057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614155b61331d57604051632711b74d60e11b815260040160405180910390fd5b61332d8260995f611dd387612594565b61334a5760405163585cfb2f60e01b815260040160405180910390fd5b7f7ab260fe0af193db5f4986770d831bda4ea46099dc817e8b6716dcae8af8e88b83836040516123339291906152b2565b6001600160a01b0383165f908152609b60209081526040918290208251608081018452905463ffffffff808216835260ff600160201b830416151593830193909352650100000000008104831693820193909352600160481b9092041660608201819052158015906133f75750806060015163ffffffff164310155b1561341157604081015163ffffffff168152600160208201525b63ffffffff8316604082015281156134345763ffffffff43166060820152613475565b61345e7f000000000000000000000000000000000000000000000000000000000000000043615151565b613469906001615151565b63ffffffff1660608201525b6001600160a01b0384165f818152609b60209081526040918290208451815486840151878601516060808a015163ffffffff95861664ffffffffff1990951694909417600160201b93151593909302929092176cffffffffffffffff0000000000191665010000000000918516919091026cffffffff000000000000000000191617600160481b92841692830217909355845195865290881692850192909252918301527f4e85751d6331506c6c62335f207eb31f12a61e570f34f5c17640308785c6d4db91015b60405180910390a150505050565b6001600160a01b038216613572576040516339b190bb60e11b815260040160405180910390fd5b5f60a75f61357f86612594565b815260208082019290925260409081015f20815160608101835281546001600160a01b03908116825260019092015491821693810193909352600160a01b900463ffffffff16908201819052909150158015906135e65750806040015163ffffffff164310155b156135fc5760208101516001600160a01b031681525b6001600160a01b038316602082015281156136225763ffffffff43166040820152613663565b61364c7f000000000000000000000000000000000000000000000000000000000000000043615151565b613657906001615151565b63ffffffff1660408201525b8060a75f61367087612594565b815260208082019290925260409081015f20835181546001600160a01b039182166001600160a01b031990911617825592840151600190910180549483015163ffffffff16600160a01b026001600160c01b031990951691909316179290921790558181015190517f3873f29d7a65a4d75f5ba28909172f486216a1420e77c3c2720815951a6b4f579161353d9187918791615592565b604051631beb2b9760e31b81526001600160a01b0382811660048301523360248301523060448301525f80356001600160e01b0319166064840152917f00000000000000000000000000000000000000000000000000000000000000009091169063df595cb890608401602060405180830381865afa15801561378c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109d89190615110565b5f6109178383613e6b565b5f610917836001600160a01b038416613e6b565b6040805180820182525f80825260208083018290528351606081018552828152808201839052808501839052845180860186526001600160a01b03898116855260a184528685209088168552909252938220929392819061382f90613f4e565b6001600160401b0390811682526001600160a01b038981165f81815260a260209081526040808320948c168084529482528083205486169682019690965291815260a082528481208b8252825284812092815291815290839020835160608101855290549283168152600160401b8304600f0b91810191909152600160c01b90910463ffffffff169181018290529192504310156138d1579092509050613933565b6138e2815f0151826020015161398a565b6001600160401b0316815260208101515f600f9190910b1215613920576139118260200151826020015161398a565b6001600160401b031660208301525b5f60408201819052602082015290925090505b935093915050565b5f61394c8460995f612b1889612594565b80156139555750815b801561396a575082516001600160401b031615155b95945050505050565b5f6109176001600160401b038085169084166155c5565b5f6109176139a1836001600160401b038616615450565b600f0b613f61565b6020808301516001600160a01b038088165f90815260a284526040808220928816825291909352909120546001600160401b03908116911614613a6f57602082810180516001600160a01b038881165f81815260a286526040808220938a1680835293875290819020805467ffffffffffffffff19166001600160401b0395861617905593518451918252948101919091529216908201527facf9095feb3a370c9cf692421c69ef320d4db5c66e6a7d29c7694eb02364fc559060600160405180910390a15b6001600160a01b038086165f90815260a060209081526040808320888452825280832093871683529281529082902083518154928501519385015163ffffffff16600160c01b0263ffffffff60c01b196001600160801b038616600160401b026001600160c01b03199095166001600160401b03909316929092179390931716919091179055600f0b15613b51576001600160a01b0385165f908152609f602090815260408083208784529091529020613b299084613bec565b506001600160a01b0385165f908152609d60205260409020613b4b9085613be1565b506118c2565b80516001600160401b03165f036118c2576001600160a01b0385165f908152609f602090815260408083208784529091529020613b8e90846137bb565b506001600160a01b0385165f908152609f602090815260408083208784529091529020613bba90613fcc565b5f036118c2576001600160a01b0385165f908152609d60205260409020610b3e90856137b0565b5f6109178383613fd5565b5f610917836001600160a01b038416613fd5565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613c5c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613c8091906155f2565b6001600160a01b0316336001600160a01b031614610fbb5760405163794821ff60e01b815260040160405180910390fd5b365f5f375f5f365f845af43d5f5f3e808015613ccb573d5ff35b3d5ffd5b6001600160a01b0381165f9081526001830160205260408120541515610917565b5f6109178383670de0b6b3a76400006001614021565b5f61091783670de0b6b3a76400008461407a565b6001600160a01b038084165f90815260a160209081526040808320938616835292905220613d4990438361415f565b604080516001600160a01b038086168252841660208201526001600160401b038316918101919091527f1c6458079a41077d003c11faf9bf097e693bd67979e4e6500bac7b29db779b5c90606001612333565b5f613db68254600f81810b600160801b909204900b131590565b15613dd457604051631ed9509560e11b815260040160405180910390fd5b508054600f0b5f9081526001909101602052604090205490565b5f613e088254600f81810b600160801b909204900b131590565b15613e2657604051631ed9509560e11b815260040160405180910390fd5b508054600f0b5f818152600180840160205260408220805492905583546fffffffffffffffffffffffffffffffff191692016001600160801b03169190911790915590565b5f8181526001830160205260408120548015613f45575f613e8d6001836153fa565b85549091505f90613ea0906001906153fa565b9050818114613eff575f865f018281548110613ebe57613ebe6150db565b905f5260205f200154905080875f018481548110613ede57613ede6150db565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080613f1057613f1061560d565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f9055600193505050506109d8565b5f9150506109d8565b5f6109d882670de0b6b3a7640000614173565b5f6001600160401b03821115613fc85760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203660448201526534206269747360d01b6064820152608401612519565b5090565b5f6109d8825490565b5f81815260018301602052604081205461401a57508154600181810184555f8481526020808220909301849055845484825282860190935260409020919091556109d8565b505f6109d8565b5f5f61402e86868661407a565b9050600183600281111561404457614044615621565b14801561406057505f848061405b5761405b615635565b868809115b1561396a57614070600182615649565b9695505050505050565b5f80805f19858709858702925082811083820303915050805f036140b1578382816140a7576140a7615635565b0492505050610917565b8084116140f85760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b6044820152606401612519565b5f8486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091025f889003889004909101858311909403939093029303949094049190911702949350505050565b610fa483836001600160401b0384166141b7565b81545f9080156141af576141998461418c6001846153fa565b5f91825260209091200190565b54600160201b90046001600160e01b03166109d4565b509092915050565b8254801561426d575f6141cf8561418c6001856153fa565b60408051808201909152905463ffffffff808216808452600160201b9092046001600160e01b0316602084015291925090851610156142215760405163151b8e3f60e11b815260040160405180910390fd5b805163ffffffff80861691160361426b57826142428661418c6001866153fa565b80546001600160e01b0392909216600160201b0263ffffffff9092169190911790555050505050565b505b506040805180820190915263ffffffff92831681526001600160e01b03918216602080830191825285546001810187555f968752952091519051909216600160201b029190921617910155565b634e487b7160e01b5f52604160045260245ffd5b604051606081016001600160401b03811182821017156142f0576142f06142ba565b60405290565b604051601f8201601f191681016001600160401b038111828210171561431e5761431e6142ba565b604052919050565b6001600160a01b038116811461270e575f5ffd5b803563ffffffff81168114610a43575f5ffd5b5f6040828403121561435d575f5ffd5b604080519081016001600160401b038111828210171561437f5761437f6142ba565b604052905080823561439081614326565b815261439e6020840161433a565b60208201525092915050565b5f604082840312156143ba575f5ffd5b610917838361434d565b5f5f5f608084860312156143d6575f5ffd5b83356143e181614326565b92506143f0856020860161434d565b9150606084013561440081614326565b809150509250925092565b81516001600160401b03168152602080830151600f0b9082015260408083015163ffffffff1690820152606081016109d8565b5f5f6060838503121561444f575f5ffd5b823561445a81614326565b9150614469846020850161434d565b90509250929050565b5f60208284031215614482575f5ffd5b5035919050565b5f60208284031215614499575f5ffd5b813561091781614326565b80516001600160a01b0316825260209081015163ffffffff16910152565b5f8151808452602084019350602083015f5b828110156144fd576144e78683516144a4565b60409590950194602091909101906001016144d4565b5093949350505050565b602081525f61091760208301846144c2565b5f5f83601f840112614529575f5ffd5b5081356001600160401b0381111561453f575f5ffd5b6020830191508360208260051b8501011115610d43575f5ffd5b5f5f5f6040848603121561456b575f5ffd5b833561457681614326565b925060208401356001600160401b03811115614590575f5ffd5b61459c86828701614519565b9497909650939450505050565b5f6001600160401b038211156145c1576145c16142ba565b5060051b60200190565b5f82601f8301126145da575f5ffd5b81356145ed6145e8826145a9565b6142f6565b8082825260208201915060208360051b86010192508583111561460e575f5ffd5b602085015b8381101561463457803561462681614326565b835260209283019201614613565b5095945050505050565b5f5f5f60808486031215614650575f5ffd5b61465a858561434d565b925060408401356001600160401b03811115614674575f5ffd5b614680868287016145cb565b92505060608401356001600160401b0381111561469b575f5ffd5b6146a7868287016145cb565b9150509250925092565b5f8151808452602084019350602083015f5b828110156144fd5781518652602095860195909101906001016146c3565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b8281101561473857603f198786030184526147238583516146b1565b94506020938401939190910190600101614707565b50929695505050505050565b5f5f5f5f60a08587031215614757575f5ffd5b614761868661434d565b935060408501356001600160401b0381111561477b575f5ffd5b614787878288016145cb565b93505060608501356001600160401b038111156147a2575f5ffd5b6147ae878288016145cb565b9250506147bd6080860161433a565b905092959194509250565b5f5f5f5f5f606086880312156147dc575f5ffd5b85356147e781614326565b945060208601356001600160401b03811115614801575f5ffd5b61480d88828901614519565b90955093505060408601356001600160401b0381111561482b575f5ffd5b61483788828901614519565b969995985093965092949392505050565b5f5f60408385031215614859575f5ffd5b823561486481614326565b915060208301356001600160401b0381111561487e575f5ffd5b830160a0818603121561488f575f5ffd5b809150509250929050565b828152604060208201525f610ae760408301846146b1565b5f82601f8301126148c1575f5ffd5b81356148cf6145e8826145a9565b8082825260208201915060208360051b8601019250858311156148f0575f5ffd5b602085015b838110156146345780356001600160401b03811115614912575f5ffd5b86016060818903601f19011215614927575f5ffd5b61492f6142ce565b61493b6020830161433a565b815260408201356001600160401b03811115614955575f5ffd5b6149648a6020838601016145cb565b6020830152506060820135915061497a82614326565b60408101919091528352602092830192016148f5565b5f5f604083850312156149a1575f5ffd5b82356149ac81614326565b915060208301356001600160401b038111156149c6575f5ffd5b6149d2858286016148b2565b9150509250929050565b5f5f604083850312156149ed575f5ffd5b82356149f881614326565b9150602083013561488f81614326565b5f8151808452602084019350602083015f5b828110156144fd57614a5386835180516001600160401b03168252602080820151600f0b9083015260409081015163ffffffff16910152565b6060959095019460209190910190600101614a1a565b604081525f614a7b60408301856144c2565b828103602084015261396a8185614a08565b602080825282518282018190525f918401906040840190835b81811015614acd5783516001600160a01b0316835260209384019390920191600101614aa6565b509095945050505050565b5f5f5f60408486031215614aea575f5ffd5b83356001600160401b03811115614aff575f5ffd5b614b0b86828701614519565b909450925050602084013561440081614326565b602080825282518282018190525f918401906040840190835b81811015614acd5783516001600160401b0316835260209384019390920191600101614b38565b5f5f5f5f60608587031215614b72575f5ffd5b8435614b7d81614326565b9350614b8b6020860161433a565b925060408501356001600160401b03811115614ba5575f5ffd5b614bb187828801614519565b95989497509550505050565b5f5f60408385031215614bce575f5ffd5b8235614bd981614326565b91506144696020840161433a565b5f60208284031215614bf7575f5ffd5b813560ff81168114610917575f5ffd5b5f5f60608385031215614c18575f5ffd5b614c22848461434d565b9150604083013561488f81614326565b5f60608284031215614c42575f5ffd5b50919050565b5f60208284031215614c58575f5ffd5b81356001600160401b03811115614c6d575f5ffd5b6109d484828501614c32565b5f5f5f60808486031215614c8b575f5ffd5b83356001600160401b03811115614ca0575f5ffd5b614cac868287016145cb565b9350506143f0856020860161434d565b602081525f6109176020830184614a08565b5f5f5f5f60608587031215614ce1575f5ffd5b8435614cec81614326565b935060208501356001600160401b03811115614d06575f5ffd5b614d1287828801614519565b90945092506147bd90506040860161433a565b5f5f60408385031215614d36575f5ffd5b8235614d4181614326565b915060208301356001600160401b03811115614d5b575f5ffd5b8301601f81018513614d6b575f5ffd5b8035614d796145e8826145a9565b8082825260208201915060208360051b850101925087831115614d9a575f5ffd5b602084015b83811015614ebf5780356001600160401b03811115614dbc575f5ffd5b85016080818b03601f19011215614dd1575f5ffd5b614dd96142ce565b614de68b6020840161434d565b815260608201356001600160401b03811115614e00575f5ffd5b614e0f8c6020838601016145cb565b60208301525060808201356001600160401b03811115614e2d575f5ffd5b6020818401019250508a601f830112614e44575f5ffd5b8135614e526145e8826145a9565b8082825260208201915060208360051b86010192508d831115614e73575f5ffd5b6020850194505b82851015614ea95784356001600160401b0381168114614e98575f5ffd5b825260209485019490910190614e7a565b6040840152505084525060209283019201614d9f565b50809450505050509250929050565b5f60208284031215614ede575f5ffd5b81356001600160401b03811115614ef3575f5ffd5b8201601f81018413614f03575f5ffd5b8035614f116145e8826145a9565b8082825260208201915060208360061b850101925086831115614f32575f5ffd5b6020840193505b8284101561407057614f4b878561434d565b8252602082019150604084019350614f39565b5f5f5f60408486031215614f70575f5ffd5b8335614f7b81614326565b925060208401356001600160401b03811115614f95575f5ffd5b8401601f81018613614fa5575f5ffd5b80356001600160401b03811115614fba575f5ffd5b866020828401011115614fcb575f5ffd5b939660209190910195509293505050565b5f5f60408385031215614fed575f5ffd5b8235614ff881614326565b915060208301356001600160401b03811115615012575f5ffd5b6149d285828601614c32565b5f5f5f5f60608587031215615031575f5ffd5b843561503c81614326565b935060208501356001600160401b03811115615056575f5ffd5b615062878288016148b2565b93505060408501356001600160401b03811115614ba5575f5ffd5b5f6020828403121561508d575f5ffd5b6109178261433a565b5f5f8335601e198436030181126150ab575f5ffd5b8301803591506001600160401b038211156150c4575f5ffd5b6020019150600581901b3603821315610d43575f5ffd5b634e487b7160e01b5f52603260045260245ffd5b5f602082840312156150ff575f5ffd5b813561ffff81168114610917575f5ffd5b5f60208284031215615120575f5ffd5b81518015158114610917575f5ffd5b604081016109d882846144a4565b634e487b7160e01b5f52601160045260245ffd5b63ffffffff81811683821601908111156109d8576109d861513d565b8183526020830192505f815f5b848110156144fd5763ffffffff6151908361433a565b168652602095860195919091019060010161517a565b6001600160a01b038581168252841660208201526060604082018190525f90614070908301848661516d565b6001600160a01b038616815260c081016151ef60208301876144a4565b6001600160a01b039490941660608201526001600160401b0392909216608083015263ffffffff1660a09091015292915050565b5f60208284031215615233575f5ffd5b81516001600160401b03811115615248575f5ffd5b8201601f81018413615258575f5ffd5b80516152666145e8826145a9565b8082825260208201915060208360051b850101925086831115615287575f5ffd5b6020840193505b828410156140705783516152a181614326565b82526020938401939091019061528e565b606081016152c082856144a4565b6001600160a01b039290921660409190910152919050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b602081525f610ae76020830184866152d8565b5f5f8335601e19843603018112615328575f5ffd5b8301803591506001600160401b03821115615341575f5ffd5b602001915036819003821315610d43575f5ffd5b6001600160a01b038781168252861660208201526080604082018190525f90615381908301868861516d565b82810360608401526153948185876152d8565b9998505050505050505050565b80516020808301519190811015614c42575f1960209190910360031b1b16919050565b5f8235603e198336030181126153d8575f5ffd5b9190910192915050565b5f600182016153f3576153f361513d565b5060010190565b818103818111156109d8576109d861513d565b6001600160401b0382811682821603908111156109d8576109d861513d565b5f81600f0b60016001607f1b031981036154485761544861513d565b5f0392915050565b600f81810b9083900b0160016001607f1b03811360016001607f1b0319821217156109d8576109d861513d565b6001600160a01b038716815260e0810161549a60208301886144a4565b60608201959095526001600160a01b039390931660808401526001600160401b0391821660a08401521660c09091015292915050565b5f602082840312156154e0575f5ffd5b5051919050565b6001600160a01b03881681525f60c08201615505602084018a6144a4565b60c060608401528690528660e083015f5b8881101561554657823561552981614326565b6001600160a01b0316825260209283019290910190600101615516565b50838103608085015261555981886146b1565b91505082810360a084015261556f8185876152d8565b9a9950505050505050505050565b5f8161558b5761558b61513d565b505f190190565b608081016155a082866144a4565b6001600160a01b0393909316604082015263ffffffff91909116606090910152919050565b600f82810b9082900b0360016001607f1b0319811260016001607f1b03821317156109d8576109d861513d565b5f60208284031215615602575f5ffd5b815161091781614326565b634e487b7160e01b5f52603160045260245ffd5b634e487b7160e01b5f52602160045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b808201808211156109d8576109d861513d56fea2646970667358221220eff7eea11020b0cb952b2e22f02345853ee62d6c23b2ee41b88b86fc347efc4364736f6c634300081e0033", + Bin: "0x610160604052348015610010575f5ffd5b5060405161599e38038061599e83398101604081905261002f91610192565b868387878585896001600160a01b03811661005d576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b0390811660805293841660a05291831660c05263ffffffff90811660e052166101005290811661012052166101405261009b6100a7565b50505050505050610221565b5f54610100900460ff16156101125760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610161575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610177575f5ffd5b50565b805163ffffffff8116811461018d575f5ffd5b919050565b5f5f5f5f5f5f5f60e0888a0312156101a8575f5ffd5b87516101b381610163565b60208901519097506101c481610163565b60408901519096506101d581610163565b60608901519095506101e681610163565b60808901519094506101f781610163565b925061020560a0890161017a565b915061021360c0890161017a565b905092959891949750929550565b60805160a05160c05160e05161010051610120516101405161569261030c5f395f81816103860152818161093f01528181610a1f01528181610a4e01528181610a9801528181610ac301528181610d1f01528181610fc3015281816120f301526123ce01525f81816105800152818161198a015261374501525f81816106b701528181613439015261362701525f818161047b015281816112f3015261171401525f818161084d01526132cb01525f818161088201528181610ec501528181610f1301528181611c1d0152612ebb01525f81816106de0152818161261d0152613c0201526156925ff3fe608060405234801561000f575f5ffd5b506004361061037d575f3560e01c80636cfb4481116101d4578063b66bd98911610109578063d7794857116100a9578063f231bd0811610079578063f231bd08146108a4578063f605ce0814610679578063fabc1cbc146108b7578063fe4b84df146108ca575f5ffd5b8063d779485714610811578063db4df76114610848578063dc2af6921461086f578063df5cf7231461087d575f5ffd5b8063c221d8ae116100e4578063c221d8ae146107c5578063d1a83f54146107d8578063d3d96ff4146107eb578063d4a3fcce146107fe575f5ffd5b8063b66bd98914610775578063b9fbaed114610788578063ba1a84e5146107b7575f5ffd5b806394d7d00c11610174578063a9333ec81161014f578063a9333ec814610679578063a98218211461074f578063adc2e3d914610762578063b2447af7146105d0575f5ffd5b806394d7d00c1461071b578063952899ee14610729578063957dc50b1461073c575f5ffd5b806379ae50cd116101af57806379ae50cd146104305780637bc1ef61146106b2578063886f1195146106d95780638ce6485414610700575f5ffd5b80636cfb4481146106795780636e3492b51461069f5780636e875dba14610560575f5ffd5b80633dff8e7d116102b557806350feea20116102555780635ac86ab7116102255780635ac86ab7146106285780635c975abb1461064b578063670d3ba2146106535780636c9d7c5814610666575f5ffd5b806350feea20146105ec578063547afb87146105ff57806356c483e61461060d578063595c6a6714610620575f5ffd5b80634657e26a116102905780634657e26a1461057b5780634a10ffe5146105a25780634b5046ef146105bd5780634cfd2939146105d0575f5ffd5b80633dff8e7d1461052c57806340120dab1461053f5780634177a87c14610560575f5ffd5b8063261f84e0116103205780632bab2c4a116102fb5780632bab2c4a146104d2578063304c10cd146104e557806332a879e4146104f8578063363520571461050b575f5ffd5b8063261f84e0146104635780632981eb77146104765780632b453a9a146104b2575f5ffd5b80631352c3e61161035b5780631352c3e6146103f8578063136439dd1461041b57806315fe502814610430578063260dc75814610450575f5ffd5b80630b156bb6146103815780630f3df50e146103c557806310e1b9b8146103d8575b5f5ffd5b6103a87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6103a86103d33660046143aa565b6108dd565b6103eb6103e63660046143c4565b61091e565b6040516103bc919061440b565b61040b61040636600461443e565b610963565b60405190151581526020016103bc565b61042e610429366004614472565b6109de565b005b61044361043e366004614489565b610a18565b6040516103bc9190614507565b61040b61045e3660046143aa565b610a48565b61042e610471366004614559565b610a72565b61049d7f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016103bc565b6104c56104c036600461463e565b610a91565b6040516103bc91906146e1565b6104c56104e0366004614744565b610abc565b6103a86104f3366004614489565b610aef565b61042e6105063660046147c8565b610b1e565b61051e610519366004614848565b610b46565b6040516103bc92919061489a565b61042e61053a366004614990565b610c9b565b61055261054d3660046149dc565b610d17565b6040516103bc929190614a69565b61056e61043e3660046143aa565b6040516103bc9190614a8d565b6103a87f000000000000000000000000000000000000000000000000000000000000000081565b6105b06104c0366004614ad8565b6040516103bc9190614b1f565b61042e6105cb3660046147c8565b610d4a565b6105de61045e3660046143aa565b6040519081526020016103bc565b61042e6105fa366004614b5f565b610de6565b6105b06104c0366004614559565b61042e61061b366004614bbd565b610eba565b61042e610fa9565b61040b610636366004614be7565b606654600160ff9092169190911b9081161490565b6066546105de565b61040b61066136600461443e565b610fbd565b61042e610674366004614c07565b610fe7565b6106876106613660046149dc565b6040516001600160401b0390911681526020016103bc565b61042e6106ad366004614c48565b61107d565b61049d7f000000000000000000000000000000000000000000000000000000000000000081565b6103a87f000000000000000000000000000000000000000000000000000000000000000081565b61070e6104c0366004614c79565b6040516103bc9190614cbc565b6105b06104e0366004614cce565b61042e610737366004614d25565b611438565b61042e61074a366004614ece565b6118c9565b61042e61075d366004614f5e565b611b54565b61042e610770366004614fdc565b611be9565b61042e610783366004614b5f565b611f15565b61079b610796366004614489565b612052565b60408051921515835263ffffffff9091166020830152016103bc565b6105de61045e366004614489565b61056e6107d336600461443e565b6120ec565b61042e6107e636600461501e565b612117565b61042e6107f93660046149dc565b612230565b6103a861080c3660046143aa565b612340565b61082461081f3660046143aa565b6123c7565b604080516001600160a01b03909316835263ffffffff9091166020830152016103bc565b6103a87f000000000000000000000000000000000000000000000000000000000000000081565b61040b61045e366004614489565b6103a87f000000000000000000000000000000000000000000000000000000000000000081565b61040b6108b23660046143aa565b6123f7565b61042e6108c5366004614472565b612416565b61042e6108d8366004614472565b612483565b5f5f60a65f6108eb85612594565b815260208101919091526040015f20546001600160a01b0316905080156109125780610917565b620e16e45b9392505050565b604080516060810182525f80825260208201819052918101919091526109177f00000000000000000000000000000000000000000000000000000000000000006125f7565b6001600160a01b0382165f908152609e6020526040812081908161098685612594565b815260208082019290925260409081015f2081518083019092525460ff8116151580835261010090910463ffffffff16928201929092529150806109d45750806020015163ffffffff164311155b9150505b92915050565b6109e6612608565b6066548181168114610a0b5760405163c61dca5d60e01b815260040160405180910390fd5b610a14826126ab565b5050565b6060610a437f00000000000000000000000000000000000000000000000000000000000000006125f7565b919050565b5f610a437f00000000000000000000000000000000000000000000000000000000000000006125f7565b82610a7c816126e8565b610a8b8461053a858588612711565b50505050565b60606109177f00000000000000000000000000000000000000000000000000000000000000006125f7565b6060610ae77f00000000000000000000000000000000000000000000000000000000000000006125f7565b949350505050565b6001600160a01b038082165f908152609760205260408120549091168015610b175780610917565b5090919050565b84610b28816126e8565b610b3e86610b3787878a612711565b8585612117565b505050505050565b5f60606001610b5481612888565b5f6040518060400160405280876001600160a01b03168152602001866020016020810190610b82919061507d565b63ffffffff1690529050610b996060860186615096565b9050610ba86040870187615096565b905014610bc8576040516343714afd60e01b815260040160405180910390fd5b60208082015182516001600160a01b03165f90815260989092526040909120610bfa9163ffffffff908116906128b316565b610c1757604051631fb1705560e21b815260040160405180910390fd5b610c2d610c276020870187614489565b82610963565b610c4a5760405163ebbff49760e01b815260040160405180910390fd5b610c5381612340565b6001600160a01b0316336001600160a01b031614610c84576040516348f5c3ed60e01b815260040160405180910390fd5b610c8e85826128ca565b9350935050509250929050565b81610ca5816126e8565b6001600160a01b0383165f90815260a4602052604090205460ff16610cdd576040516348f7dbb960e01b815260040160405180910390fd5b5f5b8251811015610a8b57610d0f84848381518110610cfe57610cfe6150db565b6020026020010151620e16e4613025565b600101610cdf565b606080610d437f00000000000000000000000000000000000000000000000000000000000000006125f7565b9250929050565b5f610d5481612888565b838214610d74576040516343714afd60e01b815260040160405180910390fd5b5f5b84811015610ddd57610dd587878784818110610d9457610d946150db565b9050602002016020810190610da99190614489565b868685818110610dbb57610dbb6150db565b9050602002016020810190610dd091906150ef565b613197565b600101610d76565b50505050505050565b83610df0816126e8565b6040805180820182526001600160a01b03871680825263ffffffff80881660208085018290525f93845260989052939091209192610e2f92916128b316565b610e4c57604051631fb1705560e21b815260040160405180910390fd5b5f5b83811015610ddd57610eb282868684818110610e6c57610e6c6150db565b9050602002016020810190610e819190614489565b610ead60405180604001604052808c6001600160a01b031681526020018b63ffffffff168152506123f7565b61329b565b600101610e4e565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480610f9957610ef4836126e8565b6040516336b87bd760e11b81526001600160a01b0384811660048301527f00000000000000000000000000000000000000000000000000000000000000001690636d70f7ae90602401602060405180830381865afa158015610f58573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f7c9190615110565b610f995760405163ccea9e6f60e01b815260040160405180910390fd5b610fa483838361337b565b505050565b610fb1612608565b610fbb5f196126ab565b565b5f6109d87f00000000000000000000000000000000000000000000000000000000000000006125f7565b8151610ff2816126e8565b60208084015184516001600160a01b03165f908152609890925260409091206110249163ffffffff908116906128b316565b61104157604051631fb1705560e21b815260040160405180910390fd5b5f61104b84612340565b6001600160a01b0316036110725760405163255b0f4160e01b815260040160405180910390fd5b610fa483835f61354b565b600261108881612888565b61109d6110986020840184614489565b613707565b806110b657506110b66110986040840160208501614489565b6110d3576040516348f5c3ed60e01b815260040160405180910390fd5b5f5b6110e26040840184615096565b90508110156113a4575f604051806040016040528085602001602081019061110a9190614489565b6001600160a01b031681526020016111256040870187615096565b85818110611135576111356150db565b905060200201602081019061114a919061507d565b63ffffffff168152509050611197816020015163ffffffff1660985f8760200160208101906111799190614489565b6001600160a01b0316815260208101919091526040015f20906128b3565b6111b457604051631fb1705560e21b815260040160405180910390fd5b609e5f6111c46020870187614489565b6001600160a01b03166001600160a01b031681526020019081526020015f205f6111ed83612594565b815260208101919091526040015f205460ff1661121d576040516325131d4f60e01b815260040160405180910390fd5b61125761122982612594565b609c5f6112396020890189614489565b6001600160a01b0316815260208101919091526040015f20906137b0565b5061128f6112686020860186614489565b609a5f61127485612594565b81526020019081526020015f206137bb90919063ffffffff16565b5061129d6020850185614489565b6001600160a01b03167fad34c3070be1dffbcaa499d000ba2b8d9848aefcac3059df245dd95c4ece14fe826040516112d5919061512f565b60405180910390a2604080518082019091525f8152602081016113187f000000000000000000000000000000000000000000000000000000000000000043615151565b63ffffffff169052609e5f6113306020880188614489565b6001600160a01b03166001600160a01b031681526020019081526020015f205f61135984612594565b81526020808201929092526040015f2082518154939092015163ffffffff166101000264ffffffff00199215159290921664ffffffffff1990931692909217179055506001016110d5565b506113b86104f36040840160208501614489565b6001600160a01b031663303ca9566113d36020850185614489565b6113e36040860160208701614489565b6113f06040870187615096565b6040518563ffffffff1660e01b815260040161140f94939291906151a6565b5f604051808303815f87803b158015611426575f5ffd5b505af1158015610b3e573d5f5f3e3d5ffd5b5f61144281612888565b61144b836126e8565b5f5f5f61145786612052565b91509150816114795760405163fa55fc8160e01b815260040160405180910390fd5b91505f90505b83518110156118c25783818151811061149a5761149a6150db565b602002602001015160400151518482815181106114b9576114b96150db565b60200260200101516020015151146114e4576040516343714afd60e01b815260040160405180910390fd5b5f8482815181106114f7576114f76150db565b602090810291909101810151518082015181516001600160a01b03165f908152609890935260409092209092506115379163ffffffff908116906128b316565b61155457604051631fb1705560e21b815260040160405180910390fd5b5f61155f8783610963565b90505f5b868481518110611575576115756150db565b602002602001015160200151518110156118b7575f87858151811061159c5761159c6150db565b60200260200101516020015182815181106115b9576115b96150db565b602002602001015190506115d0898261ffff613197565b5f5f6115e58b6115df88612594565b856137cf565b91509150806040015163ffffffff165f1461161357604051630d8fcbe360e41b815260040160405180910390fd5b5f6116208785848961393b565b9050611665825f01518c8a8151811061163b5761163b6150db565b6020026020010151604001518781518110611658576116586150db565b6020026020010151613973565b600f0b602083018190525f0361168e57604051634606179360e11b815260040160405180910390fd5b5f8260200151600f0b12156117d25780156117545761170f6116af88612594565b6001600160a01b03808f165f90815260a360209081526040808320938a16835292905220908154600160801b90819004600f0b5f818152600180860160205260409091209390935583546001600160801b03908116939091011602179055565b6117397f000000000000000000000000000000000000000000000000000000000000000043615151565b611744906001615151565b63ffffffff16604083015261183f565b6117668360200151836020015161398a565b6001600160401b031660208401528a518b9089908110611788576117886150db565b60200260200101516040015185815181106117a5576117a56150db565b6020908102919091018101516001600160401b031683525f9083015263ffffffff4316604083015261183f565b5f8260200151600f0b131561183f576117f38360200151836020015161398a565b6001600160401b03908116602085018190528451909116101561182957604051636c9be0bf60e01b815260040160405180910390fd5b6118338943615151565b63ffffffff1660408301525b6118548c61184c89612594565b8686866139a9565b7f1487af5418c47ee5ea45ef4a93398668120890774a9e13487e61e9dc3baf76dd8c8886611889865f0151876020015161398a565b866040015160405161189f9594939291906151d2565b60405180910390a15050600190920191506115639050565b50505060010161147f565b5050505050565b5f5b8151811015610a14576119488282815181106118e9576118e96150db565b60200260200101516020015163ffffffff1660985f858581518110611910576119106150db565b60200260200101515f01516001600160a01b03166001600160a01b031681526020019081526020015f206128b390919063ffffffff16565b15611b4c575f6001600160a01b031661197983838151811061196c5761196c6150db565b6020026020010151612340565b6001600160a01b031603611b4c575f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fddbdefd8484815181106119c9576119c96150db565b6020908102919091010151516040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152633635205760e01b60448201526064015f60405180830381865afa158015611a29573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611a509190810190615223565b90505f81515f1480611a8c57505f6001600160a01b0316825f81518110611a7957611a796150db565b60200260200101516001600160a01b0316145b15611ab557838381518110611aa357611aa36150db565b60200260200101515f01519050611ad2565b815f81518110611ac757611ac76150db565b602002602001015190505b611af7848481518110611ae757611ae76150db565b602002602001015182600161354b565b7ff0c8fc7d71f647bd3a88ac369112517f6a4b8038e71913f2d20f71f877dfc725848481518110611b2a57611b2a6150db565b602002602001015182604051611b419291906152b2565b60405180910390a150505b6001016118cb565b82611b5e816126e8565b6001600160a01b0384165f90815260a4602052604090205460ff16611ba0576001600160a01b0384165f90815260a460205260409020805460ff191660011790555b836001600160a01b03167fa89c1dc243d8908a96dd84944bcc97d6bc6ac00dd78e20621576be6a3c9437138484604051611bdb929190615300565b60405180910390a250505050565b6002611bf481612888565b82611bfe816126e8565b6040516336b87bd760e11b81526001600160a01b0385811660048301527f00000000000000000000000000000000000000000000000000000000000000001690636d70f7ae90602401602060405180830381865afa158015611c62573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611c869190615110565b611ca35760405163ccea9e6f60e01b815260040160405180910390fd5b5f5b611cb26020850185615096565b9050811015611e7a57604080518082019091525f9080611cd56020880188614489565b6001600160a01b03168152602001868060200190611cf39190615096565b85818110611d0357611d036150db565b9050602002016020810190611d18919061507d565b63ffffffff90811690915260208083015183516001600160a01b03165f90815260989092526040909120929350611d549291908116906128b316565b611d7157604051631fb1705560e21b815260040160405180910390fd5b611d7b8682610963565b15611d9957604051636c6c6e2760e11b815260040160405180910390fd5b611dc2611da582612594565b6001600160a01b0388165f908152609c6020526040902090613be1565b50611dee86609a5f611dd385612594565b81526020019081526020015f20613bec90919063ffffffff16565b50856001600160a01b03167f43232edf9071753d2321e5fa7e018363ee248e5f2142e6c08edd3265bfb4895e82604051611e28919061512f565b60405180910390a26001600160a01b0386165f908152609e60205260408120600191611e5384612594565b815260208101919091526040015f20805460ff191691151591909117905550600101611ca5565b50611e8b6104f36020850185614489565b6001600160a01b031663c63fd50285611ea76020870187614489565b611eb46020880188615096565b611ec160408a018a615313565b6040518763ffffffff1660e01b8152600401611ee296959493929190615355565b5f604051808303815f87803b158015611ef9575f5ffd5b505af1158015611f0b573d5f5f3e3d5ffd5b5050505050505050565b83611f1f816126e8565b6040805180820182526001600160a01b03871680825263ffffffff80881660208085018290525f93845260989052939091209192611f5e92916128b316565b611f7b57604051631fb1705560e21b815260040160405180910390fd5b5f611f8582612594565b90505f5b84811015611f0b57611fce868683818110611fa657611fa66150db565b9050602002016020810190611fbb9190614489565b5f848152609960205260409020906137bb565b611feb576040516331bc342760e11b815260040160405180910390fd5b7f7b4b073d80dcac55a11177d8459ad9f664ceeb91f71f27167bb14f8152a7eeee8387878481811061201f5761201f6150db565b90506020020160208101906120349190614489565b6040516120429291906152b2565b60405180910390a1600101611f89565b6001600160a01b0381165f908152609b602090815260408083208151608081018352905463ffffffff80821680845260ff600160201b8404161515958401869052650100000000008304821694840194909452600160481b9091041660608201819052849391929190158015906120d35750826060015163ffffffff164310155b156120e2575050604081015160015b9590945092505050565b60606109d87f00000000000000000000000000000000000000000000000000000000000000006125f7565b83612121816126e8565b83518214612142576040516343714afd60e01b815260040160405180910390fd5b6001600160a01b0385165f90815260a4602052604090205460ff1661217a576040516348f7dbb960e01b815260040160405180910390fd5b5f5b8451811015610b3e575f848483818110612198576121986150db565b90506020020160208101906121ad9190614489565b90506001600160a01b0381166121d6576040516339b190bb60e11b815260040160405180910390fd5b620e16e3196001600160a01b03821601612203576040516364be1a3f60e11b815260040160405180910390fd5b61222787878481518110612219576122196150db565b602002602001015183613025565b5060010161217c565b8161223a816126e8565b60405163b526578760e01b81526001600160a01b03848116600483015283169063b526578790602401602060405180830381865afa15801561227e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a29190615110565b6122bf57604051631d0b13c160e31b815260040160405180910390fd5b6001600160a01b038381165f90815260976020526040902080546001600160a01b0319169184169190911790557f2ae945c40c44dc0ec263f95609c3fdc6952e0aefa22d6374e44f2c997acedf858361231781610aef565b604080516001600160a01b039384168152929091166020830152015b60405180910390a1505050565b5f5f60a75f61234e85612594565b815260208082019290925260409081015f20815160608101835281546001600160a01b0390811680835260019093015490811694820194909452600160a01b90930463ffffffff16918301829052919250158015906123b75750816040015163ffffffff164310155b1561091757506020015192915050565b5f5f6123f27f00000000000000000000000000000000000000000000000000000000000000006125f7565b915091565b5f620e16e4612405836108dd565b6001600160a01b0316141592915050565b61241e613c00565b606654801982198116146124455760405163c61dca5d60e01b815260040160405180910390fd5b606682905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b5f54610100900460ff16158080156124a157505f54600160ff909116105b806124ba5750303b1580156124ba57505f5460ff166001145b6125225760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff191660011790558015612543575f805461ff0019166101001790555b61254c826126ab565b8015610a14575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b5f815f0151826020015163ffffffff166040516020016125df92919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b6040516020818303038152906040526109d8906153a1565b613cb180610fa48363ffffffff8316565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa15801561266a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061268e9190615110565b610fbb57604051631d77d47760e21b815260040160405180910390fd5b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b6126f181613707565b61270e5760405163932d94f760e01b815260040160405180910390fd5b50565b60605f836001600160401b0381111561272c5761272c6142ba565b60405190808252806020026020018201604052801561278e57816020015b61277b60405180606001604052805f63ffffffff168152602001606081526020015f6001600160a01b031681525090565b81526020019060019003908161274a5790505b5090505f5b8481101561287f5760405180606001604052808787848181106127b8576127b86150db565b90506020028101906127ca91906153c4565b6127d890602081019061507d565b63ffffffff1681526020018787848181106127f5576127f56150db565b905060200281019061280791906153c4565b612815906020810190615096565b808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152505050908252506001600160a01b038616602090910152825183908390811061286c5761286c6150db565b6020908102919091010152600101612793565b50949350505050565b606654600160ff83161b9081160361270e5760405163840a48d560e01b815260040160405180910390fd5b5f8181526001830160205260408120541515610917565b5f6060816128db6040860186615096565b90506001600160401b038111156128f4576128f46142ba565b60405190808252806020026020018201604052801561291d578160200160208202803683370190505b50905061292d6040860186615096565b90506001600160401b03811115612946576129466142ba565b60405190808252806020026020018201604052801561296f578160200160208202803683370190505b50915060a55f61297e86612594565b81526020019081526020015f205f8154612997906153e2565b918290555092505f5b6129ad6040870187615096565b9050811015612fb757801580612a4057506129cb6040870187615096565b6129d66001846153fa565b8181106129e5576129e56150db565b90506020020160208101906129fa9190614489565b6001600160a01b0316612a106040880188615096565b83818110612a2057612a206150db565b9050602002016020810190612a359190614489565b6001600160a01b0316115b612a5d57604051639f1c805360e01b815260040160405180910390fd5b612a6a6060870187615096565b82818110612a7a57612a7a6150db565b905060200201355f108015612aba5750670de0b6b3a7640000612aa06060880188615096565b83818110612ab057612ab06150db565b9050602002013511155b612ad757604051631353603160e01b815260040160405180910390fd5b612b33612ae76040880188615096565b83818110612af757612af76150db565b9050602002016020810190612b0c9190614489565b60995f612b1889612594565b81526020019081526020015f20613ccf90919063ffffffff16565b612b50576040516331bc342760e11b815260040160405180910390fd5b5f80612ba2612b6260208a018a614489565b612b6b89612594565b612b7860408c018c615096565b87818110612b8857612b886150db565b9050602002016020810190612b9d9190614489565b6137cf565b805191935091506001600160401b03165f03612bbf575050612faf565b5f612bfa612bd060608b018b615096565b86818110612be057612be06150db565b85516001600160401b031692602090910201359050613cf0565b8351909150612c156001600160401b03808416908316613d06565b868681518110612c2757612c276150db565b60200260200101818152505081835f01818151612c44919061540d565b6001600160401b0316905250835182908590612c6190839061540d565b6001600160401b0316905250602084018051839190612c8190839061540d565b6001600160401b031690525060208301515f600f9190910b1215612d99575f612ce4612cb060608d018d615096565b88818110612cc057612cc06150db565b905060200201358560200151612cd59061542c565b6001600160801b031690613cf0565b9050806001600160401b031684602001818151612d019190615450565b600f0b9052507f1487af5418c47ee5ea45ef4a93398668120890774a9e13487e61e9dc3baf76dd612d3560208d018d614489565b8b612d4360408f018f615096565b8a818110612d5357612d536150db565b9050602002016020810190612d689190614489565b612d79885f0151896020015161398a565b8860400151604051612d8f9594939291906151d2565b60405180910390a1505b612deb612da960208c018c614489565b612db28b612594565b612dbf60408e018e615096565b89818110612dcf57612dcf6150db565b9050602002016020810190612de49190614489565b87876139a9565b7f1487af5418c47ee5ea45ef4a93398668120890774a9e13487e61e9dc3baf76dd612e1960208c018c614489565b8a612e2760408e018e615096565b89818110612e3757612e376150db565b9050602002016020810190612e4c9190614489565b8651604051612e60949392919043906151d2565b60405180910390a1612eb1612e7860208c018c614489565b612e8560408d018d615096565b88818110612e9557612e956150db565b9050602002016020810190612eaa9190614489565b8651613d1a565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016635ae679a7612eed60208d018d614489565b8b8b8e8060400190612eff9190615096565b8b818110612f0f57612f0f6150db565b9050602002016020810190612f249190614489565b89516040516001600160e01b031960e088901b168152612f4c9594939291899160040161547d565b6020604051808303815f875af1158015612f68573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612f8c91906154d0565b878681518110612f9e57612f9e6150db565b602002602001018181525050505050505b6001016129a0565b507f80969ad29428d6797ee7aad084f9e4a42a82fc506dcd2ca3b6fb431f85ccebe5612fe66020870187614489565b85612ff46040890189615096565b8561300260808c018c615313565b60405161301597969594939291906154e7565b60405180910390a1509250929050565b6040805180820182526001600160a01b038516808252845163ffffffff90811660208085018290525f938452609890529390912091926130669291613be116565b61308357604051631fb1705560e21b815260040160405180910390fd5b7f31629285ead2335ae0933f86ed2ae63321f7af77b4e6eaabc42c057880977e6c816040516130b2919061512f565b60405180910390a16001600160a01b038216620e16e414801590613147578260a65f6130dd85612594565b81526020019081526020015f205f6101000a8154816001600160a01b0302191690836001600160a01b031602179055507f90a6fa2a9b79b910872ebca540cf3bd8be827f586e6420c30d8836e30012907e828460405161313e9291906152b2565b60405180910390a15b5f5b8460200151518110156131865761317e8386602001518381518110613170576131706150db565b60200260200101518461329b565b600101613149565b506118c2828560400151600161354b565b6001600160a01b038381165f90815260a360209081526040808320938616835292905290812054600f81810b600160801b909204900b035b5f811180156131e157508261ffff1682105b156118c2576001600160a01b038086165f90815260a360209081526040808320938816835292905290812061321590613d9c565b90505f5f6132248884896137cf565b91509150806040015163ffffffff16431015613242575050506118c2565b61324f88848985856139a9565b6001600160a01b038089165f90815260a360209081526040808320938b1683529290522061327c90613dee565b50613286856153e2565b94506132918461557d565b93505050506131cf565b801561331d576001600160a01b03821673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac01480159061330057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614155b61331d57604051632711b74d60e11b815260040160405180910390fd5b61332d8260995f611dd387612594565b61334a5760405163585cfb2f60e01b815260040160405180910390fd5b7f7ab260fe0af193db5f4986770d831bda4ea46099dc817e8b6716dcae8af8e88b83836040516123339291906152b2565b6001600160a01b0383165f908152609b60209081526040918290208251608081018452905463ffffffff808216835260ff600160201b830416151593830193909352650100000000008104831693820193909352600160481b9092041660608201819052158015906133f75750806060015163ffffffff164310155b1561341157604081015163ffffffff168152600160208201525b63ffffffff8316604082015281156134345763ffffffff43166060820152613475565b61345e7f000000000000000000000000000000000000000000000000000000000000000043615151565b613469906001615151565b63ffffffff1660608201525b6001600160a01b0384165f818152609b60209081526040918290208451815486840151878601516060808a015163ffffffff95861664ffffffffff1990951694909417600160201b93151593909302929092176cffffffffffffffff0000000000191665010000000000918516919091026cffffffff000000000000000000191617600160481b92841692830217909355845195865290881692850192909252918301527f4e85751d6331506c6c62335f207eb31f12a61e570f34f5c17640308785c6d4db91015b60405180910390a150505050565b6001600160a01b038216613572576040516339b190bb60e11b815260040160405180910390fd5b5f60a75f61357f86612594565b815260208082019290925260409081015f20815160608101835281546001600160a01b03908116825260019092015491821693810193909352600160a01b900463ffffffff16908201819052909150158015906135e65750806040015163ffffffff164310155b156135fc5760208101516001600160a01b031681525b6001600160a01b038316602082015281156136225763ffffffff43166040820152613663565b61364c7f000000000000000000000000000000000000000000000000000000000000000043615151565b613657906001615151565b63ffffffff1660408201525b8060a75f61367087612594565b815260208082019290925260409081015f20835181546001600160a01b039182166001600160a01b031990911617825592840151600190910180549483015163ffffffff16600160a01b026001600160c01b031990951691909316179290921790558181015190517f3873f29d7a65a4d75f5ba28909172f486216a1420e77c3c2720815951a6b4f579161353d9187918791615592565b604051631beb2b9760e31b81526001600160a01b0382811660048301523360248301523060448301525f80356001600160e01b0319166064840152917f00000000000000000000000000000000000000000000000000000000000000009091169063df595cb890608401602060405180830381865afa15801561378c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109d89190615110565b5f6109178383613e6b565b5f610917836001600160a01b038416613e6b565b6040805180820182525f80825260208083018290528351606081018552828152808201839052808501839052845180860186526001600160a01b03898116855260a184528685209088168552909252938220929392819061382f90613f4e565b6001600160401b0390811682526001600160a01b038981165f81815260a260209081526040808320948c168084529482528083205486169682019690965291815260a082528481208b8252825284812092815291815290839020835160608101855290549283168152600160401b8304600f0b91810191909152600160c01b90910463ffffffff169181018290529192504310156138d1579092509050613933565b6138e2815f0151826020015161398a565b6001600160401b0316815260208101515f600f9190910b1215613920576139118260200151826020015161398a565b6001600160401b031660208301525b5f60408201819052602082015290925090505b935093915050565b5f61394c8460995f612b1889612594565b80156139555750815b801561396a575082516001600160401b031615155b95945050505050565b5f6109176001600160401b038085169084166155c5565b5f6109176139a1836001600160401b038616615450565b600f0b613f61565b6020808301516001600160a01b038088165f90815260a284526040808220928816825291909352909120546001600160401b03908116911614613a6f57602082810180516001600160a01b038881165f81815260a286526040808220938a1680835293875290819020805467ffffffffffffffff19166001600160401b0395861617905593518451918252948101919091529216908201527facf9095feb3a370c9cf692421c69ef320d4db5c66e6a7d29c7694eb02364fc559060600160405180910390a15b6001600160a01b038086165f90815260a060209081526040808320888452825280832093871683529281529082902083518154928501519385015163ffffffff16600160c01b0263ffffffff60c01b196001600160801b038616600160401b026001600160c01b03199095166001600160401b03909316929092179390931716919091179055600f0b15613b51576001600160a01b0385165f908152609f602090815260408083208784529091529020613b299084613bec565b506001600160a01b0385165f908152609d60205260409020613b4b9085613be1565b506118c2565b80516001600160401b03165f036118c2576001600160a01b0385165f908152609f602090815260408083208784529091529020613b8e90846137bb565b506001600160a01b0385165f908152609f602090815260408083208784529091529020613bba90613fcc565b5f036118c2576001600160a01b0385165f908152609d60205260409020610b3e90856137b0565b5f6109178383613fd5565b5f610917836001600160a01b038416613fd5565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613c5c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613c8091906155f2565b6001600160a01b0316336001600160a01b031614610fbb5760405163794821ff60e01b815260040160405180910390fd5b365f5f375f5f365f845af43d5f5f3e808015613ccb573d5ff35b3d5ffd5b6001600160a01b0381165f9081526001830160205260408120541515610917565b5f6109178383670de0b6b3a76400006001614021565b5f61091783670de0b6b3a76400008461407a565b6001600160a01b038084165f90815260a160209081526040808320938616835292905220613d4990438361415f565b604080516001600160a01b038086168252841660208201526001600160401b038316918101919091527f1c6458079a41077d003c11faf9bf097e693bd67979e4e6500bac7b29db779b5c90606001612333565b5f613db68254600f81810b600160801b909204900b131590565b15613dd457604051631ed9509560e11b815260040160405180910390fd5b508054600f0b5f9081526001909101602052604090205490565b5f613e088254600f81810b600160801b909204900b131590565b15613e2657604051631ed9509560e11b815260040160405180910390fd5b508054600f0b5f818152600180840160205260408220805492905583546fffffffffffffffffffffffffffffffff191692016001600160801b03169190911790915590565b5f8181526001830160205260408120548015613f45575f613e8d6001836153fa565b85549091505f90613ea0906001906153fa565b9050818114613eff575f865f018281548110613ebe57613ebe6150db565b905f5260205f200154905080875f018481548110613ede57613ede6150db565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080613f1057613f1061560d565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f9055600193505050506109d8565b5f9150506109d8565b5f6109d882670de0b6b3a7640000614173565b5f6001600160401b03821115613fc85760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203660448201526534206269747360d01b6064820152608401612519565b5090565b5f6109d8825490565b5f81815260018301602052604081205461401a57508154600181810184555f8481526020808220909301849055845484825282860190935260409020919091556109d8565b505f6109d8565b5f5f61402e86868661407a565b9050600183600281111561404457614044615621565b14801561406057505f848061405b5761405b615635565b868809115b1561396a57614070600182615649565b9695505050505050565b5f80805f19858709858702925082811083820303915050805f036140b1578382816140a7576140a7615635565b0492505050610917565b8084116140f85760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b6044820152606401612519565b5f8486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091025f889003889004909101858311909403939093029303949094049190911702949350505050565b610fa483836001600160401b0384166141b7565b81545f9080156141af576141998461418c6001846153fa565b5f91825260209091200190565b54600160201b90046001600160e01b03166109d4565b509092915050565b8254801561426d575f6141cf8561418c6001856153fa565b60408051808201909152905463ffffffff808216808452600160201b9092046001600160e01b0316602084015291925090851610156142215760405163151b8e3f60e11b815260040160405180910390fd5b805163ffffffff80861691160361426b57826142428661418c6001866153fa565b80546001600160e01b0392909216600160201b0263ffffffff9092169190911790555050505050565b505b506040805180820190915263ffffffff92831681526001600160e01b03918216602080830191825285546001810187555f968752952091519051909216600160201b029190921617910155565b634e487b7160e01b5f52604160045260245ffd5b604051606081016001600160401b03811182821017156142f0576142f06142ba565b60405290565b604051601f8201601f191681016001600160401b038111828210171561431e5761431e6142ba565b604052919050565b6001600160a01b038116811461270e575f5ffd5b803563ffffffff81168114610a43575f5ffd5b5f6040828403121561435d575f5ffd5b604080519081016001600160401b038111828210171561437f5761437f6142ba565b604052905080823561439081614326565b815261439e6020840161433a565b60208201525092915050565b5f604082840312156143ba575f5ffd5b610917838361434d565b5f5f5f608084860312156143d6575f5ffd5b83356143e181614326565b92506143f0856020860161434d565b9150606084013561440081614326565b809150509250925092565b81516001600160401b03168152602080830151600f0b9082015260408083015163ffffffff1690820152606081016109d8565b5f5f6060838503121561444f575f5ffd5b823561445a81614326565b9150614469846020850161434d565b90509250929050565b5f60208284031215614482575f5ffd5b5035919050565b5f60208284031215614499575f5ffd5b813561091781614326565b80516001600160a01b0316825260209081015163ffffffff16910152565b5f8151808452602084019350602083015f5b828110156144fd576144e78683516144a4565b60409590950194602091909101906001016144d4565b5093949350505050565b602081525f61091760208301846144c2565b5f5f83601f840112614529575f5ffd5b5081356001600160401b0381111561453f575f5ffd5b6020830191508360208260051b8501011115610d43575f5ffd5b5f5f5f6040848603121561456b575f5ffd5b833561457681614326565b925060208401356001600160401b03811115614590575f5ffd5b61459c86828701614519565b9497909650939450505050565b5f6001600160401b038211156145c1576145c16142ba565b5060051b60200190565b5f82601f8301126145da575f5ffd5b81356145ed6145e8826145a9565b6142f6565b8082825260208201915060208360051b86010192508583111561460e575f5ffd5b602085015b8381101561463457803561462681614326565b835260209283019201614613565b5095945050505050565b5f5f5f60808486031215614650575f5ffd5b61465a858561434d565b925060408401356001600160401b03811115614674575f5ffd5b614680868287016145cb565b92505060608401356001600160401b0381111561469b575f5ffd5b6146a7868287016145cb565b9150509250925092565b5f8151808452602084019350602083015f5b828110156144fd5781518652602095860195909101906001016146c3565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b8281101561473857603f198786030184526147238583516146b1565b94506020938401939190910190600101614707565b50929695505050505050565b5f5f5f5f60a08587031215614757575f5ffd5b614761868661434d565b935060408501356001600160401b0381111561477b575f5ffd5b614787878288016145cb565b93505060608501356001600160401b038111156147a2575f5ffd5b6147ae878288016145cb565b9250506147bd6080860161433a565b905092959194509250565b5f5f5f5f5f606086880312156147dc575f5ffd5b85356147e781614326565b945060208601356001600160401b03811115614801575f5ffd5b61480d88828901614519565b90955093505060408601356001600160401b0381111561482b575f5ffd5b61483788828901614519565b969995985093965092949392505050565b5f5f60408385031215614859575f5ffd5b823561486481614326565b915060208301356001600160401b0381111561487e575f5ffd5b830160a0818603121561488f575f5ffd5b809150509250929050565b828152604060208201525f610ae760408301846146b1565b5f82601f8301126148c1575f5ffd5b81356148cf6145e8826145a9565b8082825260208201915060208360051b8601019250858311156148f0575f5ffd5b602085015b838110156146345780356001600160401b03811115614912575f5ffd5b86016060818903601f19011215614927575f5ffd5b61492f6142ce565b61493b6020830161433a565b815260408201356001600160401b03811115614955575f5ffd5b6149648a6020838601016145cb565b6020830152506060820135915061497a82614326565b60408101919091528352602092830192016148f5565b5f5f604083850312156149a1575f5ffd5b82356149ac81614326565b915060208301356001600160401b038111156149c6575f5ffd5b6149d2858286016148b2565b9150509250929050565b5f5f604083850312156149ed575f5ffd5b82356149f881614326565b9150602083013561488f81614326565b5f8151808452602084019350602083015f5b828110156144fd57614a5386835180516001600160401b03168252602080820151600f0b9083015260409081015163ffffffff16910152565b6060959095019460209190910190600101614a1a565b604081525f614a7b60408301856144c2565b828103602084015261396a8185614a08565b602080825282518282018190525f918401906040840190835b81811015614acd5783516001600160a01b0316835260209384019390920191600101614aa6565b509095945050505050565b5f5f5f60408486031215614aea575f5ffd5b83356001600160401b03811115614aff575f5ffd5b614b0b86828701614519565b909450925050602084013561440081614326565b602080825282518282018190525f918401906040840190835b81811015614acd5783516001600160401b0316835260209384019390920191600101614b38565b5f5f5f5f60608587031215614b72575f5ffd5b8435614b7d81614326565b9350614b8b6020860161433a565b925060408501356001600160401b03811115614ba5575f5ffd5b614bb187828801614519565b95989497509550505050565b5f5f60408385031215614bce575f5ffd5b8235614bd981614326565b91506144696020840161433a565b5f60208284031215614bf7575f5ffd5b813560ff81168114610917575f5ffd5b5f5f60608385031215614c18575f5ffd5b614c22848461434d565b9150604083013561488f81614326565b5f60608284031215614c42575f5ffd5b50919050565b5f60208284031215614c58575f5ffd5b81356001600160401b03811115614c6d575f5ffd5b6109d484828501614c32565b5f5f5f60808486031215614c8b575f5ffd5b83356001600160401b03811115614ca0575f5ffd5b614cac868287016145cb565b9350506143f0856020860161434d565b602081525f6109176020830184614a08565b5f5f5f5f60608587031215614ce1575f5ffd5b8435614cec81614326565b935060208501356001600160401b03811115614d06575f5ffd5b614d1287828801614519565b90945092506147bd90506040860161433a565b5f5f60408385031215614d36575f5ffd5b8235614d4181614326565b915060208301356001600160401b03811115614d5b575f5ffd5b8301601f81018513614d6b575f5ffd5b8035614d796145e8826145a9565b8082825260208201915060208360051b850101925087831115614d9a575f5ffd5b602084015b83811015614ebf5780356001600160401b03811115614dbc575f5ffd5b85016080818b03601f19011215614dd1575f5ffd5b614dd96142ce565b614de68b6020840161434d565b815260608201356001600160401b03811115614e00575f5ffd5b614e0f8c6020838601016145cb565b60208301525060808201356001600160401b03811115614e2d575f5ffd5b6020818401019250508a601f830112614e44575f5ffd5b8135614e526145e8826145a9565b8082825260208201915060208360051b86010192508d831115614e73575f5ffd5b6020850194505b82851015614ea95784356001600160401b0381168114614e98575f5ffd5b825260209485019490910190614e7a565b6040840152505084525060209283019201614d9f565b50809450505050509250929050565b5f60208284031215614ede575f5ffd5b81356001600160401b03811115614ef3575f5ffd5b8201601f81018413614f03575f5ffd5b8035614f116145e8826145a9565b8082825260208201915060208360061b850101925086831115614f32575f5ffd5b6020840193505b8284101561407057614f4b878561434d565b8252602082019150604084019350614f39565b5f5f5f60408486031215614f70575f5ffd5b8335614f7b81614326565b925060208401356001600160401b03811115614f95575f5ffd5b8401601f81018613614fa5575f5ffd5b80356001600160401b03811115614fba575f5ffd5b866020828401011115614fcb575f5ffd5b939660209190910195509293505050565b5f5f60408385031215614fed575f5ffd5b8235614ff881614326565b915060208301356001600160401b03811115615012575f5ffd5b6149d285828601614c32565b5f5f5f5f60608587031215615031575f5ffd5b843561503c81614326565b935060208501356001600160401b03811115615056575f5ffd5b615062878288016148b2565b93505060408501356001600160401b03811115614ba5575f5ffd5b5f6020828403121561508d575f5ffd5b6109178261433a565b5f5f8335601e198436030181126150ab575f5ffd5b8301803591506001600160401b038211156150c4575f5ffd5b6020019150600581901b3603821315610d43575f5ffd5b634e487b7160e01b5f52603260045260245ffd5b5f602082840312156150ff575f5ffd5b813561ffff81168114610917575f5ffd5b5f60208284031215615120575f5ffd5b81518015158114610917575f5ffd5b604081016109d882846144a4565b634e487b7160e01b5f52601160045260245ffd5b63ffffffff81811683821601908111156109d8576109d861513d565b8183526020830192505f815f5b848110156144fd5763ffffffff6151908361433a565b168652602095860195919091019060010161517a565b6001600160a01b038581168252841660208201526060604082018190525f90614070908301848661516d565b6001600160a01b038616815260c081016151ef60208301876144a4565b6001600160a01b039490941660608201526001600160401b0392909216608083015263ffffffff1660a09091015292915050565b5f60208284031215615233575f5ffd5b81516001600160401b03811115615248575f5ffd5b8201601f81018413615258575f5ffd5b80516152666145e8826145a9565b8082825260208201915060208360051b850101925086831115615287575f5ffd5b6020840193505b828410156140705783516152a181614326565b82526020938401939091019061528e565b606081016152c082856144a4565b6001600160a01b039290921660409190910152919050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b602081525f610ae76020830184866152d8565b5f5f8335601e19843603018112615328575f5ffd5b8301803591506001600160401b03821115615341575f5ffd5b602001915036819003821315610d43575f5ffd5b6001600160a01b038781168252861660208201526080604082018190525f90615381908301868861516d565b82810360608401526153948185876152d8565b9998505050505050505050565b80516020808301519190811015614c42575f1960209190910360031b1b16919050565b5f8235603e198336030181126153d8575f5ffd5b9190910192915050565b5f600182016153f3576153f361513d565b5060010190565b818103818111156109d8576109d861513d565b6001600160401b0382811682821603908111156109d8576109d861513d565b5f81600f0b60016001607f1b031981036154485761544861513d565b5f0392915050565b600f81810b9083900b0160016001607f1b03811360016001607f1b0319821217156109d8576109d861513d565b6001600160a01b038716815260e0810161549a60208301886144a4565b60608201959095526001600160a01b039390931660808401526001600160401b0391821660a08401521660c09091015292915050565b5f602082840312156154e0575f5ffd5b5051919050565b6001600160a01b03881681525f60c08201615505602084018a6144a4565b60c060608401528690528660e083015f5b8881101561554657823561552981614326565b6001600160a01b0316825260209283019290910190600101615516565b50838103608085015261555981886146b1565b91505082810360a084015261556f8185876152d8565b9a9950505050505050505050565b5f8161558b5761558b61513d565b505f190190565b608081016155a082866144a4565b6001600160a01b0393909316604082015263ffffffff91909116606090910152919050565b600f82810b9082900b0360016001607f1b0319811260016001607f1b03821317156109d8576109d861513d565b5f60208284031215615602575f5ffd5b815161091781614326565b634e487b7160e01b5f52603160045260245ffd5b634e487b7160e01b5f52602160045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b808201808211156109d8576109d861513d56fea26469706673582212201aad6d59856a6452144f346d37831b390f644b007c48c6474261b9a4089c485764736f6c634300081e0033", } // AllocationManagerABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/AllocationManagerView/binding.go b/pkg/bindings/AllocationManagerView/binding.go index d4eaa2eb0a..281240393e 100644 --- a/pkg/bindings/AllocationManagerView/binding.go +++ b/pkg/bindings/AllocationManagerView/binding.go @@ -45,7 +45,7 @@ type OperatorSet struct { // AllocationManagerViewMetaData contains all meta data concerning the AllocationManagerView contract. var AllocationManagerViewMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_delegation\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"},{\"name\":\"_eigenStrategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"_DEALLOCATION_DELAY\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_ALLOCATION_CONFIGURATION_DELAY\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"ALLOCATION_CONFIGURATION_DELAY\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DEALLOCATION_DELAY\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"eigenStrategy\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAVSRegistrar\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAVSRegistrar\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocatableMagnitude\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocatedSets\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structOperatorSet[]\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocatedStake\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[][]\",\"internalType\":\"uint256[][]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocatedStrategies\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocation\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIAllocationManagerTypes.Allocation\",\"components\":[{\"name\":\"currentMagnitude\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"pendingDiff\",\"type\":\"int128\",\"internalType\":\"int128\"},{\"name\":\"effectBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocationDelay\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocations\",\"inputs\":[{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structIAllocationManagerTypes.Allocation[]\",\"components\":[{\"name\":\"currentMagnitude\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"pendingDiff\",\"type\":\"int128\",\"internalType\":\"int128\"},{\"name\":\"effectBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getEncumberedMagnitude\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMaxMagnitude\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMaxMagnitudes\",\"inputs\":[{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64[]\",\"internalType\":\"uint64[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMaxMagnitudes\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64[]\",\"internalType\":\"uint64[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMaxMagnitudesAtBlock\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64[]\",\"internalType\":\"uint64[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMemberCount\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMembers\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMinimumSlashableStake\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"futureBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"slashableStake\",\"type\":\"uint256[][]\",\"internalType\":\"uint256[][]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetCount\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPendingSlasher\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRedistributionRecipient\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRegisteredSets\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structOperatorSet[]\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getSlashCount\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getSlasher\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStrategiesInOperatorSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStrategyAllocations\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structOperatorSet[]\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structIAllocationManagerTypes.Allocation[]\",\"components\":[{\"name\":\"currentMagnitude\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"pendingDiff\",\"type\":\"int128\",\"internalType\":\"int128\"},{\"name\":\"effectBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isMemberOfOperatorSet\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isOperatorRedistributable\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isOperatorSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isOperatorSlashable\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isRedistributingOperatorSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"AVSMetadataURIUpdated\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"metadataURI\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"AVSRegistrarSet\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"registrar\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIAVSRegistrar\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"AllocationDelaySet\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"delay\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"effectBlock\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"AllocationUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"magnitude\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"effectBlock\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EncumberedMagnitudeUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"encumberedMagnitude\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MaxMagnitudeUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"maxMagnitude\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorAddedToOperatorSet\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorRemovedFromOperatorSet\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetCreated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSlashed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"strategies\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"contractIStrategy[]\"},{\"name\":\"wadSlashed\",\"type\":\"uint256[]\",\"indexed\":false,\"internalType\":\"uint256[]\"},{\"name\":\"description\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RedistributionAddressSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"redistributionRecipient\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlasherMigrated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"slasher\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlasherUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"slasher\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"effectBlock\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyAddedToOperatorSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyRemovedFromOperatorSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AlreadyMemberOfSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InsufficientMagnitude\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidAVSRegistrar\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCaller\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperator\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidRedistributionRecipient\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidStrategy\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidWadToSlash\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ModificationAlreadyPending\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NonexistentAVSMetadata\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotMemberOfSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OperatorNotSlashable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OperatorSetAlreadyMigrated\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OutOfBounds\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SameMagnitude\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlasherNotSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StrategiesMustBeInAscendingOrder\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StrategyAlreadyInOperatorSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StrategyNotInOperatorSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UninitializedAllocationDelay\",\"inputs\":[]}]", - Bin: "0x610100604052348015610010575f5ffd5b5060405161273838038061273883398101604081905261002f91610087565b6001600160a01b039384166080529290911660a05263ffffffff90811660c0521660e0526100dd565b6001600160a01b038116811461006c575f5ffd5b50565b805163ffffffff81168114610082575f5ffd5b919050565b5f5f5f5f6080858703121561009a575f5ffd5b84516100a581610058565b60208601519094506100b681610058565b92506100c46040860161006f565b91506100d26060860161006f565b905092959194509250565b60805160a05160c05160e0516126216101175f395f61041c01525f6102a101525f61053b01525f818161057501526113b001526126215ff3fe608060405234801561000f575f5ffd5b50600436106101f2575f3560e01c80636e875dba11610114578063ba1a84e5116100a9578063db4df76111610079578063db4df76114610536578063dc2af6921461055d578063df5cf72314610570578063f231bd0814610597578063f605ce08146105aa575f5ffd5b8063ba1a84e5146104c6578063c221d8ae146104d9578063d4a3fcce146104ec578063d7794857146104ff575f5ffd5b806394d7d00c116100e457806394d7d00c1461045e578063a9333ec814610471578063b2447af714610484578063b9fbaed114610497575f5ffd5b80636e875dba146103f157806379ae50cd146104045780637bc1ef61146104175780638ce648541461043e575f5ffd5b8063304c10cd1161018a5780634cfd29391161015a5780634cfd29391461037f578063547afb87146103a0578063670d3ba2146103b35780636cfb4481146103c6575f5ffd5b8063304c10cd1461030b57806340120dab1461031e5780634177a87c1461033f5780634a10ffe51461035f575f5ffd5b8063260dc758116101c5578063260dc758146102895780632981eb771461029c5780632b453a9a146102d85780632bab2c4a146102f8575f5ffd5b80630f3df50e146101f657806310e1b9b8146102265780631352c3e61461024657806315fe502814610269575b5f5ffd5b610209610204366004611da6565b6105bd565b6040516001600160a01b0390911681526020015b60405180910390f35b610239610234366004611dc0565b6105fe565b60405161021d9190611e07565b610259610254366004611e3a565b610637565b604051901515815260200161021d565b61027c610277366004611e6e565b6106b2565b60405161021d9190611ede565b610259610297366004611da6565b6107c9565b6102c37f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff909116815260200161021d565b6102eb6102e6366004611f85565b6107fa565b60405161021d9190611ff8565b6102eb610306366004612084565b610810565b610209610319366004611e6e565b6108af565b61033161032c366004612108565b6108de565b60405161021d9291906121a0565b61035261034d366004611da6565b610a57565b60405161021d91906121fd565b61037261036d36600461220f565b610a7b565b60405161021d9190612252565b61039261038d366004611da6565b610b23565b60405190815260200161021d565b6103726103ae36600461229d565b610b45565b6102596103c1366004611e3a565b610bed565b6103d96103d4366004612108565b610c19565b6040516001600160401b03909116815260200161021d565b6103526103ff366004611da6565b610c2e565b61027c610412366004611e6e565b610c3f565b6102c37f000000000000000000000000000000000000000000000000000000000000000081565b61045161044c3660046122df565b610d19565b60405161021d9190612322565b61037261046c366004612334565b610dd5565b6103d961047f366004612108565b610ec1565b610392610492366004611da6565b610ef0565b6104aa6104a5366004611e6e565b610f12565b60408051921515835263ffffffff90911660208301520161021d565b6103926104d4366004611e6e565b610fb3565b6103526104e7366004611e3a565b610fd3565b6102096104fa366004611da6565b610ffc565b61051261050d366004611da6565b611083565b604080516001600160a01b03909316835263ffffffff90911660208301520161021d565b6102097f000000000000000000000000000000000000000000000000000000000000000081565b61025961056b366004611e6e565b611104565b6102097f000000000000000000000000000000000000000000000000000000000000000081565b6102596105a5366004611da6565b611137565b6103d96105b8366004612108565b611156565b5f5f60a65f6105cb85611162565b815260208101919091526040015f20546001600160a01b0316905080156105f257806105f7565b620e16e45b9392505050565b604080516060810182525f808252602082018190529181018290529061062d8561062786611162565b856111c5565b9695505050505050565b6001600160a01b0382165f908152609e6020526040812081908161065a85611162565b815260208082019290925260409081015f2081518083019092525460ff8116151580835261010090910463ffffffff16928201929092529150806106a85750806020015163ffffffff164311155b9150505b92915050565b6001600160a01b0381165f908152609d60205260408120606091906106d690611331565b90505f816001600160401b038111156106f1576106f1611cdb565b60405190808252806020026020018201604052801561073557816020015b604080518082019091525f808252602082015281526020019060019003908161070f5790505b5090505f5b828110156107c1576001600160a01b0385165f908152609d6020526040902061079c90610767908361133a565b604080518082019091525f80825260208201525060408051808201909152606082901c815263ffffffff909116602082015290565b8282815181106107ae576107ae61238f565b602090810291909101015260010161073a565b509392505050565b60208082015182516001600160a01b03165f9081526098909252604082206106ac9163ffffffff9081169061134516565b60606108088484844361135c565b949350505050565b606061081e8585858561135c565b90505f5b84518110156108a65761084e8582815181106108405761084061238f565b602002602001015187610637565b61089e575f5b845181101561089c575f8383815181106108705761087061238f565b602002602001015182815181106108895761088961238f565b6020908102919091010152600101610854565b505b600101610822565b50949350505050565b6001600160a01b038082165f9081526097602052604081205490911680156108d757806105f7565b5090919050565b6001600160a01b0382165f908152609d60205260408120606091829161090390611331565b90505f816001600160401b0381111561091e5761091e611cdb565b60405190808252806020026020018201604052801561096257816020015b604080518082019091525f808252602082015281526020019060019003908161093c5790505b5090505f826001600160401b0381111561097e5761097e611cdb565b6040519080825280602002602001820160405280156109c757816020015b604080516060810182525f80825260208083018290529282015282525f1990920191018161099c5790505b5090505f5b83811015610a4a576001600160a01b0388165f908152609d602052604081206109f990610767908461133a565b905080848381518110610a0e57610a0e61238f565b6020026020010181905250610a2489828a6105fe565b838381518110610a3657610a3661238f565b6020908102919091010152506001016109cc565b5090969095509350505050565b60605f6105f760995f610a6986611162565b81526020019081526020015f20611649565b60605f83516001600160401b03811115610a9757610a97611cdb565b604051908082528060200260200182016040528015610ac0578160200160208202803683370190505b5090505f5b84518110156107c157610af1858281518110610ae357610ae361238f565b602002602001015185610ec1565b828281518110610b0357610b0361238f565b6001600160401b0390921660209283029190910190910152600101610ac5565b5f60a55f610b3084611162565b81526020019081526020015f20549050919050565b60605f82516001600160401b03811115610b6157610b61611cdb565b604051908082528060200260200182016040528015610b8a578160200160208202803683370190505b5090505f5b83518110156107c157610bbb85858381518110610bae57610bae61238f565b6020026020010151610ec1565b828281518110610bcd57610bcd61238f565b6001600160401b0390921660209283029190910190910152600101610b8f565b5f6105f783609a5f610bfe86611162565b81526020019081526020015f2061165590919063ffffffff16565b5f5f610c258484611676565b95945050505050565b60606106ac609a5f610a6985611162565b6001600160a01b0381165f908152609c6020526040812060609190610c6390611331565b90505f816001600160401b03811115610c7e57610c7e611cdb565b604051908082528060200260200182016040528015610cc257816020015b604080518082019091525f8082526020820152815260200190600190039081610c9c5790505b5090505f5b828110156107c1576001600160a01b0385165f908152609c60205260409020610cf490610767908361133a565b828281518110610d0657610d0661238f565b6020908102919091010152600101610cc7565b60605f84516001600160401b03811115610d3557610d35611cdb565b604051908082528060200260200182016040528015610d7e57816020015b604080516060810182525f80825260208083018290529282015282525f19909201910181610d535790505b5090505f5b85518110156108a657610db0868281518110610da157610da161238f565b602002602001015186866105fe565b828281518110610dc257610dc261238f565b6020908102919091010152600101610d83565b60605f83516001600160401b03811115610df157610df1611cdb565b604051908082528060200260200182016040528015610e1a578160200160208202803683370190505b5090505f5b84518110156108a6576001600160a01b0386165f90815260a1602052604081208651610e8f92879291899086908110610e5a57610e5a61238f565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206117e590919063ffffffff16565b828281518110610ea157610ea161238f565b6001600160401b0390921660209283029190910190910152600101610e1f565b6001600160a01b038083165f90815260a16020908152604080832093851683529290529081206105f7906117f9565b5f6106ac609a5f610f0085611162565b81526020019081526020015f20611331565b6001600160a01b0381165f908152609b602090815260408083208151608081018352905463ffffffff80821680845260ff64010000000084041615159584018690526501000000000083048216948401949094526901000000000000000000909104166060820181905284939192919015801590610f9a5750826060015163ffffffff164310155b15610fa9575050604081015160015b9590945092505050565b6001600160a01b0381165f9081526098602052604081206106ac90611331565b6001600160a01b0382165f908152609f60205260408120606091906106a89082610a6986611162565b5f5f60a75f61100a85611162565b815260208082019290925260409081015f20815160608101835281546001600160a01b0390811680835260019093015490811694820194909452600160a01b90930463ffffffff16918301829052919250158015906110735750816040015163ffffffff164310155b156105f757506020015192915050565b5f5f5f5f5f60a75f61109488611162565b815260208082019290925260409081015f20815160608101835281546001600160a01b03908116825260019092015491821693810193909352600160a01b900463ffffffff169082018190529091504310156110f95780602001519250806040015191505b509094909350915050565b5f5f61110f83610c3f565b90505f61111b846106b2565b9050611127848361180c565b806108085750610808848261180c565b5f620e16e4611145836105bd565b6001600160a01b0316141592915050565b5f5f6108a68484611676565b5f815f0151826020015163ffffffff166040516020016111ad92919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b6040516020818303038152906040526106ac906123a3565b6040805180820182525f80825260208083018290528351606081018552828152808201839052808501839052845180860186526001600160a01b03898116855260a1845286852090881685529092529382209293928190611225906117f9565b6001600160401b0390811682526001600160a01b038981165f81815260a260209081526040808320948c168084529482528083205486169682019690965291815260a082528481208b8252825284812092815291815290839020835160608101855290549283168152600160401b8304600f0b91810191909152600160c01b90910463ffffffff169181018290529192504310156112c7579092509050611329565b6112d8815f01518260200151611884565b6001600160401b0316815260208101515f600f9190910b12156113165761130782602001518260200151611884565b6001600160401b031660208301525b5f60408201819052602082015290925090505b935093915050565b5f6106ac825490565b5f6105f783836118a3565b5f81815260018301602052604081205415156105f7565b606083516001600160401b0381111561137757611377611cdb565b6040519080825280602002602001820160405280156113aa57816020015b60608152602001906001900390816113955790505b5090505f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f0e0e67686866040518363ffffffff1660e01b81526004016113fc9291906123c9565b5f60405180830381865afa158015611416573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261143d91908101906123ed565b90505f5b855181101561163f575f86828151811061145d5761145d61238f565b6020026020010151905085516001600160401b0381111561148057611480611cdb565b6040519080825280602002602001820160405280156114a9578160200160208202803683370190505b508483815181106114bc576114bc61238f565b60209081029190910101525f5b8651811015611635575f8782815181106114e5576114e561238f565b6020908102919091018101516001600160a01b038086165f90815260a1845260408082209284168252919093528220909250611520906117f9565b9050806001600160401b03165f0361153957505061162d565b5f611545858d856105fe565b90508863ffffffff16816040015163ffffffff161115801561156d57505f8160200151600f0b125b1561158f57611583815f01518260200151611884565b6001600160401b031681525b80515f906115aa906001600160401b039081169085166118c9565b90506115f1818989815181106115c2576115c261238f565b602002602001015187815181106115db576115db61238f565b60200260200101516118dd90919063ffffffff16565b8988815181106116035761160361238f565b6020026020010151868151811061161c5761161c61238f565b602002602001018181525050505050505b6001016114c9565b5050600101611441565b5050949350505050565b60605f6105f7836118f1565b6001600160a01b0381165f90815260018301602052604081205415156105f7565b6001600160a01b038281165f81815260a2602090815260408083209486168084529482528083205493835260a38252808320948352939052918220546001600160401b039091169190600f81810b600160801b909204900b03815b818110156117a1576001600160a01b038087165f90815260a3602090815260408083209389168352929052908120611709908361194a565b6001600160a01b038881165f90815260a0602090815260408083208584528252808320938b16835292815290829020825160608101845290546001600160401b0381168252600160401b8104600f0b92820192909252600160c01b90910463ffffffff169181018290529192504310156117845750506117a1565b611792868260200151611884565b955050508060010190506116d1565b506001600160a01b038086165f90815260a16020908152604080832093881683529290522083906117d1906117f9565b6117db919061250d565b9150509250929050565b5f6105f78383670de0b6b3a76400006119b9565b5f6106ac82670de0b6b3a7640000611a0f565b5f805b825181101561187b5761183b8484838151811061182e5761182e61238f565b6020026020010151610637565b801561186457506118648382815181106118575761185761238f565b6020026020010151611137565b156118735760019150506106ac565b60010161180f565b505f9392505050565b5f6105f761189b836001600160401b03861661252c565b600f0b611a47565b5f825f0182815481106118b8576118b861238f565b905f5260205f200154905092915050565b5f6105f783670de0b6b3a764000084611ab7565b5f6105f78383670de0b6b3a7640000611ab7565b6060815f0180548060200260200160405190810160405280929190818152602001828054801561193e57602002820191905f5260205f20905b81548152602001906001019080831161192a575b50505050509050919050565b5f5f61196c61195884611b9c565b85546119679190600f0b61256b565b611c05565b8454909150600160801b9004600f90810b9082900b1261199f57604051632d0483c560e21b815260040160405180910390fd5b600f0b5f9081526001939093016020525050604090205490565b82545f90816119ca86868385611c6e565b90508015611a05576119ee866119e1600184612592565b5f91825260209091200190565b5464010000000090046001600160e01b031661062d565b5091949350505050565b81545f908015611a3f57611a28846119e1600184612592565b5464010000000090046001600160e01b03166106a8565b509092915050565b5f6001600160401b03821115611ab35760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203660448201526534206269747360d01b60648201526084015b60405180910390fd5b5090565b5f80805f19858709858702925082811083820303915050805f03611aee57838281611ae457611ae46125a5565b04925050506105f7565b808411611b355760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b6044820152606401611aaa565b5f8486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091025f889003889004909101858311909403939093029303949094049190911702949350505050565b5f6001600160ff1b03821115611ab35760405162461bcd60e51b815260206004820152602860248201527f53616665436173743a2076616c756520646f65736e27742066697420696e2061604482015267371034b73a191a9b60c11b6064820152608401611aaa565b80600f81900b8114611c695760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b6064820152608401611aaa565b919050565b5f5b818310156107c1575f611c838484611cc1565b5f8781526020902090915063ffffffff86169082015463ffffffff161115611cad57809250611cbb565b611cb88160016125b9565b93505b50611c70565b5f611ccf60028484186125cc565b6105f7908484166125b9565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b0381118282101715611d1757611d17611cdb565b604052919050565b6001600160a01b0381168114611d33575f5ffd5b50565b803563ffffffff81168114611c69575f5ffd5b5f60408284031215611d59575f5ffd5b604080519081016001600160401b0381118282101715611d7b57611d7b611cdb565b6040529050808235611d8c81611d1f565b8152611d9a60208401611d36565b60208201525092915050565b5f60408284031215611db6575f5ffd5b6105f78383611d49565b5f5f5f60808486031215611dd2575f5ffd5b8335611ddd81611d1f565b9250611dec8560208601611d49565b91506060840135611dfc81611d1f565b809150509250925092565b81516001600160401b03168152602080830151600f0b9082015260408083015163ffffffff1690820152606081016106ac565b5f5f60608385031215611e4b575f5ffd5b8235611e5681611d1f565b9150611e658460208501611d49565b90509250929050565b5f60208284031215611e7e575f5ffd5b81356105f781611d1f565b5f8151808452602084019350602083015f5b82811015611ed457815180516001600160a01b0316875260209081015163ffffffff168188015260409096019590910190600101611e9b565b5093949350505050565b602081525f6105f76020830184611e89565b5f6001600160401b03821115611f0857611f08611cdb565b5060051b60200190565b5f82601f830112611f21575f5ffd5b8135611f34611f2f82611ef0565b611cef565b8082825260208201915060208360051b860101925085831115611f55575f5ffd5b602085015b83811015611f7b578035611f6d81611d1f565b835260209283019201611f5a565b5095945050505050565b5f5f5f60808486031215611f97575f5ffd5b611fa18585611d49565b925060408401356001600160401b03811115611fbb575f5ffd5b611fc786828701611f12565b92505060608401356001600160401b03811115611fe2575f5ffd5b611fee86828701611f12565b9150509250925092565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b8281101561207857868503603f19018452815180518087526020918201918701905f5b8181101561205f578351835260209384019390920191600101612041565b509096505050602093840193919091019060010161201e565b50929695505050505050565b5f5f5f5f60a08587031215612097575f5ffd5b6120a18686611d49565b935060408501356001600160401b038111156120bb575f5ffd5b6120c787828801611f12565b93505060608501356001600160401b038111156120e2575f5ffd5b6120ee87828801611f12565b9250506120fd60808601611d36565b905092959194509250565b5f5f60408385031215612119575f5ffd5b823561212481611d1f565b9150602083013561213481611d1f565b809150509250929050565b5f8151808452602084019350602083015f5b82811015611ed45761218a86835180516001600160401b03168252602080820151600f0b9083015260409081015163ffffffff16910152565b6060959095019460209190910190600101612151565b604081525f6121b26040830185611e89565b8281036020840152610c25818561213f565b5f8151808452602084019350602083015f5b82811015611ed45781516001600160a01b03168652602095860195909101906001016121d6565b602081525f6105f760208301846121c4565b5f5f60408385031215612220575f5ffd5b82356001600160401b03811115612235575f5ffd5b61224185828601611f12565b925050602083013561213481611d1f565b602080825282518282018190525f918401906040840190835b818110156122925783516001600160401b031683526020938401939092019160010161226b565b509095945050505050565b5f5f604083850312156122ae575f5ffd5b82356122b981611d1f565b915060208301356001600160401b038111156122d3575f5ffd5b6117db85828601611f12565b5f5f5f608084860312156122f1575f5ffd5b83356001600160401b03811115612306575f5ffd5b61231286828701611f12565b935050611dec8560208601611d49565b602081525f6105f7602083018461213f565b5f5f5f60608486031215612346575f5ffd5b833561235181611d1f565b925060208401356001600160401b0381111561236b575f5ffd5b61237786828701611f12565b92505061238660408501611d36565b90509250925092565b634e487b7160e01b5f52603260045260245ffd5b805160208083015191908110156123c3575f198160200360031b1b821691505b50919050565b604081525f6123db60408301856121c4565b8281036020840152610c2581856121c4565b5f602082840312156123fd575f5ffd5b81516001600160401b03811115612412575f5ffd5b8201601f81018413612422575f5ffd5b8051612430611f2f82611ef0565b8082825260208201915060208360051b850101925086831115612451575f5ffd5b602084015b838110156124ee5780516001600160401b03811115612473575f5ffd5b8501603f81018913612483575f5ffd5b6020810151612494611f2f82611ef0565b808282526020820191506020808460051b8601010192508b8311156124b7575f5ffd5b6040840193505b828410156124d95783518252602093840193909101906124be565b86525050602093840193919091019050612456565b509695505050505050565b634e487b7160e01b5f52601160045260245ffd5b6001600160401b0382811682821603908111156106ac576106ac6124f9565b600f81810b9083900b016f7fffffffffffffffffffffffffffffff81136f7fffffffffffffffffffffffffffffff19821217156106ac576106ac6124f9565b8082018281125f83128015821682158216171561258a5761258a6124f9565b505092915050565b818103818111156106ac576106ac6124f9565b634e487b7160e01b5f52601260045260245ffd5b808201808211156106ac576106ac6124f9565b5f826125e657634e487b7160e01b5f52601260045260245ffd5b50049056fea2646970667358221220a58a72c3a97e44c4d5be26f7a6b6d441e019f58b37b1d45cb9b6f916dc89b4ff64736f6c634300081e0033", + Bin: "0x610100604052348015610010575f5ffd5b5060405161273838038061273883398101604081905261002f91610087565b6001600160a01b039384166080529290911660a05263ffffffff90811660c0521660e0526100dd565b6001600160a01b038116811461006c575f5ffd5b50565b805163ffffffff81168114610082575f5ffd5b919050565b5f5f5f5f6080858703121561009a575f5ffd5b84516100a581610058565b60208601519094506100b681610058565b92506100c46040860161006f565b91506100d26060860161006f565b905092959194509250565b60805160a05160c05160e0516126216101175f395f61041c01525f6102a101525f61053b01525f818161057501526113b001526126215ff3fe608060405234801561000f575f5ffd5b50600436106101f2575f3560e01c80636e875dba11610114578063ba1a84e5116100a9578063db4df76111610079578063db4df76114610536578063dc2af6921461055d578063df5cf72314610570578063f231bd0814610597578063f605ce08146105aa575f5ffd5b8063ba1a84e5146104c6578063c221d8ae146104d9578063d4a3fcce146104ec578063d7794857146104ff575f5ffd5b806394d7d00c116100e457806394d7d00c1461045e578063a9333ec814610471578063b2447af714610484578063b9fbaed114610497575f5ffd5b80636e875dba146103f157806379ae50cd146104045780637bc1ef61146104175780638ce648541461043e575f5ffd5b8063304c10cd1161018a5780634cfd29391161015a5780634cfd29391461037f578063547afb87146103a0578063670d3ba2146103b35780636cfb4481146103c6575f5ffd5b8063304c10cd1461030b57806340120dab1461031e5780634177a87c1461033f5780634a10ffe51461035f575f5ffd5b8063260dc758116101c5578063260dc758146102895780632981eb771461029c5780632b453a9a146102d85780632bab2c4a146102f8575f5ffd5b80630f3df50e146101f657806310e1b9b8146102265780631352c3e61461024657806315fe502814610269575b5f5ffd5b610209610204366004611da6565b6105bd565b6040516001600160a01b0390911681526020015b60405180910390f35b610239610234366004611dc0565b6105fe565b60405161021d9190611e07565b610259610254366004611e3a565b610637565b604051901515815260200161021d565b61027c610277366004611e6e565b6106b2565b60405161021d9190611ede565b610259610297366004611da6565b6107c9565b6102c37f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff909116815260200161021d565b6102eb6102e6366004611f85565b6107fa565b60405161021d9190611ff8565b6102eb610306366004612084565b610810565b610209610319366004611e6e565b6108af565b61033161032c366004612108565b6108de565b60405161021d9291906121a0565b61035261034d366004611da6565b610a57565b60405161021d91906121fd565b61037261036d36600461220f565b610a7b565b60405161021d9190612252565b61039261038d366004611da6565b610b23565b60405190815260200161021d565b6103726103ae36600461229d565b610b45565b6102596103c1366004611e3a565b610bed565b6103d96103d4366004612108565b610c19565b6040516001600160401b03909116815260200161021d565b6103526103ff366004611da6565b610c2e565b61027c610412366004611e6e565b610c3f565b6102c37f000000000000000000000000000000000000000000000000000000000000000081565b61045161044c3660046122df565b610d19565b60405161021d9190612322565b61037261046c366004612334565b610dd5565b6103d961047f366004612108565b610ec1565b610392610492366004611da6565b610ef0565b6104aa6104a5366004611e6e565b610f12565b60408051921515835263ffffffff90911660208301520161021d565b6103926104d4366004611e6e565b610fb3565b6103526104e7366004611e3a565b610fd3565b6102096104fa366004611da6565b610ffc565b61051261050d366004611da6565b611083565b604080516001600160a01b03909316835263ffffffff90911660208301520161021d565b6102097f000000000000000000000000000000000000000000000000000000000000000081565b61025961056b366004611e6e565b611104565b6102097f000000000000000000000000000000000000000000000000000000000000000081565b6102596105a5366004611da6565b611137565b6103d96105b8366004612108565b611156565b5f5f60a65f6105cb85611162565b815260208101919091526040015f20546001600160a01b0316905080156105f257806105f7565b620e16e45b9392505050565b604080516060810182525f808252602082018190529181018290529061062d8561062786611162565b856111c5565b9695505050505050565b6001600160a01b0382165f908152609e6020526040812081908161065a85611162565b815260208082019290925260409081015f2081518083019092525460ff8116151580835261010090910463ffffffff16928201929092529150806106a85750806020015163ffffffff164311155b9150505b92915050565b6001600160a01b0381165f908152609d60205260408120606091906106d690611331565b90505f816001600160401b038111156106f1576106f1611cdb565b60405190808252806020026020018201604052801561073557816020015b604080518082019091525f808252602082015281526020019060019003908161070f5790505b5090505f5b828110156107c1576001600160a01b0385165f908152609d6020526040902061079c90610767908361133a565b604080518082019091525f80825260208201525060408051808201909152606082901c815263ffffffff909116602082015290565b8282815181106107ae576107ae61238f565b602090810291909101015260010161073a565b509392505050565b60208082015182516001600160a01b03165f9081526098909252604082206106ac9163ffffffff9081169061134516565b60606108088484844361135c565b949350505050565b606061081e8585858561135c565b90505f5b84518110156108a65761084e8582815181106108405761084061238f565b602002602001015187610637565b61089e575f5b845181101561089c575f8383815181106108705761087061238f565b602002602001015182815181106108895761088961238f565b6020908102919091010152600101610854565b505b600101610822565b50949350505050565b6001600160a01b038082165f9081526097602052604081205490911680156108d757806105f7565b5090919050565b6001600160a01b0382165f908152609d60205260408120606091829161090390611331565b90505f816001600160401b0381111561091e5761091e611cdb565b60405190808252806020026020018201604052801561096257816020015b604080518082019091525f808252602082015281526020019060019003908161093c5790505b5090505f826001600160401b0381111561097e5761097e611cdb565b6040519080825280602002602001820160405280156109c757816020015b604080516060810182525f80825260208083018290529282015282525f1990920191018161099c5790505b5090505f5b83811015610a4a576001600160a01b0388165f908152609d602052604081206109f990610767908461133a565b905080848381518110610a0e57610a0e61238f565b6020026020010181905250610a2489828a6105fe565b838381518110610a3657610a3661238f565b6020908102919091010152506001016109cc565b5090969095509350505050565b60605f6105f760995f610a6986611162565b81526020019081526020015f20611649565b60605f83516001600160401b03811115610a9757610a97611cdb565b604051908082528060200260200182016040528015610ac0578160200160208202803683370190505b5090505f5b84518110156107c157610af1858281518110610ae357610ae361238f565b602002602001015185610ec1565b828281518110610b0357610b0361238f565b6001600160401b0390921660209283029190910190910152600101610ac5565b5f60a55f610b3084611162565b81526020019081526020015f20549050919050565b60605f82516001600160401b03811115610b6157610b61611cdb565b604051908082528060200260200182016040528015610b8a578160200160208202803683370190505b5090505f5b83518110156107c157610bbb85858381518110610bae57610bae61238f565b6020026020010151610ec1565b828281518110610bcd57610bcd61238f565b6001600160401b0390921660209283029190910190910152600101610b8f565b5f6105f783609a5f610bfe86611162565b81526020019081526020015f2061165590919063ffffffff16565b5f5f610c258484611676565b95945050505050565b60606106ac609a5f610a6985611162565b6001600160a01b0381165f908152609c6020526040812060609190610c6390611331565b90505f816001600160401b03811115610c7e57610c7e611cdb565b604051908082528060200260200182016040528015610cc257816020015b604080518082019091525f8082526020820152815260200190600190039081610c9c5790505b5090505f5b828110156107c1576001600160a01b0385165f908152609c60205260409020610cf490610767908361133a565b828281518110610d0657610d0661238f565b6020908102919091010152600101610cc7565b60605f84516001600160401b03811115610d3557610d35611cdb565b604051908082528060200260200182016040528015610d7e57816020015b604080516060810182525f80825260208083018290529282015282525f19909201910181610d535790505b5090505f5b85518110156108a657610db0868281518110610da157610da161238f565b602002602001015186866105fe565b828281518110610dc257610dc261238f565b6020908102919091010152600101610d83565b60605f83516001600160401b03811115610df157610df1611cdb565b604051908082528060200260200182016040528015610e1a578160200160208202803683370190505b5090505f5b84518110156108a6576001600160a01b0386165f90815260a1602052604081208651610e8f92879291899086908110610e5a57610e5a61238f565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206117e590919063ffffffff16565b828281518110610ea157610ea161238f565b6001600160401b0390921660209283029190910190910152600101610e1f565b6001600160a01b038083165f90815260a16020908152604080832093851683529290529081206105f7906117f9565b5f6106ac609a5f610f0085611162565b81526020019081526020015f20611331565b6001600160a01b0381165f908152609b602090815260408083208151608081018352905463ffffffff80821680845260ff64010000000084041615159584018690526501000000000083048216948401949094526901000000000000000000909104166060820181905284939192919015801590610f9a5750826060015163ffffffff164310155b15610fa9575050604081015160015b9590945092505050565b6001600160a01b0381165f9081526098602052604081206106ac90611331565b6001600160a01b0382165f908152609f60205260408120606091906106a89082610a6986611162565b5f5f60a75f61100a85611162565b815260208082019290925260409081015f20815160608101835281546001600160a01b0390811680835260019093015490811694820194909452600160a01b90930463ffffffff16918301829052919250158015906110735750816040015163ffffffff164310155b156105f757506020015192915050565b5f5f5f5f5f60a75f61109488611162565b815260208082019290925260409081015f20815160608101835281546001600160a01b03908116825260019092015491821693810193909352600160a01b900463ffffffff169082018190529091504310156110f95780602001519250806040015191505b509094909350915050565b5f5f61110f83610c3f565b90505f61111b846106b2565b9050611127848361180c565b806108085750610808848261180c565b5f620e16e4611145836105bd565b6001600160a01b0316141592915050565b5f5f6108a68484611676565b5f815f0151826020015163ffffffff166040516020016111ad92919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b6040516020818303038152906040526106ac906123a3565b6040805180820182525f80825260208083018290528351606081018552828152808201839052808501839052845180860186526001600160a01b03898116855260a1845286852090881685529092529382209293928190611225906117f9565b6001600160401b0390811682526001600160a01b038981165f81815260a260209081526040808320948c168084529482528083205486169682019690965291815260a082528481208b8252825284812092815291815290839020835160608101855290549283168152600160401b8304600f0b91810191909152600160c01b90910463ffffffff169181018290529192504310156112c7579092509050611329565b6112d8815f01518260200151611884565b6001600160401b0316815260208101515f600f9190910b12156113165761130782602001518260200151611884565b6001600160401b031660208301525b5f60408201819052602082015290925090505b935093915050565b5f6106ac825490565b5f6105f783836118a3565b5f81815260018301602052604081205415156105f7565b606083516001600160401b0381111561137757611377611cdb565b6040519080825280602002602001820160405280156113aa57816020015b60608152602001906001900390816113955790505b5090505f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f0e0e67686866040518363ffffffff1660e01b81526004016113fc9291906123c9565b5f60405180830381865afa158015611416573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261143d91908101906123ed565b90505f5b855181101561163f575f86828151811061145d5761145d61238f565b6020026020010151905085516001600160401b0381111561148057611480611cdb565b6040519080825280602002602001820160405280156114a9578160200160208202803683370190505b508483815181106114bc576114bc61238f565b60209081029190910101525f5b8651811015611635575f8782815181106114e5576114e561238f565b6020908102919091018101516001600160a01b038086165f90815260a1845260408082209284168252919093528220909250611520906117f9565b9050806001600160401b03165f0361153957505061162d565b5f611545858d856105fe565b90508863ffffffff16816040015163ffffffff161115801561156d57505f8160200151600f0b125b1561158f57611583815f01518260200151611884565b6001600160401b031681525b80515f906115aa906001600160401b039081169085166118c9565b90506115f1818989815181106115c2576115c261238f565b602002602001015187815181106115db576115db61238f565b60200260200101516118dd90919063ffffffff16565b8988815181106116035761160361238f565b6020026020010151868151811061161c5761161c61238f565b602002602001018181525050505050505b6001016114c9565b5050600101611441565b5050949350505050565b60605f6105f7836118f1565b6001600160a01b0381165f90815260018301602052604081205415156105f7565b6001600160a01b038281165f81815260a2602090815260408083209486168084529482528083205493835260a38252808320948352939052918220546001600160401b039091169190600f81810b600160801b909204900b03815b818110156117a1576001600160a01b038087165f90815260a3602090815260408083209389168352929052908120611709908361194a565b6001600160a01b038881165f90815260a0602090815260408083208584528252808320938b16835292815290829020825160608101845290546001600160401b0381168252600160401b8104600f0b92820192909252600160c01b90910463ffffffff169181018290529192504310156117845750506117a1565b611792868260200151611884565b955050508060010190506116d1565b506001600160a01b038086165f90815260a16020908152604080832093881683529290522083906117d1906117f9565b6117db919061250d565b9150509250929050565b5f6105f78383670de0b6b3a76400006119b9565b5f6106ac82670de0b6b3a7640000611a0f565b5f805b825181101561187b5761183b8484838151811061182e5761182e61238f565b6020026020010151610637565b801561186457506118648382815181106118575761185761238f565b6020026020010151611137565b156118735760019150506106ac565b60010161180f565b505f9392505050565b5f6105f761189b836001600160401b03861661252c565b600f0b611a47565b5f825f0182815481106118b8576118b861238f565b905f5260205f200154905092915050565b5f6105f783670de0b6b3a764000084611ab7565b5f6105f78383670de0b6b3a7640000611ab7565b6060815f0180548060200260200160405190810160405280929190818152602001828054801561193e57602002820191905f5260205f20905b81548152602001906001019080831161192a575b50505050509050919050565b5f5f61196c61195884611b9c565b85546119679190600f0b61256b565b611c05565b8454909150600160801b9004600f90810b9082900b1261199f57604051632d0483c560e21b815260040160405180910390fd5b600f0b5f9081526001939093016020525050604090205490565b82545f90816119ca86868385611c6e565b90508015611a05576119ee866119e1600184612592565b5f91825260209091200190565b5464010000000090046001600160e01b031661062d565b5091949350505050565b81545f908015611a3f57611a28846119e1600184612592565b5464010000000090046001600160e01b03166106a8565b509092915050565b5f6001600160401b03821115611ab35760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203660448201526534206269747360d01b60648201526084015b60405180910390fd5b5090565b5f80805f19858709858702925082811083820303915050805f03611aee57838281611ae457611ae46125a5565b04925050506105f7565b808411611b355760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b6044820152606401611aaa565b5f8486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091025f889003889004909101858311909403939093029303949094049190911702949350505050565b5f6001600160ff1b03821115611ab35760405162461bcd60e51b815260206004820152602860248201527f53616665436173743a2076616c756520646f65736e27742066697420696e2061604482015267371034b73a191a9b60c11b6064820152608401611aaa565b80600f81900b8114611c695760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b6064820152608401611aaa565b919050565b5f5b818310156107c1575f611c838484611cc1565b5f8781526020902090915063ffffffff86169082015463ffffffff161115611cad57809250611cbb565b611cb88160016125b9565b93505b50611c70565b5f611ccf60028484186125cc565b6105f7908484166125b9565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b0381118282101715611d1757611d17611cdb565b604052919050565b6001600160a01b0381168114611d33575f5ffd5b50565b803563ffffffff81168114611c69575f5ffd5b5f60408284031215611d59575f5ffd5b604080519081016001600160401b0381118282101715611d7b57611d7b611cdb565b6040529050808235611d8c81611d1f565b8152611d9a60208401611d36565b60208201525092915050565b5f60408284031215611db6575f5ffd5b6105f78383611d49565b5f5f5f60808486031215611dd2575f5ffd5b8335611ddd81611d1f565b9250611dec8560208601611d49565b91506060840135611dfc81611d1f565b809150509250925092565b81516001600160401b03168152602080830151600f0b9082015260408083015163ffffffff1690820152606081016106ac565b5f5f60608385031215611e4b575f5ffd5b8235611e5681611d1f565b9150611e658460208501611d49565b90509250929050565b5f60208284031215611e7e575f5ffd5b81356105f781611d1f565b5f8151808452602084019350602083015f5b82811015611ed457815180516001600160a01b0316875260209081015163ffffffff168188015260409096019590910190600101611e9b565b5093949350505050565b602081525f6105f76020830184611e89565b5f6001600160401b03821115611f0857611f08611cdb565b5060051b60200190565b5f82601f830112611f21575f5ffd5b8135611f34611f2f82611ef0565b611cef565b8082825260208201915060208360051b860101925085831115611f55575f5ffd5b602085015b83811015611f7b578035611f6d81611d1f565b835260209283019201611f5a565b5095945050505050565b5f5f5f60808486031215611f97575f5ffd5b611fa18585611d49565b925060408401356001600160401b03811115611fbb575f5ffd5b611fc786828701611f12565b92505060608401356001600160401b03811115611fe2575f5ffd5b611fee86828701611f12565b9150509250925092565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b8281101561207857868503603f19018452815180518087526020918201918701905f5b8181101561205f578351835260209384019390920191600101612041565b509096505050602093840193919091019060010161201e565b50929695505050505050565b5f5f5f5f60a08587031215612097575f5ffd5b6120a18686611d49565b935060408501356001600160401b038111156120bb575f5ffd5b6120c787828801611f12565b93505060608501356001600160401b038111156120e2575f5ffd5b6120ee87828801611f12565b9250506120fd60808601611d36565b905092959194509250565b5f5f60408385031215612119575f5ffd5b823561212481611d1f565b9150602083013561213481611d1f565b809150509250929050565b5f8151808452602084019350602083015f5b82811015611ed45761218a86835180516001600160401b03168252602080820151600f0b9083015260409081015163ffffffff16910152565b6060959095019460209190910190600101612151565b604081525f6121b26040830185611e89565b8281036020840152610c25818561213f565b5f8151808452602084019350602083015f5b82811015611ed45781516001600160a01b03168652602095860195909101906001016121d6565b602081525f6105f760208301846121c4565b5f5f60408385031215612220575f5ffd5b82356001600160401b03811115612235575f5ffd5b61224185828601611f12565b925050602083013561213481611d1f565b602080825282518282018190525f918401906040840190835b818110156122925783516001600160401b031683526020938401939092019160010161226b565b509095945050505050565b5f5f604083850312156122ae575f5ffd5b82356122b981611d1f565b915060208301356001600160401b038111156122d3575f5ffd5b6117db85828601611f12565b5f5f5f608084860312156122f1575f5ffd5b83356001600160401b03811115612306575f5ffd5b61231286828701611f12565b935050611dec8560208601611d49565b602081525f6105f7602083018461213f565b5f5f5f60608486031215612346575f5ffd5b833561235181611d1f565b925060208401356001600160401b0381111561236b575f5ffd5b61237786828701611f12565b92505061238660408501611d36565b90509250925092565b634e487b7160e01b5f52603260045260245ffd5b805160208083015191908110156123c3575f198160200360031b1b821691505b50919050565b604081525f6123db60408301856121c4565b8281036020840152610c2581856121c4565b5f602082840312156123fd575f5ffd5b81516001600160401b03811115612412575f5ffd5b8201601f81018413612422575f5ffd5b8051612430611f2f82611ef0565b8082825260208201915060208360051b850101925086831115612451575f5ffd5b602084015b838110156124ee5780516001600160401b03811115612473575f5ffd5b8501603f81018913612483575f5ffd5b6020810151612494611f2f82611ef0565b808282526020820191506020808460051b8601010192508b8311156124b7575f5ffd5b6040840193505b828410156124d95783518252602093840193909101906124be565b86525050602093840193919091019050612456565b509695505050505050565b634e487b7160e01b5f52601160045260245ffd5b6001600160401b0382811682821603908111156106ac576106ac6124f9565b600f81810b9083900b016f7fffffffffffffffffffffffffffffff81136f7fffffffffffffffffffffffffffffff19821217156106ac576106ac6124f9565b8082018281125f83128015821682158216171561258a5761258a6124f9565b505092915050565b818103818111156106ac576106ac6124f9565b634e487b7160e01b5f52601260045260245ffd5b808201808211156106ac576106ac6124f9565b5f826125e657634e487b7160e01b5f52601260045260245ffd5b50049056fea26469706673582212200cf4fa4a951d28e3f819ceab1a94a96fba57ae78d979897d4e41b448ede6faaf64736f6c634300081e0033", } // AllocationManagerViewABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/CrossChainRegistry/binding.go b/pkg/bindings/CrossChainRegistry/binding.go index c8cb6eda46..2ee0f865ef 100644 --- a/pkg/bindings/CrossChainRegistry/binding.go +++ b/pkg/bindings/CrossChainRegistry/binding.go @@ -44,7 +44,7 @@ type OperatorSet struct { // CrossChainRegistryMetaData contains all meta data concerning the CrossChainRegistry contract. var CrossChainRegistryMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_allocationManager\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"},{\"name\":\"_keyRegistrar\",\"type\":\"address\",\"internalType\":\"contractIKeyRegistrar\"},{\"name\":\"_permissionController\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addChainIDsToWhitelist\",\"inputs\":[{\"name\":\"chainIDs\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"operatorTableUpdaters\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"allocationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateOperatorTableBytes\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"createGenerationReservation\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operatorTableCalculator\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableCalculator\"},{\"name\":\"config\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getActiveGenerationReservationCount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getActiveGenerationReservations\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structOperatorSet[]\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getActiveGenerationReservationsByRange\",\"inputs\":[{\"name\":\"startIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"endIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structOperatorSet[]\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetConfig\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorTableCalculator\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableCalculator\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getSupportedChains\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTableUpdateCadence\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"hasActiveGenerationReservation\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"initialTableUpdateCadence\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"initialPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"keyRegistrar\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIKeyRegistrar\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"permissionController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeChainIDsFromWhitelist\",\"inputs\":[{\"name\":\"chainIDs\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeGenerationReservation\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setOperatorSetConfig\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"config\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setOperatorTableCalculator\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operatorTableCalculator\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableCalculator\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setTableUpdateCadence\",\"inputs\":[{\"name\":\"tableUpdateCadence\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"ChainIDAddedToWhitelist\",\"inputs\":[{\"name\":\"chainID\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"operatorTableUpdater\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ChainIDRemovedFromWhitelist\",\"inputs\":[{\"name\":\"chainID\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GenerationReservationCreated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GenerationReservationRemoved\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetConfigRemoved\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetConfigSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"config\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorTableCalculatorRemoved\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorTableCalculatorSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operatorTableCalculator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIOperatorTableCalculator\"}],\"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\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdateCadenceSet\",\"inputs\":[{\"name\":\"tableUpdateCadence\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ChainIDAlreadyWhitelisted\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ChainIDNotWhitelisted\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CurrentlyPaused\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EmptyChainIDsArray\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GenerationReservationAlreadyExists\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GenerationReservationDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidChainId\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidEndIndex\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidNewPausedStatus\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidPermissions\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidRange\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidStalenessPeriod\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidTableUpdateCadence\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"KeyTypeNotSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyPauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyUnpauser\",\"inputs\":[]}]", - Bin: "0x610100604052348015610010575f5ffd5b506040516125b73803806125b783398101604081905261002f9161015b565b818484836001600160a01b03811661005a576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b0390811660805291821660a052811660c0521660e05261007f610088565b505050506101b7565b5f54610100900460ff16156100f35760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610142575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610158575f5ffd5b50565b5f5f5f5f6080858703121561016e575f5ffd5b845161017981610144565b602086015190945061018a81610144565b604086015190935061019b81610144565b60608601519092506101ac81610144565b939692955090935050565b60805160a05160c05160e05161238e6102295f395f81816102db0152611a3101525f818161027c015281816109dc015261107001525f81816103db01528181610762015281816108d501528181610b6b0152610fc701525f818161036d015281816116590152611928015261238e5ff3fe608060405234801561000f575f5ffd5b50600436106101c6575f3560e01c8063715018a6116100fe578063ca8aa7c71161009e578063d9a6729e1161006e578063d9a6729e14610438578063dfbd9dfd1461044b578063f2fde38b1461045e578063fabc1cbc14610471575f5ffd5b8063ca8aa7c7146103d6578063d09b978b146103fd578063d504491114610412578063d6db9e2514610425575f5ffd5b80638da5cb5b116100d95780638da5cb5b1461038f578063ac505f4b146103a0578063b186a60e146103b8578063c4bffe2b146103c0575f5ffd5b8063715018a61461034d57806375e4b53914610355578063886f119514610368575f5ffd5b80633ec45c7e11610169578063595c6a6711610144578063595c6a67146102fd5780635ac86ab7146103055780635c975abb146103285780636c55a37f1461033a575f5ffd5b80633ec45c7e1461027757806341ee6d0e146102b65780634657e26a146102d6575f5ffd5b80631ca9142a116101a45780631ca9142a1461020557806321fa7fdc14610218578063277e1e621461024157806336b200de14610254575f5ffd5b806304e98be3146101ca5780630f19aaef146101df578063136439dd146101f2575b5f5ffd5b6101dd6101d8366004611c81565b610484565b005b6101dd6101ed366004611d19565b6105c8565b6101dd610200366004611d55565b6106ee565b6101dd610213366004611d82565b610728565b61022b610226366004611e5b565b61083b565b6040516102389190611e93565b60405180910390f35b6101dd61024f366004611ea1565b61089b565b610267610262366004611e5b565b6109bc565b6040519015158152602001610238565b61029e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610238565b6102c96102c4366004611ed4565b6109d7565b6040516102389190611f1c565b61029e7f000000000000000000000000000000000000000000000000000000000000000081565b6101dd610b1e565b610267610313366004611f2e565b606654600160ff9092169190911b9081161490565b6066545b604051908152602001610238565b6101dd610348366004611ed4565b610b32565b6101dd610d38565b61029e610363366004611e5b565b610d49565b61029e7f000000000000000000000000000000000000000000000000000000000000000081565b6033546001600160a01b031661029e565b609e5460405163ffffffff9091168152602001610238565b61032c610d75565b6103c8610d85565b604051610238929190611f4e565b61029e7f000000000000000000000000000000000000000000000000000000000000000081565b610405610e9b565b6040516102389190611fd7565b6101dd610420366004612024565b610f8e565b6101dd610433366004612068565b6111b7565b610405610446366004612081565b6111cb565b6101dd6104593660046120a1565b611315565b6101dd61046c3660046120e0565b6113bb565b6101dd61047f366004611d55565b611431565b61048c61149e565b6003610497816114f8565b8382146104b75760405163512509d360e11b815260040160405180910390fd5b5f5b848110156105c0575f8686838181106104d4576104d46120fb565b905060200201359050805f036104fd57604051633d23e4d160e11b815260040160405180910390fd5b61053181868685818110610513576105136120fb565b905060200201602081019061052891906120e0565b609b9190611523565b61054e576040516324bf631b60e11b815260040160405180910390fd5b7f7a0a76d85b582b17996dd7371a407aa7a79b870db8539247fba315c7b6beff6281868685818110610582576105826120fb565b905060200201602081019061059791906120e0565b604080519283526001600160a01b0390911660208301520160405180910390a1506001016104b9565b505050505050565b5f54610100900460ff16158080156105e657505f54600160ff909116105b806105ff5750303b1580156105ff57505f5460ff166001145b6106675760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff191660011790558015610688575f805461ff0019166101001790555b61069184611542565b61069a83611593565b6106a382611607565b80156106e8575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6106f6611644565b606654818116811461071b5760405163c61dca5d60e01b815260040160405180910390fd5b61072482611607565b5050565b6001610733816114f8565b61074060208401846120e0565b610749816116e7565b6040516304c1b8eb60e31b815284906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063260dc75890610797908490600401612140565b602060405180830381865afa1580156107b2573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d6919061214e565b6107f357604051631fb1705560e21b815260040160405180910390fd5b8461080661026236839003830183611e5b565b61082357604051634d2baea960e11b815260040160405180910390fd5b6105c061083536889003880188611e5b565b8661170d565b604080518082019091525f8082526020820152609a5f61085a84611787565b815260208082019290925260409081015f208151808301909252546001600160a01b0381168252600160a01b900463ffffffff169181019190915292915050565b60026108a6816114f8565b6108b360208401846120e0565b6108bc816116e7565b6040516304c1b8eb60e31b815284906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063260dc7589061090a908490600401612140565b602060405180830381865afa158015610925573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610949919061214e565b61096657604051631fb1705560e21b815260040160405180910390fd5b8461097961026236839003830183611e5b565b61099657604051634d2baea960e11b815260040160405180910390fd5b6105c06109a836889003880188611e5b565b6109b736889003880188611e5b565b6117ea565b5f6109d16109c983611787565b6097906118b3565b92915050565b6060817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637cffe48c846040518263ffffffff1660e01b8152600401610a269190612140565b602060405180830381865afa158015610a41573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a65919061216d565b610a7761022636869003860186611e5b565b610a8961036336879003870187611e5b565b6001600160a01b03166341ee6d0e866040518263ffffffff1660e01b8152600401610ab49190612140565b5f60405180830381865afa158015610ace573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610af5919081019061218b565b604051602001610b089493929190612233565b6040516020818303038152906040529050919050565b610b26611644565b610b305f19611607565b565b5f610b3c816114f8565b610b4960208301836120e0565b610b52816116e7565b6040516304c1b8eb60e31b815283906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063260dc75890610ba0908490600401612140565b602060405180830381865afa158015610bbb573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bdf919061214e565b610bfc57604051631fb1705560e21b815260040160405180910390fd5b83610c0f61026236839003830183611e5b565b610c2c57604051634d2baea960e11b815260040160405180910390fd5b5f610c44610c3f36889003880188611e5b565b611787565b5f818152609960205260409081902080546001600160a01b0319169055519091507fd7811913efd5d98fc7ea0d1fdd022b3d31987815360842d05b1d1cf55578d16a90610c92908890612140565b60405180910390a15f818152609a60205260409081902080546001600160c01b0319169055517f210a1118a869246162804e2a7f21ef808ebd93f4be7ed512014fe29a7a8be02e90610ce5908890612140565b60405180910390a1610cf86097826118ca565b507f4ffdfdd59e9e1e3c301608788f78dd458e61cb8c045ca92b62a7b484c80824fb86604051610d289190612140565b60405180910390a1505050505050565b610d4061149e565b610b305f611542565b5f60995f610d5684611787565b815260208101919091526040015f20546001600160a01b031692915050565b5f610d8060976118d5565b905090565b6060805f610d93609b6118de565b90505f8167ffffffffffffffff811115610daf57610daf611db8565b604051908082528060200260200182016040528015610dd8578160200160208202803683370190505b5090505f8267ffffffffffffffff811115610df557610df5611db8565b604051908082528060200260200182016040528015610e1e578160200160208202803683370190505b5090505f5b83811015610e90575f80610e38609b846118e8565b9150915081858481518110610e4f57610e4f6120fb565b60200260200101818152505080848481518110610e6e57610e6e6120fb565b6001600160a01b03909216602092830291909101909101525050600101610e23565b509094909350915050565b60605f610ea860976118d5565b90505f8167ffffffffffffffff811115610ec457610ec4611db8565b604051908082528060200260200182016040528015610f0857816020015b604080518082019091525f8082526020820152815260200190600190039081610ee25790505b5090505f5b82811015610f87575f610f21609783611905565b90505f610f5d82604080518082019091525f80825260208201525060408051808201909152606082901c815263ffffffff909116602082015290565b905080848481518110610f7257610f726120fb565b60209081029190910101525050600101610f0d565b5092915050565b5f610f98816114f8565b610fa560208501856120e0565b610fae816116e7565b6040516304c1b8eb60e31b815285906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063260dc75890610ffc908490600401612140565b602060405180830381865afa158015611017573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061103b919061214e565b61105857604051631fb1705560e21b815260040160405180910390fd5b5f604051631f3ff92360e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637cffe48c906110a5908a90600401612140565b602060405180830381865afa1580156110c0573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110e4919061216d565b60028111156110f5576110f561221f565b036111135760405163e57cacbd60e01b815260040160405180910390fd5b611130611128610c3f36899003890189611e5b565b609790611910565b61114d57604051631883461560e01b815260040160405180910390fd5b7f4fb6efec7dd60036ce3a7af8d5c48425019daa0fb61eb471a966a7ac2c6fa6a68660405161117c9190612140565b60405180910390a161119661083536889003880188611e5b565b6105c06111a836889003880188611e5b565b6109b736879003870187611e5b565b6111bf61149e565b6111c881611593565b50565b6060818311156111ee5760405163561ce9bb60e01b815260040160405180910390fd5b6111f860976118d5565b821115611218576040516302da361360e61b815260040160405180910390fd5b5f611223848461229f565b90505f8167ffffffffffffffff81111561123f5761123f611db8565b60405190808252806020026020018201604052801561128357816020015b604080518082019091525f808252602082015281526020019060019003908161125d5790505b5090505f5b8281101561130c575f6112a661129e83896122b2565b609790611905565b90505f6112e282604080518082019091525f80825260208201525060408051808201909152606082901c815263ffffffff909116602082015290565b9050808484815181106112f7576112f76120fb565b60209081029190910101525050600101611288565b50949350505050565b61131d61149e565b6003611328816114f8565b5f5b828110156106e8575f848483818110611345576113456120fb565b90506020020135905061136281609b61191b90919063ffffffff16565b61137f5760405163b3f92ba160e01b815260040160405180910390fd5b6040518181527f6824d36084ecf2cd819b137cb5d837cc6e73afce1e0e348c9fdecaa81d0341e59060200160405180910390a15060010161132a565b6113c361149e565b6001600160a01b0381166114285760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161065e565b6111c881611542565b611439611926565b606654801982198116146114605760405163c61dca5d60e01b815260040160405180910390fd5b606682905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b6033546001600160a01b03163314610b305760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161065e565b606654600160ff83161b908116036111c85760405163840a48d560e01b815260040160405180910390fd5b5f61153884846001600160a01b0385166119d7565b90505b9392505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f8163ffffffff16116115b9576040516316d98e1b60e31b815260040160405180910390fd5b609e805463ffffffff191663ffffffff83169081179091556040519081527f4fbcd0cca70015b33db8af4aa4f2bd6fd6c1efa9460b8e2333f252c1467a63279060200160405180910390a150565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa1580156116a6573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116ca919061214e565b610b3057604051631d77d47760e21b815260040160405180910390fd5b6116f0816119f3565b6111c85760405163932d94f760e01b815260040160405180910390fd5b8060995f61171a85611787565b81526020019081526020015f205f6101000a8154816001600160a01b0302191690836001600160a01b031602179055507f7f7ccafd92d20fdb39dee184a0dce002a9da420ed0def461f2a027abc9b3f6df828260405161177b9291906122c5565b60405180910390a15050565b5f815f0151826020015163ffffffff166040516020016117d292919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b6040516020818303038152906040526109d1906122eb565b602081015163ffffffff1615806118115750609e54602082015163ffffffff918216911610155b61182e57604051632e46483160e11b815260040160405180910390fd5b80609a5f61183b85611787565b815260208082019290925260409081015f2083518154949093015163ffffffff16600160a01b026001600160c01b03199094166001600160a01b0390931692909217929092179055517f3147846ee526009000671c20380b856a633345691300f82585f90034715cf0e29061177b908490849061230e565b5f818152600183016020526040812054151561153b565b5f61153b8383611a9c565b5f6109d1825490565b5f6109d182611b7f565b5f8080806118f68686611b89565b909450925050505b9250929050565b5f61153b8383611bb2565b5f61153b8383611bd8565b5f61153b8383611c24565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611982573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119a69190612329565b6001600160a01b0316336001600160a01b031614610b305760405163794821ff60e01b815260040160405180910390fd5b5f82815260028401602052604081208290556115388484611910565b604051631beb2b9760e31b81526001600160a01b0382811660048301523360248301523060448301525f80356001600160e01b0319166064840152917f00000000000000000000000000000000000000000000000000000000000000009091169063df595cb890608401602060405180830381865afa158015611a78573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109d1919061214e565b5f8181526001830160205260408120548015611b76575f611abe60018361229f565b85549091505f90611ad19060019061229f565b9050818114611b30575f865f018281548110611aef57611aef6120fb565b905f5260205f200154905080875f018481548110611b0f57611b0f6120fb565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080611b4157611b41612344565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f9055600193505050506109d1565b5f9150506109d1565b5f6109d1826118d5565b5f8080611b968585611905565b5f81815260029690960160205260409095205494959350505050565b5f825f018281548110611bc757611bc76120fb565b905f5260205f200154905092915050565b5f818152600183016020526040812054611c1d57508154600181810184555f8481526020808220909301849055845484825282860190935260409020919091556109d1565b505f6109d1565b5f818152600283016020526040812081905561153b83836118ca565b5f5f83601f840112611c50575f5ffd5b50813567ffffffffffffffff811115611c67575f5ffd5b6020830191508360208260051b85010111156118fe575f5ffd5b5f5f5f5f60408587031215611c94575f5ffd5b843567ffffffffffffffff811115611caa575f5ffd5b611cb687828801611c40565b909550935050602085013567ffffffffffffffff811115611cd5575f5ffd5b611ce187828801611c40565b95989497509550505050565b6001600160a01b03811681146111c8575f5ffd5b803563ffffffff81168114611d14575f5ffd5b919050565b5f5f5f60608486031215611d2b575f5ffd5b8335611d3681611ced565b9250611d4460208501611d01565b929592945050506040919091013590565b5f60208284031215611d65575f5ffd5b5035919050565b5f60408284031215611d7c575f5ffd5b50919050565b5f5f60608385031215611d93575f5ffd5b611d9d8484611d6c565b91506040830135611dad81611ced565b809150509250929050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611df557611df5611db8565b604052919050565b5f60408284031215611e0d575f5ffd5b6040805190810167ffffffffffffffff81118282101715611e3057611e30611db8565b6040529050808235611e4181611ced565b8152611e4f60208401611d01565b60208201525092915050565b5f60408284031215611e6b575f5ffd5b61153b8383611dfd565b80516001600160a01b0316825260209081015163ffffffff16910152565b604081016109d18284611e75565b5f5f60808385031215611eb2575f5ffd5b611ebc8484611d6c565b9150611ecb8460408501611d6c565b90509250929050565b5f60408284031215611ee4575f5ffd5b61153b8383611d6c565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61153b6020830184611eee565b5f60208284031215611f3e575f5ffd5b813560ff8116811461153b575f5ffd5b604080825283519082018190525f9060208501906060840190835b81811015611f87578351835260209384019390920191600101611f69565b5050838103602080860191909152855180835291810192508501905f5b81811015611fcb5782516001600160a01b0316845260209384019390920191600101611fa4565b50919695505050505050565b602080825282518282018190525f918401906040840190835b8181101561201957612003838551611e75565b6020939093019260409290920191600101611ff0565b509095945050505050565b5f5f5f60a08486031215612036575f5ffd5b6120408585611d6c565b9250604084013561205081611ced565b915061205f8560608601611d6c565b90509250925092565b5f60208284031215612078575f5ffd5b61153b82611d01565b5f5f60408385031215612092575f5ffd5b50508035926020909101359150565b5f5f602083850312156120b2575f5ffd5b823567ffffffffffffffff8111156120c8575f5ffd5b6120d485828601611c40565b90969095509350505050565b5f602082840312156120f0575f5ffd5b813561153b81611ced565b634e487b7160e01b5f52603260045260245ffd5b803561211a81611ced565b6001600160a01b0316825263ffffffff61213660208301611d01565b1660208301525050565b604081016109d1828461210f565b5f6020828403121561215e575f5ffd5b8151801515811461153b575f5ffd5b5f6020828403121561217d575f5ffd5b81516003811061153b575f5ffd5b5f6020828403121561219b575f5ffd5b815167ffffffffffffffff8111156121b1575f5ffd5b8201601f810184136121c1575f5ffd5b805167ffffffffffffffff8111156121db576121db611db8565b6121ee601f8201601f1916602001611dcc565b818152856020838501011115612202575f5ffd5b8160208401602083015e5f91810160200191909152949350505050565b634e487b7160e01b5f52602160045260245ffd5b61223d818661210f565b5f6003851061225a57634e487b7160e01b5f52602160045260245ffd5b84604083015261226d6060830185611e75565b60c060a083015261228160c0830184611eee565b9695505050505050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156109d1576109d161228b565b808201808211156109d1576109d161228b565b606081016122d38285611e75565b6001600160a01b039290921660409190910152919050565b80516020808301519190811015611d7c575f1960209190910360031b1b16919050565b6080810161231c8285611e75565b61153b6040830184611e75565b5f60208284031215612339575f5ffd5b815161153b81611ced565b634e487b7160e01b5f52603160045260245ffdfea26469706673582212205f367ac5988f2026f0727d1dbe43305921daf374bbe2a46200b02e4f8ee9dcd964736f6c634300081e0033", + Bin: "0x610100604052348015610010575f5ffd5b506040516125b73803806125b783398101604081905261002f9161015b565b818484836001600160a01b03811661005a576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b0390811660805291821660a052811660c0521660e05261007f610088565b505050506101b7565b5f54610100900460ff16156100f35760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610142575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610158575f5ffd5b50565b5f5f5f5f6080858703121561016e575f5ffd5b845161017981610144565b602086015190945061018a81610144565b604086015190935061019b81610144565b60608601519092506101ac81610144565b939692955090935050565b60805160a05160c05160e05161238e6102295f395f81816102db0152611a3101525f818161027c015281816109dc015261107001525f81816103db01528181610762015281816108d501528181610b6b0152610fc701525f818161036d015281816116590152611928015261238e5ff3fe608060405234801561000f575f5ffd5b50600436106101c6575f3560e01c8063715018a6116100fe578063ca8aa7c71161009e578063d9a6729e1161006e578063d9a6729e14610438578063dfbd9dfd1461044b578063f2fde38b1461045e578063fabc1cbc14610471575f5ffd5b8063ca8aa7c7146103d6578063d09b978b146103fd578063d504491114610412578063d6db9e2514610425575f5ffd5b80638da5cb5b116100d95780638da5cb5b1461038f578063ac505f4b146103a0578063b186a60e146103b8578063c4bffe2b146103c0575f5ffd5b8063715018a61461034d57806375e4b53914610355578063886f119514610368575f5ffd5b80633ec45c7e11610169578063595c6a6711610144578063595c6a67146102fd5780635ac86ab7146103055780635c975abb146103285780636c55a37f1461033a575f5ffd5b80633ec45c7e1461027757806341ee6d0e146102b65780634657e26a146102d6575f5ffd5b80631ca9142a116101a45780631ca9142a1461020557806321fa7fdc14610218578063277e1e621461024157806336b200de14610254575f5ffd5b806304e98be3146101ca5780630f19aaef146101df578063136439dd146101f2575b5f5ffd5b6101dd6101d8366004611c81565b610484565b005b6101dd6101ed366004611d19565b6105c8565b6101dd610200366004611d55565b6106ee565b6101dd610213366004611d82565b610728565b61022b610226366004611e5b565b61083b565b6040516102389190611e93565b60405180910390f35b6101dd61024f366004611ea1565b61089b565b610267610262366004611e5b565b6109bc565b6040519015158152602001610238565b61029e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610238565b6102c96102c4366004611ed4565b6109d7565b6040516102389190611f1c565b61029e7f000000000000000000000000000000000000000000000000000000000000000081565b6101dd610b1e565b610267610313366004611f2e565b606654600160ff9092169190911b9081161490565b6066545b604051908152602001610238565b6101dd610348366004611ed4565b610b32565b6101dd610d38565b61029e610363366004611e5b565b610d49565b61029e7f000000000000000000000000000000000000000000000000000000000000000081565b6033546001600160a01b031661029e565b609e5460405163ffffffff9091168152602001610238565b61032c610d75565b6103c8610d85565b604051610238929190611f4e565b61029e7f000000000000000000000000000000000000000000000000000000000000000081565b610405610e9b565b6040516102389190611fd7565b6101dd610420366004612024565b610f8e565b6101dd610433366004612068565b6111b7565b610405610446366004612081565b6111cb565b6101dd6104593660046120a1565b611315565b6101dd61046c3660046120e0565b6113bb565b6101dd61047f366004611d55565b611431565b61048c61149e565b6003610497816114f8565b8382146104b75760405163512509d360e11b815260040160405180910390fd5b5f5b848110156105c0575f8686838181106104d4576104d46120fb565b905060200201359050805f036104fd57604051633d23e4d160e11b815260040160405180910390fd5b61053181868685818110610513576105136120fb565b905060200201602081019061052891906120e0565b609b9190611523565b61054e576040516324bf631b60e11b815260040160405180910390fd5b7f7a0a76d85b582b17996dd7371a407aa7a79b870db8539247fba315c7b6beff6281868685818110610582576105826120fb565b905060200201602081019061059791906120e0565b604080519283526001600160a01b0390911660208301520160405180910390a1506001016104b9565b505050505050565b5f54610100900460ff16158080156105e657505f54600160ff909116105b806105ff5750303b1580156105ff57505f5460ff166001145b6106675760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff191660011790558015610688575f805461ff0019166101001790555b61069184611542565b61069a83611593565b6106a382611607565b80156106e8575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6106f6611644565b606654818116811461071b5760405163c61dca5d60e01b815260040160405180910390fd5b61072482611607565b5050565b6001610733816114f8565b61074060208401846120e0565b610749816116e7565b6040516304c1b8eb60e31b815284906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063260dc75890610797908490600401612140565b602060405180830381865afa1580156107b2573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d6919061214e565b6107f357604051631fb1705560e21b815260040160405180910390fd5b8461080661026236839003830183611e5b565b61082357604051634d2baea960e11b815260040160405180910390fd5b6105c061083536889003880188611e5b565b8661170d565b604080518082019091525f8082526020820152609a5f61085a84611787565b815260208082019290925260409081015f208151808301909252546001600160a01b0381168252600160a01b900463ffffffff169181019190915292915050565b60026108a6816114f8565b6108b360208401846120e0565b6108bc816116e7565b6040516304c1b8eb60e31b815284906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063260dc7589061090a908490600401612140565b602060405180830381865afa158015610925573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610949919061214e565b61096657604051631fb1705560e21b815260040160405180910390fd5b8461097961026236839003830183611e5b565b61099657604051634d2baea960e11b815260040160405180910390fd5b6105c06109a836889003880188611e5b565b6109b736889003880188611e5b565b6117ea565b5f6109d16109c983611787565b6097906118b3565b92915050565b6060817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637cffe48c846040518263ffffffff1660e01b8152600401610a269190612140565b602060405180830381865afa158015610a41573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a65919061216d565b610a7761022636869003860186611e5b565b610a8961036336879003870187611e5b565b6001600160a01b03166341ee6d0e866040518263ffffffff1660e01b8152600401610ab49190612140565b5f60405180830381865afa158015610ace573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610af5919081019061218b565b604051602001610b089493929190612233565b6040516020818303038152906040529050919050565b610b26611644565b610b305f19611607565b565b5f610b3c816114f8565b610b4960208301836120e0565b610b52816116e7565b6040516304c1b8eb60e31b815283906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063260dc75890610ba0908490600401612140565b602060405180830381865afa158015610bbb573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bdf919061214e565b610bfc57604051631fb1705560e21b815260040160405180910390fd5b83610c0f61026236839003830183611e5b565b610c2c57604051634d2baea960e11b815260040160405180910390fd5b5f610c44610c3f36889003880188611e5b565b611787565b5f818152609960205260409081902080546001600160a01b0319169055519091507fd7811913efd5d98fc7ea0d1fdd022b3d31987815360842d05b1d1cf55578d16a90610c92908890612140565b60405180910390a15f818152609a60205260409081902080546001600160c01b0319169055517f210a1118a869246162804e2a7f21ef808ebd93f4be7ed512014fe29a7a8be02e90610ce5908890612140565b60405180910390a1610cf86097826118ca565b507f4ffdfdd59e9e1e3c301608788f78dd458e61cb8c045ca92b62a7b484c80824fb86604051610d289190612140565b60405180910390a1505050505050565b610d4061149e565b610b305f611542565b5f60995f610d5684611787565b815260208101919091526040015f20546001600160a01b031692915050565b5f610d8060976118d5565b905090565b6060805f610d93609b6118de565b90505f8167ffffffffffffffff811115610daf57610daf611db8565b604051908082528060200260200182016040528015610dd8578160200160208202803683370190505b5090505f8267ffffffffffffffff811115610df557610df5611db8565b604051908082528060200260200182016040528015610e1e578160200160208202803683370190505b5090505f5b83811015610e90575f80610e38609b846118e8565b9150915081858481518110610e4f57610e4f6120fb565b60200260200101818152505080848481518110610e6e57610e6e6120fb565b6001600160a01b03909216602092830291909101909101525050600101610e23565b509094909350915050565b60605f610ea860976118d5565b90505f8167ffffffffffffffff811115610ec457610ec4611db8565b604051908082528060200260200182016040528015610f0857816020015b604080518082019091525f8082526020820152815260200190600190039081610ee25790505b5090505f5b82811015610f87575f610f21609783611905565b90505f610f5d82604080518082019091525f80825260208201525060408051808201909152606082901c815263ffffffff909116602082015290565b905080848481518110610f7257610f726120fb565b60209081029190910101525050600101610f0d565b5092915050565b5f610f98816114f8565b610fa560208501856120e0565b610fae816116e7565b6040516304c1b8eb60e31b815285906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063260dc75890610ffc908490600401612140565b602060405180830381865afa158015611017573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061103b919061214e565b61105857604051631fb1705560e21b815260040160405180910390fd5b5f604051631f3ff92360e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637cffe48c906110a5908a90600401612140565b602060405180830381865afa1580156110c0573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110e4919061216d565b60028111156110f5576110f561221f565b036111135760405163e57cacbd60e01b815260040160405180910390fd5b611130611128610c3f36899003890189611e5b565b609790611910565b61114d57604051631883461560e01b815260040160405180910390fd5b7f4fb6efec7dd60036ce3a7af8d5c48425019daa0fb61eb471a966a7ac2c6fa6a68660405161117c9190612140565b60405180910390a161119661083536889003880188611e5b565b6105c06111a836889003880188611e5b565b6109b736879003870187611e5b565b6111bf61149e565b6111c881611593565b50565b6060818311156111ee5760405163561ce9bb60e01b815260040160405180910390fd5b6111f860976118d5565b821115611218576040516302da361360e61b815260040160405180910390fd5b5f611223848461229f565b90505f8167ffffffffffffffff81111561123f5761123f611db8565b60405190808252806020026020018201604052801561128357816020015b604080518082019091525f808252602082015281526020019060019003908161125d5790505b5090505f5b8281101561130c575f6112a661129e83896122b2565b609790611905565b90505f6112e282604080518082019091525f80825260208201525060408051808201909152606082901c815263ffffffff909116602082015290565b9050808484815181106112f7576112f76120fb565b60209081029190910101525050600101611288565b50949350505050565b61131d61149e565b6003611328816114f8565b5f5b828110156106e8575f848483818110611345576113456120fb565b90506020020135905061136281609b61191b90919063ffffffff16565b61137f5760405163b3f92ba160e01b815260040160405180910390fd5b6040518181527f6824d36084ecf2cd819b137cb5d837cc6e73afce1e0e348c9fdecaa81d0341e59060200160405180910390a15060010161132a565b6113c361149e565b6001600160a01b0381166114285760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161065e565b6111c881611542565b611439611926565b606654801982198116146114605760405163c61dca5d60e01b815260040160405180910390fd5b606682905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b6033546001600160a01b03163314610b305760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161065e565b606654600160ff83161b908116036111c85760405163840a48d560e01b815260040160405180910390fd5b5f61153884846001600160a01b0385166119d7565b90505b9392505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f8163ffffffff16116115b9576040516316d98e1b60e31b815260040160405180910390fd5b609e805463ffffffff191663ffffffff83169081179091556040519081527f4fbcd0cca70015b33db8af4aa4f2bd6fd6c1efa9460b8e2333f252c1467a63279060200160405180910390a150565b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa1580156116a6573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116ca919061214e565b610b3057604051631d77d47760e21b815260040160405180910390fd5b6116f0816119f3565b6111c85760405163932d94f760e01b815260040160405180910390fd5b8060995f61171a85611787565b81526020019081526020015f205f6101000a8154816001600160a01b0302191690836001600160a01b031602179055507f7f7ccafd92d20fdb39dee184a0dce002a9da420ed0def461f2a027abc9b3f6df828260405161177b9291906122c5565b60405180910390a15050565b5f815f0151826020015163ffffffff166040516020016117d292919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b6040516020818303038152906040526109d1906122eb565b602081015163ffffffff1615806118115750609e54602082015163ffffffff918216911610155b61182e57604051632e46483160e11b815260040160405180910390fd5b80609a5f61183b85611787565b815260208082019290925260409081015f2083518154949093015163ffffffff16600160a01b026001600160c01b03199094166001600160a01b0390931692909217929092179055517f3147846ee526009000671c20380b856a633345691300f82585f90034715cf0e29061177b908490849061230e565b5f818152600183016020526040812054151561153b565b5f61153b8383611a9c565b5f6109d1825490565b5f6109d182611b7f565b5f8080806118f68686611b89565b909450925050505b9250929050565b5f61153b8383611bb2565b5f61153b8383611bd8565b5f61153b8383611c24565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611982573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119a69190612329565b6001600160a01b0316336001600160a01b031614610b305760405163794821ff60e01b815260040160405180910390fd5b5f82815260028401602052604081208290556115388484611910565b604051631beb2b9760e31b81526001600160a01b0382811660048301523360248301523060448301525f80356001600160e01b0319166064840152917f00000000000000000000000000000000000000000000000000000000000000009091169063df595cb890608401602060405180830381865afa158015611a78573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109d1919061214e565b5f8181526001830160205260408120548015611b76575f611abe60018361229f565b85549091505f90611ad19060019061229f565b9050818114611b30575f865f018281548110611aef57611aef6120fb565b905f5260205f200154905080875f018481548110611b0f57611b0f6120fb565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080611b4157611b41612344565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f9055600193505050506109d1565b5f9150506109d1565b5f6109d1826118d5565b5f8080611b968585611905565b5f81815260029690960160205260409095205494959350505050565b5f825f018281548110611bc757611bc76120fb565b905f5260205f200154905092915050565b5f818152600183016020526040812054611c1d57508154600181810184555f8481526020808220909301849055845484825282860190935260409020919091556109d1565b505f6109d1565b5f818152600283016020526040812081905561153b83836118ca565b5f5f83601f840112611c50575f5ffd5b50813567ffffffffffffffff811115611c67575f5ffd5b6020830191508360208260051b85010111156118fe575f5ffd5b5f5f5f5f60408587031215611c94575f5ffd5b843567ffffffffffffffff811115611caa575f5ffd5b611cb687828801611c40565b909550935050602085013567ffffffffffffffff811115611cd5575f5ffd5b611ce187828801611c40565b95989497509550505050565b6001600160a01b03811681146111c8575f5ffd5b803563ffffffff81168114611d14575f5ffd5b919050565b5f5f5f60608486031215611d2b575f5ffd5b8335611d3681611ced565b9250611d4460208501611d01565b929592945050506040919091013590565b5f60208284031215611d65575f5ffd5b5035919050565b5f60408284031215611d7c575f5ffd5b50919050565b5f5f60608385031215611d93575f5ffd5b611d9d8484611d6c565b91506040830135611dad81611ced565b809150509250929050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611df557611df5611db8565b604052919050565b5f60408284031215611e0d575f5ffd5b6040805190810167ffffffffffffffff81118282101715611e3057611e30611db8565b6040529050808235611e4181611ced565b8152611e4f60208401611d01565b60208201525092915050565b5f60408284031215611e6b575f5ffd5b61153b8383611dfd565b80516001600160a01b0316825260209081015163ffffffff16910152565b604081016109d18284611e75565b5f5f60808385031215611eb2575f5ffd5b611ebc8484611d6c565b9150611ecb8460408501611d6c565b90509250929050565b5f60408284031215611ee4575f5ffd5b61153b8383611d6c565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61153b6020830184611eee565b5f60208284031215611f3e575f5ffd5b813560ff8116811461153b575f5ffd5b604080825283519082018190525f9060208501906060840190835b81811015611f87578351835260209384019390920191600101611f69565b5050838103602080860191909152855180835291810192508501905f5b81811015611fcb5782516001600160a01b0316845260209384019390920191600101611fa4565b50919695505050505050565b602080825282518282018190525f918401906040840190835b8181101561201957612003838551611e75565b6020939093019260409290920191600101611ff0565b509095945050505050565b5f5f5f60a08486031215612036575f5ffd5b6120408585611d6c565b9250604084013561205081611ced565b915061205f8560608601611d6c565b90509250925092565b5f60208284031215612078575f5ffd5b61153b82611d01565b5f5f60408385031215612092575f5ffd5b50508035926020909101359150565b5f5f602083850312156120b2575f5ffd5b823567ffffffffffffffff8111156120c8575f5ffd5b6120d485828601611c40565b90969095509350505050565b5f602082840312156120f0575f5ffd5b813561153b81611ced565b634e487b7160e01b5f52603260045260245ffd5b803561211a81611ced565b6001600160a01b0316825263ffffffff61213660208301611d01565b1660208301525050565b604081016109d1828461210f565b5f6020828403121561215e575f5ffd5b8151801515811461153b575f5ffd5b5f6020828403121561217d575f5ffd5b81516003811061153b575f5ffd5b5f6020828403121561219b575f5ffd5b815167ffffffffffffffff8111156121b1575f5ffd5b8201601f810184136121c1575f5ffd5b805167ffffffffffffffff8111156121db576121db611db8565b6121ee601f8201601f1916602001611dcc565b818152856020838501011115612202575f5ffd5b8160208401602083015e5f91810160200191909152949350505050565b634e487b7160e01b5f52602160045260245ffd5b61223d818661210f565b5f6003851061225a57634e487b7160e01b5f52602160045260245ffd5b84604083015261226d6060830185611e75565b60c060a083015261228160c0830184611eee565b9695505050505050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156109d1576109d161228b565b808201808211156109d1576109d161228b565b606081016122d38285611e75565b6001600160a01b039290921660409190910152919050565b80516020808301519190811015611d7c575f1960209190910360031b1b16919050565b6080810161231c8285611e75565b61153b6040830184611e75565b5f60208284031215612339575f5ffd5b815161153b81611ced565b634e487b7160e01b5f52603160045260245ffdfea264697066735822122071b3bdc28040f492dd50268210c7ebd02f47c39d92f8ba95b58d270288c9e86764736f6c634300081e0033", } // CrossChainRegistryABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/DelegationManager/binding.go b/pkg/bindings/DelegationManager/binding.go index 633c0c6fc2..6d74478371 100644 --- a/pkg/bindings/DelegationManager/binding.go +++ b/pkg/bindings/DelegationManager/binding.go @@ -62,7 +62,7 @@ type OperatorSet struct { // DelegationManagerMetaData contains all meta data concerning the DelegationManager contract. var DelegationManagerMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_strategyManager\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"},{\"name\":\"_eigenPodManager\",\"type\":\"address\",\"internalType\":\"contractIEigenPodManager\"},{\"name\":\"_allocationManager\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"_permissionController\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"},{\"name\":\"_MIN_WITHDRAWAL_DELAY\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"DELEGATION_APPROVAL_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allocationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"beaconChainETHStrategy\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateDelegationApprovalDigestHash\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"approver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"approverSalt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateWithdrawalRoot\",\"inputs\":[{\"name\":\"withdrawal\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManagerTypes.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"scaledShares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"completeQueuedWithdrawal\",\"inputs\":[{\"name\":\"withdrawal\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManagerTypes.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"scaledShares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"tokens\",\"type\":\"address[]\",\"internalType\":\"contractIERC20[]\"},{\"name\":\"receiveAsTokens\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"completeQueuedWithdrawals\",\"inputs\":[{\"name\":\"withdrawals\",\"type\":\"tuple[]\",\"internalType\":\"structIDelegationManagerTypes.Withdrawal[]\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"scaledShares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"tokens\",\"type\":\"address[][]\",\"internalType\":\"contractIERC20[][]\"},{\"name\":\"receiveAsTokens\",\"type\":\"bool[]\",\"internalType\":\"bool[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"convertToDepositShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"withdrawableShares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"cumulativeWithdrawalsQueued\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"totalQueued\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decreaseDelegatedShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"curDepositShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"beaconChainSlashingFactorDecrease\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegateTo\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"approverSignatureAndExpiry\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtilsMixinTypes.SignatureWithExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"approverSalt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegatedTo\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationApprover\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationApproverSaltIsSpent\",\"inputs\":[{\"name\":\"delegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"spent\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"depositScalingFactor\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"eigenPodManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenPodManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDepositedShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorShares\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorsShares\",\"inputs\":[{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[][]\",\"internalType\":\"uint256[][]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getQueuedWithdrawal\",\"inputs\":[{\"name\":\"withdrawalRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"withdrawal\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManagerTypes.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"scaledShares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"shares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getQueuedWithdrawalRoots\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getQueuedWithdrawals\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"withdrawals\",\"type\":\"tuple[]\",\"internalType\":\"structIDelegationManagerTypes.Withdrawal[]\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"scaledShares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"shares\",\"type\":\"uint256[][]\",\"internalType\":\"uint256[][]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getSlashableSharesInQueue\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getWithdrawableShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[{\"name\":\"withdrawableShares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"depositShares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"increaseDelegatedShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"prevDepositShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"addedShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isDelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isOperator\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minWithdrawalDelayBlocks\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"modifyOperatorDetails\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"newDelegationApprover\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"operatorShares\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingWithdrawals\",\"inputs\":[{\"name\":\"withdrawalRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"pending\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"permissionController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"queueWithdrawals\",\"inputs\":[{\"name\":\"params\",\"type\":\"tuple[]\",\"internalType\":\"structIDelegationManagerTypes.QueuedWithdrawalParams[]\",\"components\":[{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"depositShares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"__deprecated_withdrawer\",\"type\":\"address\",\"internalType\":\"address\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"queuedWithdrawals\",\"inputs\":[{\"name\":\"withdrawalRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"withdrawal\",\"type\":\"tuple\",\"internalType\":\"structIDelegationManagerTypes.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"scaledShares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"redelegate\",\"inputs\":[{\"name\":\"newOperator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"newOperatorApproverSig\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtilsMixinTypes.SignatureWithExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"approverSalt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"withdrawalRoots\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registerAsOperator\",\"inputs\":[{\"name\":\"initDelegationApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"allocationDelay\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slashOperatorShares\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"slashId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"prevMaxMagnitude\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"newMaxMagnitude\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"totalDepositSharesToSlash\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"strategyManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"undelegate\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"withdrawalRoots\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateOperatorMetadataURI\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"DelegationApproverUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newDelegationApprover\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DepositScalingFactorUpdated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"newDepositScalingFactor\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorMetadataURIUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"metadataURI\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorRegistered\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"delegationApprover\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSharesDecreased\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSharesIncreased\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSharesSlashed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"totalSlashedShares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashingWithdrawalCompleted\",\"inputs\":[{\"name\":\"withdrawalRoot\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashingWithdrawalQueued\",\"inputs\":[{\"name\":\"withdrawalRoot\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"withdrawal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIDelegationManagerTypes.Withdrawal\",\"components\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delegatedTo\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"scaledShares\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"sharesToWithdraw\",\"type\":\"uint256[]\",\"indexed\":false,\"internalType\":\"uint256[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerDelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerForceUndelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StakerUndelegated\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ActivelyDelegated\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CallerCannotUndelegate\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CurrentlyPaused\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FullySlashed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputArrayLengthZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidDepositScalingFactor\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidNewPausedStatus\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidPermissions\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSnapshotOrdering\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotActivelyDelegated\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyAllocationManager\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyEigenPodManager\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyPauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyStrategyManagerOrEigenPodManager\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyUnpauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OperatorNotRegistered\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OperatorsCannotUndelegate\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SaltSpent\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignatureExpired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"WithdrawalDelayNotElapsed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawalNotQueued\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawerNotCaller\",\"inputs\":[]}]", - Bin: "0x610160604052348015610010575f5ffd5b5060405161605338038061605383398101604081905261002f916101d9565b808084898989878a6001600160a01b03811661005e576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b0390811660805293841660a05291831660c052821660e05263ffffffff16610100521661012052610095816100b0565b61014052506100a490506100f6565b50505050505050610364565b5f5f829050601f815111156100e3578260405163305a27a960e01b81526004016100da9190610309565b60405180910390fd5b80516100ee8261033e565b179392505050565b5f54610100900460ff161561015d5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b60648201526084016100da565b5f5460ff908116146101ac575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146101c2575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b5f5f5f5f5f5f5f60e0888a0312156101ef575f5ffd5b87516101fa816101ae565b602089015190975061020b816101ae565b604089015190965061021c816101ae565b606089015190955061022d816101ae565b608089015190945061023e816101ae565b60a089015190935063ffffffff81168114610257575f5ffd5b60c08901519092506001600160401b03811115610272575f5ffd5b88015f601f82018b13610283575f5ffd5b81516001600160401b0381111561029c5761029c6101c5565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102ca576102ca6101c5565b6040528181528382016020018d10156102e1575f5ffd5b8160208501602083015e5f602083830101528092508094505050505092959891949750929550565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b8051602080830151919081101561035e575f198160200360031b1b821691505b50919050565b60805160a05160c05160e051610100516101205161014051615bfd6104565f395f8181610fc10152613dec01525f81816104120152613a7a01525f8181610703015281816131c7015281816134bd015261367601525f818161075301528181610cf301528181610eb60152818161103901528181611392015281816117f401528181612446015261414c01525f818161043901528181610e34015281816112f10152818161156501528181612d3701528181612f18015261333101525f818161036f01528181610e02015281816114b9015261330b01525f81816105e201528181612afd0152613e5b0152615bfd5ff3fe608060405234801561000f575f5ffd5b50600436106102b1575f3560e01c80636d70f7ae1161017b578063bb45fef2116100e4578063e4cc3f901161009e578063f698da2511610079578063f698da25146107ce578063fabc1cbc146107d6578063fd8aa88d146107e9578063fe4b84df146107fc575f5ffd5b8063e4cc3f9014610788578063eea9064b1461079b578063f0e0e676146107ae575f5ffd5b8063bb45fef2146106b9578063bfae3fd2146106e6578063c448feb8146106f9578063c978f7ac1461072d578063ca8aa7c71461074e578063da8be86414610775575f5ffd5b80639104c319116101355780639104c319146106175780639435bb431461063257806399f5371b14610645578063a178848414610665578063a33a343314610684578063b7f06ebe14610697575f5ffd5b80636d70f7ae1461057a5780636e1744481461058d578063778e55f3146105a057806378296ec5146105ca578063886f1195146105dd5780639004134714610604575f5ffd5b806354b7c96c1161021d5780635c975abb116101d75780635c975abb146104d45780635d975e88146104dc5780635dd68579146104fd57806360a0d1ce1461051e57806365da12641461053157806366d5ba9314610559575f5ffd5b806354b7c96c1461045b57806354fd4d501461046e578063595c6a6714610483578063597b36da1461048b5780635ac86ab71461049e5780635ae679a7146104c1575f5ffd5b806339b70e381161026e57806339b70e381461036a5780633c651cf2146103a95780633cdeb5e0146103bc5780633e28391d146103ea5780634657e26a1461040d5780634665bcda14610434575f5ffd5b806304a4f979146102b55780630b9f487a146102ef5780630dd8dd0214610302578063136439dd1461032257806325df922e146103375780632aa6d88814610357575b5f5ffd5b6102dc7f14bde674c9f64b2ad00eaaee4a8bed1fabef35c7507e3c5b9cfc9436909a2dad81565b6040519081526020015b60405180910390f35b6102dc6102fd366004614a86565b61080f565b610315610310366004614b1d565b610897565b6040516102e69190614b5b565b610335610330366004614b92565b610b09565b005b61034a610345366004614d27565b610b43565b6040516102e69190614dd5565b610335610365366004614e37565b610ca3565b6103917f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102e6565b6103356103b7366004614e95565b610df7565b6103916103ca366004614ed8565b6001600160a01b039081165f908152609960205260409020600101541690565b6103fd6103f8366004614ed8565b610f4a565b60405190151581526020016102e6565b6103917f000000000000000000000000000000000000000000000000000000000000000081565b6103917f000000000000000000000000000000000000000000000000000000000000000081565b610335610469366004614ef3565b610f69565b610476610fba565b6040516102e69190614f58565b610335610fea565b6102dc610499366004615026565b610ffe565b6103fd6104ac366004615057565b606654600160ff9092169190911b9081161490565b6102dc6104cf36600461508b565b61102d565b6066546102dc565b6104ef6104ea366004614b92565b61119f565b6040516102e69291906151c0565b61051061050b366004614ed8565b6111bc565b6040516102e6929190615232565b61033561052c36600461529f565b6112e6565b61039161053f366004614ed8565b609a6020525f90815260409020546001600160a01b031681565b61056c610567366004614ed8565b611491565b6040516102e69291906152de565b6103fd610588366004614ed8565b611791565b6102dc61059b366004614ef3565b6117c9565b6102dc6105ae366004614ef3565b609860209081525f928352604080842090915290825290205481565b6103356105d83660046152f0565b611873565b6103917f000000000000000000000000000000000000000000000000000000000000000081565b61034a610612366004615340565b6118ec565b61039173beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac081565b61033561064036600461538c565b6119c2565b610658610653366004614b92565b611a7d565b6040516102e69190615428565b6102dc610673366004614ed8565b609f6020525f908152604090205481565b61031561069236600461543a565b611b99565b6103fd6106a5366004614b92565b609e6020525f908152604090205460ff1681565b6103fd6106c7366004615521565b609c60209081525f928352604080842090915290825290205460ff1681565b6102dc6106f4366004614ef3565b611bb1565b60405163ffffffff7f00000000000000000000000000000000000000000000000000000000000000001681526020016102e6565b61074061073b366004615340565b611bed565b6040516102e692919061554b565b6103917f000000000000000000000000000000000000000000000000000000000000000081565b610315610783366004614ed8565b611e7a565b61033561079636600461556a565b611fa3565b6103356107a936600461543a565b611fdb565b6107c16107bc3660046155e8565b612046565b6040516102e69190615695565b6102dc6120eb565b6103356107e4366004614b92565b6121a4565b6103156107f7366004614ed8565b612212565b61033561080a366004614b92565b612235565b604080517f14bde674c9f64b2ad00eaaee4a8bed1fabef35c7507e3c5b9cfc9436909a2dad60208201526001600160a01b03808616928201929092528187166060820152908516608082015260a0810183905260c081018290525f9061088d9060e00160405160208183030381529060405280519060200120612346565b9695505050505050565b606060016108a481612374565b6108ac6123a2565b5f836001600160401b038111156108c5576108c5614ba9565b6040519080825280602002602001820160405280156108ee578160200160208202803683370190505b50335f908152609a60205260408120549192506001600160a01b03909116905b85811015610afa57868682818110610928576109286156a7565b905060200281019061093a91906156bb565b6109489060208101906156d9565b905087878381811061095c5761095c6156a7565b905060200281019061096e91906156bb565b61097890806156d9565b905014610998576040516343714afd60e01b815260040160405180910390fd5b5f610a0233848a8a868181106109b0576109b06156a7565b90506020028101906109c291906156bb565b6109cc90806156d9565b808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152506123fb92505050565b9050610ad433848a8a86818110610a1b57610a1b6156a7565b9050602002810190610a2d91906156bb565b610a3790806156d9565b808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152508e92508d9150889050818110610a7c57610a7c6156a7565b9050602002810190610a8e91906156bb565b610a9c9060208101906156d9565b808060200260200160405190810160405280939291908181526020018383602002808284375f9201919091525088925061254d915050565b848381518110610ae657610ae66156a7565b60209081029190910101525060010161090e565b5050600160c955949350505050565b610b11612ae8565b6066548181168114610b365760405163c61dca5d60e01b815260040160405180910390fd5b610b3f82612b8b565b5050565b6001600160a01b038084165f908152609a60205260408120546060921690610b6c8683876123fb565b90505f85516001600160401b03811115610b8857610b88614ba9565b604051908082528060200260200182016040528015610bb1578160200160208202803683370190505b5090505f5b8651811015610c96576001600160a01b0388165f90815260a260205260408120885182908a9085908110610bec57610bec6156a7565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206040518060200160405290815f820154815250509050610c70878381518110610c3e57610c3e6156a7565b6020026020010151858481518110610c5857610c586156a7565b602002602001015183612bc89092919063ffffffff16565b838381518110610c8257610c826156a7565b602090810291909101015250600101610bb6565b50925050505b9392505050565b610cab6123a2565b610cb433610f4a565b15610cd257604051633bf2b50360e11b815260040160405180910390fd5b604051632b6241f360e11b815233600482015263ffffffff841660248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906356c483e6906044015f604051808303815f87803b158015610d3c575f5ffd5b505af1158015610d4e573d5f5f3e3d5ffd5b50505050610d5c3385612be6565b610d663333612c48565b6040516001600160a01b038516815233907fa453db612af59e5521d6ab9284dc3e2d06af286eb1b1b7b771fce4716c19f2c19060200160405180910390a2336001600160a01b03167f02a919ed0e2acad1dd90f17ef2fa4ae5462ee1339170034a8531cca4b67080908383604051610ddf92919061571e565b60405180910390a2610df1600160c955565b50505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480610e565750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b610e735760405163045206a560e21b815260040160405180910390fd5b610e7b6123a2565b6001600160a01b038481165f908152609a602052604080822054905163152667d960e31b8152908316600482018190528684166024830152927f0000000000000000000000000000000000000000000000000000000000000000169063a9333ec890604401602060405180830381865afa158015610efb573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f1f919061574c565b90505f610f2d878784612ed1565b9050610f3d838888888886612fb3565b505050610df1600160c955565b6001600160a01b039081165f908152609a602052604090205416151590565b81610f73816130f8565b610f7b6123a2565b610f8483611791565b610fa1576040516325ec6c1f60e01b815260040160405180910390fd5b610fab8383612be6565b610fb5600160c955565b505050565b6060610fe57f000000000000000000000000000000000000000000000000000000000000000061311e565b905090565b610ff2612ae8565b610ffc5f19612b8b565b565b5f816040516020016110109190615428565b604051602081830303815290604052805190602001209050919050565b5f336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611077576040516323d871a560e01b815260040160405180910390fd5b61107f6123a2565b6001600160a01b038088165f9081526098602090815260408083209388168352929052908120546110bd906001600160401b0380871690861661315b565b90505f6110cc89878787613173565b90506110d8818361577b565b92506110e6895f888561326a565b604080516001600160a01b038881168252602082018690528b16917fdd611f4ef63f4385f1756c86ce1f1f389a9013ba6fa07daba8528291bc2d3c30910160405180910390a2611135866132e4565b6001600160a01b0316633fb99ca5898989876040518563ffffffff1660e01b8152600401611166949392919061578e565b5f604051808303815f87803b15801561117d575f5ffd5b505af115801561118f573d5f5f3e3d5ffd5b50505050505061088d600160c955565b6111a7614947565b60606111b283613356565b9094909350915050565b6060805f6111c984612212565b8051909150806001600160401b038111156111e6576111e6614ba9565b60405190808252806020026020018201604052801561121f57816020015b61120c614947565b8152602001906001900390816112045790505b509350806001600160401b0381111561123a5761123a614ba9565b60405190808252806020026020018201604052801561126d57816020015b60608152602001906001900390816112585790505b5092505f5b818110156112de5761129c83828151811061128f5761128f6156a7565b6020026020010151613356565b8683815181106112ae576112ae6156a7565b602002602001018684815181106112c7576112c76156a7565b602090810291909101019190915252600101611272565b505050915091565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461132f57604051633213a66160e21b815260040160405180910390fd5b6113376123a2565b61134083610f4a565b15610fab576001600160a01b038381165f908152609a602052604080822054905163152667d960e31b81529083166004820181905273beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac06024830152927f0000000000000000000000000000000000000000000000000000000000000000169063a9333ec890604401602060405180830381865afa1580156113d7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113fb919061574c565b6001600160a01b0386165f90815260a26020908152604080832073beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac0845282528083208151928301909152548152919250611461866114596001600160401b038087169089166135a9565b8491906135bd565b9050611483848873beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac08461326a565b50505050610fb5600160c955565b6040516394f649dd60e01b81526001600160a01b03828116600483015260609182915f9182917f000000000000000000000000000000000000000000000000000000000000000016906394f649dd906024015f60405180830381865afa1580156114fd573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611524919081019061583e565b60405163fe243a1760e01b81526001600160a01b03888116600483015273beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac060248301529294509092505f917f0000000000000000000000000000000000000000000000000000000000000000169063fe243a1790604401602060405180830381865afa1580156115aa573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115ce91906158f9565b9050805f036115e257509094909350915050565b5f835160016115f1919061577b565b6001600160401b0381111561160857611608614ba9565b604051908082528060200260200182016040528015611631578160200160208202803683370190505b5090505f84516001611643919061577b565b6001600160401b0381111561165a5761165a614ba9565b604051908082528060200260200182016040528015611683578160200160208202803683370190505b50905073beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac0828651815181106116ae576116ae6156a7565b60200260200101906001600160a01b031690816001600160a01b03168152505082818651815181106116e2576116e26156a7565b60209081029190910101525f5b85518110156117835785818151811061170a5761170a6156a7565b6020026020010151838281518110611724576117246156a7565b60200260200101906001600160a01b031690816001600160a01b031681525050848181518110611756576117566156a7565b6020026020010151828281518110611770576117706156a7565b60209081029190910101526001016116ef565b509097909650945050505050565b5f6001600160a01b038216158015906117c357506001600160a01b038083165f818152609a6020526040902054909116145b92915050565b60405163152667d960e31b81526001600160a01b03838116600483015282811660248301525f9182917f0000000000000000000000000000000000000000000000000000000000000000169063a9333ec890604401602060405180830381865afa158015611839573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061185d919061574c565b905061186b8484835f613173565b949350505050565b8261187d816130f8565b61188684611791565b6118a3576040516325ec6c1f60e01b815260040160405180910390fd5b836001600160a01b03167f02a919ed0e2acad1dd90f17ef2fa4ae5462ee1339170034a8531cca4b670809084846040516118de92919061571e565b60405180910390a250505050565b60605f82516001600160401b0381111561190857611908614ba9565b604051908082528060200260200182016040528015611931578160200160208202803683370190505b5090505f5b83518110156119ba576001600160a01b0385165f908152609860205260408120855190919086908490811061196d5761196d6156a7565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f20548282815181106119a7576119a76156a7565b6020908102919091010152600101611936565b509392505050565b60026119cd81612374565b6119d56123a2565b855f5b81811015611a6857611a608989838181106119f5576119f56156a7565b9050602002810190611a079190615910565b611a1090615924565b888884818110611a2257611a226156a7565b9050602002810190611a3491906156d9565b888886818110611a4657611a466156a7565b9050602002016020810190611a5b919061592f565b6135db565b6001016119d8565b5050611a74600160c955565b50505050505050565b611a85614947565b5f82815260a46020908152604091829020825160e08101845281546001600160a01b03908116825260018301548116828501526002830154168185015260038201546060820152600482015463ffffffff1660808201526005820180548551818602810186019096528086529194929360a08601939290830182828015611b3357602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611b15575b5050505050815260200160068201805480602002602001604051908101604052809291908181526020018280548015611b8957602002820191905f5260205f20905b815481526020019060010190808311611b75575b5050505050815250509050919050565b6060611ba433611e7a565b9050610c9c848484611fdb565b6001600160a01b038083165f90815260a260209081526040808320938516835292815282822083519182019093529154825290610c9c90613a1d565b60608082516001600160401b03811115611c0957611c09614ba9565b604051908082528060200260200182016040528015611c32578160200160208202803683370190505b50915082516001600160401b03811115611c4e57611c4e614ba9565b604051908082528060200260200182016040528015611c77578160200160208202803683370190505b506001600160a01b038086165f908152609a6020526040812054929350911690611ca28683876123fb565b90505f5b8551811015611e6f575f611cd2878381518110611cc557611cc56156a7565b60200260200101516132e4565b9050806001600160a01b031663fe243a1789898581518110611cf657611cf66156a7565b60200260200101516040518363ffffffff1660e01b8152600401611d309291906001600160a01b0392831681529116602082015260400190565b602060405180830381865afa158015611d4b573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d6f91906158f9565b858381518110611d8157611d816156a7565b6020026020010181815250505f60a25f8a6001600160a01b03166001600160a01b031681526020019081526020015f205f898581518110611dc457611dc46156a7565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206040518060200160405290815f820154815250509050611e48868481518110611e1657611e166156a7565b6020026020010151858581518110611e3057611e306156a7565b6020026020010151836135bd9092919063ffffffff16565b878481518110611e5a57611e5a6156a7565b60209081029190910101525050600101611ca6565b5050505b9250929050565b6060611e846123a2565b611e8d82610f4a565b611eaa5760405163a5c7c44560e01b815260040160405180910390fd5b611eb382611791565b15611ed1576040516311ca333560e31b815260040160405180910390fd5b336001600160a01b03831614611f89576001600160a01b038083165f908152609a602052604090205416611f0481613a3c565b80611f2a57506001600160a01b038181165f908152609960205260409020600101541633145b611f4757604051631e499a2360e11b815260040160405180910390fd5b806001600160a01b0316836001600160a01b03167ff0eddf07e6ea14f388b47e1e94a0f464ecbd9eed4171130e0fc0e99fb4030a8a60405160405180910390a3505b611f9282613ae5565b9050611f9e600160c955565b919050565b6002611fae81612374565b611fb66123a2565b611fca611fc286615924565b8585856135db565b611fd4600160c955565b5050505050565b611fe36123a2565b611fec33610f4a565b1561200a57604051633bf2b50360e11b815260040160405180910390fd5b61201383611791565b612030576040516325ec6c1f60e01b815260040160405180910390fd5b61203c33848484613d25565b610fab3384612c48565b60605f83516001600160401b0381111561206257612062614ba9565b60405190808252806020026020018201604052801561209557816020015b60608152602001906001900390816120805790505b5090505f5b84518110156119ba576120c68582815181106120b8576120b86156a7565b6020026020010151856118ec565b8282815181106120d8576120d86156a7565b602090810291909101015260010161209a565b60408051808201909152600a81526922b4b3b2b72630bcb2b960b11b6020909101525f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea612158613de4565b805160209182012060408051928301949094529281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6121ac613e59565b606654801982198116146121d35760405163c61dca5d60e01b815260040160405180910390fd5b606682905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c906020015b60405180910390a25050565b6001600160a01b0381165f90815260a3602052604090206060906117c390613f0a565b5f54610100900460ff161580801561225357505f54600160ff909116105b8061226c5750303b15801561226c57505f5460ff166001145b6122d45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff1916600117905580156122f5575f805461ff0019166101001790555b6122fe82612b8b565b8015610b3f575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b5f61234f6120eb565b60405161190160f01b6020820152602281019190915260428101839052606201611010565b606654600160ff83161b9081160361239f5760405163840a48d560e01b815260040160405180910390fd5b50565b600260c954036123f45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016122cb565b600260c955565b60605f82516001600160401b0381111561241757612417614ba9565b604051908082528060200260200182016040528015612440578160200160208202803683370190505b5090505f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663547afb8786866040518363ffffffff1660e01b815260040161249292919061594a565b5f60405180830381865afa1580156124ac573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526124d3919081019061596d565b90505f5b84518110156125425761251d878683815181106124f6576124f66156a7565b6020026020010151848481518110612510576125106156a7565b6020026020010151612ed1565b83828151811061252f5761252f6156a7565b60209081029190910101526001016124d7565b509095945050505050565b5f6001600160a01b038616612575576040516339b190bb60e11b815260040160405180910390fd5b83515f036125965760405163796cc52560e01b815260040160405180910390fd5b5f84516001600160401b038111156125b0576125b0614ba9565b6040519080825280602002602001820160405280156125d9578160200160208202803683370190505b5090505f85516001600160401b038111156125f6576125f6614ba9565b60405190808252806020026020018201604052801561261f578160200160208202803683370190505b5090505f5b865181101561291b575f612643888381518110611cc557611cc56156a7565b90505f60a25f8c6001600160a01b03166001600160a01b031681526020019081526020015f205f8a858151811061267c5761267c6156a7565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f2090506126f58884815181106126ba576126ba6156a7565b60200260200101518885815181106126d4576126d46156a7565b602090810291909101810151604080519283019052845482529091906135bd565b848481518110612707576127076156a7565b602002602001018181525050612746888481518110612728576127286156a7565b60209081029190910181015160408051928301905283548252613f16565b858481518110612758576127586156a7565b60209081029190910101526001600160a01b038a16156127ed576127af8a8a8581518110612788576127886156a7565b60200260200101518786815181106127a2576127a26156a7565b6020026020010151613f2a565b6127ed8a8c8b86815181106127c6576127c66156a7565b60200260200101518787815181106127e0576127e06156a7565b602002602001015161326a565b5f826001600160a01b031663724af4238d8c8781518110612810576128106156a7565b60200260200101518c888151811061282a5761282a6156a7565b60200260200101516040518463ffffffff1660e01b8152600401612850939291906159fc565b6020604051808303815f875af115801561286c573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061289091906158f9565b9050805f0361290d575f82557f8be932bac54561f27260f95463d9b8ab37e06b2842e5ee2404157cc13df6eb8f8c8b86815181106128d0576128d06156a7565b60200260200101516128f5856040518060200160405290815f82015481525050613a1d565b604051612904939291906159fc565b60405180910390a15b505050806001019050612624565b506001600160a01b0388165f908152609f6020526040812080549182919061294283615a20565b91905055505f6040518060e001604052808b6001600160a01b031681526020018a6001600160a01b031681526020018b6001600160a01b031681526020018381526020014363ffffffff1681526020018981526020018581525090505f6129a882610ffe565b5f818152609e602090815260408083208054600160ff19909116811790915560a4835292819020865181546001600160a01b03199081166001600160a01b039283161783558885015195830180548216968316969096179095559187015160028201805490951692169190911790925560608501516003830155608085015160048301805463ffffffff191663ffffffff90921691909117905560a085015180519394508593612a5e92600585019201906149a0565b5060c08201518051612a7a916006840191602090910190614a03565b5050506001600160a01b038b165f90815260a360205260409020612a9e9082613f94565b507f26b2aae26516e8719ef50ea2f6831a2efbd4e37dccdf0f6936b27bc08e793e30818386604051612ad293929190615a38565b60405180910390a19a9950505050505050505050565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa158015612b4a573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b6e9190615a62565b610ffc57604051631d77d47760e21b815260040160405180910390fd5b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b5f61186b82612be0612bd987613a1d565b8690613f9f565b90613f9f565b6001600160a01b038281165f8181526099602090815260409182902060010180546001600160a01b0319169486169485179055905192835290917f773b54c04d756fcc5e678111f7d730de3be98192000799eee3d63716055a87c69101612206565b5f612c5281612374565b5f5f612c5d85611491565b915091505f612c6d5f86856123fb565b6001600160a01b038781165f818152609a602052604080822080546001600160a01b031916948b16948517905551939450919290917fc3ee9f2e5fda98e8066a1f745b2df9285f416fe98cf2559cd21484b3d874330491a35f5b8351811015611a745773beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac06001600160a01b0316848281518110612d0057612d006156a7565b60200260200101516001600160a01b031603612e705760405163a3d75e0960e01b81526001600160a01b0388811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063a3d75e0990602401602060405180830381865afa158015612d7e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612da2919061574c565b90505f60a25f8a6001600160a01b03166001600160a01b031681526020019081526020015f205f878581518110612ddb57612ddb6156a7565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206040518060200160405290815f820154815250509050612e4f858481518110612e2d57612e2d6156a7565b6020026020010151836001600160401b0316836135bd9092919063ffffffff16565b858481518110612e6157612e616156a7565b60200260200101818152505050505b612ec98688868481518110612e8757612e876156a7565b60200260200101515f878681518110612ea257612ea26156a7565b6020026020010151878781518110612ebc57612ebc6156a7565b6020026020010151612fb3565b600101612cc7565b5f73beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeabf196001600160a01b03841601612fa35760405163a3d75e0960e01b81526001600160a01b0385811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063a3d75e0990602401602060405180830381865afa158015612f5f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612f83919061574c565b9050612f9b6001600160401b038481169083166135a9565b915050610c9c565b506001600160401b031692915050565b805f03612fd357604051630a33bc6960e21b815260040160405180910390fd5b81156130f0576001600160a01b038086165f90815260a26020908152604080832093881683529290522061300981858585613fb3565b6040805160208101909152815481527f8be932bac54561f27260f95463d9b8ab37e06b2842e5ee2404157cc13df6eb8f908790879061304790613a1d565b604051613056939291906159fc565b60405180910390a161306786610f4a565b15611a74576001600160a01b038088165f908152609860209081526040808320938916835292905290812080548592906130a290849061577b565b92505081905550866001600160a01b03167f1ec042c965e2edd7107b51188ee0f383e22e76179041ab3a9d18ff151405166c8787866040516130e6939291906159fc565b60405180910390a2505b505050505050565b61310181613a3c565b61239f5760405163932d94f760e01b815260040160405180910390fd5b60605f61312a83614049565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f6131698483856001614070565b61186b9085615a7d565b5f826001600160401b03165f0361318b57505f61186b565b6001600160a01b038086165f90815260a56020908152604080832093881683529290529081206131ba906140cb565b90505f61322060016131ec7f000000000000000000000000000000000000000000000000000000000000000043615a90565b6131f69190615a90565b6001600160a01b03808a165f90815260a560209081526040808320938c16835292905220906140e5565b90505f61322d8284615a7d565b905061325e613245826001600160401b0389166135a9565b876001600160401b0316876001600160401b031661315b565b98975050505050505050565b6001600160a01b038085165f908152609860209081526040808320938616835292905290812080548392906132a0908490615a7d565b92505081905550836001600160a01b03167f6909600037b75d7b4733aedd815442b5ec018a827751c832aaff64eba5d6d2dd8484846040516118de939291906159fc565b5f6001600160a01b03821673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac01461332f577f00000000000000000000000000000000000000000000000000000000000000006117c3565b7f000000000000000000000000000000000000000000000000000000000000000092915050565b61335e614947565b5f82815260a46020908152604091829020825160e08101845281546001600160a01b0390811682526001830154811682850152600283015416818501526003820154606082810191909152600483015463ffffffff1660808301526005830180548651818702810187019097528087529195929460a0860193929083018282801561341057602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116133f2575b505050505081526020016006820180548060200260200160405190810160405280929190818152602001828054801561346657602002820191905f5260205f20905b815481526020019060010190808311613452575b50505050508152505091508160a00151516001600160401b0381111561348e5761348e614ba9565b6040519080825280602002602001820160405280156134b7578160200160208202803683370190505b5090505f7f000000000000000000000000000000000000000000000000000000000000000083608001516134eb9190615aac565b90505f4363ffffffff168263ffffffff161061351c57613517845f015185602001518660a001516123fb565b613533565b613533845f015185602001518660a0015185614101565b90505f5b8460a00151518110156112de576135848560c00151828151811061355d5761355d6156a7565b6020026020010151838381518110613577576135776156a7565b602002602001015161422f565b848281518110613596576135966156a7565b6020908102919091010152600101613537565b5f610c9c8383670de0b6b3a764000061423a565b5f61186b826135d56135ce87613a1d565b86906135a9565b906135a9565b60a0840151518214613600576040516343714afd60e01b815260040160405180910390fd5b83604001516001600160a01b0316336001600160a01b031614613636576040516316110d3560e21b815260040160405180910390fd5b5f61364085610ffe565b5f818152609e602052604090205490915060ff16613671576040516387c9d21960e01b815260040160405180910390fd5b60605f7f000000000000000000000000000000000000000000000000000000000000000087608001516136a49190615aac565b90508063ffffffff164363ffffffff16116136d2576040516378f67ae160e11b815260040160405180910390fd5b6136e9875f015188602001518960a0015184614101565b87516001600160a01b03165f90815260a36020526040902090925061370f91508361431f565b505f82815260a46020526040812080546001600160a01b031990811682556001820180548216905560028201805490911690556003810182905560048101805463ffffffff19169055906137666005830182614a3c565b613773600683015f614a3c565b50505f828152609e602052604090819020805460ff19169055517f1f40400889274ed07b24845e5054a87a0cab969eb1277aafe61ae352e7c32a00906137bc9084815260200190565b60405180910390a185516001600160a01b039081165f908152609a6020526040812054885160a08a015191909316926137f69184906123fb565b90505f5b8860a0015151811015613a12575f6138218a60a001518381518110611cc557611cc56156a7565b90505f6138578b60c00151848151811061383d5761383d6156a7565b6020026020010151878581518110613577576135776156a7565b9050805f03613867575050613a0a565b871561393557816001600160a01b0316632eae418c8c5f01518d60a001518681518110613896576138966156a7565b60200260200101518d8d888181106138b0576138b06156a7565b90506020020160208101906138c59190614ed8565b60405160e085901b6001600160e01b03191681526001600160a01b03938416600482015291831660248301529091166044820152606481018490526084015f604051808303815f87803b15801561391a575f5ffd5b505af115801561392c573d5f5f3e3d5ffd5b50505050613a07565b5f5f836001600160a01b03166350ff72258e5f01518f60a001518881518110613960576139606156a7565b6020026020010151866040518463ffffffff1660e01b8152600401613987939291906159fc565b60408051808303815f875af11580156139a2573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906139c69190615ac8565b91509150613a04878e5f01518f60a0015188815181106139e8576139e86156a7565b602002602001015185858b8b81518110612ebc57612ebc6156a7565b50505b50505b6001016137fa565b505050505050505050565b80515f9015613a2d5781516117c3565b670de0b6b3a764000092915050565b604051631beb2b9760e31b81526001600160a01b0382811660048301523360248301523060448301525f80356001600160e01b0319166064840152917f00000000000000000000000000000000000000000000000000000000000000009091169063df595cb890608401602060405180830381865afa158015613ac1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117c39190615a62565b60606001613af281612374565b6001600160a01b038084165f818152609a602052604080822080546001600160a01b0319811690915590519316928392917ffee30966a256b71e14bc0ebfc94315e28ef4a97a7131a9e2b7a310a73af4467691a35f5f613b5186611491565b9150915081515f03613b6557505050613d1f565b81516001600160401b03811115613b7e57613b7e614ba9565b604051908082528060200260200182016040528015613ba7578160200160208202803683370190505b5094505f613bb68785856123fb565b90505f5b8351811015613d19576040805160018082528183019092525f916020808301908036833750506040805160018082528183019092529293505f9291506020808301908036833750506040805160018082528183019092529293505f92915060208083019080368337019050509050868481518110613c3a57613c3a6156a7565b6020026020010151835f81518110613c5457613c546156a7565b60200260200101906001600160a01b031690816001600160a01b031681525050858481518110613c8657613c866156a7565b6020026020010151825f81518110613ca057613ca06156a7565b602002602001018181525050848481518110613cbe57613cbe6156a7565b6020026020010151815f81518110613cd857613cd86156a7565b602002602001018181525050613cf18b8985858561254d565b8a8581518110613d0357613d036156a7565b6020908102919091010152505050600101613bba565b50505050505b50919050565b6001600160a01b038084165f908152609960205260409020600101541680613d4d5750610df1565b6001600160a01b0381165f908152609c6020908152604080832085845290915290205460ff1615613d9157604051630d4c4c9160e21b815260040160405180910390fd5b6001600160a01b0381165f908152609c602090815260408083208584528252909120805460ff19166001179055830151611fd4908290613dd890889088908490889061080f565b8551602087015161432a565b60605f613e107f000000000000000000000000000000000000000000000000000000000000000061311e565b9050805f81518110613e2457613e246156a7565b016020908101516040516001600160f81b03199091169181019190915260210160405160208183030381529060405291505090565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613eb5573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613ed99190615aea565b6001600160a01b0316336001600160a01b031614610ffc5760405163794821ff60e01b815260040160405180910390fd5b60605f610c9c8361437c565b5f610c9c613f2384613a1d565b83906135a9565b6001600160a01b038084165f90815260a5602090815260408083209386168352929052908120613f59906140cb565b9050610df143613f69848461577b565b6001600160a01b038088165f90815260a560209081526040808320938a1683529290522091906143d5565b5f610c9c83836143e0565b5f610c9c83670de0b6b3a76400008461423a565b825f03613fdf57604080516020810190915284548152613fd8908290612be090613a1d565b8455610df1565b6040805160208101909152845481525f90613ffb9085846135bd565b90505f614008848361577b565b90505f61402384612be061401c888a61577b565b8590613f9f565b80885590505f819003611a745760405163172cec7360e31b815260040160405180910390fd5b5f60ff8216601f8111156117c357604051632cd44ac360e21b815260040160405180910390fd5b5f5f61407d86868661423a565b9050600183600281111561409357614093615b05565b1480156140af57505f84806140aa576140aa615b19565b868809115b156140c2576140bf60018261577b565b90505b95945050505050565b5f6140d6828261442c565b6001600160e01b031692915050565b5f6140f1838383614471565b6001600160e01b03169392505050565b60605f83516001600160401b0381111561411d5761411d614ba9565b604051908082528060200260200182016040528015614146578160200160208202803683370190505b5090505f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166394d7d00c8787876040518463ffffffff1660e01b815260040161419a93929190615b2d565b5f60405180830381865afa1580156141b4573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526141db919081019061596d565b90505f5b8551811015614223576141fe888783815181106124f6576124f66156a7565b838281518110614210576142106156a7565b60209081029190910101526001016141df565b50909695505050505050565b5f610c9c83836135a9565b5f80805f19858709858702925082811083820303915050805f036142715783828161426757614267615b19565b0492505050610c9c565b8084116142b85760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b60448201526064016122cb565b5f8486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091025f889003889004909101858311909403939093029303949094049190911702949350505050565b5f610c9c83836144ba565b4281101561434b57604051630819bdcd60e01b815260040160405180910390fd5b61435f6001600160a01b038516848461459d565b610df157604051638baa579f60e01b815260040160405180910390fd5b6060815f018054806020026020016040519081016040528092919081815260200182805480156143c957602002820191905f5260205f20905b8154815260200190600101908083116143b5575b50505050509050919050565b610fb58383836145f1565b5f81815260018301602052604081205461442557508154600181810184555f8481526020808220909301849055845484825282860190935260409020919091556117c3565b505f6117c3565b81545f9080156144695761445284614445600184615a7d565b5f91825260209091200190565b5464010000000090046001600160e01b031661186b565b509092915050565b82545f9081614482868683856146f7565b905080156144b05761449986614445600184615a7d565b5464010000000090046001600160e01b031661088d565b5091949350505050565b5f8181526001830160205260408120548015614594575f6144dc600183615a7d565b85549091505f906144ef90600190615a7d565b905081811461454e575f865f01828154811061450d5761450d6156a7565b905f5260205f200154905080875f01848154811061452d5761452d6156a7565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061455f5761455f615b66565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f9055600193505050506117c3565b5f9150506117c3565b5f5f5f6145aa858561474a565b90925090505f8160048111156145c2576145c2615b05565b1480156145e05750856001600160a01b0316826001600160a01b0316145b8061088d575061088d868686614789565b825480156146a9575f61460985614445600185615a7d565b60408051808201909152905463ffffffff8082168084526401000000009092046001600160e01b03166020840152919250908516101561465c5760405163151b8e3f60e11b815260040160405180910390fd5b805163ffffffff8086169116036146a7578261467d86614445600186615a7d565b80546001600160e01b03929092166401000000000263ffffffff9092169190911790555050505050565b505b506040805180820190915263ffffffff92831681526001600160e01b03918216602080830191825285546001810187555f968752952091519051909216640100000000029190921617910155565b5f5b818310156119ba575f61470c8484614870565b5f8781526020902090915063ffffffff86169082015463ffffffff16111561473657809250614744565b61474181600161577b565b93505b506146f9565b5f5f825160410361477e576020830151604084015160608501515f1a6147728782858561488a565b94509450505050611e73565b505f90506002611e73565b5f5f5f856001600160a01b0316631626ba7e60e01b86866040516024016147b1929190615b7a565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516147ef9190615b92565b5f60405180830381855afa9150503d805f8114614827576040519150601f19603f3d011682016040523d82523d5f602084013e61482c565b606091505b509150915081801561484057506020815110155b801561088d57508051630b135d3f60e11b9061486590830160209081019084016158f9565b149695505050505050565b5f61487e6002848418615ba8565b610c9c9084841661577b565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156148bf57505f9050600361493e565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614910573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116614938575f6001925092505061493e565b91505f90505b94509492505050565b6040518060e001604052805f6001600160a01b031681526020015f6001600160a01b031681526020015f6001600160a01b031681526020015f81526020015f63ffffffff16815260200160608152602001606081525090565b828054828255905f5260205f209081019282156149f3579160200282015b828111156149f357825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906149be565b506149ff929150614a53565b5090565b828054828255905f5260205f209081019282156149f3579160200282015b828111156149f3578251825591602001919060010190614a21565b5080545f8255905f5260205f209081019061239f91905b5b808211156149ff575f8155600101614a54565b6001600160a01b038116811461239f575f5ffd5b8035611f9e81614a67565b5f5f5f5f5f60a08688031215614a9a575f5ffd5b8535614aa581614a67565b94506020860135614ab581614a67565b93506040860135614ac581614a67565b94979396509394606081013594506080013592915050565b5f5f83601f840112614aed575f5ffd5b5081356001600160401b03811115614b03575f5ffd5b6020830191508360208260051b8501011115611e73575f5ffd5b5f5f60208385031215614b2e575f5ffd5b82356001600160401b03811115614b43575f5ffd5b614b4f85828601614add565b90969095509350505050565b602080825282518282018190525f918401906040840190835b81811015612542578351835260209384019390920191600101614b74565b5f60208284031215614ba2575f5ffd5b5035919050565b634e487b7160e01b5f52604160045260245ffd5b60405160e081016001600160401b0381118282101715614bdf57614bdf614ba9565b60405290565b604080519081016001600160401b0381118282101715614bdf57614bdf614ba9565b604051601f8201601f191681016001600160401b0381118282101715614c2f57614c2f614ba9565b604052919050565b5f6001600160401b03821115614c4f57614c4f614ba9565b5060051b60200190565b5f82601f830112614c68575f5ffd5b8135614c7b614c7682614c37565b614c07565b8082825260208201915060208360051b860101925085831115614c9c575f5ffd5b602085015b83811015614cc2578035614cb481614a67565b835260209283019201614ca1565b5095945050505050565b5f82601f830112614cdb575f5ffd5b8135614ce9614c7682614c37565b8082825260208201915060208360051b860101925085831115614d0a575f5ffd5b602085015b83811015614cc2578035835260209283019201614d0f565b5f5f5f60608486031215614d39575f5ffd5b8335614d4481614a67565b925060208401356001600160401b03811115614d5e575f5ffd5b614d6a86828701614c59565b92505060408401356001600160401b03811115614d85575f5ffd5b614d9186828701614ccc565b9150509250925092565b5f8151808452602084019350602083015f5b82811015614dcb578151865260209586019590910190600101614dad565b5093949350505050565b602081525f610c9c6020830184614d9b565b803563ffffffff81168114611f9e575f5ffd5b5f5f83601f840112614e0a575f5ffd5b5081356001600160401b03811115614e20575f5ffd5b602083019150836020828501011115611e73575f5ffd5b5f5f5f5f60608587031215614e4a575f5ffd5b8435614e5581614a67565b9350614e6360208601614de7565b925060408501356001600160401b03811115614e7d575f5ffd5b614e8987828801614dfa565b95989497509550505050565b5f5f5f5f60808587031215614ea8575f5ffd5b8435614eb381614a67565b93506020850135614ec381614a67565b93969395505050506040820135916060013590565b5f60208284031215614ee8575f5ffd5b8135610c9c81614a67565b5f5f60408385031215614f04575f5ffd5b8235614f0f81614a67565b91506020830135614f1f81614a67565b809150509250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f610c9c6020830184614f2a565b5f60e08284031215614f7a575f5ffd5b614f82614bbd565b9050614f8d82614a7b565b8152614f9b60208301614a7b565b6020820152614fac60408301614a7b565b604082015260608281013590820152614fc760808301614de7565b608082015260a08201356001600160401b03811115614fe4575f5ffd5b614ff084828501614c59565b60a08301525060c08201356001600160401b0381111561500e575f5ffd5b61501a84828501614ccc565b60c08301525092915050565b5f60208284031215615036575f5ffd5b81356001600160401b0381111561504b575f5ffd5b61186b84828501614f6a565b5f60208284031215615067575f5ffd5b813560ff81168114610c9c575f5ffd5b6001600160401b038116811461239f575f5ffd5b5f5f5f5f5f5f86880360e08112156150a1575f5ffd5b87356150ac81614a67565b96506040601f19820112156150bf575f5ffd5b506020870194506060870135935060808701356150db81614a67565b925060a08701356150eb81615077565b915060c08701356150fb81615077565b809150509295509295509295565b5f8151808452602084019350602083015f5b82811015614dcb5781516001600160a01b031686526020958601959091019060010161511b565b80516001600160a01b03908116835260208083015182169084015260408083015190911690830152606080820151908301526080808201515f9161518d9085018263ffffffff169052565b5060a082015160e060a08501526151a760e0850182615109565b905060c083015184820360c08601526140c28282614d9b565b604081525f6151d26040830185615142565b82810360208401526140c28185614d9b565b5f82825180855260208501945060208160051b830101602085015f5b8381101561422357601f1985840301885261521c838351614d9b565b6020988901989093509190910190600101615200565b5f604082016040835280855180835260608501915060608160051b8601019250602087015f5b8281101561528957605f19878603018452615274858351615142565b94506020938401939190910190600101615258565b5050505082810360208401526140c281856151e4565b5f5f5f606084860312156152b1575f5ffd5b83356152bc81614a67565b92506020840135915060408401356152d381615077565b809150509250925092565b604081525f6151d26040830185615109565b5f5f5f60408486031215615302575f5ffd5b833561530d81614a67565b925060208401356001600160401b03811115615327575f5ffd5b61533386828701614dfa565b9497909650939450505050565b5f5f60408385031215615351575f5ffd5b823561535c81614a67565b915060208301356001600160401b03811115615376575f5ffd5b61538285828601614c59565b9150509250929050565b5f5f5f5f5f5f606087890312156153a1575f5ffd5b86356001600160401b038111156153b6575f5ffd5b6153c289828a01614add565b90975095505060208701356001600160401b038111156153e0575f5ffd5b6153ec89828a01614add565b90955093505060408701356001600160401b0381111561540a575f5ffd5b61541689828a01614add565b979a9699509497509295939492505050565b602081525f610c9c6020830184615142565b5f5f5f6060848603121561544c575f5ffd5b833561545781614a67565b925060208401356001600160401b03811115615471575f5ffd5b840160408187031215615482575f5ffd5b61548a614be5565b81356001600160401b0381111561549f575f5ffd5b8201601f810188136154af575f5ffd5b80356001600160401b038111156154c8576154c8614ba9565b6154db601f8201601f1916602001614c07565b8181528960208385010111156154ef575f5ffd5b816020840160208301375f60209282018301528352928301359282019290925293969395505050506040919091013590565b5f5f60408385031215615532575f5ffd5b823561553d81614a67565b946020939093013593505050565b604081525f6151d26040830185614d9b565b801515811461239f575f5ffd5b5f5f5f5f6060858703121561557d575f5ffd5b84356001600160401b03811115615592575f5ffd5b850160e081880312156155a3575f5ffd5b935060208501356001600160401b038111156155bd575f5ffd5b6155c987828801614add565b90945092505060408501356155dd8161555d565b939692955090935050565b5f5f604083850312156155f9575f5ffd5b82356001600160401b0381111561560e575f5ffd5b8301601f8101851361561e575f5ffd5b803561562c614c7682614c37565b8082825260208201915060208360051b85010192508783111561564d575f5ffd5b6020840193505b8284101561567857833561566781614a67565b825260209384019390910190615654565b945050505060208301356001600160401b03811115615376575f5ffd5b602081525f610c9c60208301846151e4565b634e487b7160e01b5f52603260045260245ffd5b5f8235605e198336030181126156cf575f5ffd5b9190910192915050565b5f5f8335601e198436030181126156ee575f5ffd5b8301803591506001600160401b03821115615707575f5ffd5b6020019150600581901b3603821315611e73575f5ffd5b60208152816020820152818360408301375f818301604090810191909152601f909201601f19160101919050565b5f6020828403121561575c575f5ffd5b8151610c9c81615077565b634e487b7160e01b5f52601160045260245ffd5b808201808211156117c3576117c3615767565b60a08101853561579d81614a67565b6001600160a01b0316825263ffffffff6157b960208801614de7565b16602083015260408201949094526001600160a01b03929092166060830152608090910152919050565b5f82601f8301126157f2575f5ffd5b8151615800614c7682614c37565b8082825260208201915060208360051b860101925085831115615821575f5ffd5b602085015b83811015614cc2578051835260209283019201615826565b5f5f6040838503121561584f575f5ffd5b82516001600160401b03811115615864575f5ffd5b8301601f81018513615874575f5ffd5b8051615882614c7682614c37565b8082825260208201915060208360051b8501019250878311156158a3575f5ffd5b6020840193505b828410156158ce5783516158bd81614a67565b8252602093840193909101906158aa565b8095505050505060208301516001600160401b038111156158ed575f5ffd5b615382858286016157e3565b5f60208284031215615909575f5ffd5b5051919050565b5f823560de198336030181126156cf575f5ffd5b5f6117c33683614f6a565b5f6020828403121561593f575f5ffd5b8135610c9c8161555d565b6001600160a01b03831681526040602082018190525f9061186b90830184615109565b5f6020828403121561597d575f5ffd5b81516001600160401b03811115615992575f5ffd5b8201601f810184136159a2575f5ffd5b80516159b0614c7682614c37565b8082825260208201915060208360051b8501019250868311156159d1575f5ffd5b6020840193505b8284101561088d5783516159eb81615077565b8252602093840193909101906159d8565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f60018201615a3157615a31615767565b5060010190565b838152606060208201525f615a506060830185615142565b828103604084015261088d8185614d9b565b5f60208284031215615a72575f5ffd5b8151610c9c8161555d565b818103818111156117c3576117c3615767565b63ffffffff82811682821603908111156117c3576117c3615767565b63ffffffff81811683821601908111156117c3576117c3615767565b5f5f60408385031215615ad9575f5ffd5b505080516020909101519092909150565b5f60208284031215615afa575f5ffd5b8151610c9c81614a67565b634e487b7160e01b5f52602160045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b6001600160a01b03841681526060602082018190525f90615b5090830185615109565b905063ffffffff83166040830152949350505050565b634e487b7160e01b5f52603160045260245ffd5b828152604060208201525f61186b6040830184614f2a565b5f82518060208501845e5f920191825250919050565b5f82615bc257634e487b7160e01b5f52601260045260245ffd5b50049056fea2646970667358221220eb609cbbe717d35d459e2d155ddc463ef3365654ab74b2f281a4052efc62caaa64736f6c634300081e0033", + Bin: "0x610160604052348015610010575f5ffd5b5060405161605338038061605383398101604081905261002f916101d9565b808084898989878a6001600160a01b03811661005e576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b0390811660805293841660a05291831660c052821660e05263ffffffff16610100521661012052610095816100b0565b61014052506100a490506100f6565b50505050505050610364565b5f5f829050601f815111156100e3578260405163305a27a960e01b81526004016100da9190610309565b60405180910390fd5b80516100ee8261033e565b179392505050565b5f54610100900460ff161561015d5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b60648201526084016100da565b5f5460ff908116146101ac575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146101c2575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b5f5f5f5f5f5f5f60e0888a0312156101ef575f5ffd5b87516101fa816101ae565b602089015190975061020b816101ae565b604089015190965061021c816101ae565b606089015190955061022d816101ae565b608089015190945061023e816101ae565b60a089015190935063ffffffff81168114610257575f5ffd5b60c08901519092506001600160401b03811115610272575f5ffd5b88015f601f82018b13610283575f5ffd5b81516001600160401b0381111561029c5761029c6101c5565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102ca576102ca6101c5565b6040528181528382016020018d10156102e1575f5ffd5b8160208501602083015e5f602083830101528092508094505050505092959891949750929550565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b8051602080830151919081101561035e575f198160200360031b1b821691505b50919050565b60805160a05160c05160e051610100516101205161014051615bfd6104565f395f8181610fc10152613dec01525f81816104120152613a7a01525f8181610703015281816131c7015281816134bd015261367601525f818161075301528181610cf301528181610eb60152818161103901528181611392015281816117f401528181612446015261414c01525f818161043901528181610e34015281816112f10152818161156501528181612d3701528181612f18015261333101525f818161036f01528181610e02015281816114b9015261330b01525f81816105e201528181612afd0152613e5b0152615bfd5ff3fe608060405234801561000f575f5ffd5b50600436106102b1575f3560e01c80636d70f7ae1161017b578063bb45fef2116100e4578063e4cc3f901161009e578063f698da2511610079578063f698da25146107ce578063fabc1cbc146107d6578063fd8aa88d146107e9578063fe4b84df146107fc575f5ffd5b8063e4cc3f9014610788578063eea9064b1461079b578063f0e0e676146107ae575f5ffd5b8063bb45fef2146106b9578063bfae3fd2146106e6578063c448feb8146106f9578063c978f7ac1461072d578063ca8aa7c71461074e578063da8be86414610775575f5ffd5b80639104c319116101355780639104c319146106175780639435bb431461063257806399f5371b14610645578063a178848414610665578063a33a343314610684578063b7f06ebe14610697575f5ffd5b80636d70f7ae1461057a5780636e1744481461058d578063778e55f3146105a057806378296ec5146105ca578063886f1195146105dd5780639004134714610604575f5ffd5b806354b7c96c1161021d5780635c975abb116101d75780635c975abb146104d45780635d975e88146104dc5780635dd68579146104fd57806360a0d1ce1461051e57806365da12641461053157806366d5ba9314610559575f5ffd5b806354b7c96c1461045b57806354fd4d501461046e578063595c6a6714610483578063597b36da1461048b5780635ac86ab71461049e5780635ae679a7146104c1575f5ffd5b806339b70e381161026e57806339b70e381461036a5780633c651cf2146103a95780633cdeb5e0146103bc5780633e28391d146103ea5780634657e26a1461040d5780634665bcda14610434575f5ffd5b806304a4f979146102b55780630b9f487a146102ef5780630dd8dd0214610302578063136439dd1461032257806325df922e146103375780632aa6d88814610357575b5f5ffd5b6102dc7f14bde674c9f64b2ad00eaaee4a8bed1fabef35c7507e3c5b9cfc9436909a2dad81565b6040519081526020015b60405180910390f35b6102dc6102fd366004614a86565b61080f565b610315610310366004614b1d565b610897565b6040516102e69190614b5b565b610335610330366004614b92565b610b09565b005b61034a610345366004614d27565b610b43565b6040516102e69190614dd5565b610335610365366004614e37565b610ca3565b6103917f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102e6565b6103356103b7366004614e95565b610df7565b6103916103ca366004614ed8565b6001600160a01b039081165f908152609960205260409020600101541690565b6103fd6103f8366004614ed8565b610f4a565b60405190151581526020016102e6565b6103917f000000000000000000000000000000000000000000000000000000000000000081565b6103917f000000000000000000000000000000000000000000000000000000000000000081565b610335610469366004614ef3565b610f69565b610476610fba565b6040516102e69190614f58565b610335610fea565b6102dc610499366004615026565b610ffe565b6103fd6104ac366004615057565b606654600160ff9092169190911b9081161490565b6102dc6104cf36600461508b565b61102d565b6066546102dc565b6104ef6104ea366004614b92565b61119f565b6040516102e69291906151c0565b61051061050b366004614ed8565b6111bc565b6040516102e6929190615232565b61033561052c36600461529f565b6112e6565b61039161053f366004614ed8565b609a6020525f90815260409020546001600160a01b031681565b61056c610567366004614ed8565b611491565b6040516102e69291906152de565b6103fd610588366004614ed8565b611791565b6102dc61059b366004614ef3565b6117c9565b6102dc6105ae366004614ef3565b609860209081525f928352604080842090915290825290205481565b6103356105d83660046152f0565b611873565b6103917f000000000000000000000000000000000000000000000000000000000000000081565b61034a610612366004615340565b6118ec565b61039173beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac081565b61033561064036600461538c565b6119c2565b610658610653366004614b92565b611a7d565b6040516102e69190615428565b6102dc610673366004614ed8565b609f6020525f908152604090205481565b61031561069236600461543a565b611b99565b6103fd6106a5366004614b92565b609e6020525f908152604090205460ff1681565b6103fd6106c7366004615521565b609c60209081525f928352604080842090915290825290205460ff1681565b6102dc6106f4366004614ef3565b611bb1565b60405163ffffffff7f00000000000000000000000000000000000000000000000000000000000000001681526020016102e6565b61074061073b366004615340565b611bed565b6040516102e692919061554b565b6103917f000000000000000000000000000000000000000000000000000000000000000081565b610315610783366004614ed8565b611e7a565b61033561079636600461556a565b611fa3565b6103356107a936600461543a565b611fdb565b6107c16107bc3660046155e8565b612046565b6040516102e69190615695565b6102dc6120eb565b6103356107e4366004614b92565b6121a4565b6103156107f7366004614ed8565b612212565b61033561080a366004614b92565b612235565b604080517f14bde674c9f64b2ad00eaaee4a8bed1fabef35c7507e3c5b9cfc9436909a2dad60208201526001600160a01b03808616928201929092528187166060820152908516608082015260a0810183905260c081018290525f9061088d9060e00160405160208183030381529060405280519060200120612346565b9695505050505050565b606060016108a481612374565b6108ac6123a2565b5f836001600160401b038111156108c5576108c5614ba9565b6040519080825280602002602001820160405280156108ee578160200160208202803683370190505b50335f908152609a60205260408120549192506001600160a01b03909116905b85811015610afa57868682818110610928576109286156a7565b905060200281019061093a91906156bb565b6109489060208101906156d9565b905087878381811061095c5761095c6156a7565b905060200281019061096e91906156bb565b61097890806156d9565b905014610998576040516343714afd60e01b815260040160405180910390fd5b5f610a0233848a8a868181106109b0576109b06156a7565b90506020028101906109c291906156bb565b6109cc90806156d9565b808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152506123fb92505050565b9050610ad433848a8a86818110610a1b57610a1b6156a7565b9050602002810190610a2d91906156bb565b610a3790806156d9565b808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152508e92508d9150889050818110610a7c57610a7c6156a7565b9050602002810190610a8e91906156bb565b610a9c9060208101906156d9565b808060200260200160405190810160405280939291908181526020018383602002808284375f9201919091525088925061254d915050565b848381518110610ae657610ae66156a7565b60209081029190910101525060010161090e565b5050600160c955949350505050565b610b11612ae8565b6066548181168114610b365760405163c61dca5d60e01b815260040160405180910390fd5b610b3f82612b8b565b5050565b6001600160a01b038084165f908152609a60205260408120546060921690610b6c8683876123fb565b90505f85516001600160401b03811115610b8857610b88614ba9565b604051908082528060200260200182016040528015610bb1578160200160208202803683370190505b5090505f5b8651811015610c96576001600160a01b0388165f90815260a260205260408120885182908a9085908110610bec57610bec6156a7565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206040518060200160405290815f820154815250509050610c70878381518110610c3e57610c3e6156a7565b6020026020010151858481518110610c5857610c586156a7565b602002602001015183612bc89092919063ffffffff16565b838381518110610c8257610c826156a7565b602090810291909101015250600101610bb6565b50925050505b9392505050565b610cab6123a2565b610cb433610f4a565b15610cd257604051633bf2b50360e11b815260040160405180910390fd5b604051632b6241f360e11b815233600482015263ffffffff841660248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906356c483e6906044015f604051808303815f87803b158015610d3c575f5ffd5b505af1158015610d4e573d5f5f3e3d5ffd5b50505050610d5c3385612be6565b610d663333612c48565b6040516001600160a01b038516815233907fa453db612af59e5521d6ab9284dc3e2d06af286eb1b1b7b771fce4716c19f2c19060200160405180910390a2336001600160a01b03167f02a919ed0e2acad1dd90f17ef2fa4ae5462ee1339170034a8531cca4b67080908383604051610ddf92919061571e565b60405180910390a2610df1600160c955565b50505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480610e565750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b610e735760405163045206a560e21b815260040160405180910390fd5b610e7b6123a2565b6001600160a01b038481165f908152609a602052604080822054905163152667d960e31b8152908316600482018190528684166024830152927f0000000000000000000000000000000000000000000000000000000000000000169063a9333ec890604401602060405180830381865afa158015610efb573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f1f919061574c565b90505f610f2d878784612ed1565b9050610f3d838888888886612fb3565b505050610df1600160c955565b6001600160a01b039081165f908152609a602052604090205416151590565b81610f73816130f8565b610f7b6123a2565b610f8483611791565b610fa1576040516325ec6c1f60e01b815260040160405180910390fd5b610fab8383612be6565b610fb5600160c955565b505050565b6060610fe57f000000000000000000000000000000000000000000000000000000000000000061311e565b905090565b610ff2612ae8565b610ffc5f19612b8b565b565b5f816040516020016110109190615428565b604051602081830303815290604052805190602001209050919050565b5f336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611077576040516323d871a560e01b815260040160405180910390fd5b61107f6123a2565b6001600160a01b038088165f9081526098602090815260408083209388168352929052908120546110bd906001600160401b0380871690861661315b565b90505f6110cc89878787613173565b90506110d8818361577b565b92506110e6895f888561326a565b604080516001600160a01b038881168252602082018690528b16917fdd611f4ef63f4385f1756c86ce1f1f389a9013ba6fa07daba8528291bc2d3c30910160405180910390a2611135866132e4565b6001600160a01b0316633fb99ca5898989876040518563ffffffff1660e01b8152600401611166949392919061578e565b5f604051808303815f87803b15801561117d575f5ffd5b505af115801561118f573d5f5f3e3d5ffd5b50505050505061088d600160c955565b6111a7614947565b60606111b283613356565b9094909350915050565b6060805f6111c984612212565b8051909150806001600160401b038111156111e6576111e6614ba9565b60405190808252806020026020018201604052801561121f57816020015b61120c614947565b8152602001906001900390816112045790505b509350806001600160401b0381111561123a5761123a614ba9565b60405190808252806020026020018201604052801561126d57816020015b60608152602001906001900390816112585790505b5092505f5b818110156112de5761129c83828151811061128f5761128f6156a7565b6020026020010151613356565b8683815181106112ae576112ae6156a7565b602002602001018684815181106112c7576112c76156a7565b602090810291909101019190915252600101611272565b505050915091565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461132f57604051633213a66160e21b815260040160405180910390fd5b6113376123a2565b61134083610f4a565b15610fab576001600160a01b038381165f908152609a602052604080822054905163152667d960e31b81529083166004820181905273beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac06024830152927f0000000000000000000000000000000000000000000000000000000000000000169063a9333ec890604401602060405180830381865afa1580156113d7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113fb919061574c565b6001600160a01b0386165f90815260a26020908152604080832073beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac0845282528083208151928301909152548152919250611461866114596001600160401b038087169089166135a9565b8491906135bd565b9050611483848873beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac08461326a565b50505050610fb5600160c955565b6040516394f649dd60e01b81526001600160a01b03828116600483015260609182915f9182917f000000000000000000000000000000000000000000000000000000000000000016906394f649dd906024015f60405180830381865afa1580156114fd573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611524919081019061583e565b60405163fe243a1760e01b81526001600160a01b03888116600483015273beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac060248301529294509092505f917f0000000000000000000000000000000000000000000000000000000000000000169063fe243a1790604401602060405180830381865afa1580156115aa573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115ce91906158f9565b9050805f036115e257509094909350915050565b5f835160016115f1919061577b565b6001600160401b0381111561160857611608614ba9565b604051908082528060200260200182016040528015611631578160200160208202803683370190505b5090505f84516001611643919061577b565b6001600160401b0381111561165a5761165a614ba9565b604051908082528060200260200182016040528015611683578160200160208202803683370190505b50905073beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac0828651815181106116ae576116ae6156a7565b60200260200101906001600160a01b031690816001600160a01b03168152505082818651815181106116e2576116e26156a7565b60209081029190910101525f5b85518110156117835785818151811061170a5761170a6156a7565b6020026020010151838281518110611724576117246156a7565b60200260200101906001600160a01b031690816001600160a01b031681525050848181518110611756576117566156a7565b6020026020010151828281518110611770576117706156a7565b60209081029190910101526001016116ef565b509097909650945050505050565b5f6001600160a01b038216158015906117c357506001600160a01b038083165f818152609a6020526040902054909116145b92915050565b60405163152667d960e31b81526001600160a01b03838116600483015282811660248301525f9182917f0000000000000000000000000000000000000000000000000000000000000000169063a9333ec890604401602060405180830381865afa158015611839573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061185d919061574c565b905061186b8484835f613173565b949350505050565b8261187d816130f8565b61188684611791565b6118a3576040516325ec6c1f60e01b815260040160405180910390fd5b836001600160a01b03167f02a919ed0e2acad1dd90f17ef2fa4ae5462ee1339170034a8531cca4b670809084846040516118de92919061571e565b60405180910390a250505050565b60605f82516001600160401b0381111561190857611908614ba9565b604051908082528060200260200182016040528015611931578160200160208202803683370190505b5090505f5b83518110156119ba576001600160a01b0385165f908152609860205260408120855190919086908490811061196d5761196d6156a7565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f20548282815181106119a7576119a76156a7565b6020908102919091010152600101611936565b509392505050565b60026119cd81612374565b6119d56123a2565b855f5b81811015611a6857611a608989838181106119f5576119f56156a7565b9050602002810190611a079190615910565b611a1090615924565b888884818110611a2257611a226156a7565b9050602002810190611a3491906156d9565b888886818110611a4657611a466156a7565b9050602002016020810190611a5b919061592f565b6135db565b6001016119d8565b5050611a74600160c955565b50505050505050565b611a85614947565b5f82815260a46020908152604091829020825160e08101845281546001600160a01b03908116825260018301548116828501526002830154168185015260038201546060820152600482015463ffffffff1660808201526005820180548551818602810186019096528086529194929360a08601939290830182828015611b3357602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611b15575b5050505050815260200160068201805480602002602001604051908101604052809291908181526020018280548015611b8957602002820191905f5260205f20905b815481526020019060010190808311611b75575b5050505050815250509050919050565b6060611ba433611e7a565b9050610c9c848484611fdb565b6001600160a01b038083165f90815260a260209081526040808320938516835292815282822083519182019093529154825290610c9c90613a1d565b60608082516001600160401b03811115611c0957611c09614ba9565b604051908082528060200260200182016040528015611c32578160200160208202803683370190505b50915082516001600160401b03811115611c4e57611c4e614ba9565b604051908082528060200260200182016040528015611c77578160200160208202803683370190505b506001600160a01b038086165f908152609a6020526040812054929350911690611ca28683876123fb565b90505f5b8551811015611e6f575f611cd2878381518110611cc557611cc56156a7565b60200260200101516132e4565b9050806001600160a01b031663fe243a1789898581518110611cf657611cf66156a7565b60200260200101516040518363ffffffff1660e01b8152600401611d309291906001600160a01b0392831681529116602082015260400190565b602060405180830381865afa158015611d4b573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d6f91906158f9565b858381518110611d8157611d816156a7565b6020026020010181815250505f60a25f8a6001600160a01b03166001600160a01b031681526020019081526020015f205f898581518110611dc457611dc46156a7565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206040518060200160405290815f820154815250509050611e48868481518110611e1657611e166156a7565b6020026020010151858581518110611e3057611e306156a7565b6020026020010151836135bd9092919063ffffffff16565b878481518110611e5a57611e5a6156a7565b60209081029190910101525050600101611ca6565b5050505b9250929050565b6060611e846123a2565b611e8d82610f4a565b611eaa5760405163a5c7c44560e01b815260040160405180910390fd5b611eb382611791565b15611ed1576040516311ca333560e31b815260040160405180910390fd5b336001600160a01b03831614611f89576001600160a01b038083165f908152609a602052604090205416611f0481613a3c565b80611f2a57506001600160a01b038181165f908152609960205260409020600101541633145b611f4757604051631e499a2360e11b815260040160405180910390fd5b806001600160a01b0316836001600160a01b03167ff0eddf07e6ea14f388b47e1e94a0f464ecbd9eed4171130e0fc0e99fb4030a8a60405160405180910390a3505b611f9282613ae5565b9050611f9e600160c955565b919050565b6002611fae81612374565b611fb66123a2565b611fca611fc286615924565b8585856135db565b611fd4600160c955565b5050505050565b611fe36123a2565b611fec33610f4a565b1561200a57604051633bf2b50360e11b815260040160405180910390fd5b61201383611791565b612030576040516325ec6c1f60e01b815260040160405180910390fd5b61203c33848484613d25565b610fab3384612c48565b60605f83516001600160401b0381111561206257612062614ba9565b60405190808252806020026020018201604052801561209557816020015b60608152602001906001900390816120805790505b5090505f5b84518110156119ba576120c68582815181106120b8576120b86156a7565b6020026020010151856118ec565b8282815181106120d8576120d86156a7565b602090810291909101015260010161209a565b60408051808201909152600a81526922b4b3b2b72630bcb2b960b11b6020909101525f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea612158613de4565b805160209182012060408051928301949094529281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6121ac613e59565b606654801982198116146121d35760405163c61dca5d60e01b815260040160405180910390fd5b606682905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c906020015b60405180910390a25050565b6001600160a01b0381165f90815260a3602052604090206060906117c390613f0a565b5f54610100900460ff161580801561225357505f54600160ff909116105b8061226c5750303b15801561226c57505f5460ff166001145b6122d45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff1916600117905580156122f5575f805461ff0019166101001790555b6122fe82612b8b565b8015610b3f575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b5f61234f6120eb565b60405161190160f01b6020820152602281019190915260428101839052606201611010565b606654600160ff83161b9081160361239f5760405163840a48d560e01b815260040160405180910390fd5b50565b600260c954036123f45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016122cb565b600260c955565b60605f82516001600160401b0381111561241757612417614ba9565b604051908082528060200260200182016040528015612440578160200160208202803683370190505b5090505f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663547afb8786866040518363ffffffff1660e01b815260040161249292919061594a565b5f60405180830381865afa1580156124ac573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526124d3919081019061596d565b90505f5b84518110156125425761251d878683815181106124f6576124f66156a7565b6020026020010151848481518110612510576125106156a7565b6020026020010151612ed1565b83828151811061252f5761252f6156a7565b60209081029190910101526001016124d7565b509095945050505050565b5f6001600160a01b038616612575576040516339b190bb60e11b815260040160405180910390fd5b83515f036125965760405163796cc52560e01b815260040160405180910390fd5b5f84516001600160401b038111156125b0576125b0614ba9565b6040519080825280602002602001820160405280156125d9578160200160208202803683370190505b5090505f85516001600160401b038111156125f6576125f6614ba9565b60405190808252806020026020018201604052801561261f578160200160208202803683370190505b5090505f5b865181101561291b575f612643888381518110611cc557611cc56156a7565b90505f60a25f8c6001600160a01b03166001600160a01b031681526020019081526020015f205f8a858151811061267c5761267c6156a7565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f2090506126f58884815181106126ba576126ba6156a7565b60200260200101518885815181106126d4576126d46156a7565b602090810291909101810151604080519283019052845482529091906135bd565b848481518110612707576127076156a7565b602002602001018181525050612746888481518110612728576127286156a7565b60209081029190910181015160408051928301905283548252613f16565b858481518110612758576127586156a7565b60209081029190910101526001600160a01b038a16156127ed576127af8a8a8581518110612788576127886156a7565b60200260200101518786815181106127a2576127a26156a7565b6020026020010151613f2a565b6127ed8a8c8b86815181106127c6576127c66156a7565b60200260200101518787815181106127e0576127e06156a7565b602002602001015161326a565b5f826001600160a01b031663724af4238d8c8781518110612810576128106156a7565b60200260200101518c888151811061282a5761282a6156a7565b60200260200101516040518463ffffffff1660e01b8152600401612850939291906159fc565b6020604051808303815f875af115801561286c573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061289091906158f9565b9050805f0361290d575f82557f8be932bac54561f27260f95463d9b8ab37e06b2842e5ee2404157cc13df6eb8f8c8b86815181106128d0576128d06156a7565b60200260200101516128f5856040518060200160405290815f82015481525050613a1d565b604051612904939291906159fc565b60405180910390a15b505050806001019050612624565b506001600160a01b0388165f908152609f6020526040812080549182919061294283615a20565b91905055505f6040518060e001604052808b6001600160a01b031681526020018a6001600160a01b031681526020018b6001600160a01b031681526020018381526020014363ffffffff1681526020018981526020018581525090505f6129a882610ffe565b5f818152609e602090815260408083208054600160ff19909116811790915560a4835292819020865181546001600160a01b03199081166001600160a01b039283161783558885015195830180548216968316969096179095559187015160028201805490951692169190911790925560608501516003830155608085015160048301805463ffffffff191663ffffffff90921691909117905560a085015180519394508593612a5e92600585019201906149a0565b5060c08201518051612a7a916006840191602090910190614a03565b5050506001600160a01b038b165f90815260a360205260409020612a9e9082613f94565b507f26b2aae26516e8719ef50ea2f6831a2efbd4e37dccdf0f6936b27bc08e793e30818386604051612ad293929190615a38565b60405180910390a19a9950505050505050505050565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa158015612b4a573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b6e9190615a62565b610ffc57604051631d77d47760e21b815260040160405180910390fd5b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b5f61186b82612be0612bd987613a1d565b8690613f9f565b90613f9f565b6001600160a01b038281165f8181526099602090815260409182902060010180546001600160a01b0319169486169485179055905192835290917f773b54c04d756fcc5e678111f7d730de3be98192000799eee3d63716055a87c69101612206565b5f612c5281612374565b5f5f612c5d85611491565b915091505f612c6d5f86856123fb565b6001600160a01b038781165f818152609a602052604080822080546001600160a01b031916948b16948517905551939450919290917fc3ee9f2e5fda98e8066a1f745b2df9285f416fe98cf2559cd21484b3d874330491a35f5b8351811015611a745773beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac06001600160a01b0316848281518110612d0057612d006156a7565b60200260200101516001600160a01b031603612e705760405163a3d75e0960e01b81526001600160a01b0388811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063a3d75e0990602401602060405180830381865afa158015612d7e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612da2919061574c565b90505f60a25f8a6001600160a01b03166001600160a01b031681526020019081526020015f205f878581518110612ddb57612ddb6156a7565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206040518060200160405290815f820154815250509050612e4f858481518110612e2d57612e2d6156a7565b6020026020010151836001600160401b0316836135bd9092919063ffffffff16565b858481518110612e6157612e616156a7565b60200260200101818152505050505b612ec98688868481518110612e8757612e876156a7565b60200260200101515f878681518110612ea257612ea26156a7565b6020026020010151878781518110612ebc57612ebc6156a7565b6020026020010151612fb3565b600101612cc7565b5f73beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeabf196001600160a01b03841601612fa35760405163a3d75e0960e01b81526001600160a01b0385811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063a3d75e0990602401602060405180830381865afa158015612f5f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612f83919061574c565b9050612f9b6001600160401b038481169083166135a9565b915050610c9c565b506001600160401b031692915050565b805f03612fd357604051630a33bc6960e21b815260040160405180910390fd5b81156130f0576001600160a01b038086165f90815260a26020908152604080832093881683529290522061300981858585613fb3565b6040805160208101909152815481527f8be932bac54561f27260f95463d9b8ab37e06b2842e5ee2404157cc13df6eb8f908790879061304790613a1d565b604051613056939291906159fc565b60405180910390a161306786610f4a565b15611a74576001600160a01b038088165f908152609860209081526040808320938916835292905290812080548592906130a290849061577b565b92505081905550866001600160a01b03167f1ec042c965e2edd7107b51188ee0f383e22e76179041ab3a9d18ff151405166c8787866040516130e6939291906159fc565b60405180910390a2505b505050505050565b61310181613a3c565b61239f5760405163932d94f760e01b815260040160405180910390fd5b60605f61312a83614049565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f6131698483856001614070565b61186b9085615a7d565b5f826001600160401b03165f0361318b57505f61186b565b6001600160a01b038086165f90815260a56020908152604080832093881683529290529081206131ba906140cb565b90505f61322060016131ec7f000000000000000000000000000000000000000000000000000000000000000043615a90565b6131f69190615a90565b6001600160a01b03808a165f90815260a560209081526040808320938c16835292905220906140e5565b90505f61322d8284615a7d565b905061325e613245826001600160401b0389166135a9565b876001600160401b0316876001600160401b031661315b565b98975050505050505050565b6001600160a01b038085165f908152609860209081526040808320938616835292905290812080548392906132a0908490615a7d565b92505081905550836001600160a01b03167f6909600037b75d7b4733aedd815442b5ec018a827751c832aaff64eba5d6d2dd8484846040516118de939291906159fc565b5f6001600160a01b03821673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac01461332f577f00000000000000000000000000000000000000000000000000000000000000006117c3565b7f000000000000000000000000000000000000000000000000000000000000000092915050565b61335e614947565b5f82815260a46020908152604091829020825160e08101845281546001600160a01b0390811682526001830154811682850152600283015416818501526003820154606082810191909152600483015463ffffffff1660808301526005830180548651818702810187019097528087529195929460a0860193929083018282801561341057602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116133f2575b505050505081526020016006820180548060200260200160405190810160405280929190818152602001828054801561346657602002820191905f5260205f20905b815481526020019060010190808311613452575b50505050508152505091508160a00151516001600160401b0381111561348e5761348e614ba9565b6040519080825280602002602001820160405280156134b7578160200160208202803683370190505b5090505f7f000000000000000000000000000000000000000000000000000000000000000083608001516134eb9190615aac565b90505f4363ffffffff168263ffffffff161061351c57613517845f015185602001518660a001516123fb565b613533565b613533845f015185602001518660a0015185614101565b90505f5b8460a00151518110156112de576135848560c00151828151811061355d5761355d6156a7565b6020026020010151838381518110613577576135776156a7565b602002602001015161422f565b848281518110613596576135966156a7565b6020908102919091010152600101613537565b5f610c9c8383670de0b6b3a764000061423a565b5f61186b826135d56135ce87613a1d565b86906135a9565b906135a9565b60a0840151518214613600576040516343714afd60e01b815260040160405180910390fd5b83604001516001600160a01b0316336001600160a01b031614613636576040516316110d3560e21b815260040160405180910390fd5b5f61364085610ffe565b5f818152609e602052604090205490915060ff16613671576040516387c9d21960e01b815260040160405180910390fd5b60605f7f000000000000000000000000000000000000000000000000000000000000000087608001516136a49190615aac565b90508063ffffffff164363ffffffff16116136d2576040516378f67ae160e11b815260040160405180910390fd5b6136e9875f015188602001518960a0015184614101565b87516001600160a01b03165f90815260a36020526040902090925061370f91508361431f565b505f82815260a46020526040812080546001600160a01b031990811682556001820180548216905560028201805490911690556003810182905560048101805463ffffffff19169055906137666005830182614a3c565b613773600683015f614a3c565b50505f828152609e602052604090819020805460ff19169055517f1f40400889274ed07b24845e5054a87a0cab969eb1277aafe61ae352e7c32a00906137bc9084815260200190565b60405180910390a185516001600160a01b039081165f908152609a6020526040812054885160a08a015191909316926137f69184906123fb565b90505f5b8860a0015151811015613a12575f6138218a60a001518381518110611cc557611cc56156a7565b90505f6138578b60c00151848151811061383d5761383d6156a7565b6020026020010151878581518110613577576135776156a7565b9050805f03613867575050613a0a565b871561393557816001600160a01b0316632eae418c8c5f01518d60a001518681518110613896576138966156a7565b60200260200101518d8d888181106138b0576138b06156a7565b90506020020160208101906138c59190614ed8565b60405160e085901b6001600160e01b03191681526001600160a01b03938416600482015291831660248301529091166044820152606481018490526084015f604051808303815f87803b15801561391a575f5ffd5b505af115801561392c573d5f5f3e3d5ffd5b50505050613a07565b5f5f836001600160a01b03166350ff72258e5f01518f60a001518881518110613960576139606156a7565b6020026020010151866040518463ffffffff1660e01b8152600401613987939291906159fc565b60408051808303815f875af11580156139a2573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906139c69190615ac8565b91509150613a04878e5f01518f60a0015188815181106139e8576139e86156a7565b602002602001015185858b8b81518110612ebc57612ebc6156a7565b50505b50505b6001016137fa565b505050505050505050565b80515f9015613a2d5781516117c3565b670de0b6b3a764000092915050565b604051631beb2b9760e31b81526001600160a01b0382811660048301523360248301523060448301525f80356001600160e01b0319166064840152917f00000000000000000000000000000000000000000000000000000000000000009091169063df595cb890608401602060405180830381865afa158015613ac1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117c39190615a62565b60606001613af281612374565b6001600160a01b038084165f818152609a602052604080822080546001600160a01b0319811690915590519316928392917ffee30966a256b71e14bc0ebfc94315e28ef4a97a7131a9e2b7a310a73af4467691a35f5f613b5186611491565b9150915081515f03613b6557505050613d1f565b81516001600160401b03811115613b7e57613b7e614ba9565b604051908082528060200260200182016040528015613ba7578160200160208202803683370190505b5094505f613bb68785856123fb565b90505f5b8351811015613d19576040805160018082528183019092525f916020808301908036833750506040805160018082528183019092529293505f9291506020808301908036833750506040805160018082528183019092529293505f92915060208083019080368337019050509050868481518110613c3a57613c3a6156a7565b6020026020010151835f81518110613c5457613c546156a7565b60200260200101906001600160a01b031690816001600160a01b031681525050858481518110613c8657613c866156a7565b6020026020010151825f81518110613ca057613ca06156a7565b602002602001018181525050848481518110613cbe57613cbe6156a7565b6020026020010151815f81518110613cd857613cd86156a7565b602002602001018181525050613cf18b8985858561254d565b8a8581518110613d0357613d036156a7565b6020908102919091010152505050600101613bba565b50505050505b50919050565b6001600160a01b038084165f908152609960205260409020600101541680613d4d5750610df1565b6001600160a01b0381165f908152609c6020908152604080832085845290915290205460ff1615613d9157604051630d4c4c9160e21b815260040160405180910390fd5b6001600160a01b0381165f908152609c602090815260408083208584528252909120805460ff19166001179055830151611fd4908290613dd890889088908490889061080f565b8551602087015161432a565b60605f613e107f000000000000000000000000000000000000000000000000000000000000000061311e565b9050805f81518110613e2457613e246156a7565b016020908101516040516001600160f81b03199091169181019190915260210160405160208183030381529060405291505090565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613eb5573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613ed99190615aea565b6001600160a01b0316336001600160a01b031614610ffc5760405163794821ff60e01b815260040160405180910390fd5b60605f610c9c8361437c565b5f610c9c613f2384613a1d565b83906135a9565b6001600160a01b038084165f90815260a5602090815260408083209386168352929052908120613f59906140cb565b9050610df143613f69848461577b565b6001600160a01b038088165f90815260a560209081526040808320938a1683529290522091906143d5565b5f610c9c83836143e0565b5f610c9c83670de0b6b3a76400008461423a565b825f03613fdf57604080516020810190915284548152613fd8908290612be090613a1d565b8455610df1565b6040805160208101909152845481525f90613ffb9085846135bd565b90505f614008848361577b565b90505f61402384612be061401c888a61577b565b8590613f9f565b80885590505f819003611a745760405163172cec7360e31b815260040160405180910390fd5b5f60ff8216601f8111156117c357604051632cd44ac360e21b815260040160405180910390fd5b5f5f61407d86868661423a565b9050600183600281111561409357614093615b05565b1480156140af57505f84806140aa576140aa615b19565b868809115b156140c2576140bf60018261577b565b90505b95945050505050565b5f6140d6828261442c565b6001600160e01b031692915050565b5f6140f1838383614471565b6001600160e01b03169392505050565b60605f83516001600160401b0381111561411d5761411d614ba9565b604051908082528060200260200182016040528015614146578160200160208202803683370190505b5090505f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166394d7d00c8787876040518463ffffffff1660e01b815260040161419a93929190615b2d565b5f60405180830381865afa1580156141b4573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526141db919081019061596d565b90505f5b8551811015614223576141fe888783815181106124f6576124f66156a7565b838281518110614210576142106156a7565b60209081029190910101526001016141df565b50909695505050505050565b5f610c9c83836135a9565b5f80805f19858709858702925082811083820303915050805f036142715783828161426757614267615b19565b0492505050610c9c565b8084116142b85760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b60448201526064016122cb565b5f8486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091025f889003889004909101858311909403939093029303949094049190911702949350505050565b5f610c9c83836144ba565b4281101561434b57604051630819bdcd60e01b815260040160405180910390fd5b61435f6001600160a01b038516848461459d565b610df157604051638baa579f60e01b815260040160405180910390fd5b6060815f018054806020026020016040519081016040528092919081815260200182805480156143c957602002820191905f5260205f20905b8154815260200190600101908083116143b5575b50505050509050919050565b610fb58383836145f1565b5f81815260018301602052604081205461442557508154600181810184555f8481526020808220909301849055845484825282860190935260409020919091556117c3565b505f6117c3565b81545f9080156144695761445284614445600184615a7d565b5f91825260209091200190565b5464010000000090046001600160e01b031661186b565b509092915050565b82545f9081614482868683856146f7565b905080156144b05761449986614445600184615a7d565b5464010000000090046001600160e01b031661088d565b5091949350505050565b5f8181526001830160205260408120548015614594575f6144dc600183615a7d565b85549091505f906144ef90600190615a7d565b905081811461454e575f865f01828154811061450d5761450d6156a7565b905f5260205f200154905080875f01848154811061452d5761452d6156a7565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061455f5761455f615b66565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f9055600193505050506117c3565b5f9150506117c3565b5f5f5f6145aa858561474a565b90925090505f8160048111156145c2576145c2615b05565b1480156145e05750856001600160a01b0316826001600160a01b0316145b8061088d575061088d868686614789565b825480156146a9575f61460985614445600185615a7d565b60408051808201909152905463ffffffff8082168084526401000000009092046001600160e01b03166020840152919250908516101561465c5760405163151b8e3f60e11b815260040160405180910390fd5b805163ffffffff8086169116036146a7578261467d86614445600186615a7d565b80546001600160e01b03929092166401000000000263ffffffff9092169190911790555050505050565b505b506040805180820190915263ffffffff92831681526001600160e01b03918216602080830191825285546001810187555f968752952091519051909216640100000000029190921617910155565b5f5b818310156119ba575f61470c8484614870565b5f8781526020902090915063ffffffff86169082015463ffffffff16111561473657809250614744565b61474181600161577b565b93505b506146f9565b5f5f825160410361477e576020830151604084015160608501515f1a6147728782858561488a565b94509450505050611e73565b505f90506002611e73565b5f5f5f856001600160a01b0316631626ba7e60e01b86866040516024016147b1929190615b7a565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516147ef9190615b92565b5f60405180830381855afa9150503d805f8114614827576040519150601f19603f3d011682016040523d82523d5f602084013e61482c565b606091505b509150915081801561484057506020815110155b801561088d57508051630b135d3f60e11b9061486590830160209081019084016158f9565b149695505050505050565b5f61487e6002848418615ba8565b610c9c9084841661577b565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156148bf57505f9050600361493e565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614910573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116614938575f6001925092505061493e565b91505f90505b94509492505050565b6040518060e001604052805f6001600160a01b031681526020015f6001600160a01b031681526020015f6001600160a01b031681526020015f81526020015f63ffffffff16815260200160608152602001606081525090565b828054828255905f5260205f209081019282156149f3579160200282015b828111156149f357825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906149be565b506149ff929150614a53565b5090565b828054828255905f5260205f209081019282156149f3579160200282015b828111156149f3578251825591602001919060010190614a21565b5080545f8255905f5260205f209081019061239f91905b5b808211156149ff575f8155600101614a54565b6001600160a01b038116811461239f575f5ffd5b8035611f9e81614a67565b5f5f5f5f5f60a08688031215614a9a575f5ffd5b8535614aa581614a67565b94506020860135614ab581614a67565b93506040860135614ac581614a67565b94979396509394606081013594506080013592915050565b5f5f83601f840112614aed575f5ffd5b5081356001600160401b03811115614b03575f5ffd5b6020830191508360208260051b8501011115611e73575f5ffd5b5f5f60208385031215614b2e575f5ffd5b82356001600160401b03811115614b43575f5ffd5b614b4f85828601614add565b90969095509350505050565b602080825282518282018190525f918401906040840190835b81811015612542578351835260209384019390920191600101614b74565b5f60208284031215614ba2575f5ffd5b5035919050565b634e487b7160e01b5f52604160045260245ffd5b60405160e081016001600160401b0381118282101715614bdf57614bdf614ba9565b60405290565b604080519081016001600160401b0381118282101715614bdf57614bdf614ba9565b604051601f8201601f191681016001600160401b0381118282101715614c2f57614c2f614ba9565b604052919050565b5f6001600160401b03821115614c4f57614c4f614ba9565b5060051b60200190565b5f82601f830112614c68575f5ffd5b8135614c7b614c7682614c37565b614c07565b8082825260208201915060208360051b860101925085831115614c9c575f5ffd5b602085015b83811015614cc2578035614cb481614a67565b835260209283019201614ca1565b5095945050505050565b5f82601f830112614cdb575f5ffd5b8135614ce9614c7682614c37565b8082825260208201915060208360051b860101925085831115614d0a575f5ffd5b602085015b83811015614cc2578035835260209283019201614d0f565b5f5f5f60608486031215614d39575f5ffd5b8335614d4481614a67565b925060208401356001600160401b03811115614d5e575f5ffd5b614d6a86828701614c59565b92505060408401356001600160401b03811115614d85575f5ffd5b614d9186828701614ccc565b9150509250925092565b5f8151808452602084019350602083015f5b82811015614dcb578151865260209586019590910190600101614dad565b5093949350505050565b602081525f610c9c6020830184614d9b565b803563ffffffff81168114611f9e575f5ffd5b5f5f83601f840112614e0a575f5ffd5b5081356001600160401b03811115614e20575f5ffd5b602083019150836020828501011115611e73575f5ffd5b5f5f5f5f60608587031215614e4a575f5ffd5b8435614e5581614a67565b9350614e6360208601614de7565b925060408501356001600160401b03811115614e7d575f5ffd5b614e8987828801614dfa565b95989497509550505050565b5f5f5f5f60808587031215614ea8575f5ffd5b8435614eb381614a67565b93506020850135614ec381614a67565b93969395505050506040820135916060013590565b5f60208284031215614ee8575f5ffd5b8135610c9c81614a67565b5f5f60408385031215614f04575f5ffd5b8235614f0f81614a67565b91506020830135614f1f81614a67565b809150509250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f610c9c6020830184614f2a565b5f60e08284031215614f7a575f5ffd5b614f82614bbd565b9050614f8d82614a7b565b8152614f9b60208301614a7b565b6020820152614fac60408301614a7b565b604082015260608281013590820152614fc760808301614de7565b608082015260a08201356001600160401b03811115614fe4575f5ffd5b614ff084828501614c59565b60a08301525060c08201356001600160401b0381111561500e575f5ffd5b61501a84828501614ccc565b60c08301525092915050565b5f60208284031215615036575f5ffd5b81356001600160401b0381111561504b575f5ffd5b61186b84828501614f6a565b5f60208284031215615067575f5ffd5b813560ff81168114610c9c575f5ffd5b6001600160401b038116811461239f575f5ffd5b5f5f5f5f5f5f86880360e08112156150a1575f5ffd5b87356150ac81614a67565b96506040601f19820112156150bf575f5ffd5b506020870194506060870135935060808701356150db81614a67565b925060a08701356150eb81615077565b915060c08701356150fb81615077565b809150509295509295509295565b5f8151808452602084019350602083015f5b82811015614dcb5781516001600160a01b031686526020958601959091019060010161511b565b80516001600160a01b03908116835260208083015182169084015260408083015190911690830152606080820151908301526080808201515f9161518d9085018263ffffffff169052565b5060a082015160e060a08501526151a760e0850182615109565b905060c083015184820360c08601526140c28282614d9b565b604081525f6151d26040830185615142565b82810360208401526140c28185614d9b565b5f82825180855260208501945060208160051b830101602085015f5b8381101561422357601f1985840301885261521c838351614d9b565b6020988901989093509190910190600101615200565b5f604082016040835280855180835260608501915060608160051b8601019250602087015f5b8281101561528957605f19878603018452615274858351615142565b94506020938401939190910190600101615258565b5050505082810360208401526140c281856151e4565b5f5f5f606084860312156152b1575f5ffd5b83356152bc81614a67565b92506020840135915060408401356152d381615077565b809150509250925092565b604081525f6151d26040830185615109565b5f5f5f60408486031215615302575f5ffd5b833561530d81614a67565b925060208401356001600160401b03811115615327575f5ffd5b61533386828701614dfa565b9497909650939450505050565b5f5f60408385031215615351575f5ffd5b823561535c81614a67565b915060208301356001600160401b03811115615376575f5ffd5b61538285828601614c59565b9150509250929050565b5f5f5f5f5f5f606087890312156153a1575f5ffd5b86356001600160401b038111156153b6575f5ffd5b6153c289828a01614add565b90975095505060208701356001600160401b038111156153e0575f5ffd5b6153ec89828a01614add565b90955093505060408701356001600160401b0381111561540a575f5ffd5b61541689828a01614add565b979a9699509497509295939492505050565b602081525f610c9c6020830184615142565b5f5f5f6060848603121561544c575f5ffd5b833561545781614a67565b925060208401356001600160401b03811115615471575f5ffd5b840160408187031215615482575f5ffd5b61548a614be5565b81356001600160401b0381111561549f575f5ffd5b8201601f810188136154af575f5ffd5b80356001600160401b038111156154c8576154c8614ba9565b6154db601f8201601f1916602001614c07565b8181528960208385010111156154ef575f5ffd5b816020840160208301375f60209282018301528352928301359282019290925293969395505050506040919091013590565b5f5f60408385031215615532575f5ffd5b823561553d81614a67565b946020939093013593505050565b604081525f6151d26040830185614d9b565b801515811461239f575f5ffd5b5f5f5f5f6060858703121561557d575f5ffd5b84356001600160401b03811115615592575f5ffd5b850160e081880312156155a3575f5ffd5b935060208501356001600160401b038111156155bd575f5ffd5b6155c987828801614add565b90945092505060408501356155dd8161555d565b939692955090935050565b5f5f604083850312156155f9575f5ffd5b82356001600160401b0381111561560e575f5ffd5b8301601f8101851361561e575f5ffd5b803561562c614c7682614c37565b8082825260208201915060208360051b85010192508783111561564d575f5ffd5b6020840193505b8284101561567857833561566781614a67565b825260209384019390910190615654565b945050505060208301356001600160401b03811115615376575f5ffd5b602081525f610c9c60208301846151e4565b634e487b7160e01b5f52603260045260245ffd5b5f8235605e198336030181126156cf575f5ffd5b9190910192915050565b5f5f8335601e198436030181126156ee575f5ffd5b8301803591506001600160401b03821115615707575f5ffd5b6020019150600581901b3603821315611e73575f5ffd5b60208152816020820152818360408301375f818301604090810191909152601f909201601f19160101919050565b5f6020828403121561575c575f5ffd5b8151610c9c81615077565b634e487b7160e01b5f52601160045260245ffd5b808201808211156117c3576117c3615767565b60a08101853561579d81614a67565b6001600160a01b0316825263ffffffff6157b960208801614de7565b16602083015260408201949094526001600160a01b03929092166060830152608090910152919050565b5f82601f8301126157f2575f5ffd5b8151615800614c7682614c37565b8082825260208201915060208360051b860101925085831115615821575f5ffd5b602085015b83811015614cc2578051835260209283019201615826565b5f5f6040838503121561584f575f5ffd5b82516001600160401b03811115615864575f5ffd5b8301601f81018513615874575f5ffd5b8051615882614c7682614c37565b8082825260208201915060208360051b8501019250878311156158a3575f5ffd5b6020840193505b828410156158ce5783516158bd81614a67565b8252602093840193909101906158aa565b8095505050505060208301516001600160401b038111156158ed575f5ffd5b615382858286016157e3565b5f60208284031215615909575f5ffd5b5051919050565b5f823560de198336030181126156cf575f5ffd5b5f6117c33683614f6a565b5f6020828403121561593f575f5ffd5b8135610c9c8161555d565b6001600160a01b03831681526040602082018190525f9061186b90830184615109565b5f6020828403121561597d575f5ffd5b81516001600160401b03811115615992575f5ffd5b8201601f810184136159a2575f5ffd5b80516159b0614c7682614c37565b8082825260208201915060208360051b8501019250868311156159d1575f5ffd5b6020840193505b8284101561088d5783516159eb81615077565b8252602093840193909101906159d8565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f60018201615a3157615a31615767565b5060010190565b838152606060208201525f615a506060830185615142565b828103604084015261088d8185614d9b565b5f60208284031215615a72575f5ffd5b8151610c9c8161555d565b818103818111156117c3576117c3615767565b63ffffffff82811682821603908111156117c3576117c3615767565b63ffffffff81811683821601908111156117c3576117c3615767565b5f5f60408385031215615ad9575f5ffd5b505080516020909101519092909150565b5f60208284031215615afa575f5ffd5b8151610c9c81614a67565b634e487b7160e01b5f52602160045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b6001600160a01b03841681526060602082018190525f90615b5090830185615109565b905063ffffffff83166040830152949350505050565b634e487b7160e01b5f52603160045260245ffd5b828152604060208201525f61186b6040830184614f2a565b5f82518060208501845e5f920191825250919050565b5f82615bc257634e487b7160e01b5f52601260045260245ffd5b50049056fea26469706673582212201c984b352f51fb96e67a34dabbd1a86357a598d83dff30829ef20a8c63590d5664736f6c634300081e0033", } // DelegationManagerABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/EigenPod/binding.go b/pkg/bindings/EigenPod/binding.go index e24b5a6142..3a57b12a6c 100644 --- a/pkg/bindings/EigenPod/binding.go +++ b/pkg/bindings/EigenPod/binding.go @@ -86,7 +86,7 @@ type IEigenPodTypesWithdrawalRequest struct { // EigenPodMetaData contains all meta data concerning the EigenPod contract. var EigenPodMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_ethPOS\",\"type\":\"address\",\"internalType\":\"contractIETHPOSDeposit\"},{\"name\":\"_eigenPodManager\",\"type\":\"address\",\"internalType\":\"contractIEigenPodManager\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"activeValidatorCount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"checkpointBalanceExitedGwei\",\"inputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"currentCheckpoint\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIEigenPodTypes.Checkpoint\",\"components\":[{\"name\":\"beaconBlockRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"proofsRemaining\",\"type\":\"uint24\",\"internalType\":\"uint24\"},{\"name\":\"podBalanceGwei\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"balanceDeltasGwei\",\"type\":\"int64\",\"internalType\":\"int64\"},{\"name\":\"prevBeaconBalanceGwei\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"currentCheckpointTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"eigenPodManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenPodManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ethPOS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIETHPOSDeposit\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getConsolidationRequestFee\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getParentBlockRoot\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getWithdrawalRequestFee\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_podOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"lastCheckpointTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"podOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proofSubmitter\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"recoverTokens\",\"inputs\":[{\"name\":\"tokenList\",\"type\":\"address[]\",\"internalType\":\"contractIERC20[]\"},{\"name\":\"amountsToWithdraw\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"requestConsolidation\",\"inputs\":[{\"name\":\"requests\",\"type\":\"tuple[]\",\"internalType\":\"structIEigenPodTypes.ConsolidationRequest[]\",\"components\":[{\"name\":\"srcPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"targetPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"requestWithdrawal\",\"inputs\":[{\"name\":\"requests\",\"type\":\"tuple[]\",\"internalType\":\"structIEigenPodTypes.WithdrawalRequest[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"amountGwei\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"setProofSubmitter\",\"inputs\":[{\"name\":\"newProofSubmitter\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"stake\",\"inputs\":[{\"name\":\"pubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"depositDataRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"startCheckpoint\",\"inputs\":[{\"name\":\"revertIfNoBalance\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"validatorPubkeyHashToInfo\",\"inputs\":[{\"name\":\"validatorPubkeyHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIEigenPodTypes.ValidatorInfo\",\"components\":[{\"name\":\"validatorIndex\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"restakedBalanceGwei\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"lastCheckpointedAt\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enumIEigenPodTypes.VALIDATOR_STATUS\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"validatorPubkeyToInfo\",\"inputs\":[{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIEigenPodTypes.ValidatorInfo\",\"components\":[{\"name\":\"validatorIndex\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"restakedBalanceGwei\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"lastCheckpointedAt\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enumIEigenPodTypes.VALIDATOR_STATUS\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"validatorStatus\",\"inputs\":[{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumIEigenPodTypes.VALIDATOR_STATUS\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"validatorStatus\",\"inputs\":[{\"name\":\"pubkeyHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumIEigenPodTypes.VALIDATOR_STATUS\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyCheckpointProofs\",\"inputs\":[{\"name\":\"balanceContainerProof\",\"type\":\"tuple\",\"internalType\":\"structBeaconChainProofs.BalanceContainerProof\",\"components\":[{\"name\":\"balanceContainerRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"proofs\",\"type\":\"tuple[]\",\"internalType\":\"structBeaconChainProofs.BalanceProof[]\",\"components\":[{\"name\":\"pubkeyHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"balanceRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyStaleBalance\",\"inputs\":[{\"name\":\"beaconTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"stateRootProof\",\"type\":\"tuple\",\"internalType\":\"structBeaconChainProofs.StateRootProof\",\"components\":[{\"name\":\"beaconStateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"proof\",\"type\":\"tuple\",\"internalType\":\"structBeaconChainProofs.ValidatorProof\",\"components\":[{\"name\":\"validatorFields\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyWithdrawalCredentials\",\"inputs\":[{\"name\":\"beaconTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"stateRootProof\",\"type\":\"tuple\",\"internalType\":\"structBeaconChainProofs.StateRootProof\",\"components\":[{\"name\":\"beaconStateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"validatorIndices\",\"type\":\"uint40[]\",\"internalType\":\"uint40[]\"},{\"name\":\"validatorFieldsProofs\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"validatorFields\",\"type\":\"bytes32[][]\",\"internalType\":\"bytes32[][]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawRestakedBeaconChainETH\",\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amountWei\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawableRestakedExecutionLayerGwei\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"CheckpointCreated\",\"inputs\":[{\"name\":\"checkpointTimestamp\",\"type\":\"uint64\",\"indexed\":true,\"internalType\":\"uint64\"},{\"name\":\"beaconBlockRoot\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"validatorCount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CheckpointFinalized\",\"inputs\":[{\"name\":\"checkpointTimestamp\",\"type\":\"uint64\",\"indexed\":true,\"internalType\":\"uint64\"},{\"name\":\"totalShareDeltaWei\",\"type\":\"int256\",\"indexed\":false,\"internalType\":\"int256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ConsolidationRequested\",\"inputs\":[{\"name\":\"sourcePubkeyHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"targetPubkeyHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EigenPodStaked\",\"inputs\":[{\"name\":\"pubkeyHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ExitRequested\",\"inputs\":[{\"name\":\"validatorPubkeyHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"NonBeaconChainETHReceived\",\"inputs\":[{\"name\":\"amountReceived\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProofSubmitterUpdated\",\"inputs\":[{\"name\":\"prevProofSubmitter\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newProofSubmitter\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RestakedBeaconChainETHWithdrawn\",\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SwitchToCompoundingRequested\",\"inputs\":[{\"name\":\"validatorPubkeyHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ValidatorBalanceUpdated\",\"inputs\":[{\"name\":\"pubkeyHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"balanceTimestamp\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"newValidatorBalanceGwei\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ValidatorCheckpointed\",\"inputs\":[{\"name\":\"checkpointTimestamp\",\"type\":\"uint64\",\"indexed\":true,\"internalType\":\"uint64\"},{\"name\":\"pubkeyHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ValidatorRestaked\",\"inputs\":[{\"name\":\"pubkeyHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ValidatorWithdrawn\",\"inputs\":[{\"name\":\"checkpointTimestamp\",\"type\":\"uint64\",\"indexed\":true,\"internalType\":\"uint64\"},{\"name\":\"pubkeyHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalRequested\",\"inputs\":[{\"name\":\"validatorPubkeyHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"withdrawalAmountGwei\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"BeaconTimestampBeforeLatestCheckpoint\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"BeaconTimestampTooFarInPast\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CannotCheckpointTwiceInSingleBlock\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CheckpointAlreadyActive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CredentialsAlreadyVerified\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CurrentlyPaused\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EmptyRoot\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FeeQueryFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ForkTimestampZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InsufficientFunds\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InsufficientWithdrawableBalance\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidEIP4788Response\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidIndex\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProof\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProofLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProofLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidPubKeyLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidValidatorFieldsLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"LeavesNotPowerOfTwo\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"MsgValueNot32ETH\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoActiveCheckpoint\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoBalanceToCheckpoint\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotEnoughLeaves\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyEigenPodManager\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyEigenPodOwner\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyEigenPodOwnerOrProofSubmitter\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"PredeployFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TimestampOutOfRange\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ValidatorInactiveOnBeaconChain\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ValidatorIsExitingBeaconChain\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ValidatorNotActiveInPod\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ValidatorNotSlashedOnBeaconChain\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawalCredentialsNotForEigenPod\",\"inputs\":[]}]", - Bin: "0x60c060405234801561000f575f5ffd5b5060405161473838038061473883398101604081905261002e91610123565b6001600160a01b03808316608052811660a052610049610050565b505061015b565b5f54610100900460ff16156100bb5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff9081161461010a575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610120575f5ffd5b50565b5f5f60408385031215610134575f5ffd5b825161013f8161010c565b60208401519092506101508161010c565b809150509250929050565b60805160a05161455a6101de5f395f818161031e015281816106a801528181610750015281816109fe01528181610dbf01528181610fb9015281816110990152818161159a01528181611641015281816118ca01528181611c1801528181611d4c0152818161222201526130ef01525f818161054e01526116aa015261455a5ff3fe6080604052600436106101b2575f3560e01c80636c0d2d5a116100e7578063c44e30dc11610087578063d06d558711610062578063d06d558714610613578063dda3346c14610632578063ee94d67c14610651578063f074ba6214610670575f5ffd5b8063c44e30dc146105c1578063c4907442146105d5578063c4d66de8146105f4575f5ffd5b806374cdd798116100c257806374cdd7981461053d57806388676cad146105705780639b4e46341461058f578063b522538a146105a2575f5ffd5b80636c0d2d5a146104bd5780636fcd0e53146104dc5780637439841f14610508575f5ffd5b806342ecff2a1161015257806352396a591161012d57806352396a591461042b578063587533571461045f57806358eaee791461047e5780636691954e146104aa575f5ffd5b806342ecff2a146102e75780634665bcda1461030d57806347d2837214610340575f5ffd5b80632340e8d31161018d5780632340e8d31461026f5780633474aa16146102845780633f5fa57a146102b55780633f65cf19146102c8575f5ffd5b8063039157d2146101f05780630b18ff66146102115780631e5155331461024d575f5ffd5b366101ec576040513481527f6fdd3dbdb173299608c0aa9f368735857c8842b581f8389238bf05bd04b3bf499060200160405180910390a1005b5f5ffd5b3480156101fb575f5ffd5b5061020f61020a366004613a01565b61068f565b005b34801561021c575f5ffd5b50603354610230906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610258575f5ffd5b506102616109c4565b604051908152602001610244565b34801561027a575f5ffd5b5061026160395481565b34801561028f575f5ffd5b506034546001600160401b03165b6040516001600160401b039091168152602001610244565b61020f6102c3366004613abc565b6109e5565b3480156102d3575f5ffd5b5061020f6102e2366004613afa565b610d66565b3480156102f2575f5ffd5b50603a5461029d90600160401b90046001600160401b031681565b348015610318575f5ffd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b34801561034b575f5ffd5b506103d06040805160a0810182525f80825260208201819052918101829052606081018290526080810191909152506040805160a081018252603c548152603d5462ffffff811660208301526001600160401b0363010000008204811693830193909352600160581b810460070b6060830152600160981b9004909116608082015290565b60405161024491905f60a0820190508251825262ffffff60208401511660208301526001600160401b036040840151166040830152606083015160070b60608301526001600160401b03608084015116608083015292915050565b348015610436575f5ffd5b5061029d610445366004613bd1565b603b6020525f90815260409020546001600160401b031681565b34801561046a575f5ffd5b50603e54610230906001600160a01b031681565b348015610489575f5ffd5b5061049d610498366004613c29565b61101e565b6040516102449190613c8f565b61020f6104b8366004613abc565b611080565b3480156104c8575f5ffd5b506102616104d7366004613bd1565b611388565b3480156104e7575f5ffd5b506104fb6104f6366004613c9d565b611496565b6040516102449190613cb4565b348015610513575f5ffd5b5061049d610522366004613c9d565b5f90815260366020526040902054600160c01b900460ff1690565b348015610548575f5ffd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b34801561057b575f5ffd5b5061020f61058a366004613d14565b611541565b61020f61059d366004613d2f565b611636565b3480156105ad575f5ffd5b506104fb6105bc366004613c29565b6117b4565b3480156105cc575f5ffd5b506102616118a3565b3480156105e0575f5ffd5b5061020f6105ef366004613dc4565b6118bf565b3480156105ff575f5ffd5b5061020f61060e366004613dee565b6119f6565b34801561061e575f5ffd5b5061020f61062d366004613dee565b611b40565b34801561063d575f5ffd5b5061020f61064c366004613ed9565b611bd4565b34801561065c575f5ffd5b50603a5461029d906001600160401b031681565b34801561067b575f5ffd5b5061020f61068a366004613fab565b611d33565b604051635ac86ab760e01b8152600660048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa1580156106f5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107199190614012565b156107375760405163840a48d560e01b815260040160405180910390fd5b604051635ac86ab760e01b8152600860048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa15801561079d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107c19190614012565b156107df5760405163840a48d560e01b815260040160405180910390fd5b5f6108236107ed858061402d565b808060200260200160405190810160405280939291908181526020018383602002808284375f9201919091525061212f92505050565b5f818152603660209081526040808320815160808101835281546001600160401b038082168352600160401b8204811695830195909552600160801b8104909416928101929092529394509192906060830190600160c01b900460ff16600281111561089157610891613c5b565b60028111156108a2576108a2613c5b565b81525050905080604001516001600160401b0316876001600160401b0316116108de576040516337e07ffd60e01b815260040160405180910390fd5b6001816060015160028111156108f6576108f6613c5b565b146109145760405163d49e19a760e01b815260040160405180910390fd5b610957610921868061402d565b808060200260200160405190810160405280939291908181526020018383602002808284375f9201919091525061215192505050565b6109745760405163161ce5ed60e31b815260040160405180910390fd5b61098661098088611388565b87612179565b6109b26109928861221e565b873561099e888061402d565b6109ab60208b018b614072565b87516122f5565b6109bb5f612429565b50505050505050565b5f6109e071bbddc7ce488642fb579f8b00f3a5900072516125a9565b905090565b604051635ac86ab760e01b8152600a60048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa158015610a4b573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a6f9190614012565b15610a8d5760405163840a48d560e01b815260040160405180910390fd5b6033546001600160a01b0316331480610ab05750603e546001600160a01b031633145b610acd5760405163427a777960e01b815260040160405180910390fd5b5f610ad66118a3565b90505f610ae384836140c8565b905080341015610b065760405163356680b760e01b815260040160405180910390fd5b5f610b1182346140df565b90505f5b85811015610d4d5736878783818110610b3057610b306140f2565b9050602002810190610b429190614106565b90505f610b8b610b528380614072565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061262f92505050565b905060015f82815260366020526040902054600160c01b900460ff166002811115610bb857610bb8613c5b565b14610bd65760405163d49e19a760e01b815260040160405180910390fd5b5f610be18380614072565b610bf16040860160208701613bd1565b604051602001610c0393929190614124565b60405160208183030381529060405290505f710961ef480eb55e80d19ad83579a64c0070026001600160a01b03168883604051610c40919061415c565b5f6040518083038185875af1925050503d805f8114610c7a576040519150601f19603f3d011682016040523d82523d5f602084013e610c7f565b606091505b5050905080610ca15760405163fc52d48360e01b815260040160405180910390fd5b610cb16040850160208601613bd1565b6001600160401b03165f03610cef5760405183907f60d8ca014d4765a2b8b389e25714cb1cef83b574222911a01d90c1bd69d2d320905f90a2610d3d565b827f8b2737bb64ab2f2dc09552dfa1c250399e6a42c7ea9f0e1c658f5d65d708ec05610d216040870160208801613bd1565b6040516001600160401b03909116815260200160405180910390a25b505060019092019150610b159050565b508015610d5e57610d5e33826126c0565b505050505050565b6033546001600160a01b0316331480610d895750603e546001600160a01b031633145b610da65760405163427a777960e01b815260040160405180910390fd5b604051635ac86ab760e01b8152600260048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa158015610e0c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e309190614012565b15610e4e5760405163840a48d560e01b815260040160405180910390fd5b8584148015610e5c57508382145b610e79576040516343714afd60e01b815260040160405180910390fd5b603a546001600160401b03600160401b9091048116908a1611610eaf576040516337e07ffd60e01b815260040160405180910390fd5b603a546001600160401b03908116908a1611610ede576040516335e7f6b760e01b815260040160405180910390fd5b610ef0610eea8a611388565b89612179565b5f805b87811015610f8957610f758b8b358b8b85818110610f1357610f136140f2565b9050602002016020810190610f289190614167565b8a8a86818110610f3a57610f3a6140f2565b9050602002810190610f4c9190614072565b8a8a88818110610f5e57610f5e6140f2565b9050602002810190610f70919061402d565b6127d5565b610f7f908361418b565b9150600101610ef3565b5060335460405163a1ca780b60e01b81526001600160a01b0391821660048201525f6024820152604481018390527f00000000000000000000000000000000000000000000000000000000000000009091169063a1ca780b906064015f604051808303815f87803b158015610ffc575f5ffd5b505af115801561100e573d5f5f3e3d5ffd5b5050505050505050505050505050565b5f5f61105e84848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061262f92505050565b5f90815260366020526040902054600160c01b900460ff169150505b92915050565b604051635ac86ab760e01b8152600960048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa1580156110e6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061110a9190614012565b156111285760405163840a48d560e01b815260040160405180910390fd5b6033546001600160a01b031633148061114b5750603e546001600160a01b031633145b6111685760405163427a777960e01b815260040160405180910390fd5b5f6111716109c4565b90505f61117e84836140c8565b9050803410156111a15760405163356680b760e01b815260040160405180910390fd5b5f6111ac82346140df565b90505f5b85811015610d4d57368787838181106111cb576111cb6140f2565b90506020028101906111dd9190614106565b90505f6111ed610b528380614072565b90505f611200610b526020850185614072565b905060015f82815260366020526040902054600160c01b900460ff16600281111561122d5761122d613c5b565b1461124b5760405163d49e19a760e01b815260040160405180910390fd5b5f6112568480614072565b6112636020870187614072565b604051602001611276949392919061419e565b60405160208183030381529060405290505f71bbddc7ce488642fb579f8b00f3a5900072516001600160a01b031689836040516112b3919061415c565b5f6040518083038185875af1925050503d805f81146112ed576040519150601f19603f3d011682016040523d82523d5f602084013e6112f2565b606091505b50509050806113145760405163fc52d48360e01b815260040160405180910390fd5b82840361134a5760405184907fc97b965b92ae7fd20095fe8eb7b99f81f95f8c4adffb22a19116d8eb2846b016905f90a2611377565b604051839085907f42f9c9db2ca443e9ec62f4588bd0c9b241065c02c2a8001ac164ae1282dc7b94905f90a35b5050600190930192506111b0915050565b5f611396611fff600c6140c8565b6113a96001600160401b038416426140df565b106113c757604051637944e66d60e11b815260040160405180910390fd5b604080516001600160401b03841660208201525f918291720f3df6d732807ef1319fb7b8bb8522d0beac02910160408051601f198184030181529082905261140e9161415c565b5f60405180830381855afa9150503d805f8114611446576040519150601f19603f3d011682016040523d82523d5f602084013e61144b565b606091505b509150915081801561145d57505f8151115b61147a5760405163558ad0a360e01b815260040160405180910390fd5b8080602001905181019061148e91906141bd565b949350505050565b6114bd604080516080810182525f8082526020820181905291810182905290606082015290565b5f82815260366020908152604091829020825160808101845281546001600160401b038082168352600160401b8204811694830194909452600160801b810490931693810193909352906060830190600160c01b900460ff16600281111561152757611527613c5b565b600281111561153857611538613c5b565b90525092915050565b6033546001600160a01b03163314806115645750603e546001600160a01b031633145b6115815760405163427a777960e01b815260040160405180910390fd5b604051635ac86ab760e01b8152600660048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa1580156115e7573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061160b9190614012565b156116295760405163840a48d560e01b815260040160405180910390fd5b61163282612429565b5050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461167f57604051633213a66160e21b815260040160405180910390fd5b346801bc16d674ec800000146116a85760405163049696b360e31b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663228951186801bc16d674ec80000087876116eb612cd6565b8888886040518863ffffffff1660e01b815260040161170f9695949392919061422a565b5f604051808303818588803b158015611726575f5ffd5b505af1158015611738573d5f5f3e3d5ffd5b50505050507fa01003766d3cd97cf2ade5429690bf5d206be7fb01ef9d3a0089ecf67bc1121961179c86868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061262f92505050565b60405190815260200160405180910390a15050505050565b6117db604080516080810182525f8082526020820181905291810182905290606082015290565b60365f61181c85858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061262f92505050565b815260208082019290925260409081015f20815160808101835281546001600160401b038082168352600160401b8204811695830195909552600160801b81049094169281019290925290916060830190600160c01b900460ff16600281111561188857611888613c5b565b600281111561189957611899613c5b565b9052509392505050565b5f6109e0710961ef480eb55e80d19ad83579a64c0070026125a9565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461190857604051633213a66160e21b815260040160405180910390fd5b5f611917633b9aca008361428c565b9050611930633b9aca006001600160401b0383166140c8565b6034549092506001600160401b039081169082161115611963576040516302c6f54760e21b815260040160405180910390fd5b603480548291905f906119809084906001600160401b031661429f565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550826001600160a01b03167f8947fd2ce07ef9cc302c4e8f0461015615d91ce851564839e91cc804c2f49d8e836040516119df91815260200190565b60405180910390a26119f183836126c0565b505050565b5f54610100900460ff1615808015611a1457505f54600160ff909116105b80611a2d5750303b158015611a2d57505f5460ff166001145b611a955760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff191660011790558015611ab6575f805461ff0019166101001790555b6001600160a01b038216611add576040516339b190bb60e11b815260040160405180910390fd5b603380546001600160a01b0319166001600160a01b0384161790558015611632575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6033546001600160a01b03163314611b6b5760405163719f370360e11b815260040160405180910390fd5b603e54604080516001600160a01b03928316815291831660208301527ffb8129080a19d34dceac04ba253fc50304dc86c729bd63cdca4a969ad19a5eac910160405180910390a1603e80546001600160a01b0319166001600160a01b0392909216919091179055565b6033546001600160a01b03163314611bff5760405163719f370360e11b815260040160405180910390fd5b604051635ac86ab760e01b8152600560048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa158015611c65573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611c899190614012565b15611ca75760405163840a48d560e01b815260040160405180910390fd5b8251845114611cc9576040516343714afd60e01b815260040160405180910390fd5b5f5b8451811015611d2c57611d2483858381518110611cea57611cea6140f2565b6020026020010151878481518110611d0457611d046140f2565b60200260200101516001600160a01b0316612d069092919063ffffffff16565b600101611ccb565b5050505050565b604051635ac86ab760e01b8152600760048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa158015611d99573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611dbd9190614012565b15611ddb5760405163840a48d560e01b815260040160405180910390fd5b603a54600160401b90046001600160401b03165f819003611e0f57604051631a544f4960e01b815260040160405180910390fd5b6040805160a081018252603c548152603d5462ffffff811660208301526001600160401b0363010000008204811693830193909352600160581b810460070b6060830152600160981b90049091166080820152611e76611e6e8361221e565b825188612d58565b5f805b858110156120d65736878783818110611e9457611e946140f2565b9050602002810190611ea691906142be565b80355f908152603660209081526040808320815160808101835281546001600160401b038082168352600160401b8204811695830195909552600160801b8104909416928101929092529394509192906060830190600160c01b900460ff166002811115611f1657611f16613c5b565b6002811115611f2757611f27613c5b565b9052509050600181606001516002811115611f4457611f44613c5b565b14611f505750506120ce565b856001600160401b031681604001516001600160401b031610611f745750506120ce565b5f8080611f84848a8f3588612e19565b60208b0180519396509194509250611f9b826142d2565b62ffffff16905250608088018051849190611fb79083906142ef565b6001600160401b0316905250606088018051839190611fd790839061430e565b60070b905250611fe781886142ef565b85355f908152603660209081526040918290208751815492890151938901516001600160401b03908116600160801b0267ffffffffffffffff60801b19958216600160401b026001600160801b0319909516919092161792909217928316821781556060880151939a50879390929091839160ff60c01b1990911668ffffffffffffffffff60801b1990911617600160c01b83600281111561208b5761208b613c5b565b021790555050604051863591506001600160401b038b16907fe4866335761a51dcaff766448ab0af6064291ee5dc94e68492bb9cd757c1e350905f90a350505050505b600101611e79565b506001600160401b038084165f908152603b6020526040812080548493919291612102918591166142ef565b92506101000a8154816001600160401b0302191690836001600160401b031602179055506109bb82612f2f565b5f815f81518110612142576121426140f2565b60200260200101519050919050565b5f81600381518110612165576121656140f2565b60200260200101515f5f1b14159050919050565b612185600360206140c8565b6121926020830183614072565b9050146121b2576040516313717da960e21b815260040160405180910390fd5b6122016121c26020830183614072565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508692505084359050600361314f565b611632576040516309bde33960e01b815260040160405180910390fd5b5f5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632704351a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561227c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a0919061433d565b9050806001600160401b03165f036122cb576040516341a02cc960e01b815260040160405180910390fd5b806001600160401b0316836001600160401b031611156122ec5760016122ee565b5f5b9392505050565b600884146123165760405163200591bd60e01b815260040160405180910390fd5b5f61232088613184565b90508061232f6028600161418b565b612339919061418b565b6123449060206140c8565b8314612363576040516313717da960e21b815260040160405180910390fd5b5f61239f8787808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152506131ac92505050565b90505f64ffffffffff84166123b66028600161418b565b600b901b17905061240086868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508d925086915085905061314f565b61241d576040516309bde33960e01b815260040160405180910390fd5b50505050505050505050565b603a54600160401b90046001600160401b0316156124595760405162be9bc360e81b815260040160405180910390fd5b603a546001600160401b03428116911603612487576040516367db5b8b60e01b815260040160405180910390fd5b6034545f906001600160401b03166124a3633b9aca004761428c565b6124ad919061429f565b90508180156124c357506001600160401b038116155b156124e1576040516332dea95960e21b815260040160405180910390fd5b5f6040518060a001604052806124f642611388565b815260395462ffffff1660208201526001600160401b0380851660408301525f60608301819052608090920191909152603a805442909216600160401b026fffffffffffffffff000000000000000019909216919091179055905061255a81612f2f565b805160208083015160405162ffffff90911681526001600160401b034216917f575796133bbed337e5b39aa49a30dc2556a91e0c6c2af4b7b886ae77ebef1076910160405180910390a3505050565b5f5f5f836001600160a01b03166040515f60405180830381855afa9150503d805f81146125f1576040519150601f19603f3d011682016040523d82523d5f602084013e6125f6565b606091505b5091509150818015612609575080516020145b6126265760405163c90158af60e01b815260040160405180910390fd5b61148e81614358565b5f815160301461265257604051634f88323960e11b815260040160405180910390fd5b6040516002906126689084905f9060200161437b565b60408051601f19818403018152908290526126829161415c565b602060405180830381855afa15801561269d573d5f5f3e3d5ffd5b5050506040513d601f19601f8201168201806040525081019061107a91906141bd565b804710156127105760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401611a8c565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114612759576040519150601f19603f3d011682016040523d82523d5f602084013e61275e565b606091505b50509050806119f15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401611a8c565b5f5f6128128484808060200260200160405190810160405280939291908181526020018383602002808284375f9201919091525061212f92505050565b5f818152603660209081526040808320815160808101835281546001600160401b038082168352600160401b8204811695830195909552600160801b8104909416928101929092529394509192906060830190600160c01b900460ff16600281111561288057612880613c5b565b600281111561289157612891613c5b565b90525090505f816060015160028111156128ad576128ad613c5b565b146128cb576040516335e09e9d60e01b815260040160405180910390fd5b6001600160401b0380166129108686808060200260200160405190810160405280939291908181526020018383602002808284375f9201919091525061347a92505050565b6001600160401b03160361293757604051631958236d60e21b815260040160405180910390fd5b6001600160401b03801661297c8686808060200260200160405190810160405280939291908181526020018383602002808284375f9201919091525061349e92505050565b6001600160401b0316146129a357604051632eade63760e01b815260040160405180910390fd5b6129ab612cd6565b6129b490614358565b6129ef8686808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152506134b592505050565b1480612a4457506129fe6134c9565b612a0790614358565b612a428686808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152506134b592505050565b145b612a6157604051633772dd5360e11b815260040160405180910390fd5b5f612a9d8686808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152506134e592505050565b9050612ab6612aab8c61221e565b8b88888c8c8f6122f5565b60398054905f612ac58361439f565b9091555050603a545f90600160401b90046001600160401b031615612afc57603a54600160401b90046001600160401b0316612b09565b603a546001600160401b03165b6040805160808101825264ffffffffff8d1681526001600160401b03858116602083015283169181019190915290915060608101600190525f858152603660209081526040918290208351815492850151938501516001600160401b03908116600160801b0267ffffffffffffffff60801b19958216600160401b026001600160801b031990951691909216179290921792831682178155606084015190929091839160ff60c01b1990911668ffffffffffffffffff60801b1990911617600160c01b836002811115612bde57612bde613c5b565b021790555050603d8054849250601390612c09908490600160981b90046001600160401b03166142ef565b92506101000a8154816001600160401b0302191690836001600160401b031602179055507f101790c2993f6a4d962bd17c786126823ba1c4cf04ff4cccb2659d50fb20aee884604051612c5e91815260200190565b60405180910390a1604080518581526001600160401b03838116602083015284168183015290517fcdae700d7241bc027168c53cf6f889763b0a2c88a65d77fc13a8a9fef0d8605f9181900360600190a1612cc6633b9aca006001600160401b0384166140c8565b9c9b505050505050505050505050565b604051606090612cf290600160f81b905f9030906020016143b7565b604051602081830303815290604052905090565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526119f19084906134fc565b5f612d6284613184565b9050612d6f81600361418b565b612d7a9060206140c8565b612d876020840184614072565b905014612da7576040516313717da960e21b815260040160405180910390fd5b6003811b600c17612dfc612dbe6020850185614072565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525088925050863590508461314f565b611d2c576040516309bde33960e01b815260040160405180910390fd5b5f5f5f866020015192505f612e3286895f0151876135cf565b9050836001600160401b0316816001600160401b031614612ea657612e5784826143f5565b60408051873581526001600160401b038a8116602083015284168183015290519194507fcdae700d7241bc027168c53cf6f889763b0a2c88a65d77fc13a8a9fef0d8605f919081900360600190a15b6001600160401b0380821660208a0181905290881660408a01525f03612f245760398054905f612ed583614424565b909155505060026060890152612eea83614439565b6040519092508535906001600160401b038916907f5ce0aa04ae51d52da6e680fbe0336d2e2432f7c3dc2d4f3193204c57b9072107905f90a35b509450945094915050565b8051603c556020810151603d805460408401516060850151608086015162ffffff9095166affffffffffffffffffffff19909316831763010000006001600160401b0393841602176fffffffffffffffffffffffffffffffff60581b1916600160581b9183169190910267ffffffffffffffff60981b191617600160981b919094160292909217905515612fc05750565b60808101516034545f91612fdc916001600160401b03166142ef565b90505f82606001518360400151612ff3919061430e565b60408401516034805492935090915f906130179084906001600160401b03166142ef565b82546101009290920a6001600160401b03818102199093169183160217909155603a8054600160401b810483166001600160801b03199091161790555f915061306790633b9aca009085166140c8565b90505f61307c633b9aca00600785900b61445e565b603a546040518281529192506001600160401b0316907f525408c201bc1576eb44116f6478f1c2a54775b19a043bcfdc708364f74f8e449060200160405180910390a260335460405163a1ca780b60e01b81526001600160a01b03918216600482015260248101849052604481018390527f00000000000000000000000000000000000000000000000000000000000000009091169063a1ca780b906064015f604051808303815f87803b158015613132575f5ffd5b505af1158015613144573d5f5f3e3d5ffd5b505050505050505050565b5f8361316e576040516329e7276760e11b815260040160405180910390fd5b8361317a8685856136ad565b1495945050505050565b5f8082600181111561319857613198613c5b565b146131a457600661107a565b600592915050565b5f60018251116131cf5760405163f8ef036760e01b815260040160405180910390fd5b6131d982516137a0565b6131f65760405163f6558f5160e01b815260040160405180910390fd5b5f60028351613205919061428c565b90505f816001600160401b0381111561322057613220613e09565b604051908082528060200260200182016040528015613249578160200160208202803683370190505b5090505f5b828110156133435760028561326383836140c8565b81518110613273576132736140f2565b60200260200101518683600261328991906140c8565b61329490600161418b565b815181106132a4576132a46140f2565b60200260200101516040516020016132c6929190918252602082015260400190565b60408051601f19818403018152908290526132e09161415c565b602060405180830381855afa1580156132fb573d5f5f3e3d5ffd5b5050506040513d601f19601f8201168201806040525081019061331e91906141bd565b828281518110613330576133306140f2565b602090810291909101015260010161324e565b505b816001146134575761335860028361428c565b91505f5b828110156134515760028261337183836140c8565b81518110613381576133816140f2565b60200260200101518383600261339791906140c8565b6133a290600161418b565b815181106133b2576133b26140f2565b60200260200101516040516020016133d4929190918252602082015260400190565b60408051601f19818403018152908290526133ee9161415c565b602060405180830381855afa158015613409573d5f5f3e3d5ffd5b5050506040513d601f19601f8201168201806040525081019061342c91906141bd565b82828151811061343e5761343e6140f2565b602090810291909101015260010161335c565b50613345565b805f81518110613469576134696140f2565b602002602001015192505050919050565b5f61107a82600581518110613491576134916140f2565b60200260200101516137bf565b5f61107a82600681518110613491576134916140f2565b5f81600181518110612142576121426140f2565b604051606090612cf290600160f91b905f9030906020016143b7565b5f61107a82600281518110613491576134916140f2565b5f613550826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166138269092919063ffffffff16565b905080515f14806135705750808060200190518101906135709190614012565b6119f15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401611a8c565b5f6135dc6026600161418b565b6135e79060206140c8565b6135f46040840184614072565b905014613614576040516313717da960e21b815260040160405180910390fd5b5f61362060048561448d565b64ffffffffff1690506136796136396040850185614072565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250899250505060208601358461314f565b613696576040516309bde33960e01b815260040160405180910390fd5b6136a4836020013585613834565b95945050505050565b5f83515f141580156136ca5750602084516136c891906144b6565b155b6136e7576040516313717da960e21b815260040160405180910390fd5b604080516020808201909252848152905b855181116137775761370b6002856144b6565b5f0361373d5781515f528086015160205260208260405f60026107d05a03fa613732575f5ffd5b600284049350613765565b808601515f52815160205260208260405f60026107d05a03fa61375e575f5ffd5b6002840493505b61377060208261418b565b90506136f8565b508215613797576040516363df817160e01b815260040160405180910390fd5b51949350505050565b5f811580159061107a57506137b66001836140df565b82161592915050565b60f881901c60e882901c61ff00161760d882901c62ff0000161760c882901c63ff000000161764ff0000000060b883901c161765ff000000000060a883901c161766ff000000000000609883901c161767ff0000000000000060889290921c919091161790565b606061148e84845f85613860565b5f806138416004846144c9565b61384c9060406144f2565b64ffffffffff16905061148e84821b6137bf565b6060824710156138c15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401611a8c565b5f5f866001600160a01b031685876040516138dc919061415c565b5f6040518083038185875af1925050503d805f8114613916576040519150601f19603f3d011682016040523d82523d5f602084013e61391b565b606091505b509150915061392c87838387613937565b979650505050505050565b606083156139a55782515f0361399e576001600160a01b0385163b61399e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611a8c565b508161148e565b61148e83838151156139ba5781518083602001fd5b8060405162461bcd60e51b8152600401611a8c9190614512565b6001600160401b03811681146139e8575f5ffd5b50565b5f604082840312156139fb575f5ffd5b50919050565b5f5f5f60608486031215613a13575f5ffd5b8335613a1e816139d4565b925060208401356001600160401b03811115613a38575f5ffd5b613a44868287016139eb565b92505060408401356001600160401b03811115613a5f575f5ffd5b613a6b868287016139eb565b9150509250925092565b5f5f83601f840112613a85575f5ffd5b5081356001600160401b03811115613a9b575f5ffd5b6020830191508360208260051b8501011115613ab5575f5ffd5b9250929050565b5f5f60208385031215613acd575f5ffd5b82356001600160401b03811115613ae2575f5ffd5b613aee85828601613a75565b90969095509350505050565b5f5f5f5f5f5f5f5f60a0898b031215613b11575f5ffd5b8835613b1c816139d4565b975060208901356001600160401b03811115613b36575f5ffd5b613b428b828c016139eb565b97505060408901356001600160401b03811115613b5d575f5ffd5b613b698b828c01613a75565b90975095505060608901356001600160401b03811115613b87575f5ffd5b613b938b828c01613a75565b90955093505060808901356001600160401b03811115613bb1575f5ffd5b613bbd8b828c01613a75565b999c989b5096995094979396929594505050565b5f60208284031215613be1575f5ffd5b81356122ee816139d4565b5f5f83601f840112613bfc575f5ffd5b5081356001600160401b03811115613c12575f5ffd5b602083019150836020828501011115613ab5575f5ffd5b5f5f60208385031215613c3a575f5ffd5b82356001600160401b03811115613c4f575f5ffd5b613aee85828601613bec565b634e487b7160e01b5f52602160045260245ffd5b60038110613c8b57634e487b7160e01b5f52602160045260245ffd5b9052565b6020810161107a8284613c6f565b5f60208284031215613cad575f5ffd5b5035919050565b5f6080820190506001600160401b0383511682526001600160401b0360208401511660208301526001600160401b0360408401511660408301526060830151613d006060840182613c6f565b5092915050565b80151581146139e8575f5ffd5b5f60208284031215613d24575f5ffd5b81356122ee81613d07565b5f5f5f5f5f60608688031215613d43575f5ffd5b85356001600160401b03811115613d58575f5ffd5b613d6488828901613bec565b90965094505060208601356001600160401b03811115613d82575f5ffd5b613d8e88828901613bec565b96999598509660400135949350505050565b6001600160a01b03811681146139e8575f5ffd5b8035613dbf81613da0565b919050565b5f5f60408385031215613dd5575f5ffd5b8235613de081613da0565b946020939093013593505050565b5f60208284031215613dfe575f5ffd5b81356122ee81613da0565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b0381118282101715613e4557613e45613e09565b604052919050565b5f6001600160401b03821115613e6557613e65613e09565b5060051b60200190565b5f82601f830112613e7e575f5ffd5b8135613e91613e8c82613e4d565b613e1d565b8082825260208201915060208360051b860101925085831115613eb2575f5ffd5b602085015b83811015613ecf578035835260209283019201613eb7565b5095945050505050565b5f5f5f60608486031215613eeb575f5ffd5b83356001600160401b03811115613f00575f5ffd5b8401601f81018613613f10575f5ffd5b8035613f1e613e8c82613e4d565b8082825260208201915060208360051b850101925088831115613f3f575f5ffd5b6020840193505b82841015613f6a578335613f5981613da0565b825260209384019390910190613f46565b955050505060208401356001600160401b03811115613f87575f5ffd5b613f9386828701613e6f565b925050613fa260408501613db4565b90509250925092565b5f5f5f60408486031215613fbd575f5ffd5b83356001600160401b03811115613fd2575f5ffd5b613fde868287016139eb565b93505060208401356001600160401b03811115613ff9575f5ffd5b61400586828701613a75565b9497909650939450505050565b5f60208284031215614022575f5ffd5b81516122ee81613d07565b5f5f8335601e19843603018112614042575f5ffd5b8301803591506001600160401b0382111561405b575f5ffd5b6020019150600581901b3603821315613ab5575f5ffd5b5f5f8335601e19843603018112614087575f5ffd5b8301803591506001600160401b038211156140a0575f5ffd5b602001915036819003821315613ab5575f5ffd5b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761107a5761107a6140b4565b8181038181111561107a5761107a6140b4565b634e487b7160e01b5f52603260045260245ffd5b5f8235603e1983360301811261411a575f5ffd5b9190910192915050565b8284823760c09190911b6001600160c01b0319169101908152600801919050565b5f81518060208401855e5f93019283525090919050565b5f6122ee8284614145565b5f60208284031215614177575f5ffd5b813564ffffffffff811681146122ee575f5ffd5b8082018082111561107a5761107a6140b4565b838582375f8482015f8152838582375f93019283525090949350505050565b5f602082840312156141cd575f5ffd5b5051919050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b608081525f61423d60808301888a6141d4565b828103602084015261424f81886141fc565b905082810360408401526142648186886141d4565b915050826060830152979650505050505050565b634e487b7160e01b5f52601260045260245ffd5b5f8261429a5761429a614278565b500490565b6001600160401b03828116828216039081111561107a5761107a6140b4565b5f8235605e1983360301811261411a575f5ffd5b5f62ffffff8216806142e6576142e66140b4565b5f190192915050565b6001600160401b03818116838216019081111561107a5761107a6140b4565b600781810b9083900b01677fffffffffffffff8113677fffffffffffffff198212171561107a5761107a6140b4565b5f6020828403121561434d575f5ffd5b81516122ee816139d4565b805160208083015191908110156139fb575f1960209190910360031b1b16919050565b5f6143868285614145565b6001600160801b03199390931683525050601001919050565b5f600182016143b0576143b06140b4565b5060010190565b6001600160f81b03199390931683526001600160a81b031991909116600183015260601b6bffffffffffffffffffffffff1916600c82015260200190565b600782810b9082900b03677fffffffffffffff198112677fffffffffffffff8213171561107a5761107a6140b4565b5f81614432576144326140b4565b505f190190565b5f8160070b677fffffffffffffff198103614456576144566140b4565b5f0392915050565b8082025f8212600160ff1b84141615614479576144796140b4565b818105831482151761107a5761107a6140b4565b5f64ffffffffff8316806144a3576144a3614278565b8064ffffffffff84160491505092915050565b5f826144c4576144c4614278565b500690565b5f64ffffffffff8316806144df576144df614278565b8064ffffffffff84160691505092915050565b64ffffffffff8181168382160290811690818114613d0057613d006140b4565b602081525f6122ee60208301846141fc56fea2646970667358221220150997dc569abe69c84016680c4f6a38f3415e4ee7f3d3d9fc5a6b2be1e80f2f64736f6c634300081e0033", + Bin: "0x60c060405234801561000f575f5ffd5b5060405161473838038061473883398101604081905261002e91610123565b6001600160a01b03808316608052811660a052610049610050565b505061015b565b5f54610100900460ff16156100bb5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff9081161461010a575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610120575f5ffd5b50565b5f5f60408385031215610134575f5ffd5b825161013f8161010c565b60208401519092506101508161010c565b809150509250929050565b60805160a05161455a6101de5f395f818161031e015281816106a801528181610750015281816109fe01528181610dbf01528181610fb9015281816110990152818161159a01528181611641015281816118ca01528181611c1801528181611d4c0152818161222201526130ef01525f818161054e01526116aa015261455a5ff3fe6080604052600436106101b2575f3560e01c80636c0d2d5a116100e7578063c44e30dc11610087578063d06d558711610062578063d06d558714610613578063dda3346c14610632578063ee94d67c14610651578063f074ba6214610670575f5ffd5b8063c44e30dc146105c1578063c4907442146105d5578063c4d66de8146105f4575f5ffd5b806374cdd798116100c257806374cdd7981461053d57806388676cad146105705780639b4e46341461058f578063b522538a146105a2575f5ffd5b80636c0d2d5a146104bd5780636fcd0e53146104dc5780637439841f14610508575f5ffd5b806342ecff2a1161015257806352396a591161012d57806352396a591461042b578063587533571461045f57806358eaee791461047e5780636691954e146104aa575f5ffd5b806342ecff2a146102e75780634665bcda1461030d57806347d2837214610340575f5ffd5b80632340e8d31161018d5780632340e8d31461026f5780633474aa16146102845780633f5fa57a146102b55780633f65cf19146102c8575f5ffd5b8063039157d2146101f05780630b18ff66146102115780631e5155331461024d575f5ffd5b366101ec576040513481527f6fdd3dbdb173299608c0aa9f368735857c8842b581f8389238bf05bd04b3bf499060200160405180910390a1005b5f5ffd5b3480156101fb575f5ffd5b5061020f61020a366004613a01565b61068f565b005b34801561021c575f5ffd5b50603354610230906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610258575f5ffd5b506102616109c4565b604051908152602001610244565b34801561027a575f5ffd5b5061026160395481565b34801561028f575f5ffd5b506034546001600160401b03165b6040516001600160401b039091168152602001610244565b61020f6102c3366004613abc565b6109e5565b3480156102d3575f5ffd5b5061020f6102e2366004613afa565b610d66565b3480156102f2575f5ffd5b50603a5461029d90600160401b90046001600160401b031681565b348015610318575f5ffd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b34801561034b575f5ffd5b506103d06040805160a0810182525f80825260208201819052918101829052606081018290526080810191909152506040805160a081018252603c548152603d5462ffffff811660208301526001600160401b0363010000008204811693830193909352600160581b810460070b6060830152600160981b9004909116608082015290565b60405161024491905f60a0820190508251825262ffffff60208401511660208301526001600160401b036040840151166040830152606083015160070b60608301526001600160401b03608084015116608083015292915050565b348015610436575f5ffd5b5061029d610445366004613bd1565b603b6020525f90815260409020546001600160401b031681565b34801561046a575f5ffd5b50603e54610230906001600160a01b031681565b348015610489575f5ffd5b5061049d610498366004613c29565b61101e565b6040516102449190613c8f565b61020f6104b8366004613abc565b611080565b3480156104c8575f5ffd5b506102616104d7366004613bd1565b611388565b3480156104e7575f5ffd5b506104fb6104f6366004613c9d565b611496565b6040516102449190613cb4565b348015610513575f5ffd5b5061049d610522366004613c9d565b5f90815260366020526040902054600160c01b900460ff1690565b348015610548575f5ffd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b34801561057b575f5ffd5b5061020f61058a366004613d14565b611541565b61020f61059d366004613d2f565b611636565b3480156105ad575f5ffd5b506104fb6105bc366004613c29565b6117b4565b3480156105cc575f5ffd5b506102616118a3565b3480156105e0575f5ffd5b5061020f6105ef366004613dc4565b6118bf565b3480156105ff575f5ffd5b5061020f61060e366004613dee565b6119f6565b34801561061e575f5ffd5b5061020f61062d366004613dee565b611b40565b34801561063d575f5ffd5b5061020f61064c366004613ed9565b611bd4565b34801561065c575f5ffd5b50603a5461029d906001600160401b031681565b34801561067b575f5ffd5b5061020f61068a366004613fab565b611d33565b604051635ac86ab760e01b8152600660048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa1580156106f5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107199190614012565b156107375760405163840a48d560e01b815260040160405180910390fd5b604051635ac86ab760e01b8152600860048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa15801561079d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107c19190614012565b156107df5760405163840a48d560e01b815260040160405180910390fd5b5f6108236107ed858061402d565b808060200260200160405190810160405280939291908181526020018383602002808284375f9201919091525061212f92505050565b5f818152603660209081526040808320815160808101835281546001600160401b038082168352600160401b8204811695830195909552600160801b8104909416928101929092529394509192906060830190600160c01b900460ff16600281111561089157610891613c5b565b60028111156108a2576108a2613c5b565b81525050905080604001516001600160401b0316876001600160401b0316116108de576040516337e07ffd60e01b815260040160405180910390fd5b6001816060015160028111156108f6576108f6613c5b565b146109145760405163d49e19a760e01b815260040160405180910390fd5b610957610921868061402d565b808060200260200160405190810160405280939291908181526020018383602002808284375f9201919091525061215192505050565b6109745760405163161ce5ed60e31b815260040160405180910390fd5b61098661098088611388565b87612179565b6109b26109928861221e565b873561099e888061402d565b6109ab60208b018b614072565b87516122f5565b6109bb5f612429565b50505050505050565b5f6109e071bbddc7ce488642fb579f8b00f3a5900072516125a9565b905090565b604051635ac86ab760e01b8152600a60048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa158015610a4b573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a6f9190614012565b15610a8d5760405163840a48d560e01b815260040160405180910390fd5b6033546001600160a01b0316331480610ab05750603e546001600160a01b031633145b610acd5760405163427a777960e01b815260040160405180910390fd5b5f610ad66118a3565b90505f610ae384836140c8565b905080341015610b065760405163356680b760e01b815260040160405180910390fd5b5f610b1182346140df565b90505f5b85811015610d4d5736878783818110610b3057610b306140f2565b9050602002810190610b429190614106565b90505f610b8b610b528380614072565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061262f92505050565b905060015f82815260366020526040902054600160c01b900460ff166002811115610bb857610bb8613c5b565b14610bd65760405163d49e19a760e01b815260040160405180910390fd5b5f610be18380614072565b610bf16040860160208701613bd1565b604051602001610c0393929190614124565b60405160208183030381529060405290505f710961ef480eb55e80d19ad83579a64c0070026001600160a01b03168883604051610c40919061415c565b5f6040518083038185875af1925050503d805f8114610c7a576040519150601f19603f3d011682016040523d82523d5f602084013e610c7f565b606091505b5050905080610ca15760405163fc52d48360e01b815260040160405180910390fd5b610cb16040850160208601613bd1565b6001600160401b03165f03610cef5760405183907f60d8ca014d4765a2b8b389e25714cb1cef83b574222911a01d90c1bd69d2d320905f90a2610d3d565b827f8b2737bb64ab2f2dc09552dfa1c250399e6a42c7ea9f0e1c658f5d65d708ec05610d216040870160208801613bd1565b6040516001600160401b03909116815260200160405180910390a25b505060019092019150610b159050565b508015610d5e57610d5e33826126c0565b505050505050565b6033546001600160a01b0316331480610d895750603e546001600160a01b031633145b610da65760405163427a777960e01b815260040160405180910390fd5b604051635ac86ab760e01b8152600260048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa158015610e0c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e309190614012565b15610e4e5760405163840a48d560e01b815260040160405180910390fd5b8584148015610e5c57508382145b610e79576040516343714afd60e01b815260040160405180910390fd5b603a546001600160401b03600160401b9091048116908a1611610eaf576040516337e07ffd60e01b815260040160405180910390fd5b603a546001600160401b03908116908a1611610ede576040516335e7f6b760e01b815260040160405180910390fd5b610ef0610eea8a611388565b89612179565b5f805b87811015610f8957610f758b8b358b8b85818110610f1357610f136140f2565b9050602002016020810190610f289190614167565b8a8a86818110610f3a57610f3a6140f2565b9050602002810190610f4c9190614072565b8a8a88818110610f5e57610f5e6140f2565b9050602002810190610f70919061402d565b6127d5565b610f7f908361418b565b9150600101610ef3565b5060335460405163a1ca780b60e01b81526001600160a01b0391821660048201525f6024820152604481018390527f00000000000000000000000000000000000000000000000000000000000000009091169063a1ca780b906064015f604051808303815f87803b158015610ffc575f5ffd5b505af115801561100e573d5f5f3e3d5ffd5b5050505050505050505050505050565b5f5f61105e84848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061262f92505050565b5f90815260366020526040902054600160c01b900460ff169150505b92915050565b604051635ac86ab760e01b8152600960048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa1580156110e6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061110a9190614012565b156111285760405163840a48d560e01b815260040160405180910390fd5b6033546001600160a01b031633148061114b5750603e546001600160a01b031633145b6111685760405163427a777960e01b815260040160405180910390fd5b5f6111716109c4565b90505f61117e84836140c8565b9050803410156111a15760405163356680b760e01b815260040160405180910390fd5b5f6111ac82346140df565b90505f5b85811015610d4d57368787838181106111cb576111cb6140f2565b90506020028101906111dd9190614106565b90505f6111ed610b528380614072565b90505f611200610b526020850185614072565b905060015f82815260366020526040902054600160c01b900460ff16600281111561122d5761122d613c5b565b1461124b5760405163d49e19a760e01b815260040160405180910390fd5b5f6112568480614072565b6112636020870187614072565b604051602001611276949392919061419e565b60405160208183030381529060405290505f71bbddc7ce488642fb579f8b00f3a5900072516001600160a01b031689836040516112b3919061415c565b5f6040518083038185875af1925050503d805f81146112ed576040519150601f19603f3d011682016040523d82523d5f602084013e6112f2565b606091505b50509050806113145760405163fc52d48360e01b815260040160405180910390fd5b82840361134a5760405184907fc97b965b92ae7fd20095fe8eb7b99f81f95f8c4adffb22a19116d8eb2846b016905f90a2611377565b604051839085907f42f9c9db2ca443e9ec62f4588bd0c9b241065c02c2a8001ac164ae1282dc7b94905f90a35b5050600190930192506111b0915050565b5f611396611fff600c6140c8565b6113a96001600160401b038416426140df565b106113c757604051637944e66d60e11b815260040160405180910390fd5b604080516001600160401b03841660208201525f918291720f3df6d732807ef1319fb7b8bb8522d0beac02910160408051601f198184030181529082905261140e9161415c565b5f60405180830381855afa9150503d805f8114611446576040519150601f19603f3d011682016040523d82523d5f602084013e61144b565b606091505b509150915081801561145d57505f8151115b61147a5760405163558ad0a360e01b815260040160405180910390fd5b8080602001905181019061148e91906141bd565b949350505050565b6114bd604080516080810182525f8082526020820181905291810182905290606082015290565b5f82815260366020908152604091829020825160808101845281546001600160401b038082168352600160401b8204811694830194909452600160801b810490931693810193909352906060830190600160c01b900460ff16600281111561152757611527613c5b565b600281111561153857611538613c5b565b90525092915050565b6033546001600160a01b03163314806115645750603e546001600160a01b031633145b6115815760405163427a777960e01b815260040160405180910390fd5b604051635ac86ab760e01b8152600660048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa1580156115e7573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061160b9190614012565b156116295760405163840a48d560e01b815260040160405180910390fd5b61163282612429565b5050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461167f57604051633213a66160e21b815260040160405180910390fd5b346801bc16d674ec800000146116a85760405163049696b360e31b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663228951186801bc16d674ec80000087876116eb612cd6565b8888886040518863ffffffff1660e01b815260040161170f9695949392919061422a565b5f604051808303818588803b158015611726575f5ffd5b505af1158015611738573d5f5f3e3d5ffd5b50505050507fa01003766d3cd97cf2ade5429690bf5d206be7fb01ef9d3a0089ecf67bc1121961179c86868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061262f92505050565b60405190815260200160405180910390a15050505050565b6117db604080516080810182525f8082526020820181905291810182905290606082015290565b60365f61181c85858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061262f92505050565b815260208082019290925260409081015f20815160808101835281546001600160401b038082168352600160401b8204811695830195909552600160801b81049094169281019290925290916060830190600160c01b900460ff16600281111561188857611888613c5b565b600281111561189957611899613c5b565b9052509392505050565b5f6109e0710961ef480eb55e80d19ad83579a64c0070026125a9565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461190857604051633213a66160e21b815260040160405180910390fd5b5f611917633b9aca008361428c565b9050611930633b9aca006001600160401b0383166140c8565b6034549092506001600160401b039081169082161115611963576040516302c6f54760e21b815260040160405180910390fd5b603480548291905f906119809084906001600160401b031661429f565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550826001600160a01b03167f8947fd2ce07ef9cc302c4e8f0461015615d91ce851564839e91cc804c2f49d8e836040516119df91815260200190565b60405180910390a26119f183836126c0565b505050565b5f54610100900460ff1615808015611a1457505f54600160ff909116105b80611a2d5750303b158015611a2d57505f5460ff166001145b611a955760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff191660011790558015611ab6575f805461ff0019166101001790555b6001600160a01b038216611add576040516339b190bb60e11b815260040160405180910390fd5b603380546001600160a01b0319166001600160a01b0384161790558015611632575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6033546001600160a01b03163314611b6b5760405163719f370360e11b815260040160405180910390fd5b603e54604080516001600160a01b03928316815291831660208301527ffb8129080a19d34dceac04ba253fc50304dc86c729bd63cdca4a969ad19a5eac910160405180910390a1603e80546001600160a01b0319166001600160a01b0392909216919091179055565b6033546001600160a01b03163314611bff5760405163719f370360e11b815260040160405180910390fd5b604051635ac86ab760e01b8152600560048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa158015611c65573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611c899190614012565b15611ca75760405163840a48d560e01b815260040160405180910390fd5b8251845114611cc9576040516343714afd60e01b815260040160405180910390fd5b5f5b8451811015611d2c57611d2483858381518110611cea57611cea6140f2565b6020026020010151878481518110611d0457611d046140f2565b60200260200101516001600160a01b0316612d069092919063ffffffff16565b600101611ccb565b5050505050565b604051635ac86ab760e01b8152600760048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635ac86ab790602401602060405180830381865afa158015611d99573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611dbd9190614012565b15611ddb5760405163840a48d560e01b815260040160405180910390fd5b603a54600160401b90046001600160401b03165f819003611e0f57604051631a544f4960e01b815260040160405180910390fd5b6040805160a081018252603c548152603d5462ffffff811660208301526001600160401b0363010000008204811693830193909352600160581b810460070b6060830152600160981b90049091166080820152611e76611e6e8361221e565b825188612d58565b5f805b858110156120d65736878783818110611e9457611e946140f2565b9050602002810190611ea691906142be565b80355f908152603660209081526040808320815160808101835281546001600160401b038082168352600160401b8204811695830195909552600160801b8104909416928101929092529394509192906060830190600160c01b900460ff166002811115611f1657611f16613c5b565b6002811115611f2757611f27613c5b565b9052509050600181606001516002811115611f4457611f44613c5b565b14611f505750506120ce565b856001600160401b031681604001516001600160401b031610611f745750506120ce565b5f8080611f84848a8f3588612e19565b60208b0180519396509194509250611f9b826142d2565b62ffffff16905250608088018051849190611fb79083906142ef565b6001600160401b0316905250606088018051839190611fd790839061430e565b60070b905250611fe781886142ef565b85355f908152603660209081526040918290208751815492890151938901516001600160401b03908116600160801b0267ffffffffffffffff60801b19958216600160401b026001600160801b0319909516919092161792909217928316821781556060880151939a50879390929091839160ff60c01b1990911668ffffffffffffffffff60801b1990911617600160c01b83600281111561208b5761208b613c5b565b021790555050604051863591506001600160401b038b16907fe4866335761a51dcaff766448ab0af6064291ee5dc94e68492bb9cd757c1e350905f90a350505050505b600101611e79565b506001600160401b038084165f908152603b6020526040812080548493919291612102918591166142ef565b92506101000a8154816001600160401b0302191690836001600160401b031602179055506109bb82612f2f565b5f815f81518110612142576121426140f2565b60200260200101519050919050565b5f81600381518110612165576121656140f2565b60200260200101515f5f1b14159050919050565b612185600360206140c8565b6121926020830183614072565b9050146121b2576040516313717da960e21b815260040160405180910390fd5b6122016121c26020830183614072565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508692505084359050600361314f565b611632576040516309bde33960e01b815260040160405180910390fd5b5f5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632704351a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561227c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a0919061433d565b9050806001600160401b03165f036122cb576040516341a02cc960e01b815260040160405180910390fd5b806001600160401b0316836001600160401b031611156122ec5760016122ee565b5f5b9392505050565b600884146123165760405163200591bd60e01b815260040160405180910390fd5b5f61232088613184565b90508061232f6028600161418b565b612339919061418b565b6123449060206140c8565b8314612363576040516313717da960e21b815260040160405180910390fd5b5f61239f8787808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152506131ac92505050565b90505f64ffffffffff84166123b66028600161418b565b600b901b17905061240086868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508d925086915085905061314f565b61241d576040516309bde33960e01b815260040160405180910390fd5b50505050505050505050565b603a54600160401b90046001600160401b0316156124595760405162be9bc360e81b815260040160405180910390fd5b603a546001600160401b03428116911603612487576040516367db5b8b60e01b815260040160405180910390fd5b6034545f906001600160401b03166124a3633b9aca004761428c565b6124ad919061429f565b90508180156124c357506001600160401b038116155b156124e1576040516332dea95960e21b815260040160405180910390fd5b5f6040518060a001604052806124f642611388565b815260395462ffffff1660208201526001600160401b0380851660408301525f60608301819052608090920191909152603a805442909216600160401b026fffffffffffffffff000000000000000019909216919091179055905061255a81612f2f565b805160208083015160405162ffffff90911681526001600160401b034216917f575796133bbed337e5b39aa49a30dc2556a91e0c6c2af4b7b886ae77ebef1076910160405180910390a3505050565b5f5f5f836001600160a01b03166040515f60405180830381855afa9150503d805f81146125f1576040519150601f19603f3d011682016040523d82523d5f602084013e6125f6565b606091505b5091509150818015612609575080516020145b6126265760405163c90158af60e01b815260040160405180910390fd5b61148e81614358565b5f815160301461265257604051634f88323960e11b815260040160405180910390fd5b6040516002906126689084905f9060200161437b565b60408051601f19818403018152908290526126829161415c565b602060405180830381855afa15801561269d573d5f5f3e3d5ffd5b5050506040513d601f19601f8201168201806040525081019061107a91906141bd565b804710156127105760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401611a8c565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114612759576040519150601f19603f3d011682016040523d82523d5f602084013e61275e565b606091505b50509050806119f15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401611a8c565b5f5f6128128484808060200260200160405190810160405280939291908181526020018383602002808284375f9201919091525061212f92505050565b5f818152603660209081526040808320815160808101835281546001600160401b038082168352600160401b8204811695830195909552600160801b8104909416928101929092529394509192906060830190600160c01b900460ff16600281111561288057612880613c5b565b600281111561289157612891613c5b565b90525090505f816060015160028111156128ad576128ad613c5b565b146128cb576040516335e09e9d60e01b815260040160405180910390fd5b6001600160401b0380166129108686808060200260200160405190810160405280939291908181526020018383602002808284375f9201919091525061347a92505050565b6001600160401b03160361293757604051631958236d60e21b815260040160405180910390fd5b6001600160401b03801661297c8686808060200260200160405190810160405280939291908181526020018383602002808284375f9201919091525061349e92505050565b6001600160401b0316146129a357604051632eade63760e01b815260040160405180910390fd5b6129ab612cd6565b6129b490614358565b6129ef8686808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152506134b592505050565b1480612a4457506129fe6134c9565b612a0790614358565b612a428686808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152506134b592505050565b145b612a6157604051633772dd5360e11b815260040160405180910390fd5b5f612a9d8686808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152506134e592505050565b9050612ab6612aab8c61221e565b8b88888c8c8f6122f5565b60398054905f612ac58361439f565b9091555050603a545f90600160401b90046001600160401b031615612afc57603a54600160401b90046001600160401b0316612b09565b603a546001600160401b03165b6040805160808101825264ffffffffff8d1681526001600160401b03858116602083015283169181019190915290915060608101600190525f858152603660209081526040918290208351815492850151938501516001600160401b03908116600160801b0267ffffffffffffffff60801b19958216600160401b026001600160801b031990951691909216179290921792831682178155606084015190929091839160ff60c01b1990911668ffffffffffffffffff60801b1990911617600160c01b836002811115612bde57612bde613c5b565b021790555050603d8054849250601390612c09908490600160981b90046001600160401b03166142ef565b92506101000a8154816001600160401b0302191690836001600160401b031602179055507f101790c2993f6a4d962bd17c786126823ba1c4cf04ff4cccb2659d50fb20aee884604051612c5e91815260200190565b60405180910390a1604080518581526001600160401b03838116602083015284168183015290517fcdae700d7241bc027168c53cf6f889763b0a2c88a65d77fc13a8a9fef0d8605f9181900360600190a1612cc6633b9aca006001600160401b0384166140c8565b9c9b505050505050505050505050565b604051606090612cf290600160f81b905f9030906020016143b7565b604051602081830303815290604052905090565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526119f19084906134fc565b5f612d6284613184565b9050612d6f81600361418b565b612d7a9060206140c8565b612d876020840184614072565b905014612da7576040516313717da960e21b815260040160405180910390fd5b6003811b600c17612dfc612dbe6020850185614072565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525088925050863590508461314f565b611d2c576040516309bde33960e01b815260040160405180910390fd5b5f5f5f866020015192505f612e3286895f0151876135cf565b9050836001600160401b0316816001600160401b031614612ea657612e5784826143f5565b60408051873581526001600160401b038a8116602083015284168183015290519194507fcdae700d7241bc027168c53cf6f889763b0a2c88a65d77fc13a8a9fef0d8605f919081900360600190a15b6001600160401b0380821660208a0181905290881660408a01525f03612f245760398054905f612ed583614424565b909155505060026060890152612eea83614439565b6040519092508535906001600160401b038916907f5ce0aa04ae51d52da6e680fbe0336d2e2432f7c3dc2d4f3193204c57b9072107905f90a35b509450945094915050565b8051603c556020810151603d805460408401516060850151608086015162ffffff9095166affffffffffffffffffffff19909316831763010000006001600160401b0393841602176fffffffffffffffffffffffffffffffff60581b1916600160581b9183169190910267ffffffffffffffff60981b191617600160981b919094160292909217905515612fc05750565b60808101516034545f91612fdc916001600160401b03166142ef565b90505f82606001518360400151612ff3919061430e565b60408401516034805492935090915f906130179084906001600160401b03166142ef565b82546101009290920a6001600160401b03818102199093169183160217909155603a8054600160401b810483166001600160801b03199091161790555f915061306790633b9aca009085166140c8565b90505f61307c633b9aca00600785900b61445e565b603a546040518281529192506001600160401b0316907f525408c201bc1576eb44116f6478f1c2a54775b19a043bcfdc708364f74f8e449060200160405180910390a260335460405163a1ca780b60e01b81526001600160a01b03918216600482015260248101849052604481018390527f00000000000000000000000000000000000000000000000000000000000000009091169063a1ca780b906064015f604051808303815f87803b158015613132575f5ffd5b505af1158015613144573d5f5f3e3d5ffd5b505050505050505050565b5f8361316e576040516329e7276760e11b815260040160405180910390fd5b8361317a8685856136ad565b1495945050505050565b5f8082600181111561319857613198613c5b565b146131a457600661107a565b600592915050565b5f60018251116131cf5760405163f8ef036760e01b815260040160405180910390fd5b6131d982516137a0565b6131f65760405163f6558f5160e01b815260040160405180910390fd5b5f60028351613205919061428c565b90505f816001600160401b0381111561322057613220613e09565b604051908082528060200260200182016040528015613249578160200160208202803683370190505b5090505f5b828110156133435760028561326383836140c8565b81518110613273576132736140f2565b60200260200101518683600261328991906140c8565b61329490600161418b565b815181106132a4576132a46140f2565b60200260200101516040516020016132c6929190918252602082015260400190565b60408051601f19818403018152908290526132e09161415c565b602060405180830381855afa1580156132fb573d5f5f3e3d5ffd5b5050506040513d601f19601f8201168201806040525081019061331e91906141bd565b828281518110613330576133306140f2565b602090810291909101015260010161324e565b505b816001146134575761335860028361428c565b91505f5b828110156134515760028261337183836140c8565b81518110613381576133816140f2565b60200260200101518383600261339791906140c8565b6133a290600161418b565b815181106133b2576133b26140f2565b60200260200101516040516020016133d4929190918252602082015260400190565b60408051601f19818403018152908290526133ee9161415c565b602060405180830381855afa158015613409573d5f5f3e3d5ffd5b5050506040513d601f19601f8201168201806040525081019061342c91906141bd565b82828151811061343e5761343e6140f2565b602090810291909101015260010161335c565b50613345565b805f81518110613469576134696140f2565b602002602001015192505050919050565b5f61107a82600581518110613491576134916140f2565b60200260200101516137bf565b5f61107a82600681518110613491576134916140f2565b5f81600181518110612142576121426140f2565b604051606090612cf290600160f91b905f9030906020016143b7565b5f61107a82600281518110613491576134916140f2565b5f613550826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166138269092919063ffffffff16565b905080515f14806135705750808060200190518101906135709190614012565b6119f15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401611a8c565b5f6135dc6026600161418b565b6135e79060206140c8565b6135f46040840184614072565b905014613614576040516313717da960e21b815260040160405180910390fd5b5f61362060048561448d565b64ffffffffff1690506136796136396040850185614072565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250899250505060208601358461314f565b613696576040516309bde33960e01b815260040160405180910390fd5b6136a4836020013585613834565b95945050505050565b5f83515f141580156136ca5750602084516136c891906144b6565b155b6136e7576040516313717da960e21b815260040160405180910390fd5b604080516020808201909252848152905b855181116137775761370b6002856144b6565b5f0361373d5781515f528086015160205260208260405f60026107d05a03fa613732575f5ffd5b600284049350613765565b808601515f52815160205260208260405f60026107d05a03fa61375e575f5ffd5b6002840493505b61377060208261418b565b90506136f8565b508215613797576040516363df817160e01b815260040160405180910390fd5b51949350505050565b5f811580159061107a57506137b66001836140df565b82161592915050565b60f881901c60e882901c61ff00161760d882901c62ff0000161760c882901c63ff000000161764ff0000000060b883901c161765ff000000000060a883901c161766ff000000000000609883901c161767ff0000000000000060889290921c919091161790565b606061148e84845f85613860565b5f806138416004846144c9565b61384c9060406144f2565b64ffffffffff16905061148e84821b6137bf565b6060824710156138c15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401611a8c565b5f5f866001600160a01b031685876040516138dc919061415c565b5f6040518083038185875af1925050503d805f8114613916576040519150601f19603f3d011682016040523d82523d5f602084013e61391b565b606091505b509150915061392c87838387613937565b979650505050505050565b606083156139a55782515f0361399e576001600160a01b0385163b61399e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611a8c565b508161148e565b61148e83838151156139ba5781518083602001fd5b8060405162461bcd60e51b8152600401611a8c9190614512565b6001600160401b03811681146139e8575f5ffd5b50565b5f604082840312156139fb575f5ffd5b50919050565b5f5f5f60608486031215613a13575f5ffd5b8335613a1e816139d4565b925060208401356001600160401b03811115613a38575f5ffd5b613a44868287016139eb565b92505060408401356001600160401b03811115613a5f575f5ffd5b613a6b868287016139eb565b9150509250925092565b5f5f83601f840112613a85575f5ffd5b5081356001600160401b03811115613a9b575f5ffd5b6020830191508360208260051b8501011115613ab5575f5ffd5b9250929050565b5f5f60208385031215613acd575f5ffd5b82356001600160401b03811115613ae2575f5ffd5b613aee85828601613a75565b90969095509350505050565b5f5f5f5f5f5f5f5f60a0898b031215613b11575f5ffd5b8835613b1c816139d4565b975060208901356001600160401b03811115613b36575f5ffd5b613b428b828c016139eb565b97505060408901356001600160401b03811115613b5d575f5ffd5b613b698b828c01613a75565b90975095505060608901356001600160401b03811115613b87575f5ffd5b613b938b828c01613a75565b90955093505060808901356001600160401b03811115613bb1575f5ffd5b613bbd8b828c01613a75565b999c989b5096995094979396929594505050565b5f60208284031215613be1575f5ffd5b81356122ee816139d4565b5f5f83601f840112613bfc575f5ffd5b5081356001600160401b03811115613c12575f5ffd5b602083019150836020828501011115613ab5575f5ffd5b5f5f60208385031215613c3a575f5ffd5b82356001600160401b03811115613c4f575f5ffd5b613aee85828601613bec565b634e487b7160e01b5f52602160045260245ffd5b60038110613c8b57634e487b7160e01b5f52602160045260245ffd5b9052565b6020810161107a8284613c6f565b5f60208284031215613cad575f5ffd5b5035919050565b5f6080820190506001600160401b0383511682526001600160401b0360208401511660208301526001600160401b0360408401511660408301526060830151613d006060840182613c6f565b5092915050565b80151581146139e8575f5ffd5b5f60208284031215613d24575f5ffd5b81356122ee81613d07565b5f5f5f5f5f60608688031215613d43575f5ffd5b85356001600160401b03811115613d58575f5ffd5b613d6488828901613bec565b90965094505060208601356001600160401b03811115613d82575f5ffd5b613d8e88828901613bec565b96999598509660400135949350505050565b6001600160a01b03811681146139e8575f5ffd5b8035613dbf81613da0565b919050565b5f5f60408385031215613dd5575f5ffd5b8235613de081613da0565b946020939093013593505050565b5f60208284031215613dfe575f5ffd5b81356122ee81613da0565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b0381118282101715613e4557613e45613e09565b604052919050565b5f6001600160401b03821115613e6557613e65613e09565b5060051b60200190565b5f82601f830112613e7e575f5ffd5b8135613e91613e8c82613e4d565b613e1d565b8082825260208201915060208360051b860101925085831115613eb2575f5ffd5b602085015b83811015613ecf578035835260209283019201613eb7565b5095945050505050565b5f5f5f60608486031215613eeb575f5ffd5b83356001600160401b03811115613f00575f5ffd5b8401601f81018613613f10575f5ffd5b8035613f1e613e8c82613e4d565b8082825260208201915060208360051b850101925088831115613f3f575f5ffd5b6020840193505b82841015613f6a578335613f5981613da0565b825260209384019390910190613f46565b955050505060208401356001600160401b03811115613f87575f5ffd5b613f9386828701613e6f565b925050613fa260408501613db4565b90509250925092565b5f5f5f60408486031215613fbd575f5ffd5b83356001600160401b03811115613fd2575f5ffd5b613fde868287016139eb565b93505060208401356001600160401b03811115613ff9575f5ffd5b61400586828701613a75565b9497909650939450505050565b5f60208284031215614022575f5ffd5b81516122ee81613d07565b5f5f8335601e19843603018112614042575f5ffd5b8301803591506001600160401b0382111561405b575f5ffd5b6020019150600581901b3603821315613ab5575f5ffd5b5f5f8335601e19843603018112614087575f5ffd5b8301803591506001600160401b038211156140a0575f5ffd5b602001915036819003821315613ab5575f5ffd5b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761107a5761107a6140b4565b8181038181111561107a5761107a6140b4565b634e487b7160e01b5f52603260045260245ffd5b5f8235603e1983360301811261411a575f5ffd5b9190910192915050565b8284823760c09190911b6001600160c01b0319169101908152600801919050565b5f81518060208401855e5f93019283525090919050565b5f6122ee8284614145565b5f60208284031215614177575f5ffd5b813564ffffffffff811681146122ee575f5ffd5b8082018082111561107a5761107a6140b4565b838582375f8482015f8152838582375f93019283525090949350505050565b5f602082840312156141cd575f5ffd5b5051919050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b608081525f61423d60808301888a6141d4565b828103602084015261424f81886141fc565b905082810360408401526142648186886141d4565b915050826060830152979650505050505050565b634e487b7160e01b5f52601260045260245ffd5b5f8261429a5761429a614278565b500490565b6001600160401b03828116828216039081111561107a5761107a6140b4565b5f8235605e1983360301811261411a575f5ffd5b5f62ffffff8216806142e6576142e66140b4565b5f190192915050565b6001600160401b03818116838216019081111561107a5761107a6140b4565b600781810b9083900b01677fffffffffffffff8113677fffffffffffffff198212171561107a5761107a6140b4565b5f6020828403121561434d575f5ffd5b81516122ee816139d4565b805160208083015191908110156139fb575f1960209190910360031b1b16919050565b5f6143868285614145565b6001600160801b03199390931683525050601001919050565b5f600182016143b0576143b06140b4565b5060010190565b6001600160f81b03199390931683526001600160a81b031991909116600183015260601b6bffffffffffffffffffffffff1916600c82015260200190565b600782810b9082900b03677fffffffffffffff198112677fffffffffffffff8213171561107a5761107a6140b4565b5f81614432576144326140b4565b505f190190565b5f8160070b677fffffffffffffff198103614456576144566140b4565b5f0392915050565b8082025f8212600160ff1b84141615614479576144796140b4565b818105831482151761107a5761107a6140b4565b5f64ffffffffff8316806144a3576144a3614278565b8064ffffffffff84160491505092915050565b5f826144c4576144c4614278565b500690565b5f64ffffffffff8316806144df576144df614278565b8064ffffffffff84160691505092915050565b64ffffffffff8181168382160290811690818114613d0057613d006140b4565b602081525f6122ee60208301846141fc56fea2646970667358221220a84f22428cb25b584710c1cde5c652669e817ac9b977264e9f674941c3eacf3d64736f6c634300081e0033", } // EigenPodABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/EigenPodManager/binding.go b/pkg/bindings/EigenPodManager/binding.go index 360bfb0ffa..96e7f1efd1 100644 --- a/pkg/bindings/EigenPodManager/binding.go +++ b/pkg/bindings/EigenPodManager/binding.go @@ -38,7 +38,7 @@ type OperatorSet struct { // EigenPodManagerMetaData contains all meta data concerning the EigenPodManager contract. var EigenPodManagerMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_ethPOS\",\"type\":\"address\",\"internalType\":\"contractIETHPOSDeposit\"},{\"name\":\"_eigenPodBeacon\",\"type\":\"address\",\"internalType\":\"contractIBeacon\"},{\"name\":\"_delegationManager\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"beaconChainETHStrategy\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"beaconChainSlashingFactor\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"burnableETHShares\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"createPod\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"eigenPodBeacon\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIBeacon\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ethPOS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIETHPOSDeposit\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPod\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenPod\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"hasPod\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"increaseBurnOrRedistributableShares\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"addedSharesToBurn\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_initPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"numPods\",\"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\":\"ownerToPod\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenPod\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pectraForkTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"podOwnerDepositShares\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"shares\",\"type\":\"int256\",\"internalType\":\"int256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proofTimestampSetter\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"recordBeaconChainETHBalanceUpdate\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"prevRestakedBalanceWei\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"balanceDeltaWei\",\"type\":\"int256\",\"internalType\":\"int256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeDepositShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"depositSharesToRemove\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setPectraForkTimestamp\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setProofTimestampSetter\",\"inputs\":[{\"name\":\"newProofTimestampSetter\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"stake\",\"inputs\":[{\"name\":\"pubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"depositDataRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"stakerDepositShares\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"depositShares\",\"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\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawSharesAsTokens\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"BeaconChainETHDeposited\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BeaconChainETHWithdrawalCompleted\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"delegatedAddress\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"withdrawer\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"withdrawalRoot\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BeaconChainSlashingFactorDecreased\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"prevBeaconChainSlashingFactor\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"newBeaconChainSlashingFactor\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BurnableETHSharesIncreased\",\"inputs\":[{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"NewTotalShares\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newTotalShares\",\"type\":\"int256\",\"indexed\":false,\"internalType\":\"int256\"}],\"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\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PectraForkTimestampSet\",\"inputs\":[{\"name\":\"newPectraForkTimestamp\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PodDeployed\",\"inputs\":[{\"name\":\"eigenPod\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"podOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PodSharesUpdated\",\"inputs\":[{\"name\":\"podOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"sharesDelta\",\"type\":\"int256\",\"indexed\":false,\"internalType\":\"int256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProofTimestampSetterSet\",\"inputs\":[{\"name\":\"newProofTimestampSetter\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"CurrentlyPaused\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EigenPodAlreadyExists\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidNewPausedStatus\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidStrategy\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"LegacyWithdrawalsNotCompleted\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyDelegationManager\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyEigenPod\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyPauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyProofTimestampSetter\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyUnpauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SharesNegative\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SharesNotMultipleOfGwei\",\"inputs\":[]}]", - Bin: "0x610100604052348015610010575f5ffd5b50604051612ca0380380612ca083398101604081905261002f9161015c565b838383836001600160a01b03811661005a576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b0390811660805292831660a05290821660c0521660e052610080610089565b505050506101b8565b5f54610100900460ff16156100f45760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610143575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610159575f5ffd5b50565b5f5f5f5f6080858703121561016f575f5ffd5b845161017a81610145565b602086015190945061018b81610145565b604086015190935061019c81610145565b60608601519092506101ad81610145565b939692955090935050565b60805160a05160c05160e051612a6f6102315f395f81816105e00152818161074f015281816109a801528181610a4e01528181610ba901528181610f260152610fdb01525f81816102800152818161107101526117ce01525f61041f01525f81816104660152818161143901526119eb0152612a6f5ff3fe6080604052600436106101e6575f3560e01c8063886f119511610108578063a6a509be1161009d578063f2fde38b1161006d578063f2fde38b14610602578063f5d4fed314610621578063f6848d2414610636578063fabc1cbc1461066f578063fe243a171461068e575f5ffd5b8063a6a509be14610570578063cd6dc68714610585578063d48e8894146105a4578063ea4d3c9b146105cf575f5ffd5b80639ba06275116100d85780639ba06275146104df578063a1ca780b14610513578063a38406a314610532578063a3d75e0914610551575f5ffd5b8063886f1195146104555780638da5cb5b146104885780639104c319146104a55780639b4e4634146104cc575f5ffd5b8063595edbcb1161017e578063715018a61161014e578063715018a6146103db578063724af423146103ef57806374cdd7981461040e57806384d8106214610441575f5ffd5b8063595edbcb146103405780635a26fbf41461035f5780635ac86ab71461037e5780635c975abb146103bd575f5ffd5b80632eae418c116101b95780632eae418c146102ba5780633fb99ca5146102d957806350ff7225146102f8578063595c6a671461032c575f5ffd5b80630d1e9de1146101ea578063136439dd1461020b5780632704351a1461022a578063292b7b2b1461026f575b5f5ffd5b3480156101f5575f5ffd5b50610209610204366004611cbe565b6106ad565b005b348015610216575f5ffd5b50610209610225366004611cd9565b61070a565b348015610235575f5ffd5b50609f5461025190600160a01b900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561027a575f5ffd5b506102a27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610266565b3480156102c5575f5ffd5b506102096102d4366004611cf0565b610744565b3480156102e4575f5ffd5b506102096102f3366004611d3e565b61099d565b348015610303575f5ffd5b50610317610312366004611d88565b610a41565b60408051928352602083019190915201610266565b348015610337575f5ffd5b50610209610af1565b34801561034b575f5ffd5b50609f546102a2906001600160a01b031681565b34801561036a575f5ffd5b50610209610379366004611dc6565b610b05565b348015610389575f5ffd5b506103ad610398366004611ded565b606654600160ff9092169190911b9081161490565b6040519015158152602001610266565b3480156103c8575f5ffd5b506066545b604051908152602001610266565b3480156103e6575f5ffd5b50610209610b8c565b3480156103fa575f5ffd5b506103cd610409366004611d88565b610b9d565b348015610419575f5ffd5b506102a27f000000000000000000000000000000000000000000000000000000000000000081565b34801561044c575f5ffd5b506102a2610ce2565b348015610460575f5ffd5b506102a27f000000000000000000000000000000000000000000000000000000000000000081565b348015610493575f5ffd5b506033546001600160a01b03166102a2565b3480156104b0575f5ffd5b506102a273beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac081565b6102096104da366004611e4b565b610d45565b3480156104ea575f5ffd5b506102a26104f9366004611cbe565b60986020525f90815260409020546001600160a01b031681565b34801561051e575f5ffd5b5061020961052d366004611ebe565b610df6565b34801561053d575f5ffd5b506102a261054c366004611cbe565b611017565b34801561055c575f5ffd5b5061025161056b366004611cbe565b6110e8565b34801561057b575f5ffd5b506103cd60995481565b348015610590575f5ffd5b5061020961059f366004611ef0565b611148565b3480156105af575f5ffd5b506103cd6105be366004611cbe565b609b6020525f908152604090205481565b3480156105da575f5ffd5b506102a27f000000000000000000000000000000000000000000000000000000000000000081565b34801561060d575f5ffd5b5061020961061c366004611cbe565b611264565b34801561062c575f5ffd5b506103cd609e5481565b348015610641575f5ffd5b506103ad610650366004611cbe565b6001600160a01b039081165f9081526098602052604090205416151590565b34801561067a575f5ffd5b50610209610689366004611cd9565b6112dd565b348015610699575f5ffd5b506103cd6106a8366004611f1a565b61134a565b6106b56113ca565b609f80546001600160a01b0319166001600160a01b0383169081179091556040519081527f7025c71a9fe60d709e71b377dc5f7c72c3e1d8539f8022574254e736ceca01e5906020015b60405180910390a150565b610712611424565b60665481811681146107375760405163c61dca5d60e01b815260040160405180910390fd5b610740826114c7565b5050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461078d5760405163f739589b60e01b815260040160405180910390fd5b610795611504565b6001600160a01b03831673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac0146107d257604051632711b74d60e11b815260040160405180910390fd5b6001600160a01b0384166107f9576040516339b190bb60e11b815260040160405180910390fd5b5f81136108195760405163ef147de160e01b815260040160405180910390fd5b6001600160a01b0384165f908152609b6020526040812054908290821215610913575f61084583611f65565b90505f8185111561086357508061085c8186611f7f565b9250610869565b505f9150835b5f6108748286611f92565b6001600160a01b038a165f818152609b60205260409081902083905551919250907f4e2b791dedccd9fb30141b088cabf5c14a8912b52f59375c95c010700b8c6193906108c49085815260200190565b60405180910390a2886001600160a01b03167fd4def76d6d2bed6f14d5cd9af73cc2913d618d00edde42432e81c09bfe0770988260405161090791815260200190565b60405180910390a25050505b801561098b576001600160a01b038681165f81815260986020526040908190205490516362483a2160e11b81526004810192909252602482018490529091169063c4907442906044015b5f604051808303815f87803b158015610974575f5ffd5b505af1158015610986573d5f5f3e3d5ffd5b505050505b5050610997600160c955565b50505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109e65760405163f739589b60e01b815260040160405180910390fd5b6109ee611504565b80609e5f8282546109ff9190611fb9565b90915550506040518181527f1ed04b7fd262c0d9e50fa02957f32a81a151f03baaa367faeedc7521b001c4a49060200160405180910390a1610997600160c955565b5f80336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a8c5760405163f739589b60e01b815260040160405180910390fd5b610a94611504565b6001600160a01b03841673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac014610ad157604051632711b74d60e11b815260040160405180910390fd5b610adb858461155d565b91509150610ae9600160c955565b935093915050565b610af9611424565b610b035f196114c7565b565b609f546001600160a01b03163314610b3057604051630986113760e41b815260040160405180910390fd5b609f805467ffffffffffffffff60a01b1916600160a01b67ffffffffffffffff8416908102919091179091556040519081527f1bc8f042a52db3a437620dea4548f2031fb2a16dd8d3b0b854295528dd2cdd33906020016106ff565b610b946113ca565b610b035f6116a4565b5f336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610be75760405163f739589b60e01b815260040160405180910390fd5b610bef611504565b6001600160a01b03831673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac014610c2c57604051632711b74d60e11b815260040160405180910390fd5b5f610c36836116f5565b6001600160a01b0386165f908152609b6020526040902054610c589190611fcc565b90505f811215610c7b5760405163ef147de160e01b815260040160405180910390fd5b6001600160a01b0385165f818152609b602052604090819020839055517fd4def76d6d2bed6f14d5cd9af73cc2913d618d00edde42432e81c09bfe07709890610cc79084815260200190565b60405180910390a29050610cdb600160c955565b9392505050565b5f5f610ced8161175e565b610cf5611504565b335f908152609860205260409020546001600160a01b031615610d2b5760405163031a852160e21b815260040160405180910390fd5b5f610d34611789565b925050610d41600160c955565b5090565b5f610d4f8161175e565b610d57611504565b335f908152609860205260409020546001600160a01b031680610d7f57610d7c611789565b90505b6040516326d3918d60e21b81526001600160a01b03821690639b4e4634903490610db5908b908b908b908b908b9060040161201a565b5f604051808303818588803b158015610dcc575f5ffd5b505af1158015610dde573d5f5f3e3d5ffd5b505050505050610dee600160c955565b505050505050565b6001600160a01b038084165f908152609860205260409020548491163314610e31576040516312e16d7160e11b815260040160405180910390fd5b610e39611504565b6001600160a01b038416610e60576040516339b190bb60e11b815260040160405180910390fd5b610e6e633b9aca0083612067565b15610e8c576040516347d072bb60e11b815260040160405180910390fd5b6001600160a01b0384165f908152609b602052604081205490811215610ec557604051634b692bcf60e01b815260040160405180910390fd5b5f831315610f86575f5f610ed9878661155d565b604051631e328e7960e11b81526001600160a01b038a8116600483015273beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac0602483015260448201849052606482018390529294509092507f000000000000000000000000000000000000000000000000000000000000000090911690633c651cf2906084015f604051808303815f87803b158015610f69575f5ffd5b505af1158015610f7b573d5f5f3e3d5ffd5b50505050505061100c565b5f83121561100c575f610fa28686610f9d87611f65565b6118e4565b60405163305068e760e11b81526001600160a01b0388811660048301526024820185905267ffffffffffffffff831660448301529192507f0000000000000000000000000000000000000000000000000000000000000000909116906360a0d1ce9060640161095d565b50610997600160c955565b6001600160a01b038082165f90815260986020526040812054909116806110e2576110df836001600160a01b03165f1b60405180610940016040528061090e815260200161212c61090e9139604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166020820152808201919091525f606082015260800160408051601f19818403018152908290526110c4929160200161209d565b604051602081830303815290604052805190602001206119dd565b90505b92915050565b6001600160a01b0381165f908152609d6020908152604080832081518083019092525460ff8116151580835261010090910467ffffffffffffffff16928201929092529061113e57670de0b6b3a7640000610cdb565b6020015192915050565b5f54610100900460ff161580801561116657505f54600160ff909116105b8061117f5750303b15801561117f57505f5460ff166001145b6111e75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff191660011790558015611208575f805461ff0019166101001790555b611211836116a4565b61121a826114c7565b801561125f575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b61126c6113ca565b6001600160a01b0381166112d15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016111de565b6112da816116a4565b50565b6112e56119e9565b6066548019821981161461130c5760405163c61dca5d60e01b815260040160405180910390fd5b606682905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b5f6001600160a01b03821673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac01461138857604051632711b74d60e11b815260040160405180910390fd5b6001600160a01b0383165f908152609b6020526040812054126113c2576001600160a01b0383165f908152609b60205260409020546110df565b505f92915050565b6033546001600160a01b03163314610b035760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016111de565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa158015611486573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114aa91906120b9565b610b0357604051631d77d47760e21b815260040160405180910390fd5b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b600260c954036115565760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016111de565b600260c955565b5f806001600160a01b038416611586576040516339b190bb60e11b815260040160405180910390fd5b5f8312156115a75760405163ef147de160e01b815260040160405180910390fd5b6001600160a01b0384165f908152609b602052604081205484916115cb8383611f92565b6001600160a01b0388165f818152609b60205260409081902083905551919250907f4e2b791dedccd9fb30141b088cabf5c14a8912b52f59375c95c010700b8c61939061161b9086815260200190565b60405180910390a2866001600160a01b03167fd4def76d6d2bed6f14d5cd9af73cc2913d618d00edde42432e81c09bfe0770988260405161165e91815260200190565b60405180910390a25f811361167b575f5f9450945050505061169d565b5f821215611690575f9450925061169d915050565b50925083915061169d9050565b9250929050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f6001600160ff1b03821115610d415760405162461bcd60e51b815260206004820152602860248201527f53616665436173743a2076616c756520646f65736e27742066697420696e2061604482015267371034b73a191a9b60c11b60648201526084016111de565b606654600160ff83161b908116036112da5760405163840a48d560e01b815260040160405180910390fd5b5f60995f8154611798906120d8565b9091555060408051610940810190915261090e8082525f91611835918391339161212c6020830139604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166020820152808201919091525f606082015260800160408051601f1981840301815290829052611821929160200161209d565b604051602081830303815290604052611a9a565b60405163189acdbd60e31b81523360048201529091506001600160a01b0382169063c4d66de8906024015f604051808303815f87803b158015611876575f5ffd5b505af1158015611888573d5f5f3e3d5ffd5b5050335f8181526098602052604080822080546001600160a01b0319166001600160a01b038816908117909155905192945092507f21c99d0db02213c32fff5b05cf0a718ab5f858802b91498f80d82270289d856a91a3919050565b5f806118f08385611f7f565b90505f6118fc866110e8565b90505f61191467ffffffffffffffff83168488611b9c565b90505f61192182846120f0565b6040805180820182526001815267ffffffffffffffff85811660208084018281526001600160a01b038f165f818152609d845287902095518654925168ffffffffffffffffff1990931690151568ffffffffffffffff001916176101009286169290920291909117909455845193845291881691830191909152918101919091529091507fb160ab8589bf47dc04ea11b50d46678d21590cea2ed3e454e7bd3e41510f98cf9060600160405180910390a1979650505050505050565b5f6110df838330611c81565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a45573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a699190612110565b6001600160a01b0316336001600160a01b031614610b035760405163794821ff60e01b815260040160405180910390fd5b5f83471015611aeb5760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e636500000060448201526064016111de565b81515f03611b3b5760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f60448201526064016111de565b8282516020840186f590506001600160a01b038116610cdb5760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f790000000000000060448201526064016111de565b5f80805f19858709858702925082811083820303915050805f03611bd357838281611bc957611bc9612053565b0492505050610cdb565b808411611c1a5760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b60448201526064016111de565b5f8486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091025f889003889004909101858311909403939093029303949094049190911702949350505050565b5f604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b6001600160a01b03811681146112da575f5ffd5b5f60208284031215611cce575f5ffd5b8135610cdb81611caa565b5f60208284031215611ce9575f5ffd5b5035919050565b5f5f5f5f60808587031215611d03575f5ffd5b8435611d0e81611caa565b93506020850135611d1e81611caa565b92506040850135611d2e81611caa565b9396929550929360600135925050565b5f5f5f5f84860360a0811215611d52575f5ffd5b6040811215611d5f575f5ffd5b50849350604084013592506060840135611d7881611caa565b9396929550929360800135925050565b5f5f5f60608486031215611d9a575f5ffd5b8335611da581611caa565b92506020840135611db581611caa565b929592945050506040919091013590565b5f60208284031215611dd6575f5ffd5b813567ffffffffffffffff81168114610cdb575f5ffd5b5f60208284031215611dfd575f5ffd5b813560ff81168114610cdb575f5ffd5b5f5f83601f840112611e1d575f5ffd5b50813567ffffffffffffffff811115611e34575f5ffd5b60208301915083602082850101111561169d575f5ffd5b5f5f5f5f5f60608688031215611e5f575f5ffd5b853567ffffffffffffffff811115611e75575f5ffd5b611e8188828901611e0d565b909650945050602086013567ffffffffffffffff811115611ea0575f5ffd5b611eac88828901611e0d565b96999598509660400135949350505050565b5f5f5f60608486031215611ed0575f5ffd5b8335611edb81611caa565b95602085013595506040909401359392505050565b5f5f60408385031215611f01575f5ffd5b8235611f0c81611caa565b946020939093013593505050565b5f5f60408385031215611f2b575f5ffd5b8235611f3681611caa565b91506020830135611f4681611caa565b809150509250929050565b634e487b7160e01b5f52601160045260245ffd5b5f600160ff1b8201611f7957611f79611f51565b505f0390565b818103818111156110e2576110e2611f51565b8082018281125f831280158216821582161715611fb157611fb1611f51565b505092915050565b808201808211156110e2576110e2611f51565b8181035f831280158383131683831282161715611feb57611feb611f51565b5092915050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b606081525f61202d606083018789611ff2565b8281036020840152612040818688611ff2565b9150508260408301529695505050505050565b634e487b7160e01b5f52601260045260245ffd5b5f8261208157634e487b7160e01b5f52601260045260245ffd5b500790565b5f81518060208401855e5f93019283525090919050565b5f6120b16120ab8386612086565b84612086565b949350505050565b5f602082840312156120c9575f5ffd5b81518015158114610cdb575f5ffd5b5f600182016120e9576120e9611f51565b5060010190565b67ffffffffffffffff82811682821603908111156110e2576110e2611f51565b5f60208284031215612120575f5ffd5b8151610cdb81611caa56fe608060405260405161090e38038061090e83398101604081905261002291610460565b61002e82826000610035565b505061058a565b61003e83610100565b6040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a260008251118061007f5750805b156100fb576100f9836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e99190610520565b836102a360201b6100291760201c565b505b505050565b610113816102cf60201b6100551760201c565b6101725760405162461bcd60e51b815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e6044820152641d1c9858dd60da1b60648201526084015b60405180910390fd5b6101e6816001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d79190610520565b6102cf60201b6100551760201c565b61024b5760405162461bcd60e51b815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201526f1cc81b9bdd08184818dbdb9d1c9858dd60821b6064820152608401610169565b806102827fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5060001b6102de60201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606102c883836040518060600160405280602781526020016108e7602791396102e1565b9392505050565b6001600160a01b03163b151590565b90565b6060600080856001600160a01b0316856040516102fe919061053b565b600060405180830381855af49150503d8060008114610339576040519150601f19603f3d011682016040523d82523d6000602084013e61033e565b606091505b5090925090506103508683838761035a565b9695505050505050565b606083156103c65782516103bf576001600160a01b0385163b6103bf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610169565b50816103d0565b6103d083836103d8565b949350505050565b8151156103e85781518083602001fd5b8060405162461bcd60e51b81526004016101699190610557565b80516001600160a01b038116811461041957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561044f578181015183820152602001610437565b838111156100f95750506000910152565b6000806040838503121561047357600080fd5b61047c83610402565b60208401519092506001600160401b038082111561049957600080fd5b818501915085601f8301126104ad57600080fd5b8151818111156104bf576104bf61041e565b604051601f8201601f19908116603f011681019083821181831017156104e7576104e761041e565b8160405282815288602084870101111561050057600080fd5b610511836020830160208801610434565b80955050505050509250929050565b60006020828403121561053257600080fd5b6102c882610402565b6000825161054d818460208701610434565b9190910192915050565b6020815260008251806020840152610576816040850160208701610434565b601f01601f19169190910160400192915050565b61034e806105996000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b610100565b565b606061004e83836040518060600160405280602781526020016102f260279139610124565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546001600160a01b031690565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fb9190610249565b905090565b3660008037600080366000845af43d6000803e80801561011f573d6000f35b3d6000fd5b6060600080856001600160a01b03168560405161014191906102a2565b600060405180830381855af49150503d806000811461017c576040519150601f19603f3d011682016040523d82523d6000602084013e610181565b606091505b50915091506101928683838761019c565b9695505050505050565b6060831561020d578251610206576001600160a01b0385163b6102065760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b5081610217565b610217838361021f565b949350505050565b81511561022f5781518083602001fd5b8060405162461bcd60e51b81526004016101fd91906102be565b60006020828403121561025b57600080fd5b81516001600160a01b038116811461004e57600080fd5b60005b8381101561028d578181015183820152602001610275565b8381111561029c576000848401525b50505050565b600082516102b4818460208701610272565b9190910192915050565b60208152600082518060208401526102dd816040850160208701610272565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d51e81d3bc5ed20a26aeb05dce7e825c503b2061aa78628027300c8d65b9d89a64736f6c634300080c0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122000d60ff6e6426be33e4cafc68b25827809667f55791b67de15e8ad4e105918cb64736f6c634300081e0033", + Bin: "0x610100604052348015610010575f5ffd5b50604051612ca0380380612ca083398101604081905261002f9161015c565b838383836001600160a01b03811661005a576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b0390811660805292831660a05290821660c0521660e052610080610089565b505050506101b8565b5f54610100900460ff16156100f45760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610143575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610159575f5ffd5b50565b5f5f5f5f6080858703121561016f575f5ffd5b845161017a81610145565b602086015190945061018b81610145565b604086015190935061019c81610145565b60608601519092506101ad81610145565b939692955090935050565b60805160a05160c05160e051612a6f6102315f395f81816105e00152818161074f015281816109a801528181610a4e01528181610ba901528181610f260152610fdb01525f81816102800152818161107101526117ce01525f61041f01525f81816104660152818161143901526119eb0152612a6f5ff3fe6080604052600436106101e6575f3560e01c8063886f119511610108578063a6a509be1161009d578063f2fde38b1161006d578063f2fde38b14610602578063f5d4fed314610621578063f6848d2414610636578063fabc1cbc1461066f578063fe243a171461068e575f5ffd5b8063a6a509be14610570578063cd6dc68714610585578063d48e8894146105a4578063ea4d3c9b146105cf575f5ffd5b80639ba06275116100d85780639ba06275146104df578063a1ca780b14610513578063a38406a314610532578063a3d75e0914610551575f5ffd5b8063886f1195146104555780638da5cb5b146104885780639104c319146104a55780639b4e4634146104cc575f5ffd5b8063595edbcb1161017e578063715018a61161014e578063715018a6146103db578063724af423146103ef57806374cdd7981461040e57806384d8106214610441575f5ffd5b8063595edbcb146103405780635a26fbf41461035f5780635ac86ab71461037e5780635c975abb146103bd575f5ffd5b80632eae418c116101b95780632eae418c146102ba5780633fb99ca5146102d957806350ff7225146102f8578063595c6a671461032c575f5ffd5b80630d1e9de1146101ea578063136439dd1461020b5780632704351a1461022a578063292b7b2b1461026f575b5f5ffd5b3480156101f5575f5ffd5b50610209610204366004611cbe565b6106ad565b005b348015610216575f5ffd5b50610209610225366004611cd9565b61070a565b348015610235575f5ffd5b50609f5461025190600160a01b900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561027a575f5ffd5b506102a27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610266565b3480156102c5575f5ffd5b506102096102d4366004611cf0565b610744565b3480156102e4575f5ffd5b506102096102f3366004611d3e565b61099d565b348015610303575f5ffd5b50610317610312366004611d88565b610a41565b60408051928352602083019190915201610266565b348015610337575f5ffd5b50610209610af1565b34801561034b575f5ffd5b50609f546102a2906001600160a01b031681565b34801561036a575f5ffd5b50610209610379366004611dc6565b610b05565b348015610389575f5ffd5b506103ad610398366004611ded565b606654600160ff9092169190911b9081161490565b6040519015158152602001610266565b3480156103c8575f5ffd5b506066545b604051908152602001610266565b3480156103e6575f5ffd5b50610209610b8c565b3480156103fa575f5ffd5b506103cd610409366004611d88565b610b9d565b348015610419575f5ffd5b506102a27f000000000000000000000000000000000000000000000000000000000000000081565b34801561044c575f5ffd5b506102a2610ce2565b348015610460575f5ffd5b506102a27f000000000000000000000000000000000000000000000000000000000000000081565b348015610493575f5ffd5b506033546001600160a01b03166102a2565b3480156104b0575f5ffd5b506102a273beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac081565b6102096104da366004611e4b565b610d45565b3480156104ea575f5ffd5b506102a26104f9366004611cbe565b60986020525f90815260409020546001600160a01b031681565b34801561051e575f5ffd5b5061020961052d366004611ebe565b610df6565b34801561053d575f5ffd5b506102a261054c366004611cbe565b611017565b34801561055c575f5ffd5b5061025161056b366004611cbe565b6110e8565b34801561057b575f5ffd5b506103cd60995481565b348015610590575f5ffd5b5061020961059f366004611ef0565b611148565b3480156105af575f5ffd5b506103cd6105be366004611cbe565b609b6020525f908152604090205481565b3480156105da575f5ffd5b506102a27f000000000000000000000000000000000000000000000000000000000000000081565b34801561060d575f5ffd5b5061020961061c366004611cbe565b611264565b34801561062c575f5ffd5b506103cd609e5481565b348015610641575f5ffd5b506103ad610650366004611cbe565b6001600160a01b039081165f9081526098602052604090205416151590565b34801561067a575f5ffd5b50610209610689366004611cd9565b6112dd565b348015610699575f5ffd5b506103cd6106a8366004611f1a565b61134a565b6106b56113ca565b609f80546001600160a01b0319166001600160a01b0383169081179091556040519081527f7025c71a9fe60d709e71b377dc5f7c72c3e1d8539f8022574254e736ceca01e5906020015b60405180910390a150565b610712611424565b60665481811681146107375760405163c61dca5d60e01b815260040160405180910390fd5b610740826114c7565b5050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461078d5760405163f739589b60e01b815260040160405180910390fd5b610795611504565b6001600160a01b03831673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac0146107d257604051632711b74d60e11b815260040160405180910390fd5b6001600160a01b0384166107f9576040516339b190bb60e11b815260040160405180910390fd5b5f81136108195760405163ef147de160e01b815260040160405180910390fd5b6001600160a01b0384165f908152609b6020526040812054908290821215610913575f61084583611f65565b90505f8185111561086357508061085c8186611f7f565b9250610869565b505f9150835b5f6108748286611f92565b6001600160a01b038a165f818152609b60205260409081902083905551919250907f4e2b791dedccd9fb30141b088cabf5c14a8912b52f59375c95c010700b8c6193906108c49085815260200190565b60405180910390a2886001600160a01b03167fd4def76d6d2bed6f14d5cd9af73cc2913d618d00edde42432e81c09bfe0770988260405161090791815260200190565b60405180910390a25050505b801561098b576001600160a01b038681165f81815260986020526040908190205490516362483a2160e11b81526004810192909252602482018490529091169063c4907442906044015b5f604051808303815f87803b158015610974575f5ffd5b505af1158015610986573d5f5f3e3d5ffd5b505050505b5050610997600160c955565b50505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109e65760405163f739589b60e01b815260040160405180910390fd5b6109ee611504565b80609e5f8282546109ff9190611fb9565b90915550506040518181527f1ed04b7fd262c0d9e50fa02957f32a81a151f03baaa367faeedc7521b001c4a49060200160405180910390a1610997600160c955565b5f80336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a8c5760405163f739589b60e01b815260040160405180910390fd5b610a94611504565b6001600160a01b03841673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac014610ad157604051632711b74d60e11b815260040160405180910390fd5b610adb858461155d565b91509150610ae9600160c955565b935093915050565b610af9611424565b610b035f196114c7565b565b609f546001600160a01b03163314610b3057604051630986113760e41b815260040160405180910390fd5b609f805467ffffffffffffffff60a01b1916600160a01b67ffffffffffffffff8416908102919091179091556040519081527f1bc8f042a52db3a437620dea4548f2031fb2a16dd8d3b0b854295528dd2cdd33906020016106ff565b610b946113ca565b610b035f6116a4565b5f336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610be75760405163f739589b60e01b815260040160405180910390fd5b610bef611504565b6001600160a01b03831673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac014610c2c57604051632711b74d60e11b815260040160405180910390fd5b5f610c36836116f5565b6001600160a01b0386165f908152609b6020526040902054610c589190611fcc565b90505f811215610c7b5760405163ef147de160e01b815260040160405180910390fd5b6001600160a01b0385165f818152609b602052604090819020839055517fd4def76d6d2bed6f14d5cd9af73cc2913d618d00edde42432e81c09bfe07709890610cc79084815260200190565b60405180910390a29050610cdb600160c955565b9392505050565b5f5f610ced8161175e565b610cf5611504565b335f908152609860205260409020546001600160a01b031615610d2b5760405163031a852160e21b815260040160405180910390fd5b5f610d34611789565b925050610d41600160c955565b5090565b5f610d4f8161175e565b610d57611504565b335f908152609860205260409020546001600160a01b031680610d7f57610d7c611789565b90505b6040516326d3918d60e21b81526001600160a01b03821690639b4e4634903490610db5908b908b908b908b908b9060040161201a565b5f604051808303818588803b158015610dcc575f5ffd5b505af1158015610dde573d5f5f3e3d5ffd5b505050505050610dee600160c955565b505050505050565b6001600160a01b038084165f908152609860205260409020548491163314610e31576040516312e16d7160e11b815260040160405180910390fd5b610e39611504565b6001600160a01b038416610e60576040516339b190bb60e11b815260040160405180910390fd5b610e6e633b9aca0083612067565b15610e8c576040516347d072bb60e11b815260040160405180910390fd5b6001600160a01b0384165f908152609b602052604081205490811215610ec557604051634b692bcf60e01b815260040160405180910390fd5b5f831315610f86575f5f610ed9878661155d565b604051631e328e7960e11b81526001600160a01b038a8116600483015273beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac0602483015260448201849052606482018390529294509092507f000000000000000000000000000000000000000000000000000000000000000090911690633c651cf2906084015f604051808303815f87803b158015610f69575f5ffd5b505af1158015610f7b573d5f5f3e3d5ffd5b50505050505061100c565b5f83121561100c575f610fa28686610f9d87611f65565b6118e4565b60405163305068e760e11b81526001600160a01b0388811660048301526024820185905267ffffffffffffffff831660448301529192507f0000000000000000000000000000000000000000000000000000000000000000909116906360a0d1ce9060640161095d565b50610997600160c955565b6001600160a01b038082165f90815260986020526040812054909116806110e2576110df836001600160a01b03165f1b60405180610940016040528061090e815260200161212c61090e9139604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166020820152808201919091525f606082015260800160408051601f19818403018152908290526110c4929160200161209d565b604051602081830303815290604052805190602001206119dd565b90505b92915050565b6001600160a01b0381165f908152609d6020908152604080832081518083019092525460ff8116151580835261010090910467ffffffffffffffff16928201929092529061113e57670de0b6b3a7640000610cdb565b6020015192915050565b5f54610100900460ff161580801561116657505f54600160ff909116105b8061117f5750303b15801561117f57505f5460ff166001145b6111e75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff191660011790558015611208575f805461ff0019166101001790555b611211836116a4565b61121a826114c7565b801561125f575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b61126c6113ca565b6001600160a01b0381166112d15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016111de565b6112da816116a4565b50565b6112e56119e9565b6066548019821981161461130c5760405163c61dca5d60e01b815260040160405180910390fd5b606682905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b5f6001600160a01b03821673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac01461138857604051632711b74d60e11b815260040160405180910390fd5b6001600160a01b0383165f908152609b6020526040812054126113c2576001600160a01b0383165f908152609b60205260409020546110df565b505f92915050565b6033546001600160a01b03163314610b035760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016111de565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa158015611486573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114aa91906120b9565b610b0357604051631d77d47760e21b815260040160405180910390fd5b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b600260c954036115565760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016111de565b600260c955565b5f806001600160a01b038416611586576040516339b190bb60e11b815260040160405180910390fd5b5f8312156115a75760405163ef147de160e01b815260040160405180910390fd5b6001600160a01b0384165f908152609b602052604081205484916115cb8383611f92565b6001600160a01b0388165f818152609b60205260409081902083905551919250907f4e2b791dedccd9fb30141b088cabf5c14a8912b52f59375c95c010700b8c61939061161b9086815260200190565b60405180910390a2866001600160a01b03167fd4def76d6d2bed6f14d5cd9af73cc2913d618d00edde42432e81c09bfe0770988260405161165e91815260200190565b60405180910390a25f811361167b575f5f9450945050505061169d565b5f821215611690575f9450925061169d915050565b50925083915061169d9050565b9250929050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f6001600160ff1b03821115610d415760405162461bcd60e51b815260206004820152602860248201527f53616665436173743a2076616c756520646f65736e27742066697420696e2061604482015267371034b73a191a9b60c11b60648201526084016111de565b606654600160ff83161b908116036112da5760405163840a48d560e01b815260040160405180910390fd5b5f60995f8154611798906120d8565b9091555060408051610940810190915261090e8082525f91611835918391339161212c6020830139604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166020820152808201919091525f606082015260800160408051601f1981840301815290829052611821929160200161209d565b604051602081830303815290604052611a9a565b60405163189acdbd60e31b81523360048201529091506001600160a01b0382169063c4d66de8906024015f604051808303815f87803b158015611876575f5ffd5b505af1158015611888573d5f5f3e3d5ffd5b5050335f8181526098602052604080822080546001600160a01b0319166001600160a01b038816908117909155905192945092507f21c99d0db02213c32fff5b05cf0a718ab5f858802b91498f80d82270289d856a91a3919050565b5f806118f08385611f7f565b90505f6118fc866110e8565b90505f61191467ffffffffffffffff83168488611b9c565b90505f61192182846120f0565b6040805180820182526001815267ffffffffffffffff85811660208084018281526001600160a01b038f165f818152609d845287902095518654925168ffffffffffffffffff1990931690151568ffffffffffffffff001916176101009286169290920291909117909455845193845291881691830191909152918101919091529091507fb160ab8589bf47dc04ea11b50d46678d21590cea2ed3e454e7bd3e41510f98cf9060600160405180910390a1979650505050505050565b5f6110df838330611c81565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a45573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a699190612110565b6001600160a01b0316336001600160a01b031614610b035760405163794821ff60e01b815260040160405180910390fd5b5f83471015611aeb5760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e636500000060448201526064016111de565b81515f03611b3b5760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f60448201526064016111de565b8282516020840186f590506001600160a01b038116610cdb5760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f790000000000000060448201526064016111de565b5f80805f19858709858702925082811083820303915050805f03611bd357838281611bc957611bc9612053565b0492505050610cdb565b808411611c1a5760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b60448201526064016111de565b5f8486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091025f889003889004909101858311909403939093029303949094049190911702949350505050565b5f604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b6001600160a01b03811681146112da575f5ffd5b5f60208284031215611cce575f5ffd5b8135610cdb81611caa565b5f60208284031215611ce9575f5ffd5b5035919050565b5f5f5f5f60808587031215611d03575f5ffd5b8435611d0e81611caa565b93506020850135611d1e81611caa565b92506040850135611d2e81611caa565b9396929550929360600135925050565b5f5f5f5f84860360a0811215611d52575f5ffd5b6040811215611d5f575f5ffd5b50849350604084013592506060840135611d7881611caa565b9396929550929360800135925050565b5f5f5f60608486031215611d9a575f5ffd5b8335611da581611caa565b92506020840135611db581611caa565b929592945050506040919091013590565b5f60208284031215611dd6575f5ffd5b813567ffffffffffffffff81168114610cdb575f5ffd5b5f60208284031215611dfd575f5ffd5b813560ff81168114610cdb575f5ffd5b5f5f83601f840112611e1d575f5ffd5b50813567ffffffffffffffff811115611e34575f5ffd5b60208301915083602082850101111561169d575f5ffd5b5f5f5f5f5f60608688031215611e5f575f5ffd5b853567ffffffffffffffff811115611e75575f5ffd5b611e8188828901611e0d565b909650945050602086013567ffffffffffffffff811115611ea0575f5ffd5b611eac88828901611e0d565b96999598509660400135949350505050565b5f5f5f60608486031215611ed0575f5ffd5b8335611edb81611caa565b95602085013595506040909401359392505050565b5f5f60408385031215611f01575f5ffd5b8235611f0c81611caa565b946020939093013593505050565b5f5f60408385031215611f2b575f5ffd5b8235611f3681611caa565b91506020830135611f4681611caa565b809150509250929050565b634e487b7160e01b5f52601160045260245ffd5b5f600160ff1b8201611f7957611f79611f51565b505f0390565b818103818111156110e2576110e2611f51565b8082018281125f831280158216821582161715611fb157611fb1611f51565b505092915050565b808201808211156110e2576110e2611f51565b8181035f831280158383131683831282161715611feb57611feb611f51565b5092915050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b606081525f61202d606083018789611ff2565b8281036020840152612040818688611ff2565b9150508260408301529695505050505050565b634e487b7160e01b5f52601260045260245ffd5b5f8261208157634e487b7160e01b5f52601260045260245ffd5b500790565b5f81518060208401855e5f93019283525090919050565b5f6120b16120ab8386612086565b84612086565b949350505050565b5f602082840312156120c9575f5ffd5b81518015158114610cdb575f5ffd5b5f600182016120e9576120e9611f51565b5060010190565b67ffffffffffffffff82811682821603908111156110e2576110e2611f51565b5f60208284031215612120575f5ffd5b8151610cdb81611caa56fe608060405260405161090e38038061090e83398101604081905261002291610460565b61002e82826000610035565b505061058a565b61003e83610100565b6040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a260008251118061007f5750805b156100fb576100f9836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e99190610520565b836102a360201b6100291760201c565b505b505050565b610113816102cf60201b6100551760201c565b6101725760405162461bcd60e51b815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e6044820152641d1c9858dd60da1b60648201526084015b60405180910390fd5b6101e6816001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d79190610520565b6102cf60201b6100551760201c565b61024b5760405162461bcd60e51b815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201526f1cc81b9bdd08184818dbdb9d1c9858dd60821b6064820152608401610169565b806102827fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5060001b6102de60201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606102c883836040518060600160405280602781526020016108e7602791396102e1565b9392505050565b6001600160a01b03163b151590565b90565b6060600080856001600160a01b0316856040516102fe919061053b565b600060405180830381855af49150503d8060008114610339576040519150601f19603f3d011682016040523d82523d6000602084013e61033e565b606091505b5090925090506103508683838761035a565b9695505050505050565b606083156103c65782516103bf576001600160a01b0385163b6103bf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610169565b50816103d0565b6103d083836103d8565b949350505050565b8151156103e85781518083602001fd5b8060405162461bcd60e51b81526004016101699190610557565b80516001600160a01b038116811461041957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561044f578181015183820152602001610437565b838111156100f95750506000910152565b6000806040838503121561047357600080fd5b61047c83610402565b60208401519092506001600160401b038082111561049957600080fd5b818501915085601f8301126104ad57600080fd5b8151818111156104bf576104bf61041e565b604051601f8201601f19908116603f011681019083821181831017156104e7576104e761041e565b8160405282815288602084870101111561050057600080fd5b610511836020830160208801610434565b80955050505050509250929050565b60006020828403121561053257600080fd5b6102c882610402565b6000825161054d818460208701610434565b9190910192915050565b6020815260008251806020840152610576816040850160208701610434565b601f01601f19169190910160400192915050565b61034e806105996000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b610100565b565b606061004e83836040518060600160405280602781526020016102f260279139610124565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546001600160a01b031690565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fb9190610249565b905090565b3660008037600080366000845af43d6000803e80801561011f573d6000f35b3d6000fd5b6060600080856001600160a01b03168560405161014191906102a2565b600060405180830381855af49150503d806000811461017c576040519150601f19603f3d011682016040523d82523d6000602084013e610181565b606091505b50915091506101928683838761019c565b9695505050505050565b6060831561020d578251610206576001600160a01b0385163b6102065760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b5081610217565b610217838361021f565b949350505050565b81511561022f5781518083602001fd5b8060405162461bcd60e51b81526004016101fd91906102be565b60006020828403121561025b57600080fd5b81516001600160a01b038116811461004e57600080fd5b60005b8381101561028d578181015183820152602001610275565b8381111561029c576000848401525b50505050565b600082516102b4818460208701610272565b9190910192915050565b60208152600082518060208401526102dd816040850160208701610272565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d51e81d3bc5ed20a26aeb05dce7e825c503b2061aa78628027300c8d65b9d89a64736f6c634300080c0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220e1155e72c14b352a97517f96d3fa99ba87da7598c13b62b3e4283a843fa5ca7764736f6c634300081e0033", } // EigenPodManagerABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/EigenStrategy/binding.go b/pkg/bindings/EigenStrategy/binding.go index 823bc92483..c297ff2165 100644 --- a/pkg/bindings/EigenStrategy/binding.go +++ b/pkg/bindings/EigenStrategy/binding.go @@ -32,7 +32,7 @@ var ( // EigenStrategyMetaData contains all meta data concerning the EigenStrategy contract. var EigenStrategyMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_strategyManager\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"EIGEN\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigen\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deposit\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"newShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"explanation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_EIGEN\",\"type\":\"address\",\"internalType\":\"contractIEigen\"},{\"name\":\"_bEIGEN\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_underlyingToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"shares\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"sharesToUnderlying\",\"inputs\":[{\"name\":\"amountShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"sharesToUnderlyingView\",\"inputs\":[{\"name\":\"amountShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalShares\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"underlyingToShares\",\"inputs\":[{\"name\":\"amountUnderlying\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"underlyingToSharesView\",\"inputs\":[{\"name\":\"amountUnderlying\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"underlyingToken\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"userUnderlying\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"userUnderlyingView\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdraw\",\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amountShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"amountOut\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"ExchangeRateEmitted\",\"inputs\":[{\"name\":\"rate\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyTokenSet\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"},{\"name\":\"decimals\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"BalanceExceedsMaxTotalDeposits\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CurrentlyPaused\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidNewPausedStatus\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"MaxPerDepositExceedsMax\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NewSharesZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyPauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyStrategyManager\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyUnderlyingToken\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyUnpauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TotalSharesExceedsMax\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawalAmountExceedsTotalDeposits\",\"inputs\":[]}]", - Bin: "0x60c060405234801561000f575f5ffd5b5060405161160138038061160183398101604081905261002e9161014f565b8181806001600160a01b038116610058576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b03908116608052821660a05261007361007c565b50505050610187565b5f54610100900460ff16156100e75760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610136575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b038116811461014c575f5ffd5b50565b5f5f60408385031215610160575f5ffd5b825161016b81610138565b602084015190925061017c81610138565b809150509250929050565b60805160a0516114366101cb5f395f818161018b015281816103860152818161071e01526107a001525f81816102540152818161094e0152610e4f01526114365ff3fe608060405234801561000f575f5ffd5b506004361061013d575f3560e01c8063886f1195116100b4578063ce7c2ac211610079578063ce7c2ac2146102c4578063d9caed12146102d7578063e3dae51c146102ea578063f3e73875146102fd578063fabc1cbc14610310578063fdc371ce14610323575f5ffd5b8063886f11951461024f5780638c871019146102765780638f6a624014610289578063ab5921e11461029c578063c4d66de8146102b1575f5ffd5b8063485cc95511610105578063485cc955146101d7578063553ca5f8146101ea578063595c6a67146101fd5780635ac86ab7146102055780635c975abb146102345780637a8b26371461023c575f5ffd5b8063136439dd146101415780632495a5991461015657806339b70e38146101865780633a98ef39146101ad57806347e7ef24146101c4575b5f5ffd5b61015461014f366004611129565b610336565b005b603254610169906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6101b660335481565b60405190815260200161017d565b6101b66101d2366004611154565b610370565b6101546101e536600461117e565b61049f565b6101b66101f83660046111b5565b61058a565b61015461059d565b6102246102133660046111e5565b6001805460ff9092161b9081161490565b604051901515815260200161017d565b6001546101b6565b6101b661024a366004611129565b6105b1565b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6101b6610284366004611129565b6105fa565b6101b66102973660046111b5565b610604565b6102a4610611565b60405161017d9190611200565b6101546102bf3660046111b5565b610631565b6101b66102d23660046111b5565b6106f7565b6101b66102e5366004611235565b610789565b6101b66102f8366004611129565b61088b565b6101b661030b366004611129565b6108c2565b61015461031e366004611129565b6108cc565b606454610169906001600160a01b031681565b61033e610939565b60015481811681146103635760405163c61dca5d60e01b815260040160405180910390fd5b61036c826109dc565b5050565b5f5f61037b81610a19565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103c4576040516348da714f60e01b815260040160405180910390fd5b6103ce8484610a4f565b6033545f6103de6103e883611287565b90505f6103e86103ec610b08565b6103f69190611287565b90505f610403878361129a565b90508061041084896112ad565b61041a91906112c4565b9550855f0361043c57604051630c392ed360e11b815260040160405180910390fd5b6104468685611287565b60338190556f4b3b4ca85a86c47a098a223fffffffff101561047b57604051632f14e8a360e11b815260040160405180910390fd5b610494826103e860335461048f9190611287565b610b77565b505050505092915050565b5f54610100900460ff16158080156104bd57505f54600160ff909116105b806104d65750303b1580156104d657505f5460ff166001145b6104fb5760405162461bcd60e51b81526004016104f2906112e3565b60405180910390fd5b5f805460ff19166001179055801561051c575f805461ff0019166101001790555b606480546001600160a01b0319166001600160a01b03851617905561054082610bc3565b8015610585575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b5f61059761024a836106f7565b92915050565b6105a5610939565b6105af5f196109dc565b565b5f5f6103e86033546105c39190611287565b90505f6103e86105d1610b08565b6105db9190611287565b9050816105e885836112ad565b6105f291906112c4565b949350505050565b5f6105978261088b565b5f61059761030b836106f7565b60606040518060800160405280604d81526020016113b4604d9139905090565b5f54610100900460ff161580801561064f57505f54600160ff909116105b806106685750303b15801561066857505f5460ff166001145b6106845760405162461bcd60e51b81526004016104f2906112e3565b5f805460ff1916600117905580156106a5575f805461ff0019166101001790555b6106ae82610bc3565b801561036c575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b60405163fe243a1760e01b81526001600160a01b0382811660048301523060248301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063fe243a1790604401602060405180830381865afa158015610765573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105979190611331565b5f600161079581610a19565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107de576040516348da714f60e01b815260040160405180910390fd5b6107e9858585610d0e565b6033548084111561080d57604051630b469df360e41b815260040160405180910390fd5b5f61081a6103e883611287565b90505f6103e8610828610b08565b6108329190611287565b90508161083f87836112ad565b61084991906112c4565b9450610855868461129a565b603355610875610865868361129a565b6103e860335461048f9190611287565b610880888887610d54565b505050509392505050565b5f5f6103e860335461089d9190611287565b90505f6103e86108ab610b08565b6108b59190611287565b9050806105e883866112ad565b5f610597826105b1565b6108d4610e4d565b600154801982198116146108fb5760405163c61dca5d60e01b815260040160405180910390fd5b600182905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa15801561099b573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109bf9190611348565b6105af57604051631d77d47760e21b815260040160405180910390fd5b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b610a2e816001805460ff9092161b9081161490565b15610a4c5760405163840a48d560e01b815260040160405180910390fd5b50565b6032546001600160a01b0383811691161480610a7857506064546001600160a01b038381169116145b610a9557604051630312abdd60e61b815260040160405180910390fd5b6064546001600160a01b039081169083160361036c57606454604051636f074d1f60e11b8152600481018390526001600160a01b039091169063de0e9a3e906024015f604051808303815f87803b158015610aee575f5ffd5b505af1158015610b00573d5f5f3e3d5ffd5b505050505050565b6032546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610b4e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b729190611331565b905090565b7fd2494f3479e5da49d386657c292c610b5b01df313d07c62eb0cfa49924a31be881610bab84670de0b6b3a76400006112ad565b610bb591906112c4565b6040519081526020016106eb565b5f54610100900460ff16610c2d5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016104f2565b603280546001600160a01b0319166001600160a01b038316179055610c515f6109dc565b7f1c540707b00eb5427b6b774fc799d756516a54aee108b64b327acc55af55750760325f9054906101000a90046001600160a01b0316826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cc3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ce79190611367565b604080516001600160a01b03909316835260ff90911660208301520160405180910390a150565b6032546001600160a01b0383811691161480610d3757506064546001600160a01b038381169116145b61058557604051630312abdd60e61b815260040160405180910390fd5b6064546001600160a01b0390811690831603610e395760325460405163095ea7b360e01b81526001600160a01b038481166004830152602482018490529091169063095ea7b3906044016020604051808303815f875af1158015610dba573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610dde9190611348565b50606454604051630ea598cb60e41b8152600481018390526001600160a01b039091169063ea598cb0906024015f604051808303815f87803b158015610e22575f5ffd5b505af1158015610e34573d5f5f3e3d5ffd5b505050505b6105856001600160a01b0383168483610efe565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ea9573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ecd9190611382565b6001600160a01b0316336001600160a01b0316146105af5760405163794821ff60e01b815260040160405180910390fd5b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656490840152610585928692915f91610f8d91851690849061100c565b905080515f1480610fad575080806020019051810190610fad9190611348565b6105855760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104f2565b60606105f284845f85855f5f866001600160a01b03168587604051611031919061139d565b5f6040518083038185875af1925050503d805f811461106b576040519150601f19603f3d011682016040523d82523d5f602084013e611070565b606091505b50915091506110818783838761108c565b979650505050505050565b606083156110fa5782515f036110f3576001600160a01b0385163b6110f35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104f2565b50816105f2565b6105f2838381511561110f5781518083602001fd5b8060405162461bcd60e51b81526004016104f29190611200565b5f60208284031215611139575f5ffd5b5035919050565b6001600160a01b0381168114610a4c575f5ffd5b5f5f60408385031215611165575f5ffd5b823561117081611140565b946020939093013593505050565b5f5f6040838503121561118f575f5ffd5b823561119a81611140565b915060208301356111aa81611140565b809150509250929050565b5f602082840312156111c5575f5ffd5b81356111d081611140565b9392505050565b60ff81168114610a4c575f5ffd5b5f602082840312156111f5575f5ffd5b81356111d0816111d7565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f5f5f60608486031215611247575f5ffd5b833561125281611140565b9250602084013561126281611140565b929592945050506040919091013590565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561059757610597611273565b8181038181111561059757610597611273565b808202811582820484141761059757610597611273565b5f826112de57634e487b7160e01b5f52601260045260245ffd5b500490565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b5f60208284031215611341575f5ffd5b5051919050565b5f60208284031215611358575f5ffd5b815180151581146111d0575f5ffd5b5f60208284031215611377575f5ffd5b81516111d0816111d7565b5f60208284031215611392575f5ffd5b81516111d081611140565b5f82518060208501845e5f92019182525091905056fe4261736520537472617465677920696d706c656d656e746174696f6e20746f20696e68657269742066726f6d20666f72206d6f726520636f6d706c657820696d706c656d656e746174696f6e73a2646970667358221220c22464c6f3439ec7baa53cf811ca117cabd4c51ac864d739ab4db3fe2cc834e764736f6c634300081e0033", + Bin: "0x60c060405234801561000f575f5ffd5b5060405161160138038061160183398101604081905261002e9161014f565b8181806001600160a01b038116610058576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b03908116608052821660a05261007361007c565b50505050610187565b5f54610100900460ff16156100e75760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610136575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b038116811461014c575f5ffd5b50565b5f5f60408385031215610160575f5ffd5b825161016b81610138565b602084015190925061017c81610138565b809150509250929050565b60805160a0516114366101cb5f395f818161018b015281816103860152818161071e01526107a001525f81816102540152818161094e0152610e4f01526114365ff3fe608060405234801561000f575f5ffd5b506004361061013d575f3560e01c8063886f1195116100b4578063ce7c2ac211610079578063ce7c2ac2146102c4578063d9caed12146102d7578063e3dae51c146102ea578063f3e73875146102fd578063fabc1cbc14610310578063fdc371ce14610323575f5ffd5b8063886f11951461024f5780638c871019146102765780638f6a624014610289578063ab5921e11461029c578063c4d66de8146102b1575f5ffd5b8063485cc95511610105578063485cc955146101d7578063553ca5f8146101ea578063595c6a67146101fd5780635ac86ab7146102055780635c975abb146102345780637a8b26371461023c575f5ffd5b8063136439dd146101415780632495a5991461015657806339b70e38146101865780633a98ef39146101ad57806347e7ef24146101c4575b5f5ffd5b61015461014f366004611129565b610336565b005b603254610169906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6101b660335481565b60405190815260200161017d565b6101b66101d2366004611154565b610370565b6101546101e536600461117e565b61049f565b6101b66101f83660046111b5565b61058a565b61015461059d565b6102246102133660046111e5565b6001805460ff9092161b9081161490565b604051901515815260200161017d565b6001546101b6565b6101b661024a366004611129565b6105b1565b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6101b6610284366004611129565b6105fa565b6101b66102973660046111b5565b610604565b6102a4610611565b60405161017d9190611200565b6101546102bf3660046111b5565b610631565b6101b66102d23660046111b5565b6106f7565b6101b66102e5366004611235565b610789565b6101b66102f8366004611129565b61088b565b6101b661030b366004611129565b6108c2565b61015461031e366004611129565b6108cc565b606454610169906001600160a01b031681565b61033e610939565b60015481811681146103635760405163c61dca5d60e01b815260040160405180910390fd5b61036c826109dc565b5050565b5f5f61037b81610a19565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103c4576040516348da714f60e01b815260040160405180910390fd5b6103ce8484610a4f565b6033545f6103de6103e883611287565b90505f6103e86103ec610b08565b6103f69190611287565b90505f610403878361129a565b90508061041084896112ad565b61041a91906112c4565b9550855f0361043c57604051630c392ed360e11b815260040160405180910390fd5b6104468685611287565b60338190556f4b3b4ca85a86c47a098a223fffffffff101561047b57604051632f14e8a360e11b815260040160405180910390fd5b610494826103e860335461048f9190611287565b610b77565b505050505092915050565b5f54610100900460ff16158080156104bd57505f54600160ff909116105b806104d65750303b1580156104d657505f5460ff166001145b6104fb5760405162461bcd60e51b81526004016104f2906112e3565b60405180910390fd5b5f805460ff19166001179055801561051c575f805461ff0019166101001790555b606480546001600160a01b0319166001600160a01b03851617905561054082610bc3565b8015610585575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b5f61059761024a836106f7565b92915050565b6105a5610939565b6105af5f196109dc565b565b5f5f6103e86033546105c39190611287565b90505f6103e86105d1610b08565b6105db9190611287565b9050816105e885836112ad565b6105f291906112c4565b949350505050565b5f6105978261088b565b5f61059761030b836106f7565b60606040518060800160405280604d81526020016113b4604d9139905090565b5f54610100900460ff161580801561064f57505f54600160ff909116105b806106685750303b15801561066857505f5460ff166001145b6106845760405162461bcd60e51b81526004016104f2906112e3565b5f805460ff1916600117905580156106a5575f805461ff0019166101001790555b6106ae82610bc3565b801561036c575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b60405163fe243a1760e01b81526001600160a01b0382811660048301523060248301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063fe243a1790604401602060405180830381865afa158015610765573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105979190611331565b5f600161079581610a19565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107de576040516348da714f60e01b815260040160405180910390fd5b6107e9858585610d0e565b6033548084111561080d57604051630b469df360e41b815260040160405180910390fd5b5f61081a6103e883611287565b90505f6103e8610828610b08565b6108329190611287565b90508161083f87836112ad565b61084991906112c4565b9450610855868461129a565b603355610875610865868361129a565b6103e860335461048f9190611287565b610880888887610d54565b505050509392505050565b5f5f6103e860335461089d9190611287565b90505f6103e86108ab610b08565b6108b59190611287565b9050806105e883866112ad565b5f610597826105b1565b6108d4610e4d565b600154801982198116146108fb5760405163c61dca5d60e01b815260040160405180910390fd5b600182905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa15801561099b573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109bf9190611348565b6105af57604051631d77d47760e21b815260040160405180910390fd5b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b610a2e816001805460ff9092161b9081161490565b15610a4c5760405163840a48d560e01b815260040160405180910390fd5b50565b6032546001600160a01b0383811691161480610a7857506064546001600160a01b038381169116145b610a9557604051630312abdd60e61b815260040160405180910390fd5b6064546001600160a01b039081169083160361036c57606454604051636f074d1f60e11b8152600481018390526001600160a01b039091169063de0e9a3e906024015f604051808303815f87803b158015610aee575f5ffd5b505af1158015610b00573d5f5f3e3d5ffd5b505050505050565b6032546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610b4e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b729190611331565b905090565b7fd2494f3479e5da49d386657c292c610b5b01df313d07c62eb0cfa49924a31be881610bab84670de0b6b3a76400006112ad565b610bb591906112c4565b6040519081526020016106eb565b5f54610100900460ff16610c2d5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016104f2565b603280546001600160a01b0319166001600160a01b038316179055610c515f6109dc565b7f1c540707b00eb5427b6b774fc799d756516a54aee108b64b327acc55af55750760325f9054906101000a90046001600160a01b0316826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cc3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ce79190611367565b604080516001600160a01b03909316835260ff90911660208301520160405180910390a150565b6032546001600160a01b0383811691161480610d3757506064546001600160a01b038381169116145b61058557604051630312abdd60e61b815260040160405180910390fd5b6064546001600160a01b0390811690831603610e395760325460405163095ea7b360e01b81526001600160a01b038481166004830152602482018490529091169063095ea7b3906044016020604051808303815f875af1158015610dba573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610dde9190611348565b50606454604051630ea598cb60e41b8152600481018390526001600160a01b039091169063ea598cb0906024015f604051808303815f87803b158015610e22575f5ffd5b505af1158015610e34573d5f5f3e3d5ffd5b505050505b6105856001600160a01b0383168483610efe565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ea9573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ecd9190611382565b6001600160a01b0316336001600160a01b0316146105af5760405163794821ff60e01b815260040160405180910390fd5b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656490840152610585928692915f91610f8d91851690849061100c565b905080515f1480610fad575080806020019051810190610fad9190611348565b6105855760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104f2565b60606105f284845f85855f5f866001600160a01b03168587604051611031919061139d565b5f6040518083038185875af1925050503d805f811461106b576040519150601f19603f3d011682016040523d82523d5f602084013e611070565b606091505b50915091506110818783838761108c565b979650505050505050565b606083156110fa5782515f036110f3576001600160a01b0385163b6110f35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104f2565b50816105f2565b6105f2838381511561110f5781518083602001fd5b8060405162461bcd60e51b81526004016104f29190611200565b5f60208284031215611139575f5ffd5b5035919050565b6001600160a01b0381168114610a4c575f5ffd5b5f5f60408385031215611165575f5ffd5b823561117081611140565b946020939093013593505050565b5f5f6040838503121561118f575f5ffd5b823561119a81611140565b915060208301356111aa81611140565b809150509250929050565b5f602082840312156111c5575f5ffd5b81356111d081611140565b9392505050565b60ff81168114610a4c575f5ffd5b5f602082840312156111f5575f5ffd5b81356111d0816111d7565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f5f5f60608486031215611247575f5ffd5b833561125281611140565b9250602084013561126281611140565b929592945050506040919091013590565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561059757610597611273565b8181038181111561059757610597611273565b808202811582820484141761059757610597611273565b5f826112de57634e487b7160e01b5f52601260045260245ffd5b500490565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b5f60208284031215611341575f5ffd5b5051919050565b5f60208284031215611358575f5ffd5b815180151581146111d0575f5ffd5b5f60208284031215611377575f5ffd5b81516111d0816111d7565b5f60208284031215611392575f5ffd5b81516111d081611140565b5f82518060208501845e5f92019182525091905056fe4261736520537472617465677920696d706c656d656e746174696f6e20746f20696e68657269742066726f6d20666f72206d6f726520636f6d706c657820696d706c656d656e746174696f6e73a2646970667358221220c3d1b68ce4a04509d1f163fd5261b6db458d026188f783832bc2aebf5bf4eb1e64736f6c634300081e0033", } // EigenStrategyABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/KeyRegistrar/binding.go b/pkg/bindings/KeyRegistrar/binding.go index e531e56798..557a6aeb3d 100644 --- a/pkg/bindings/KeyRegistrar/binding.go +++ b/pkg/bindings/KeyRegistrar/binding.go @@ -50,7 +50,7 @@ type OperatorSet struct { // KeyRegistrarMetaData contains all meta data concerning the KeyRegistrar contract. var KeyRegistrarMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_permissionController\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"},{\"name\":\"_allocationManager\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"},{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"BN254_KEY_REGISTRATION_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ECDSA_KEY_REGISTRATION_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allocationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"configureOperatorSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"configureOperatorSetWithMinDelay\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"minDelaySeconds\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"deregisterKey\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"encodeBN254KeyData\",\"inputs\":[{\"name\":\"g1Point\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"g2Point\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"finalizeScheduledRotation\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"success\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getBN254Key\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"g1Point\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"g2Point\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBN254KeyRegistrationMessageHash\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"keyData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getECDSAAddress\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getECDSAKey\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getECDSAKeyRegistrationMessageHash\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"keyAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getKeyHash\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorFromSigningKey\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"keyData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetCurveType\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isKeyGloballyRegistered\",\"inputs\":[{\"name\":\"keyHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isRegistered\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"permissionController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerKey\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"keyData\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"rotateKey\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"newPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinKeyRotationDelay\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"minDelaySeconds\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"AggregateBN254KeyUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"newAggregateKey\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"KeyDeregistered\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"KeyRegistered\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"pubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"KeyRotationScheduled\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"oldPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"newPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"activateAt\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinKeyRotationDelaySet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"minDelay\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetConfigured\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"curveType\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ConfigurationAlreadySet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECAddFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECMulFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECPairingFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExpModFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCurveType\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidKeyFormat\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidKeypair\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidPermissions\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"KeyAlreadyRegistered\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"KeyNotFound\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OperatorAlreadyRegistered\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OperatorSetNotConfigured\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OperatorStillSlashable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"PendingRotationExists\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RotationDisabled\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignatureExpired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"ZeroAddress\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ZeroPubkey\",\"inputs\":[]}]", - Bin: "0x60e060405234801561000f575f5ffd5b50604051613bd7380380613bd783398101604081905261002e916100cb565b6001600160a01b03808316608052831660a052808061004c8161005a565b60c052506101fc9350505050565b5f5f829050601f8151111561008d578260405163305a27a960e01b815260040161008491906101a1565b60405180910390fd5b8051610098826101d6565b179392505050565b6001600160a01b03811681146100b4575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b5f5f5f606084860312156100dd575f5ffd5b83516100e8816100a0565b60208501519093506100f9816100a0565b60408501519092506001600160401b03811115610114575f5ffd5b8401601f81018613610124575f5ffd5b80516001600160401b0381111561013d5761013d6100b7565b604051601f8201601f19908116603f011681016001600160401b038111828210171561016b5761016b6100b7565b604052818152828201602001881015610182575f5ffd5b8160208401602083015e5f602083830101528093505050509250925092565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b805160208083015191908110156101f6575f198160200360031b1b821691505b50919050565b60805160a05160c05161399c61023b5f395f818161049e0152611c2701525f81816101f90152611cd201525f81816103b30152610899015261399c5ff3fe608060405234801561000f575f5ffd5b5060043610610153575f3560e01c80639a43e3fb116100bf578063d40cda1611610079578063d40cda16146103d5578063d9f12db2146103e8578063dab42d7e146103fb578063ea0d81491461041d578063ea194e2e14610430578063f698da2514610443575f5ffd5b80639a43e3fb1461032d578063a2d701f61461034e578063aa165c3014610361578063b05c8f6d14610374578063bd30a0b91461039b578063ca8aa7c7146103ae575f5ffd5b806354fd4d501161011057806354fd4d501461029a5780637690e395146102a25780637cffe48c146102b557806381b2796c146102d55780638256909c146102e857806387ab86f41461031a575f5ffd5b80630934d59714610157578063110304021461017f578063166aa127146101945780633b32a7bd146101c95780634657e26a146101f457806350435add1461021b575b5f5ffd5b61016a610165366004612d29565b61044b565b60405190151581526020015b60405180910390f35b61019261018d366004612d71565b61045f565b005b6101bb7f991b0a3376ce87f8ecc5d70962279ac09cdce934e8b5b9683e73c8ff087c7f8181565b604051908152602001610176565b6101dc6101d7366004612d9a565b610479565b6040516001600160a01b039091168152602001610176565b6101dc7f000000000000000000000000000000000000000000000000000000000000000081565b61028d610229366004612e12565b8151602080840151835180519083015185840151805190850151604080519687019790975295850193909352606084810192909252608084015260a083019190915260c082019290925260e001604051602081830303815290604052905092915050565b6040516101769190612ebd565b61028d610497565b6101bb6102b0366004612f0c565b6104c7565b6102c86102c3366004612f69565b61056f565b6040516101769190612fb7565b6101926102e3366004612fc5565b610595565b6102fb6102f6366004613054565b61078a565b604080516001600160a01b039093168352901515602083015201610176565b610192610328366004612d29565b610878565b61034061033b366004612d9a565b610be4565b60405161017692919061311a565b61019261035c366004613165565b610e7a565b61028d61036f366004612d9a565b610fab565b6101bb7fda86e76deaed01641f80ff5f72c372a038fa5182697aeb967e8b1f9819d58d8181565b61016a6103a9366004612d9a565b6111ab565b6101dc7f000000000000000000000000000000000000000000000000000000000000000081565b6101926103e3366004612fc5565b6111e8565b6101bb6103f63660046131a6565b6113ec565b61016a6104093660046131de565b5f9081526002602052604090205460ff1690565b61019261042b3660046131f5565b611485565b6101bb61043e366004612d9a565b6115bc565b6101bb611789565b5f6104568284611842565b90505b92915050565b815161046a8161190a565b6104748383611933565b505050565b5f6104848383610fab565b61048d9061321e565b60601c9392505050565b60606104c27f00000000000000000000000000000000000000000000000000000000000000006119ad565b905090565b5f5f7fda86e76deaed01641f80ff5f72c372a038fa5182697aeb967e8b1f9819d58d8186865f015187602001518787604051610504929190613276565b6040805191829003822060208301969096526001600160a01b039485169082015292909116606083015263ffffffff16608082015260a081019190915260c001604051602081830303815290604052805190602001209050610565816119ea565b9695505050505050565b5f60015f61057c84611a30565b815260208101919091526040015f205460ff1692915050565b8561059f8161190a565b5f60015f6105ac89611a30565b815260208101919091526040015f9081205460ff1691508160028111156105d5576105d5612f83565b036105f357604051635cd3106d60e11b815260040160405180910390fd5b6105fd8789611842565b505f5f5f61060a8a611a30565b815260208082019290925260409081015f9081206001600160a01b038d1682529092529020805490915088908a9060ff1661066357604051632e40e18760e01b815260040161065a9291906132a3565b60405180910390fd5b505060038101546001600160401b0316156106915760405163a54aa36960e01b815260040160405180910390fd5b5f60045f61069e8b611a30565b815260208101919091526040015f20546001600160401b0316905067fffffffffffffffe1981016106e2576040516310297f8760e11b815260040160405180910390fd5b5f6106ed82426132dd565b90506106fe8a8c8b8b8b8b8a611a8e565b506002830161070e898b8361338c565b5060038301805467ffffffffffffffff19166001600160401b0383161790556040516001600160a01b038c16907f600c8ea5356df2fad359d32cf64544f00ad31ccf4133a70b4da8630b1e3658d190610775908d90889060018901908f908f908990613468565b60405180910390a25050505050505050505050565b5f5f5f60015f61079987611a30565b815260208101919091526040015f9081205460ff16915060018260028111156107c4576107c4612f83565b036107d6575083516020850120610847565b60028260028111156107ea576107ea612f83565b0361082e575f5f86806020019051810190610805919061352c565b60408051808201825283815260209081019283525f938452915190915290209250610847915050565b60405163fdea7c0960e01b815260040160405180910390fd5b5f818152600360205260409020546001600160a01b03168061086988826111ab565b945094505050505b9250929050565b816108828161190a565b6040516309a961f360e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631352c3e6906108d0908690869060040161354e565b602060405180830381865afa1580156108eb573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061090f919061356b565b158284909161093357604051631070287960e01b815260040161065a9291906132a3565b50505f60015f61094285611a30565b815260208101919091526040015f9081205460ff16915081600281111561096b5761096b612f83565b0361098957604051635cd3106d60e11b815260040160405180910390fd5b5f5f5f61099586611a30565b815260208082019290925260409081015f9081206001600160a01b03891682528352819020815160808101909252805460ff161515825260018101805492939192918401916109e3906132fc565b80601f0160208091040260200160405190810160405280929190818152602001828054610a0f906132fc565b8015610a5a5780601f10610a3157610100808354040283529160200191610a5a565b820191905f5260205f20905b815481529060010190602001808311610a3d57829003601f168201915b50505050508152602001600282018054610a73906132fc565b80601f0160208091040260200160405190810160405280929190818152602001828054610a9f906132fc565b8015610aea5780601f10610ac157610100808354040283529160200191610aea565b820191905f5260205f20905b815481529060010190602001808311610acd57829003601f168201915b5050509183525050600391909101546001600160401b0316602090910152805190915084908690610b3057604051632e40e18760e01b815260040161065a9291906132a3565b50505f5f610b3d86611a30565b815260208082019290925260409081015f9081206001600160a01b03891682529092528120805460ff1916815590610b786001830182612b33565b610b85600283015f612b33565b50600301805467ffffffffffffffff191690556040516001600160a01b038616907f28d3c3cee49478ec6fd219cfd685cd15cd01d95cabf69b4b7b57f9eaa3eb644290610bd5908790869061358a565b60405180910390a25050505050565b604080518082019091525f8082526020820152610bff612b6a565b5f60015f610c0c87611a30565b815260208101919091526040015f205460ff1690506002816002811115610c3557610c35612f83565b14610c535760405163fdea7c0960e01b815260040160405180910390fd5b5f5f5f610c5f88611a30565b815260208082019290925260409081015f9081206001600160a01b03891682528352819020815160808101909252805460ff16151582526001810180549293919291840191610cad906132fc565b80601f0160208091040260200160405190810160405280929190818152602001828054610cd9906132fc565b8015610d245780601f10610cfb57610100808354040283529160200191610d24565b820191905f5260205f20905b815481529060010190602001808311610d0757829003601f168201915b50505050508152602001600282018054610d3d906132fc565b80601f0160208091040260200160405190810160405280929190818152602001828054610d69906132fc565b8015610db45780601f10610d8b57610100808354040283529160200191610db4565b820191905f5260205f20905b815481529060010190602001808311610d9757829003601f168201915b5050509183525050600391909101546001600160401b03166020909101528051909150610e1d5750506040805180820182525f80825260208083018290528351808501855282815280820192909252835180850190945282845283019190915292509050610871565b5f610e2782611b5f565b90505f5f5f5f84806020019051810190610e4191906135e9565b604080518082018252948552602080860194909452805180820190915291825291810191909152909c909b509950505050505050505050565b8251610e858161190a565b6001836002811115610e9957610e99612f83565b1480610eb657506002836002811115610eb457610eb4612f83565b145b610ed35760405163fdea7c0960e01b815260040160405180910390fd5b5f60015f610ee087611a30565b815260208101919091526040015f9081205460ff169150816002811115610f0957610f09612f83565b14610f26576040516281f09f60e01b815260040160405180910390fd5b8360015f610f3388611a30565b815260208101919091526040015f20805460ff19166001836002811115610f5c57610f5c612f83565b02179055507fb2266cb118e57095fcdbedb24dabd9fc9f5127e2dbedf62ce6ee71696fb8b6e78585604051610f9292919061358a565b60405180910390a1610fa48584611933565b5050505050565b60605f60015f610fba86611a30565b815260208101919091526040015f205460ff1690506001816002811115610fe357610fe3612f83565b146110015760405163fdea7c0960e01b815260040160405180910390fd5b5f5f5f61100d87611a30565b815260208082019290925260409081015f9081206001600160a01b03881682528352819020815160808101909252805460ff1615158252600181018054929391929184019161105b906132fc565b80601f0160208091040260200160405190810160405280929190818152602001828054611087906132fc565b80156110d25780601f106110a9576101008083540402835291602001916110d2565b820191905f5260205f20905b8154815290600101906020018083116110b557829003601f168201915b505050505081526020016002820180546110eb906132fc565b80601f0160208091040260200160405190810160405280929190818152602001828054611117906132fc565b80156111625780601f1061113957610100808354040283529160200191611162565b820191905f5260205f20905b81548152906001019060200180831161114557829003601f168201915b5050509183525050600391909101546001600160401b031660209091015280519091506111a15760405180602001604052805f81525092505050610459565b5f61056582611b5f565b5f5f5f6111b785611a30565b815260208082019290925260409081015f9081206001600160a01b038616825290925290205460ff16905092915050565b856111f28161190a565b5f60015f6111ff89611a30565b815260208101919091526040015f9081205460ff16915081600281111561122857611228612f83565b0361124657604051635cd3106d60e11b815260040160405180910390fd5b5f5f61125189611a30565b815260208082019290925260409081015f9081206001600160a01b038c16825290925290205460ff1615611298576040516342ee68b560e01b815260040160405180910390fd5b6112a787898888888887611a8e565b50604051806080016040528060011515815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920182905250938552505060408051602081810183528482528501529092018190529050806113158a611a30565b815260208082019290925260409081015f9081206001600160a01b038d1682528352208251815460ff1916901515178155908201516001820190611359908261362f565b506040820151600282019061136e908261362f565b50606091909101516003909101805467ffffffffffffffff19166001600160401b039092169190911790556040516001600160a01b038916907f1201ce0c5e577111bce91e907fd99cb183da5edc1e3fb650ca40769e4e9176dd906113da908a9085908b908b906136e4565b60405180910390a25050505050505050565b81516020808401516040515f938493611459937f991b0a3376ce87f8ecc5d70962279ac09cdce934e8b5b9683e73c8ff087c7f81938a93928991019485526001600160a01b039384166020860152918316604085015263ffffffff16606084015216608082015260a00190565b60405160208183030381529060405280519060200120905061147a816119ea565b9150505b9392505050565b81516114908161190a565b60018260028111156114a4576114a4612f83565b14806114c1575060028260028111156114bf576114bf612f83565b145b6114de5760405163fdea7c0960e01b815260040160405180910390fd5b5f60015f6114eb86611a30565b815260208101919091526040015f9081205460ff16915081600281111561151457611514612f83565b14611531576040516281f09f60e01b815260040160405180910390fd5b8260015f61153e87611a30565b815260208101919091526040015f20805460ff1916600183600281111561156757611567612f83565b02179055507fb2266cb118e57095fcdbedb24dabd9fc9f5127e2dbedf62ce6ee71696fb8b6e7848460405161159d92919061358a565b60405180910390a16115b6846001600160401b03611933565b50505050565b5f5f5f5f6115c986611a30565b815260208082019290925260409081015f9081206001600160a01b03871682528352819020815160808101909252805460ff16151582526001810180549293919291840191611617906132fc565b80601f0160208091040260200160405190810160405280929190818152602001828054611643906132fc565b801561168e5780601f106116655761010080835404028352916020019161168e565b820191905f5260205f20905b81548152906001019060200180831161167157829003601f168201915b505050505081526020016002820180546116a7906132fc565b80601f01602080910402602001604051908101604052809291908181526020018280546116d3906132fc565b801561171e5780601f106116f55761010080835404028352916020019161171e565b820191905f5260205f20905b81548152906001019060200180831161170157829003601f168201915b5050509183525050600391909101546001600160401b031660209091015290505f60018161174b87611a30565b815260208101919091526040015f2054825160ff909116915061177357505f91506104599050565b5f61177d83611b5f565b90506105658183611b9e565b60408051808201909152600a81526922b4b3b2b72630bcb2b960b11b6020909101525f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea6117f6611c1f565b805160209182012060408051928301949094529281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f5f5f5f61184f86611a30565b815260208082019290925260409081015f9081206001600160a01b03871682529092529020805490915060ff16611889575f915050610459565b60038101546001600160401b0316158015906118b2575060038101546001600160401b03164210155b1561190157600181016118c86002830182613711565b5060408051602081019091525f815260028201906118e6908261362f565b50600301805467ffffffffffffffff19169055506001610459565b505f9392505050565b61191381611c94565b6119305760405163932d94f760e01b815260040160405180910390fd5b50565b8060045f61194085611a30565b81526020019081526020015f205f6101000a8154816001600160401b0302191690836001600160401b031602179055507f22b2b63b5820f9d933565468845820b939bf5ad654ea6ab5bdd3728f19e4580f82826040516119a19291906137d1565b60405180910390a15050565b60605f6119b983611d3d565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f6119f3611789565b60405161190160f01b6020820152602281019190915260428101839052606201604051602081830303815290604052805190602001209050919050565b5f815f0151826020015163ffffffff16604051602001611a7692919060609290921b6001600160601b031916825260a01b6001600160a01b031916601482015260200190565b604051602081830303815290604052610459906137f5565b5f806001836002811115611aa457611aa4612f83565b03611abe57611ab7898989898989611d64565b9050611ae5565b6002836002811115611ad257611ad2612f83565b0361082e57611ab7898989898989611e56565b5f8181526002602052604090205460ff1615611b1457604051630c7bc20160e11b815260040160405180910390fd5b5f818152600260209081526040808320805460ff191660011790556003909152902080546001600160a01b038a166001600160a01b031990911617905590505b979650505050505050565b6060818101516001600160401b031615801590611b89575081606001516001600160401b03164210155b15611b9657506040015190565b506020015190565b5f6001826002811115611bb357611bb3612f83565b03611bc5575081516020830120610459565b6002826002811115611bd957611bd9612f83565b0361082e575f5f84806020019051810190611bf491906135e9565b505060408051808201825283815260209081019283525f938452915190915290209250610459915050565b60605f611c4b7f00000000000000000000000000000000000000000000000000000000000000006119ad565b9050805f81518110611c5f57611c5f613262565b016020908101516040516001600160f81b03199091169181019190915260210160405160208183030381529060405291505090565b604051631beb2b9760e31b81526001600160a01b0382811660048301523360248301523060448301525f80356001600160e01b0319166064840152917f00000000000000000000000000000000000000000000000000000000000000009091169063df595cb890608401602060405180830381865afa158015611d19573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610459919061356b565b5f60ff8216601f81111561045957604051632cd44ac360e21b815260040160405180910390fd5b5f60148414611d865760405163d109118160e01b815260040160405180910390fd5b5f611d918587613818565b60601c905080611db457604051634935505f60e01b815260040160405180910390fd5b5f611df687878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525060019250611b9e915050565b90505f611e04898b856113ec565b9050611e49838288888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152505f199250611fc0915050565b5098975050505050505050565b5f60c08414611e785760405163d109118160e01b815260040160405180910390fd5b60408214611e9957604051638baa579f60e01b815260040160405180910390fd5b5f611ea6878988886104c7565b90505f80808080611eb98a8c018c613856565b9350935093509350835f148015611ece575082155b15611eec57604051634935505f60e01b815260040160405180910390fd5b5f80611efa8a8c018c613890565b6040805180820182528381526020808201849052825180840184528b81528082018b90528351808501909452898452908301889052939550919350909190611f468b8484845f80612012565b9a508a9950611f729850505050505050505057604051638baa579f60e01b815260040160405180910390fd5b611fb387878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525060029250611b9e915050565b9998505050505050505050565b42811015611fe157604051630819bdcd60e01b815260040160405180910390fd5b611ff56001600160a01b03851684846120da565b6115b657604051638baa579f60e01b815260040160405180910390fd5b5f5f5f61201e8961212e565b90505f61202d8a89898c6121b8565b90505f61204461203d8a8461226c565b8b906122dc565b90505f61208661207f846120796040805180820182525f80825260209182015281518083019092526001825260029082015290565b9061226c565b85906122dc565b905087156120ab576120a28261209a612350565b838c8b612410565b965094506120cb565b6120be826120b7612350565b838c612624565b955085156120cb57600194505b50505050965096945050505050565b5f5f5f6120e7858561285b565b90925090505f8160048111156120ff576120ff612f83565b14801561211d5750856001600160a01b0316826001600160a01b0316145b80610565575061056586868661289a565b604080518082019091525f80825260208201525f808061215b5f5160206139475f395f51905f52866138b0565b90505b61216781612981565b90935091505f5160206139475f395f51905f52828309830361219f576040805180820190915290815260208101919091529392505050565b5f5160206139475f395f51905f5260018208905061215e565b8251602080850151845180519083015186840151805190850151875188870151604080519889018e90528801989098526060870195909552608086019390935260a085019190915260c084015260e08301526101008201526101208101919091525f907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019061014001604051602081830303815290604052805190602001205f1c61226391906138b0565b95945050505050565b604080518082019091525f8082526020820152612287612b8f565b835181526020808501519082015260408082018490525f908360608460076107d05a03fa905080806122b557fe5b50806122d457604051632319df1960e11b815260040160405180910390fd5b505092915050565b604080518082019091525f80825260208201526122f7612bad565b835181526020808501518183015283516040808401919091529084015160608301525f908360808460066107d05a03fa9050808061233157fe5b50806122d45760405163d4b68fd760e01b815260040160405180910390fd5b612358612b6a565b50604080516080810182527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28183019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed6060830152815281518083019092527f275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec82527f1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d60208381019190915281019190915290565b6040805180820182528681526020808201869052825180840190935286835282018490525f91829190612441612bcb565b5f5b60028110156125f8575f6124588260066138cf565b905084826002811061246c5761246c613262565b6020020151518361247d835f6138e6565b600c811061248d5761248d613262565b60200201528482600281106124a4576124a4613262565b602002015160200151838260016124bb91906138e6565b600c81106124cb576124cb613262565b60200201528382600281106124e2576124e2613262565b60200201515151836124f58360026138e6565b600c811061250557612505613262565b602002015283826002811061251c5761251c613262565b60200201515160016020020151836125358360036138e6565b600c811061254557612545613262565b602002015283826002811061255c5761255c613262565b6020020151602001515f6002811061257657612576613262565b6020020151836125878360046138e6565b600c811061259757612597613262565b60200201528382600281106125ae576125ae613262565b6020020151602001516001600281106125c9576125c9613262565b6020020151836125da8360056138e6565b600c81106125ea576125ea613262565b602002015250600101612443565b50612601612bea565b5f6020826101808560088cfa9151919c9115159b50909950505050505050505050565b6040805180820182528581526020808201859052825180840190935285835282018390525f91612652612bcb565b5f5b6002811015612809575f6126698260066138cf565b905084826002811061267d5761267d613262565b6020020151518361268e835f6138e6565b600c811061269e5761269e613262565b60200201528482600281106126b5576126b5613262565b602002015160200151838260016126cc91906138e6565b600c81106126dc576126dc613262565b60200201528382600281106126f3576126f3613262565b60200201515151836127068360026138e6565b600c811061271657612716613262565b602002015283826002811061272d5761272d613262565b60200201515160016020020151836127468360036138e6565b600c811061275657612756613262565b602002015283826002811061276d5761276d613262565b6020020151602001515f6002811061278757612787613262565b6020020151836127988360046138e6565b600c81106127a8576127a8613262565b60200201528382600281106127bf576127bf613262565b6020020151602001516001600281106127da576127da613262565b6020020151836127eb8360056138e6565b600c81106127fb576127fb613262565b602002015250600101612654565b50612812612bea565b5f6020826101808560086107d05a03fa9050808061282c57fe5b508061284b576040516324ccc79360e21b815260040160405180910390fd5b5051151598975050505050505050565b5f5f825160410361288f576020830151604084015160608501515f1a612883878285856129fd565b94509450505050610871565b505f90506002610871565b5f5f5f856001600160a01b0316631626ba7e60e01b86866040516024016128c29291906138f9565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516129009190613919565b5f60405180830381855afa9150503d805f8114612938576040519150601f19603f3d011682016040523d82523d5f602084013e61293d565b606091505b509150915081801561295157506020815110155b801561056557508051630b135d3f60e11b90612976908301602090810190840161392f565b149695505050505050565b5f80805f5160206139475f395f51905f5260035f5160206139475f395f51905f52865f5160206139475f395f51905f52888909090890505f6129f1827f0c19139cb84c680a6e14116da060561765e05aa45a1c72a34f082305b61f3f525f5160206139475f395f51905f52612aba565b91959194509092505050565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612a3257505f90506003612ab1565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612a83573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116612aab575f60019250925050612ab1565b91505f90505b94509492505050565b5f5f612ac4612bea565b612acc612c08565b602080825281810181905260408201819052606082018890526080820187905260a082018690528260c08360056107d05a03fa92508280612b0957fe5b5082612b285760405163d51edae360e01b815260040160405180910390fd5b505195945050505050565b508054612b3f906132fc565b5f825580601f10612b4e575050565b601f0160209004905f5260205f20908101906119309190612c26565b6040518060400160405280612b7d612c3e565b8152602001612b8a612c3e565b905290565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b604051806101800160405280600c906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b5b80821115612c3a575f8155600101612c27565b5090565b60405180604001604052806002906020820280368337509192915050565b80356001600160a01b0381168114612c72575f5ffd5b919050565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b0381118282101715612cad57612cad612c77565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612cdb57612cdb612c77565b604052919050565b5f60408284031215612cf3575f5ffd5b612cfb612c8b565b9050612d0682612c5c565b8152602082013563ffffffff81168114612d1e575f5ffd5b602082015292915050565b5f5f60608385031215612d3a575f5ffd5b612d4383612c5c565b9150612d528460208501612ce3565b90509250929050565b80356001600160401b0381168114612c72575f5ffd5b5f5f60608385031215612d82575f5ffd5b612d8c8484612ce3565b9150612d5260408401612d5b565b5f5f60608385031215612dab575f5ffd5b612db58484612ce3565b9150612d5260408401612c5c565b5f82601f830112612dd2575f5ffd5b612ddc6040612cb3565b806040840185811115612ded575f5ffd5b845b81811015612e07578035845260209384019301612def565b509095945050505050565b5f5f82840360c0811215612e24575f5ffd5b6040811215612e31575f5ffd5b612e39612c8b565b843581526020808601359082015292506080603f1982011215612e5a575f5ffd5b50612e63612c8b565b612e708560408601612dc3565b8152612e7f8560808601612dc3565b6020820152809150509250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6104566020830184612e8f565b5f5f83601f840112612edf575f5ffd5b5081356001600160401b03811115612ef5575f5ffd5b602083019150836020828501011115610871575f5ffd5b5f5f5f5f60808587031215612f1f575f5ffd5b612f2885612c5c565b9350612f378660208701612ce3565b925060608501356001600160401b03811115612f51575f5ffd5b612f5d87828801612ecf565b95989497509550505050565b5f60408284031215612f79575f5ffd5b6104568383612ce3565b634e487b7160e01b5f52602160045260245ffd5b60038110612fb357634e487b7160e01b5f52602160045260245ffd5b9052565b602081016104598284612f97565b5f5f5f5f5f5f60a08789031215612fda575f5ffd5b612fe387612c5c565b9550612ff28860208901612ce3565b945060608701356001600160401b0381111561300c575f5ffd5b61301889828a01612ecf565b90955093505060808701356001600160401b03811115613036575f5ffd5b61304289828a01612ecf565b979a9699509497509295939492505050565b5f5f60608385031215613065575f5ffd5b61306f8484612ce3565b915060408301356001600160401b03811115613089575f5ffd5b8301601f81018513613099575f5ffd5b80356001600160401b038111156130b2576130b2612c77565b6130c5601f8201601f1916602001612cb3565b8181528660208385010111156130d9575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b805f5b60028110156115b65781518452602093840193909101906001016130fb565b5f60c082019050835182526020840151602083015261313d6040830184516130f8565b602083015161314f60808401826130f8565b509392505050565b803560038110612c72575f5ffd5b5f5f5f60808486031215613177575f5ffd5b6131818585612ce3565b925061318f60408501613157565b915061319d60608501612d5b565b90509250925092565b5f5f5f608084860312156131b8575f5ffd5b6131c184612c5c565b92506131d08560208601612ce3565b915061319d60608501612c5c565b5f602082840312156131ee575f5ffd5b5035919050565b5f5f60608385031215613206575f5ffd5b6132108484612ce3565b9150612d5260408401613157565b805160208201516001600160601b031981169190601482101561325b576001600160601b03196001600160601b03198360140360031b1b82161692505b5050919050565b634e487b7160e01b5f52603260045260245ffd5b818382375f9101908152919050565b80516001600160a01b0316825260209081015163ffffffff16910152565b606081016132b18285613285565b6001600160a01b039290921660409190910152919050565b634e487b7160e01b5f52601160045260245ffd5b6001600160401b038181168382160190811115610459576104596132c9565b600181811c9082168061331057607f821691505b60208210810361332e57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561047457805f5260205f20601f840160051c810160208510156133595750805b601f840160051c820191505b81811015610fa4575f8155600101613365565b5f19600383901b1c191660019190911b1790565b6001600160401b038311156133a3576133a3612c77565b6133b7836133b183546132fc565b83613334565b5f601f8411600181146133e3575f85156133d15750838201355b6133db8682613378565b845550610fa4565b5f83815260208120601f198716915b8281101561341257868501358255602094850194600190920191016133f2565b508682101561342e575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b6134728188613285565b61347f6040820187612f97565b60c060608201525f5f8654613493816132fc565b8060c0860152600182165f81146134b157600181146134cd576134fe565b60ff19831660e087015260e082151560051b87010193506134fe565b895f5260205f205f5b838110156134f557815488820160e001526001909101906020016134d6565b870160e0019450505b5050508281036080840152613514818688613440565b915050611b5460a08301846001600160401b03169052565b5f5f6040838503121561353d575f5ffd5b505080516020909101519092909150565b6001600160a01b03831681526060810161147e6020830184613285565b5f6020828403121561357b575f5ffd5b8151801515811461147e575f5ffd5b606081016135988285613285565b61147e6040830184612f97565b5f82601f8301126135b4575f5ffd5b6135be6040612cb3565b8060408401858111156135cf575f5ffd5b845b81811015612e075780518452602093840193016135d1565b5f5f5f5f60c085870312156135fc575f5ffd5b84516020860151909450925061361586604087016135a5565b915061362486608087016135a5565b905092959194509250565b81516001600160401b0381111561364857613648612c77565b61365c8161365684546132fc565b84613334565b6020601f821160018114613689575f83156136775750848201515b6136818482613378565b855550610fa4565b5f84815260208120601f198516915b828110156136b85787850151825560209485019460019092019101613698565b50848210156136d557868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b6136ee8186613285565b6136fb6040820185612f97565b608060608201525f610565608083018486613440565b81810361371c575050565b61372682546132fc565b6001600160401b0381111561373d5761373d612c77565b61374b8161365684546132fc565b5f601f82116001811461376e575f83156136775750848201546136818482613378565b5f8581526020808220868352908220601f198616925b838110156137a45782860154825560019586019590910190602001613784565b50858310156137c157818501545f19600388901b60f8161c191681555b5050505050600190811b01905550565b606081016137df8285613285565b6001600160401b03831660408301529392505050565b8051602080830151919081101561332e575f1960209190910360031b1b16919050565b80356001600160601b0319811690601484101561384f576001600160601b03196001600160601b03198560140360031b1b82161691505b5092915050565b5f5f5f5f60c08587031215613869575f5ffd5b84359350602085013592506138818660408701612dc3565b91506136248660808701612dc3565b5f5f604083850312156138a1575f5ffd5b50508035926020909101359150565b5f826138ca57634e487b7160e01b5f52601260045260245ffd5b500690565b8082028115828204841417610459576104596132c9565b80820180821115610459576104596132c9565b828152604060208201525f6139116040830184612e8f565b949350505050565b5f82518060208501845e5f920191825250919050565b5f6020828403121561393f575f5ffd5b505191905056fe30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47a2646970667358221220d5a3b5db4ec21adaddc3a38b8798b6f47011d8119df2771ee5d2ba8e860c6fea64736f6c634300081e0033", + Bin: "0x60e060405234801561000f575f5ffd5b50604051613bd7380380613bd783398101604081905261002e916100cb565b6001600160a01b03808316608052831660a052808061004c8161005a565b60c052506101fc9350505050565b5f5f829050601f8151111561008d578260405163305a27a960e01b815260040161008491906101a1565b60405180910390fd5b8051610098826101d6565b179392505050565b6001600160a01b03811681146100b4575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b5f5f5f606084860312156100dd575f5ffd5b83516100e8816100a0565b60208501519093506100f9816100a0565b60408501519092506001600160401b03811115610114575f5ffd5b8401601f81018613610124575f5ffd5b80516001600160401b0381111561013d5761013d6100b7565b604051601f8201601f19908116603f011681016001600160401b038111828210171561016b5761016b6100b7565b604052818152828201602001881015610182575f5ffd5b8160208401602083015e5f602083830101528093505050509250925092565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b805160208083015191908110156101f6575f198160200360031b1b821691505b50919050565b60805160a05160c05161399c61023b5f395f818161049e0152611c2701525f81816101f90152611cd201525f81816103b30152610899015261399c5ff3fe608060405234801561000f575f5ffd5b5060043610610153575f3560e01c80639a43e3fb116100bf578063d40cda1611610079578063d40cda16146103d5578063d9f12db2146103e8578063dab42d7e146103fb578063ea0d81491461041d578063ea194e2e14610430578063f698da2514610443575f5ffd5b80639a43e3fb1461032d578063a2d701f61461034e578063aa165c3014610361578063b05c8f6d14610374578063bd30a0b91461039b578063ca8aa7c7146103ae575f5ffd5b806354fd4d501161011057806354fd4d501461029a5780637690e395146102a25780637cffe48c146102b557806381b2796c146102d55780638256909c146102e857806387ab86f41461031a575f5ffd5b80630934d59714610157578063110304021461017f578063166aa127146101945780633b32a7bd146101c95780634657e26a146101f457806350435add1461021b575b5f5ffd5b61016a610165366004612d29565b61044b565b60405190151581526020015b60405180910390f35b61019261018d366004612d71565b61045f565b005b6101bb7f991b0a3376ce87f8ecc5d70962279ac09cdce934e8b5b9683e73c8ff087c7f8181565b604051908152602001610176565b6101dc6101d7366004612d9a565b610479565b6040516001600160a01b039091168152602001610176565b6101dc7f000000000000000000000000000000000000000000000000000000000000000081565b61028d610229366004612e12565b8151602080840151835180519083015185840151805190850151604080519687019790975295850193909352606084810192909252608084015260a083019190915260c082019290925260e001604051602081830303815290604052905092915050565b6040516101769190612ebd565b61028d610497565b6101bb6102b0366004612f0c565b6104c7565b6102c86102c3366004612f69565b61056f565b6040516101769190612fb7565b6101926102e3366004612fc5565b610595565b6102fb6102f6366004613054565b61078a565b604080516001600160a01b039093168352901515602083015201610176565b610192610328366004612d29565b610878565b61034061033b366004612d9a565b610be4565b60405161017692919061311a565b61019261035c366004613165565b610e7a565b61028d61036f366004612d9a565b610fab565b6101bb7fda86e76deaed01641f80ff5f72c372a038fa5182697aeb967e8b1f9819d58d8181565b61016a6103a9366004612d9a565b6111ab565b6101dc7f000000000000000000000000000000000000000000000000000000000000000081565b6101926103e3366004612fc5565b6111e8565b6101bb6103f63660046131a6565b6113ec565b61016a6104093660046131de565b5f9081526002602052604090205460ff1690565b61019261042b3660046131f5565b611485565b6101bb61043e366004612d9a565b6115bc565b6101bb611789565b5f6104568284611842565b90505b92915050565b815161046a8161190a565b6104748383611933565b505050565b5f6104848383610fab565b61048d9061321e565b60601c9392505050565b60606104c27f00000000000000000000000000000000000000000000000000000000000000006119ad565b905090565b5f5f7fda86e76deaed01641f80ff5f72c372a038fa5182697aeb967e8b1f9819d58d8186865f015187602001518787604051610504929190613276565b6040805191829003822060208301969096526001600160a01b039485169082015292909116606083015263ffffffff16608082015260a081019190915260c001604051602081830303815290604052805190602001209050610565816119ea565b9695505050505050565b5f60015f61057c84611a30565b815260208101919091526040015f205460ff1692915050565b8561059f8161190a565b5f60015f6105ac89611a30565b815260208101919091526040015f9081205460ff1691508160028111156105d5576105d5612f83565b036105f357604051635cd3106d60e11b815260040160405180910390fd5b6105fd8789611842565b505f5f5f61060a8a611a30565b815260208082019290925260409081015f9081206001600160a01b038d1682529092529020805490915088908a9060ff1661066357604051632e40e18760e01b815260040161065a9291906132a3565b60405180910390fd5b505060038101546001600160401b0316156106915760405163a54aa36960e01b815260040160405180910390fd5b5f60045f61069e8b611a30565b815260208101919091526040015f20546001600160401b0316905067fffffffffffffffe1981016106e2576040516310297f8760e11b815260040160405180910390fd5b5f6106ed82426132dd565b90506106fe8a8c8b8b8b8b8a611a8e565b506002830161070e898b8361338c565b5060038301805467ffffffffffffffff19166001600160401b0383161790556040516001600160a01b038c16907f600c8ea5356df2fad359d32cf64544f00ad31ccf4133a70b4da8630b1e3658d190610775908d90889060018901908f908f908990613468565b60405180910390a25050505050505050505050565b5f5f5f60015f61079987611a30565b815260208101919091526040015f9081205460ff16915060018260028111156107c4576107c4612f83565b036107d6575083516020850120610847565b60028260028111156107ea576107ea612f83565b0361082e575f5f86806020019051810190610805919061352c565b60408051808201825283815260209081019283525f938452915190915290209250610847915050565b60405163fdea7c0960e01b815260040160405180910390fd5b5f818152600360205260409020546001600160a01b03168061086988826111ab565b945094505050505b9250929050565b816108828161190a565b6040516309a961f360e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631352c3e6906108d0908690869060040161354e565b602060405180830381865afa1580156108eb573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061090f919061356b565b158284909161093357604051631070287960e01b815260040161065a9291906132a3565b50505f60015f61094285611a30565b815260208101919091526040015f9081205460ff16915081600281111561096b5761096b612f83565b0361098957604051635cd3106d60e11b815260040160405180910390fd5b5f5f5f61099586611a30565b815260208082019290925260409081015f9081206001600160a01b03891682528352819020815160808101909252805460ff161515825260018101805492939192918401916109e3906132fc565b80601f0160208091040260200160405190810160405280929190818152602001828054610a0f906132fc565b8015610a5a5780601f10610a3157610100808354040283529160200191610a5a565b820191905f5260205f20905b815481529060010190602001808311610a3d57829003601f168201915b50505050508152602001600282018054610a73906132fc565b80601f0160208091040260200160405190810160405280929190818152602001828054610a9f906132fc565b8015610aea5780601f10610ac157610100808354040283529160200191610aea565b820191905f5260205f20905b815481529060010190602001808311610acd57829003601f168201915b5050509183525050600391909101546001600160401b0316602090910152805190915084908690610b3057604051632e40e18760e01b815260040161065a9291906132a3565b50505f5f610b3d86611a30565b815260208082019290925260409081015f9081206001600160a01b03891682529092528120805460ff1916815590610b786001830182612b33565b610b85600283015f612b33565b50600301805467ffffffffffffffff191690556040516001600160a01b038616907f28d3c3cee49478ec6fd219cfd685cd15cd01d95cabf69b4b7b57f9eaa3eb644290610bd5908790869061358a565b60405180910390a25050505050565b604080518082019091525f8082526020820152610bff612b6a565b5f60015f610c0c87611a30565b815260208101919091526040015f205460ff1690506002816002811115610c3557610c35612f83565b14610c535760405163fdea7c0960e01b815260040160405180910390fd5b5f5f5f610c5f88611a30565b815260208082019290925260409081015f9081206001600160a01b03891682528352819020815160808101909252805460ff16151582526001810180549293919291840191610cad906132fc565b80601f0160208091040260200160405190810160405280929190818152602001828054610cd9906132fc565b8015610d245780601f10610cfb57610100808354040283529160200191610d24565b820191905f5260205f20905b815481529060010190602001808311610d0757829003601f168201915b50505050508152602001600282018054610d3d906132fc565b80601f0160208091040260200160405190810160405280929190818152602001828054610d69906132fc565b8015610db45780601f10610d8b57610100808354040283529160200191610db4565b820191905f5260205f20905b815481529060010190602001808311610d9757829003601f168201915b5050509183525050600391909101546001600160401b03166020909101528051909150610e1d5750506040805180820182525f80825260208083018290528351808501855282815280820192909252835180850190945282845283019190915292509050610871565b5f610e2782611b5f565b90505f5f5f5f84806020019051810190610e4191906135e9565b604080518082018252948552602080860194909452805180820190915291825291810191909152909c909b509950505050505050505050565b8251610e858161190a565b6001836002811115610e9957610e99612f83565b1480610eb657506002836002811115610eb457610eb4612f83565b145b610ed35760405163fdea7c0960e01b815260040160405180910390fd5b5f60015f610ee087611a30565b815260208101919091526040015f9081205460ff169150816002811115610f0957610f09612f83565b14610f26576040516281f09f60e01b815260040160405180910390fd5b8360015f610f3388611a30565b815260208101919091526040015f20805460ff19166001836002811115610f5c57610f5c612f83565b02179055507fb2266cb118e57095fcdbedb24dabd9fc9f5127e2dbedf62ce6ee71696fb8b6e78585604051610f9292919061358a565b60405180910390a1610fa48584611933565b5050505050565b60605f60015f610fba86611a30565b815260208101919091526040015f205460ff1690506001816002811115610fe357610fe3612f83565b146110015760405163fdea7c0960e01b815260040160405180910390fd5b5f5f5f61100d87611a30565b815260208082019290925260409081015f9081206001600160a01b03881682528352819020815160808101909252805460ff1615158252600181018054929391929184019161105b906132fc565b80601f0160208091040260200160405190810160405280929190818152602001828054611087906132fc565b80156110d25780601f106110a9576101008083540402835291602001916110d2565b820191905f5260205f20905b8154815290600101906020018083116110b557829003601f168201915b505050505081526020016002820180546110eb906132fc565b80601f0160208091040260200160405190810160405280929190818152602001828054611117906132fc565b80156111625780601f1061113957610100808354040283529160200191611162565b820191905f5260205f20905b81548152906001019060200180831161114557829003601f168201915b5050509183525050600391909101546001600160401b031660209091015280519091506111a15760405180602001604052805f81525092505050610459565b5f61056582611b5f565b5f5f5f6111b785611a30565b815260208082019290925260409081015f9081206001600160a01b038616825290925290205460ff16905092915050565b856111f28161190a565b5f60015f6111ff89611a30565b815260208101919091526040015f9081205460ff16915081600281111561122857611228612f83565b0361124657604051635cd3106d60e11b815260040160405180910390fd5b5f5f61125189611a30565b815260208082019290925260409081015f9081206001600160a01b038c16825290925290205460ff1615611298576040516342ee68b560e01b815260040160405180910390fd5b6112a787898888888887611a8e565b50604051806080016040528060011515815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920182905250938552505060408051602081810183528482528501529092018190529050806113158a611a30565b815260208082019290925260409081015f9081206001600160a01b038d1682528352208251815460ff1916901515178155908201516001820190611359908261362f565b506040820151600282019061136e908261362f565b50606091909101516003909101805467ffffffffffffffff19166001600160401b039092169190911790556040516001600160a01b038916907f1201ce0c5e577111bce91e907fd99cb183da5edc1e3fb650ca40769e4e9176dd906113da908a9085908b908b906136e4565b60405180910390a25050505050505050565b81516020808401516040515f938493611459937f991b0a3376ce87f8ecc5d70962279ac09cdce934e8b5b9683e73c8ff087c7f81938a93928991019485526001600160a01b039384166020860152918316604085015263ffffffff16606084015216608082015260a00190565b60405160208183030381529060405280519060200120905061147a816119ea565b9150505b9392505050565b81516114908161190a565b60018260028111156114a4576114a4612f83565b14806114c1575060028260028111156114bf576114bf612f83565b145b6114de5760405163fdea7c0960e01b815260040160405180910390fd5b5f60015f6114eb86611a30565b815260208101919091526040015f9081205460ff16915081600281111561151457611514612f83565b14611531576040516281f09f60e01b815260040160405180910390fd5b8260015f61153e87611a30565b815260208101919091526040015f20805460ff1916600183600281111561156757611567612f83565b02179055507fb2266cb118e57095fcdbedb24dabd9fc9f5127e2dbedf62ce6ee71696fb8b6e7848460405161159d92919061358a565b60405180910390a16115b6846001600160401b03611933565b50505050565b5f5f5f5f6115c986611a30565b815260208082019290925260409081015f9081206001600160a01b03871682528352819020815160808101909252805460ff16151582526001810180549293919291840191611617906132fc565b80601f0160208091040260200160405190810160405280929190818152602001828054611643906132fc565b801561168e5780601f106116655761010080835404028352916020019161168e565b820191905f5260205f20905b81548152906001019060200180831161167157829003601f168201915b505050505081526020016002820180546116a7906132fc565b80601f01602080910402602001604051908101604052809291908181526020018280546116d3906132fc565b801561171e5780601f106116f55761010080835404028352916020019161171e565b820191905f5260205f20905b81548152906001019060200180831161170157829003601f168201915b5050509183525050600391909101546001600160401b031660209091015290505f60018161174b87611a30565b815260208101919091526040015f2054825160ff909116915061177357505f91506104599050565b5f61177d83611b5f565b90506105658183611b9e565b60408051808201909152600a81526922b4b3b2b72630bcb2b960b11b6020909101525f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea6117f6611c1f565b805160209182012060408051928301949094529281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f5f5f5f61184f86611a30565b815260208082019290925260409081015f9081206001600160a01b03871682529092529020805490915060ff16611889575f915050610459565b60038101546001600160401b0316158015906118b2575060038101546001600160401b03164210155b1561190157600181016118c86002830182613711565b5060408051602081019091525f815260028201906118e6908261362f565b50600301805467ffffffffffffffff19169055506001610459565b505f9392505050565b61191381611c94565b6119305760405163932d94f760e01b815260040160405180910390fd5b50565b8060045f61194085611a30565b81526020019081526020015f205f6101000a8154816001600160401b0302191690836001600160401b031602179055507f22b2b63b5820f9d933565468845820b939bf5ad654ea6ab5bdd3728f19e4580f82826040516119a19291906137d1565b60405180910390a15050565b60605f6119b983611d3d565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f6119f3611789565b60405161190160f01b6020820152602281019190915260428101839052606201604051602081830303815290604052805190602001209050919050565b5f815f0151826020015163ffffffff16604051602001611a7692919060609290921b6001600160601b031916825260a01b6001600160a01b031916601482015260200190565b604051602081830303815290604052610459906137f5565b5f806001836002811115611aa457611aa4612f83565b03611abe57611ab7898989898989611d64565b9050611ae5565b6002836002811115611ad257611ad2612f83565b0361082e57611ab7898989898989611e56565b5f8181526002602052604090205460ff1615611b1457604051630c7bc20160e11b815260040160405180910390fd5b5f818152600260209081526040808320805460ff191660011790556003909152902080546001600160a01b038a166001600160a01b031990911617905590505b979650505050505050565b6060818101516001600160401b031615801590611b89575081606001516001600160401b03164210155b15611b9657506040015190565b506020015190565b5f6001826002811115611bb357611bb3612f83565b03611bc5575081516020830120610459565b6002826002811115611bd957611bd9612f83565b0361082e575f5f84806020019051810190611bf491906135e9565b505060408051808201825283815260209081019283525f938452915190915290209250610459915050565b60605f611c4b7f00000000000000000000000000000000000000000000000000000000000000006119ad565b9050805f81518110611c5f57611c5f613262565b016020908101516040516001600160f81b03199091169181019190915260210160405160208183030381529060405291505090565b604051631beb2b9760e31b81526001600160a01b0382811660048301523360248301523060448301525f80356001600160e01b0319166064840152917f00000000000000000000000000000000000000000000000000000000000000009091169063df595cb890608401602060405180830381865afa158015611d19573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610459919061356b565b5f60ff8216601f81111561045957604051632cd44ac360e21b815260040160405180910390fd5b5f60148414611d865760405163d109118160e01b815260040160405180910390fd5b5f611d918587613818565b60601c905080611db457604051634935505f60e01b815260040160405180910390fd5b5f611df687878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525060019250611b9e915050565b90505f611e04898b856113ec565b9050611e49838288888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152505f199250611fc0915050565b5098975050505050505050565b5f60c08414611e785760405163d109118160e01b815260040160405180910390fd5b60408214611e9957604051638baa579f60e01b815260040160405180910390fd5b5f611ea6878988886104c7565b90505f80808080611eb98a8c018c613856565b9350935093509350835f148015611ece575082155b15611eec57604051634935505f60e01b815260040160405180910390fd5b5f80611efa8a8c018c613890565b6040805180820182528381526020808201849052825180840184528b81528082018b90528351808501909452898452908301889052939550919350909190611f468b8484845f80612012565b9a508a9950611f729850505050505050505057604051638baa579f60e01b815260040160405180910390fd5b611fb387878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525060029250611b9e915050565b9998505050505050505050565b42811015611fe157604051630819bdcd60e01b815260040160405180910390fd5b611ff56001600160a01b03851684846120da565b6115b657604051638baa579f60e01b815260040160405180910390fd5b5f5f5f61201e8961212e565b90505f61202d8a89898c6121b8565b90505f61204461203d8a8461226c565b8b906122dc565b90505f61208661207f846120796040805180820182525f80825260209182015281518083019092526001825260029082015290565b9061226c565b85906122dc565b905087156120ab576120a28261209a612350565b838c8b612410565b965094506120cb565b6120be826120b7612350565b838c612624565b955085156120cb57600194505b50505050965096945050505050565b5f5f5f6120e7858561285b565b90925090505f8160048111156120ff576120ff612f83565b14801561211d5750856001600160a01b0316826001600160a01b0316145b80610565575061056586868661289a565b604080518082019091525f80825260208201525f808061215b5f5160206139475f395f51905f52866138b0565b90505b61216781612981565b90935091505f5160206139475f395f51905f52828309830361219f576040805180820190915290815260208101919091529392505050565b5f5160206139475f395f51905f5260018208905061215e565b8251602080850151845180519083015186840151805190850151875188870151604080519889018e90528801989098526060870195909552608086019390935260a085019190915260c084015260e08301526101008201526101208101919091525f907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019061014001604051602081830303815290604052805190602001205f1c61226391906138b0565b95945050505050565b604080518082019091525f8082526020820152612287612b8f565b835181526020808501519082015260408082018490525f908360608460076107d05a03fa905080806122b557fe5b50806122d457604051632319df1960e11b815260040160405180910390fd5b505092915050565b604080518082019091525f80825260208201526122f7612bad565b835181526020808501518183015283516040808401919091529084015160608301525f908360808460066107d05a03fa9050808061233157fe5b50806122d45760405163d4b68fd760e01b815260040160405180910390fd5b612358612b6a565b50604080516080810182527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28183019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed6060830152815281518083019092527f275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec82527f1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d60208381019190915281019190915290565b6040805180820182528681526020808201869052825180840190935286835282018490525f91829190612441612bcb565b5f5b60028110156125f8575f6124588260066138cf565b905084826002811061246c5761246c613262565b6020020151518361247d835f6138e6565b600c811061248d5761248d613262565b60200201528482600281106124a4576124a4613262565b602002015160200151838260016124bb91906138e6565b600c81106124cb576124cb613262565b60200201528382600281106124e2576124e2613262565b60200201515151836124f58360026138e6565b600c811061250557612505613262565b602002015283826002811061251c5761251c613262565b60200201515160016020020151836125358360036138e6565b600c811061254557612545613262565b602002015283826002811061255c5761255c613262565b6020020151602001515f6002811061257657612576613262565b6020020151836125878360046138e6565b600c811061259757612597613262565b60200201528382600281106125ae576125ae613262565b6020020151602001516001600281106125c9576125c9613262565b6020020151836125da8360056138e6565b600c81106125ea576125ea613262565b602002015250600101612443565b50612601612bea565b5f6020826101808560088cfa9151919c9115159b50909950505050505050505050565b6040805180820182528581526020808201859052825180840190935285835282018390525f91612652612bcb565b5f5b6002811015612809575f6126698260066138cf565b905084826002811061267d5761267d613262565b6020020151518361268e835f6138e6565b600c811061269e5761269e613262565b60200201528482600281106126b5576126b5613262565b602002015160200151838260016126cc91906138e6565b600c81106126dc576126dc613262565b60200201528382600281106126f3576126f3613262565b60200201515151836127068360026138e6565b600c811061271657612716613262565b602002015283826002811061272d5761272d613262565b60200201515160016020020151836127468360036138e6565b600c811061275657612756613262565b602002015283826002811061276d5761276d613262565b6020020151602001515f6002811061278757612787613262565b6020020151836127988360046138e6565b600c81106127a8576127a8613262565b60200201528382600281106127bf576127bf613262565b6020020151602001516001600281106127da576127da613262565b6020020151836127eb8360056138e6565b600c81106127fb576127fb613262565b602002015250600101612654565b50612812612bea565b5f6020826101808560086107d05a03fa9050808061282c57fe5b508061284b576040516324ccc79360e21b815260040160405180910390fd5b5051151598975050505050505050565b5f5f825160410361288f576020830151604084015160608501515f1a612883878285856129fd565b94509450505050610871565b505f90506002610871565b5f5f5f856001600160a01b0316631626ba7e60e01b86866040516024016128c29291906138f9565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516129009190613919565b5f60405180830381855afa9150503d805f8114612938576040519150601f19603f3d011682016040523d82523d5f602084013e61293d565b606091505b509150915081801561295157506020815110155b801561056557508051630b135d3f60e11b90612976908301602090810190840161392f565b149695505050505050565b5f80805f5160206139475f395f51905f5260035f5160206139475f395f51905f52865f5160206139475f395f51905f52888909090890505f6129f1827f0c19139cb84c680a6e14116da060561765e05aa45a1c72a34f082305b61f3f525f5160206139475f395f51905f52612aba565b91959194509092505050565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612a3257505f90506003612ab1565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612a83573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116612aab575f60019250925050612ab1565b91505f90505b94509492505050565b5f5f612ac4612bea565b612acc612c08565b602080825281810181905260408201819052606082018890526080820187905260a082018690528260c08360056107d05a03fa92508280612b0957fe5b5082612b285760405163d51edae360e01b815260040160405180910390fd5b505195945050505050565b508054612b3f906132fc565b5f825580601f10612b4e575050565b601f0160209004905f5260205f20908101906119309190612c26565b6040518060400160405280612b7d612c3e565b8152602001612b8a612c3e565b905290565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b604051806101800160405280600c906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b5b80821115612c3a575f8155600101612c27565b5090565b60405180604001604052806002906020820280368337509192915050565b80356001600160a01b0381168114612c72575f5ffd5b919050565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b0381118282101715612cad57612cad612c77565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612cdb57612cdb612c77565b604052919050565b5f60408284031215612cf3575f5ffd5b612cfb612c8b565b9050612d0682612c5c565b8152602082013563ffffffff81168114612d1e575f5ffd5b602082015292915050565b5f5f60608385031215612d3a575f5ffd5b612d4383612c5c565b9150612d528460208501612ce3565b90509250929050565b80356001600160401b0381168114612c72575f5ffd5b5f5f60608385031215612d82575f5ffd5b612d8c8484612ce3565b9150612d5260408401612d5b565b5f5f60608385031215612dab575f5ffd5b612db58484612ce3565b9150612d5260408401612c5c565b5f82601f830112612dd2575f5ffd5b612ddc6040612cb3565b806040840185811115612ded575f5ffd5b845b81811015612e07578035845260209384019301612def565b509095945050505050565b5f5f82840360c0811215612e24575f5ffd5b6040811215612e31575f5ffd5b612e39612c8b565b843581526020808601359082015292506080603f1982011215612e5a575f5ffd5b50612e63612c8b565b612e708560408601612dc3565b8152612e7f8560808601612dc3565b6020820152809150509250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6104566020830184612e8f565b5f5f83601f840112612edf575f5ffd5b5081356001600160401b03811115612ef5575f5ffd5b602083019150836020828501011115610871575f5ffd5b5f5f5f5f60808587031215612f1f575f5ffd5b612f2885612c5c565b9350612f378660208701612ce3565b925060608501356001600160401b03811115612f51575f5ffd5b612f5d87828801612ecf565b95989497509550505050565b5f60408284031215612f79575f5ffd5b6104568383612ce3565b634e487b7160e01b5f52602160045260245ffd5b60038110612fb357634e487b7160e01b5f52602160045260245ffd5b9052565b602081016104598284612f97565b5f5f5f5f5f5f60a08789031215612fda575f5ffd5b612fe387612c5c565b9550612ff28860208901612ce3565b945060608701356001600160401b0381111561300c575f5ffd5b61301889828a01612ecf565b90955093505060808701356001600160401b03811115613036575f5ffd5b61304289828a01612ecf565b979a9699509497509295939492505050565b5f5f60608385031215613065575f5ffd5b61306f8484612ce3565b915060408301356001600160401b03811115613089575f5ffd5b8301601f81018513613099575f5ffd5b80356001600160401b038111156130b2576130b2612c77565b6130c5601f8201601f1916602001612cb3565b8181528660208385010111156130d9575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b805f5b60028110156115b65781518452602093840193909101906001016130fb565b5f60c082019050835182526020840151602083015261313d6040830184516130f8565b602083015161314f60808401826130f8565b509392505050565b803560038110612c72575f5ffd5b5f5f5f60808486031215613177575f5ffd5b6131818585612ce3565b925061318f60408501613157565b915061319d60608501612d5b565b90509250925092565b5f5f5f608084860312156131b8575f5ffd5b6131c184612c5c565b92506131d08560208601612ce3565b915061319d60608501612c5c565b5f602082840312156131ee575f5ffd5b5035919050565b5f5f60608385031215613206575f5ffd5b6132108484612ce3565b9150612d5260408401613157565b805160208201516001600160601b031981169190601482101561325b576001600160601b03196001600160601b03198360140360031b1b82161692505b5050919050565b634e487b7160e01b5f52603260045260245ffd5b818382375f9101908152919050565b80516001600160a01b0316825260209081015163ffffffff16910152565b606081016132b18285613285565b6001600160a01b039290921660409190910152919050565b634e487b7160e01b5f52601160045260245ffd5b6001600160401b038181168382160190811115610459576104596132c9565b600181811c9082168061331057607f821691505b60208210810361332e57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561047457805f5260205f20601f840160051c810160208510156133595750805b601f840160051c820191505b81811015610fa4575f8155600101613365565b5f19600383901b1c191660019190911b1790565b6001600160401b038311156133a3576133a3612c77565b6133b7836133b183546132fc565b83613334565b5f601f8411600181146133e3575f85156133d15750838201355b6133db8682613378565b845550610fa4565b5f83815260208120601f198716915b8281101561341257868501358255602094850194600190920191016133f2565b508682101561342e575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b6134728188613285565b61347f6040820187612f97565b60c060608201525f5f8654613493816132fc565b8060c0860152600182165f81146134b157600181146134cd576134fe565b60ff19831660e087015260e082151560051b87010193506134fe565b895f5260205f205f5b838110156134f557815488820160e001526001909101906020016134d6565b870160e0019450505b5050508281036080840152613514818688613440565b915050611b5460a08301846001600160401b03169052565b5f5f6040838503121561353d575f5ffd5b505080516020909101519092909150565b6001600160a01b03831681526060810161147e6020830184613285565b5f6020828403121561357b575f5ffd5b8151801515811461147e575f5ffd5b606081016135988285613285565b61147e6040830184612f97565b5f82601f8301126135b4575f5ffd5b6135be6040612cb3565b8060408401858111156135cf575f5ffd5b845b81811015612e075780518452602093840193016135d1565b5f5f5f5f60c085870312156135fc575f5ffd5b84516020860151909450925061361586604087016135a5565b915061362486608087016135a5565b905092959194509250565b81516001600160401b0381111561364857613648612c77565b61365c8161365684546132fc565b84613334565b6020601f821160018114613689575f83156136775750848201515b6136818482613378565b855550610fa4565b5f84815260208120601f198516915b828110156136b85787850151825560209485019460019092019101613698565b50848210156136d557868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b6136ee8186613285565b6136fb6040820185612f97565b608060608201525f610565608083018486613440565b81810361371c575050565b61372682546132fc565b6001600160401b0381111561373d5761373d612c77565b61374b8161365684546132fc565b5f601f82116001811461376e575f83156136775750848201546136818482613378565b5f8581526020808220868352908220601f198616925b838110156137a45782860154825560019586019590910190602001613784565b50858310156137c157818501545f19600388901b60f8161c191681555b5050505050600190811b01905550565b606081016137df8285613285565b6001600160401b03831660408301529392505050565b8051602080830151919081101561332e575f1960209190910360031b1b16919050565b80356001600160601b0319811690601484101561384f576001600160601b03196001600160601b03198560140360031b1b82161691505b5092915050565b5f5f5f5f60c08587031215613869575f5ffd5b84359350602085013592506138818660408701612dc3565b91506136248660808701612dc3565b5f5f604083850312156138a1575f5ffd5b50508035926020909101359150565b5f826138ca57634e487b7160e01b5f52601260045260245ffd5b500690565b8082028115828204841417610459576104596132c9565b80820180821115610459576104596132c9565b828152604060208201525f6139116040830184612e8f565b949350505050565b5f82518060208501845e5f920191825250919050565b5f6020828403121561393f575f5ffd5b505191905056fe30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47a26469706673582212203cb79aee006d2563e995b94bcf4d182b158f1e60d797fc446deefdbc3f3e758064736f6c634300081e0033", } // KeyRegistrarABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/RewardsCoordinator/binding.go b/pkg/bindings/RewardsCoordinator/binding.go index 3755f4ab42..d646fd4e53 100644 --- a/pkg/bindings/RewardsCoordinator/binding.go +++ b/pkg/bindings/RewardsCoordinator/binding.go @@ -114,7 +114,7 @@ type OperatorSet struct { // RewardsCoordinatorMetaData contains all meta data concerning the RewardsCoordinator contract. var RewardsCoordinatorMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinatorTypes.RewardsCoordinatorConstructorParams\",\"components\":[{\"name\":\"delegationManager\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"},{\"name\":\"strategyManager\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"},{\"name\":\"allocationManager\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"},{\"name\":\"pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"permissionController\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"},{\"name\":\"CALCULATION_INTERVAL_SECONDS\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"MAX_REWARDS_DURATION\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"MAX_RETROACTIVE_LENGTH\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"MAX_FUTURE_LENGTH\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"GENESIS_REWARDS_TIMESTAMP\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"CALCULATION_INTERVAL_SECONDS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"GENESIS_REWARDS_TIMESTAMP\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_FUTURE_LENGTH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_RETROACTIVE_LENGTH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_REWARDS_DURATION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"activationDelay\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allocationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"beaconChainETHStrategy\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateEarnerLeafHash\",\"inputs\":[{\"name\":\"leaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinatorTypes.EarnerTreeMerkleLeaf\",\"components\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"earnerTokenRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"calculateTokenLeafHash\",\"inputs\":[{\"name\":\"leaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinatorTypes.TokenTreeMerkleLeaf\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"cumulativeEarnings\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"checkClaim\",\"inputs\":[{\"name\":\"claim\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinatorTypes.RewardsMerkleClaim\",\"components\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerTreeProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"earnerLeaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinatorTypes.EarnerTreeMerkleLeaf\",\"components\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"earnerTokenRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"tokenIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"tokenTreeProofs\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"tokenLeaves\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.TokenTreeMerkleLeaf[]\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"cumulativeEarnings\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"claimerFor\",\"inputs\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"claimer\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"createAVSRewardsSubmission\",\"inputs\":[{\"name\":\"rewardsSubmissions\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.RewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createOperatorDirectedAVSRewardsSubmission\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorDirectedRewardsSubmissions\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.OperatorDirectedRewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"operatorRewards\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.OperatorReward[]\",\"components\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"description\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createOperatorDirectedOperatorSetRewardsSubmission\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operatorDirectedRewardsSubmissions\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.OperatorDirectedRewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"operatorRewards\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.OperatorReward[]\",\"components\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"description\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createRewardsForAllEarners\",\"inputs\":[{\"name\":\"rewardsSubmissions\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.RewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createRewardsForAllSubmission\",\"inputs\":[{\"name\":\"rewardsSubmissions\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.RewardsSubmission[]\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"cumulativeClaimed\",\"inputs\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[{\"name\":\"totalClaimed\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"currRewardsCalculationEndTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"defaultOperatorSplitBips\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"disableRoot\",\"inputs\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getCurrentClaimableDistributionRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinatorTypes.DistributionRoot\",\"components\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"disabled\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentDistributionRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinatorTypes.DistributionRoot\",\"components\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"disabled\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDistributionRootAtIndex\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinatorTypes.DistributionRoot\",\"components\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"disabled\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDistributionRootsLength\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorAVSSplit\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorPISplit\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetSplit\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRootIndexFromHash\",\"inputs\":[{\"name\":\"rootHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"initialPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_rewardsUpdater\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_activationDelay\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_defaultSplitBips\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isAVSRewardsSubmissionHash\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"valid\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isOperatorDirectedAVSRewardsSubmissionHash\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"valid\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isOperatorDirectedOperatorSetRewardsSubmissionHash\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"valid\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isRewardsForAllSubmitter\",\"inputs\":[{\"name\":\"submitter\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"valid\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isRewardsSubmissionForAllEarnersHash\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"valid\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isRewardsSubmissionForAllHash\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"valid\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"permissionController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"processClaim\",\"inputs\":[{\"name\":\"claim\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinatorTypes.RewardsMerkleClaim\",\"components\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerTreeProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"earnerLeaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinatorTypes.EarnerTreeMerkleLeaf\",\"components\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"earnerTokenRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"tokenIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"tokenTreeProofs\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"tokenLeaves\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.TokenTreeMerkleLeaf[]\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"cumulativeEarnings\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]},{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"processClaims\",\"inputs\":[{\"name\":\"claims\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.RewardsMerkleClaim[]\",\"components\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"earnerTreeProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"earnerLeaf\",\"type\":\"tuple\",\"internalType\":\"structIRewardsCoordinatorTypes.EarnerTreeMerkleLeaf\",\"components\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"earnerTokenRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"tokenIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"tokenTreeProofs\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"tokenLeaves\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.TokenTreeMerkleLeaf[]\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"cumulativeEarnings\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]},{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"rewardsUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setActivationDelay\",\"inputs\":[{\"name\":\"_activationDelay\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setClaimerFor\",\"inputs\":[{\"name\":\"claimer\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setClaimerFor\",\"inputs\":[{\"name\":\"earner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"claimer\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setDefaultOperatorSplit\",\"inputs\":[{\"name\":\"split\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setOperatorAVSSplit\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"split\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setOperatorPISplit\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"split\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setOperatorSetSplit\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"split\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setRewardsForAllSubmitter\",\"inputs\":[{\"name\":\"_submitter\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_newValue\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setRewardsUpdater\",\"inputs\":[{\"name\":\"_rewardsUpdater\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"strategyManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submissionNonce\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submitRoot\",\"inputs\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"AVSRewardsSubmissionCreated\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"rewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinatorTypes.RewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ActivationDelaySet\",\"inputs\":[{\"name\":\"oldActivationDelay\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"newActivationDelay\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ClaimerForSet\",\"inputs\":[{\"name\":\"earner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"oldClaimer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"claimer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DefaultOperatorSplitBipsSet\",\"inputs\":[{\"name\":\"oldDefaultOperatorSplitBips\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"},{\"name\":\"newDefaultOperatorSplitBips\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DistributionRootDisabled\",\"inputs\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DistributionRootSubmitted\",\"inputs\":[{\"name\":\"rootIndex\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"root\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsCalculationEndTimestamp\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorAVSSplitBipsSet\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"oldOperatorAVSSplitBips\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"},{\"name\":\"newOperatorAVSSplitBips\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorDirectedAVSRewardsSubmissionCreated\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorDirectedRewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"operatorDirectedRewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinatorTypes.OperatorDirectedRewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"operatorRewards\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.OperatorReward[]\",\"components\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"description\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorDirectedOperatorSetRewardsSubmissionCreated\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorDirectedRewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"operatorDirectedRewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinatorTypes.OperatorDirectedRewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"operatorRewards\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.OperatorReward[]\",\"components\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"description\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorPISplitBipsSet\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"oldOperatorPISplitBips\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"},{\"name\":\"newOperatorPISplitBips\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetSplitBipsSet\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"activatedAt\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"oldOperatorSetSplitBips\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"},{\"name\":\"newOperatorSetSplitBips\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"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\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsClaimed\",\"inputs\":[{\"name\":\"root\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"earner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"claimer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"},{\"name\":\"claimedAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsForAllSubmitterSet\",\"inputs\":[{\"name\":\"rewardsForAllSubmitter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"oldValue\",\"type\":\"bool\",\"indexed\":true,\"internalType\":\"bool\"},{\"name\":\"newValue\",\"type\":\"bool\",\"indexed\":true,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsSubmissionForAllCreated\",\"inputs\":[{\"name\":\"submitter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"rewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinatorTypes.RewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsSubmissionForAllEarnersCreated\",\"inputs\":[{\"name\":\"tokenHopper\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"submissionNonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"rewardsSubmissionHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"rewardsSubmission\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRewardsCoordinatorTypes.RewardsSubmission\",\"components\":[{\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\",\"internalType\":\"structIRewardsCoordinatorTypes.StrategyAndMultiplier[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"duration\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsUpdaterSet\",\"inputs\":[{\"name\":\"oldRewardsUpdater\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newRewardsUpdater\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AmountExceedsMax\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"AmountIsZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CurrentlyPaused\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"DurationExceedsMax\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"DurationIsZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EarningsNotGreaterThanClaimed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EmptyRoot\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputArrayLengthZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCalculationIntervalSecondsRemainder\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidClaimProof\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidDurationRemainder\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidEarner\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidEarnerLeafIndex\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidGenesisRewardsTimestampRemainder\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidIndex\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidNewPausedStatus\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidPermissions\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProofLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidRoot\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidRootIndex\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidStartTimestampRemainder\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidTokenLeafIndex\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NewRootMustBeForNewCalculatedPeriod\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyPauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyUnpauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OperatorsNotInAscendingOrder\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"PreviousSplitPending\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RewardsEndTimestampNotElapsed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RootAlreadyActivated\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RootDisabled\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RootNotActivated\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SplitExceedsMax\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StartTimestampTooFarInFuture\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StartTimestampTooFarInPast\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StrategiesNotInAscendingOrder\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StrategyNotWhitelisted\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SubmissionNotRetroactive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UnauthorizedCaller\",\"inputs\":[]}]", - Bin: "0x6101c0604052348015610010575f5ffd5b506040516148fa3803806148fa83398101604081905261002f91610263565b608081015181516020830151604084015160a085015160c086015160e087015161010088015161012089015160608a01516001600160a01b038116610087576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b031660805261009d858261032d565b63ffffffff16156100c157604051630e06bd3160e01b815260040160405180910390fd5b6100ce620151808661032d565b63ffffffff16156100f25760405163223c7b3960e11b815260040160405180910390fd5b6001600160a01b0397881660a05295871660c05293861660e05263ffffffff9283166101005290821661012052811661014052908116610160521661018052166101a05261013e610144565b50610360565b5f54610100900460ff16156101af5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff908116146101fe575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b60405161014081016001600160401b038111828210171561022f57634e487b7160e01b5f52604160045260245ffd5b60405290565b80516001600160a01b038116811461024b575f5ffd5b919050565b805163ffffffff8116811461024b575f5ffd5b5f610140828403128015610275575f5ffd5b5061027e610200565b61028783610235565b815261029560208401610235565b60208201526102a660408401610235565b60408201526102b760608401610235565b60608201526102c860808401610235565b60808201526102d960a08401610250565b60a08201526102ea60c08401610250565b60c08201526102fb60e08401610250565b60e082015261030d6101008401610250565b6101008201526103206101208401610250565b6101208201529392505050565b5f63ffffffff83168061034e57634e487b7160e01b5f52601260045260245ffd5b8063ffffffff84160691505092915050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516144c96104315f395f81816105e5015261311801525f818161049901526132fb01525f81816103e8015261281601525f818161054701526132b901525f818161085e01526131a301525f818161079f015281816131f3015261326701525f81816108b201528181610a9f01528181611b1e0152611d8e01525f818161056e015261339601525f81816109250152611a8e01525f8181610731015281816126bb015261302b01526144c95ff3fe608060405234801561000f575f5ffd5b50600436106103a8575f3560e01c80638da5cb5b116101ea578063de02e50311610114578063f6efbb59116100a9578063fabc1cbc11610079578063fabc1cbc14610a13578063fbf1e2c114610a26578063fce36c7d14610a39578063ff9f6cce14610a4c575f5ffd5b8063f6efbb59146109c7578063f74e8eac146109da578063f8cd8448146109ed578063f96abf2e14610a00575f5ffd5b8063ed71e6a2116100e4578063ed71e6a214610947578063f22cef8514610974578063f2f07ab414610987578063f2fde38b146109b4575f5ffd5b8063de02e503146108e7578063e063f81f146108fa578063e810ce211461090d578063ea4d3c9b14610920575f5ffd5b8063a50a1d9c1161018a578063bf21a8aa1161015a578063bf21a8aa14610859578063c46db60614610880578063ca8aa7c7146108ad578063dcbb03b3146108d4575f5ffd5b8063a50a1d9c146107e7578063aebd8bae146107fa578063b3dbb0e014610827578063bb7e451f1461083a575f5ffd5b80639cb9a5fa116101c55780639cb9a5fa146107875780639d45c2811461079a5780639de4b35f146107c1578063a0169ddd146107d4575f5ffd5b80638da5cb5b146107535780639104c319146107645780639be3d4e41461077f575f5ffd5b80634596021c116102d65780635e9d83481161026b5780637b8f8b051161023b5780637b8f8b05146106e7578063863cb9a9146106ef578063865c695314610702578063886f11951461072c575f5ffd5b80635e9d83481461068a57806363f6a7981461069d5780636d21117e146106b2578063715018a6146106df575f5ffd5b806358baaa3e116102a657806358baaa3e14610644578063595c6a67146106575780635ac86ab71461065f5780635c975abb14610682575f5ffd5b80634596021c146105cd5780634657e26a146105e05780634b943960146106075780634d18cc351461062d575f5ffd5b8063149bc8721161034c57806339b70e381161031c57806339b70e38146105695780633a8c0786146105905780633ccc861d146105a75780633efe1db6146105ba575f5ffd5b8063149bc872146104ce5780632b9f64a4146104ef57806336af41fa1461052f57806337838ed014610542575f5ffd5b80630e9a53cf116103875780630e9a53cf146104345780630eb3834514610481578063131433b414610494578063136439dd146104bb575f5ffd5b806218572c146103ac57806304a0c502146103e35780630ca298991461041f575b5f5ffd5b6103ce6103ba3660046138f6565b60d16020525f908152604090205460ff1681565b60405190151581526020015b60405180910390f35b61040a7f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016103da565b61043261042d36600461396e565b610a5f565b005b61043c610ce8565b6040516103da91905f6080820190508251825263ffffffff602084015116602083015263ffffffff604084015116604083015260608301511515606083015292915050565b61043261048f3660046139ca565b610de8565b61040a7f000000000000000000000000000000000000000000000000000000000000000081565b6104326104c9366004613a01565b610e68565b6104e16104dc366004613a18565b610ea2565b6040519081526020016103da565b6105176104fd3660046138f6565b60cc6020525f90815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016103da565b61043261053d366004613a32565b610f17565b61040a7f000000000000000000000000000000000000000000000000000000000000000081565b6105177f000000000000000000000000000000000000000000000000000000000000000081565b60cb5461040a90600160a01b900463ffffffff1681565b6104326105b5366004613a81565b611088565b6104326105c8366004613ad7565b6110af565b6104326105db366004613b01565b611285565b6105177f000000000000000000000000000000000000000000000000000000000000000081565b61061a6106153660046138f6565b6112e8565b60405161ffff90911681526020016103da565b60cb5461040a90600160c01b900463ffffffff1681565b610432610652366004613b53565b611343565b610432611357565b6103ce61066d366004613b6c565b606654600160ff9092169190911b9081161490565b6066546104e1565b6103ce610698366004613b8c565b61136b565b60cb5461061a90600160e01b900461ffff1681565b6103ce6106c0366004613bbd565b60cf60209081525f928352604080842090915290825290205460ff1681565b6104326113f6565b60ca546104e1565b6104326106fd3660046138f6565b611407565b6104e1610710366004613be7565b60cd60209081525f928352604080842090915290825290205481565b6105177f000000000000000000000000000000000000000000000000000000000000000081565b6033546001600160a01b0316610517565b61051773beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac081565b61043c611418565b610432610795366004613c13565b6114b4565b61040a7f000000000000000000000000000000000000000000000000000000000000000081565b61061a6107cf366004613c4a565b611612565b6104326107e23660046138f6565b611695565b6104326107f5366004613c86565b6116a0565b6103ce610808366004613bbd565b60d260209081525f928352604080842090915290825290205460ff1681565b610432610835366004613c9f565b6116b1565b6104e16108483660046138f6565b60ce6020525f908152604090205481565b61040a7f000000000000000000000000000000000000000000000000000000000000000081565b6103ce61088e366004613bbd565b60d060209081525f928352604080842090915290825290205460ff1681565b6105177f000000000000000000000000000000000000000000000000000000000000000081565b6104326108e2366004613cc9565b6117bf565b61043c6108f5366004613a01565b6118ef565b61061a610908366004613be7565b61197f565b61040a61091b366004613a01565b6119e4565b6105177f000000000000000000000000000000000000000000000000000000000000000081565b6103ce610955366004613bbd565b60d360209081525f928352604080842090915290825290205460ff1681565b610432610982366004613be7565b611a65565b6103ce610995366004613bbd565b60d760209081525f928352604080842090915290825290205460ff1681565b6104326109c23660046138f6565b611bb2565b6104326109d5366004613d0d565b611c2d565b6104326109e8366004613d6b565b611d62565b6104e16109fb366004613a18565b611f0c565b610432610a0e366004613b53565b611f1c565b610432610a21366004613a01565b61204d565b60cb54610517906001600160a01b031681565b610432610a47366004613a32565b6120ba565b610432610a5a366004613a32565b6121eb565b6009610a6a8161234c565b610a7760208501856138f6565b610a8081612377565b610a8861239d565b6040516304c1b8eb60e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063260dc75890610ad4908890600401613dd6565b602060405180830381865afa158015610aef573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b139190613de4565b610b3057604051631fb1705560e21b815260040160405180910390fd5b5f5b83811015610cd65736858583818110610b4d57610b4d613dff565b9050602002810190610b5f9190613e13565b90505f60ce81610b7260208b018b6138f6565b6001600160a01b031681526020808201929092526040015f90812054925090610b9d908a018a6138f6565b8284604051602001610bb19392919061403b565b6040516020818303038152906040528051906020012090505f610bd3846123f6565b9050600160d75f610be760208e018e6138f6565b6001600160a01b0316815260208082019290925260409081015f9081208682529092529020805460ff1916911515919091179055610c2683600161407e565b60ce5f610c3660208e018e6138f6565b6001600160a01b03166001600160a01b031681526020019081526020015f208190555081336001600160a01b03167ffff0759ccb371dfb5691798724e70b4fa61cb3bfe730a33ac19fb86a48efc7568c8688604051610c9793929190614091565b60405180910390a3610cc6333083610cb56040890160208a016138f6565b6001600160a01b03169291906125e1565b505060019092019150610b329050565b50610ce16001609755565b5050505050565b604080516080810182525f80825260208201819052918101829052606081019190915260ca545b8015610dc0575f60ca610d236001846140b6565b81548110610d3357610d33613dff565b5f91825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff161580156060830181905291925090610da25750806040015163ffffffff164210155b15610dad5792915050565b5080610db8816140c9565b915050610d0f565b5050604080516080810182525f80825260208201819052918101829052606081019190915290565b610df061264c565b6001600160a01b0382165f81815260d1602052604080822054905160ff9091169284151592841515927f4de6293e668df1398422e1def12118052c1539a03cbfedc145895d48d7685f1c9190a4506001600160a01b03919091165f90815260d160205260409020805460ff1916911515919091179055565b610e706126a6565b6066548181168114610e955760405163c61dca5d60e01b815260040160405180910390fd5b610e9e82612749565b5050565b5f80610eb160208401846138f6565b8360200135604051602001610efa9392919060f89390931b6001600160f81b031916835260609190911b6bffffffffffffffffffffffff19166001830152601582015260350190565b604051602081830303815290604052805190602001209050919050565b6001610f228161234c565b335f90815260d1602052604090205460ff16610f5157604051635c427cd960e01b815260040160405180910390fd5b610f5961239d565b5f5b828110156110785736848483818110610f7657610f76613dff565b9050602002810190610f8891906140de565b335f81815260ce60209081526040808320549051949550939192610fb29290918591879101614170565b604051602081830303815290604052805190602001209050610fd383612786565b335f90815260d0602090815260408083208484529091529020805460ff1916600190811790915561100590839061407e565b335f81815260ce602052604090819020929092559051829184917f51088b8c89628df3a8174002c2a034d0152fce6af8415d651b2a4734bf2704829061104c908890614196565b60405180910390a461106d333060408601803590610cb590602089016138f6565b505050600101610f5b565b506110836001609755565b505050565b60026110938161234c565b61109b61239d565b6110a58383612871565b6110836001609755565b60036110ba8161234c565b60cb546001600160a01b031633146110e557604051635c427cd960e01b815260040160405180910390fd5b60cb5463ffffffff600160c01b90910481169083161161111857604051631ca7e50b60e21b815260040160405180910390fd5b428263ffffffff161061113e576040516306957c9160e11b815260040160405180910390fd5b60ca5460cb545f9061115d90600160a01b900463ffffffff16426141a8565b6040805160808101825287815263ffffffff87811660208084018281528684168587018181525f6060880181815260ca8054600181018255925297517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee160029092029182015592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee290930180549151975193871667ffffffffffffffff1990921691909117600160201b978716979097029690961760ff60401b1916600160401b921515929092029190911790945560cb805463ffffffff60c01b1916600160c01b840217905593519283529394508892908616917fecd866c3c158fa00bf34d803d5f6023000b57080bcb48af004c2b4b46b3afd08910160405180910390a45050505050565b60026112908161234c565b61129861239d565b5f5b838110156112d7576112cf8585838181106112b7576112b7613dff565b90506020028101906112c991906141c4565b84612871565b60010161129a565b506112e26001609755565b50505050565b6001600160a01b0381165f90815260d5602090815260408083208151606081018352905461ffff80821683526201000082041693820193909352600160201b90920463ffffffff169082015261133d90612af9565b92915050565b61134b61264c565b61135481612b69565b50565b61135f6126a6565b6113695f19612749565b565b5f6113ee8260ca61137f6020830183613b53565b63ffffffff168154811061139557611395613dff565b5f91825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff1615156060820152612bda565b506001919050565b6113fe61264c565b6113695f612d7d565b61140f61264c565b61135481612dce565b604080516080810182525f80825260208201819052918101829052606081019190915260ca805461144b906001906140b6565b8154811061145b5761145b613dff565b5f91825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff1615156060820152919050565b60056114bf8161234c565b836114c981612377565b6114d161239d565b5f5b83811015610cd657368585838181106114ee576114ee613dff565b90506020028101906115009190613e13565b6001600160a01b0388165f90815260ce6020908152604080832054905193945092611531918b91859187910161403b565b6040516020818303038152906040528051906020012090505f611553846123f6565b6001600160a01b038b165f90815260d3602090815260408083208684529091529020805460ff1916600190811790915590915061159190849061407e565b6001600160a01b038b165f81815260ce60205260409081902092909255905183919033907ffc8888bffd711da60bc5092b33f677d81896fe80ecc677b84cfab8184462b6e0906115e49088908a906141d8565b60405180910390a4611602333083610cb56040890160208a016138f6565b5050600190920191506114d39050565b6001600160a01b0382165f90815260d66020526040812061168e9082611645611640368790038701876141f0565b612e29565b815260208082019290925260409081015f208151606081018352905461ffff80821683526201000082041693820193909352600160201b90920463ffffffff1690820152612af9565b9392505050565b33610e9e8183612e8c565b6116a861264c565b61135481612eef565b60076116bc8161234c565b826116c681612377565b60cb545f906116e290600160a01b900463ffffffff16426141a8565b6001600160a01b0386165f90815260d5602090815260408083208151606081018352905461ffff80821683526201000082041693820193909352600160201b90920463ffffffff16908201529192509061173b90612af9565b6001600160a01b0387165f90815260d560205260409020909150611760908684612f5a565b6040805163ffffffff8416815261ffff838116602083015287168183015290516001600160a01b0388169133917fd1e028bd664486a46ad26040e999cd2d22e1e9a094ee6afe19fcf64678f16f749181900360600190a3505050505050565b60066117ca8161234c565b836117d481612377565b60cb545f906117f090600160a01b900463ffffffff16426141a8565b6001600160a01b038781165f90815260d460209081526040808320938a1683529281528282208351606081018552905461ffff80821683526201000082041692820192909252600160201b90910463ffffffff169281019290925291925061185790612af9565b6001600160a01b038089165f90815260d460209081526040808320938b16835292905220909150611889908684612f5a565b6040805163ffffffff8416815261ffff838116602083015287168183015290516001600160a01b0388811692908a169133917f48e198b6ae357e529204ee53a8e514c470ff77d9cc8e4f7207f8b5d490ae6934919081900360600190a450505050505050565b604080516080810182525f80825260208201819052918101829052606081019190915260ca828154811061192557611925613dff565b5f91825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff161515606082015292915050565b6001600160a01b038281165f90815260d46020908152604080832093851683529281528282208351606081018552905461ffff80821683526201000082041692820192909252600160201b90910463ffffffff16928101929092529061168e90612af9565b60ca545f905b63ffffffff811615611a4b578260ca611a04600184614258565b63ffffffff1681548110611a1a57611a1a613dff565b905f5260205f2090600202015f015403611a395761168e600182614258565b80611a4381614274565b9150506119ea565b5060405163504570e360e01b815260040160405180910390fd5b81611a6f81612377565b6040516336b87bd760e11b81526001600160a01b0384811660048301527f00000000000000000000000000000000000000000000000000000000000000001690636d70f7ae90602401602060405180830381865afa158015611ad3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611af79190613de4565b80611b8b575060405163ba1a84e560e01b81526001600160a01b0384811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063ba1a84e590602401602060405180830381865afa158015611b65573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b899190614292565b115b611ba85760405163fb494ea160e01b815260040160405180910390fd5b6110838383612e8c565b611bba61264c565b6001600160a01b038116611c245760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61135481612d7d565b5f54610100900460ff1615808015611c4b57505f54600160ff909116105b80611c645750303b158015611c6457505f5460ff166001145b611cc75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401611c1b565b5f805460ff191660011790558015611ce8575f805461ff0019166101001790555b611cf185612749565b611cfa86612d7d565b611d0384612dce565b611d0c83612b69565b611d1582612eef565b8015611d5a575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b6008611d6d8161234c565b83611d7781612377565b6040516304c1b8eb60e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063260dc75890611dc3908790600401613dd6565b602060405180830381865afa158015611dde573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e029190613de4565b611e1f57604051631fb1705560e21b815260040160405180910390fd5b60cb545f90611e3b90600160a01b900463ffffffff16426141a8565b6001600160a01b0387165f90815260d66020526040812091925090611e6d9082611645611640368b90038b018b6141f0565b6001600160a01b0388165f90815260d660205260408120919250611eb29190611e9e611640368b90038b018b6141f0565b81526020019081526020015f208684612f5a565b866001600160a01b0316336001600160a01b03167f14918b3834ab6752eb2e1b489b6663a67810efb5f56f3944a97ede8ecf1fd9f18885858a604051611efb94939291906142a9565b60405180910390a350505050505050565b5f6001610eb160208401846138f6565b6003611f278161234c565b60cb546001600160a01b03163314611f5257604051635c427cd960e01b815260040160405180910390fd5b60ca5463ffffffff831610611f7a576040516394a8d38960e01b815260040160405180910390fd5b5f60ca8363ffffffff1681548110611f9457611f94613dff565b905f5260205f20906002020190508060010160089054906101000a900460ff1615611fd257604051631b14174b60e01b815260040160405180910390fd5b6001810154600160201b900463ffffffff16421061200357604051630c36f66560e21b815260040160405180910390fd5b60018101805460ff60401b1916600160401b17905560405163ffffffff8416907fd850e6e5dfa497b72661fa73df2923464eaed9dc2ff1d3cb82bccbfeabe5c41e905f90a2505050565b612055613029565b6066548019821981161461207c5760405163c61dca5d60e01b815260040160405180910390fd5b606682905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b5f6120c48161234c565b6120cc61239d565b5f5b8281101561107857368484838181106120e9576120e9613dff565b90506020028101906120fb91906140de565b335f81815260ce602090815260408083205490519495509391926121259290918591879101614170565b60405160208183030381529060405280519060200120905061214683612786565b335f90815260cf602090815260408083208484529091529020805460ff1916600190811790915561217890839061407e565b335f81815260ce602052604090819020929092559051829184917f450a367a380c4e339e5ae7340c8464ef27af7781ad9945cfe8abd828f89e6281906121bf908890614196565b60405180910390a46121e0333060408601803590610cb590602089016138f6565b5050506001016120ce565b60046121f68161234c565b335f90815260d1602052604090205460ff1661222557604051635c427cd960e01b815260040160405180910390fd5b61222d61239d565b5f5b82811015611078573684848381811061224a5761224a613dff565b905060200281019061225c91906140de565b335f81815260ce602090815260408083205490519495509391926122869290918591879101614170565b6040516020818303038152906040528051906020012090506122a783612786565b335f90815260d2602090815260408083208484529091529020805460ff191660019081179091556122d990839061407e565b335f81815260ce602052604090819020929092559051829184917f5251b6fdefcb5d81144e735f69ea4c695fd43b0289ca53dc075033f5fc80068b90612320908890614196565b60405180910390a4612341333060408601803590610cb590602089016138f6565b50505060010161222f565b606654600160ff83161b908116036113545760405163840a48d560e01b815260040160405180910390fd5b612380816130da565b6113545760405163932d94f760e01b815260040160405180910390fd5b6002609754036123ef5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611c1b565b6002609755565b5f61242961240483806142dd565b6124146080860160608701613b53565b61242460a0870160808801613b53565b613183565b5f61243760408401846142dd565b9050116124575760405163796cc52560e01b815260040160405180910390fd5b4261246860a0840160808501613b53565b6124786080850160608601613b53565b61248291906141a8565b63ffffffff16106124a65760405163150358a160e21b815260040160405180910390fd5b5f80805b6124b760408601866142dd565b90508110156125a857366124ce60408701876142dd565b838181106124de576124de613dff565b6040029190910191505f90506124f760208301836138f6565b6001600160a01b03160361251e57604051630863a45360e11b815260040160405180910390fd5b61252b60208201826138f6565b6001600160a01b0316836001600160a01b03161061255c576040516310fb47f160e31b815260040160405180910390fd5b5f816020013511612580576040516310eb483f60e21b815260040160405180910390fd5b61258d60208201826138f6565b925061259d60208201358561407e565b9350506001016124aa565b506f4b3b4ca85a86c47a098a223fffffffff8211156125da5760405163070b5a6f60e21b815260040160405180910390fd5b5092915050565b6040516001600160a01b03808516602483015283166044820152606481018290526112e29085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613481565b6033546001600160a01b031633146113695760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611c1b565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa158015612708573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061272c9190613de4565b61136957604051631d77d47760e21b815260040160405180910390fd5b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b6127b361279382806142dd565b6127a36080850160608601613b53565b61242460a0860160808701613b53565b5f8160400135116127d7576040516310eb483f60e21b815260040160405180910390fd5b6f4b3b4ca85a86c47a098a223fffffffff8160400135111561280c5760405163070b5a6f60e21b815260040160405180910390fd5b61283c63ffffffff7f0000000000000000000000000000000000000000000000000000000000000000164261407e565b61284c6080830160608401613b53565b63ffffffff16111561135457604051637ee2b44360e01b815260040160405180910390fd5b5f60ca6128816020850185613b53565b63ffffffff168154811061289757612897613dff565b5f91825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff161515606082015290506128f78382612bda565b5f61290860808501606086016138f6565b6001600160a01b038082165f90815260cc6020526040902054919250168061292d5750805b336001600160a01b0382161461295657604051635c427cd960e01b815260040160405180910390fd5b5f5b61296560a0870187614322565b9050811015611d5a573661297c60e08801886142dd565b8381811061298c5761298c613dff565b6001600160a01b0387165f90815260cd6020908152604080832093029490940194509290915082906129c0908501856138f6565b6001600160a01b03166001600160a01b031681526020019081526020015f2054905080826020013511612a065760405163aa385e8160e01b815260040160405180910390fd5b5f612a158260208501356140b6565b6001600160a01b0387165f90815260cd60209081526040822092935085018035929190612a4290876138f6565b6001600160a01b031681526020808201929092526040015f2091909155612a839089908390612a73908701876138f6565b6001600160a01b03169190613554565b86516001600160a01b03808a1691878216918916907f9543dbd55580842586a951f0386e24d68a5df99ae29e3b216588b45fd684ce3190612ac760208901896138f6565b604080519283526001600160a01b039091166020830152810186905260600160405180910390a4505050600101612958565b5f816040015163ffffffff165f1480612b2b5750815161ffff908116148015612b2b5750816040015163ffffffff1642105b15612b4357505060cb54600160e01b900461ffff1690565b816040015163ffffffff16421015612b5c57815161133d565b506020015190565b919050565b60cb546040805163ffffffff600160a01b9093048316815291831660208301527faf557c6c02c208794817a705609cfa935f827312a1adfdd26494b6b95dd2b4b3910160405180910390a160cb805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055565b806060015115612bfd57604051631b14174b60e01b815260040160405180910390fd5b806040015163ffffffff16421015612c2857604051631437a2bb60e31b815260040160405180910390fd5b612c3560c0830183614322565b9050612c4460a0840184614322565b905014612c64576040516343714afd60e01b815260040160405180910390fd5b612c7160e08301836142dd565b9050612c8060c0840184614322565b905014612ca0576040516343714afd60e01b815260040160405180910390fd5b8051612ccc90612cb66040850160208601613b53565b612cc36040860186614367565b86606001613584565b5f5b612cdb60a0840184614322565b905081101561108357612d756080840135612cf960a0860186614322565b84818110612d0957612d09613dff565b9050602002016020810190612d1e9190613b53565b612d2b60c0870187614322565b85818110612d3b57612d3b613dff565b9050602002810190612d4d9190614367565b612d5a60e08901896142dd565b87818110612d6a57612d6a613dff565b905060400201613628565b600101612cce565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b60cb546040516001600160a01b038084169216907f237b82f438d75fc568ebab484b75b01d9287b9e98b490b7c23221623b6705dbb905f90a360cb80546001600160a01b0319166001600160a01b0392909216919091179055565b5f815f0151826020015163ffffffff16604051602001612e7492919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b60405160208183030381529060405261133d906143a9565b6001600160a01b038083165f81815260cc602052604080822080548686166001600160a01b0319821681179092559151919094169392849290917fbab947934d42e0ad206f25c9cab18b5bb6ae144acfb00f40b4e3aa59590ca3129190a4505050565b60cb546040805161ffff600160e01b9093048316815291831660208301527fe6cd4edfdcc1f6d130ab35f73d72378f3a642944fb4ee5bd84b7807a81ea1c4e910160405180910390a160cb805461ffff909216600160e01b0261ffff60e01b19909216919091179055565b61271061ffff83161115612f815760405163891c63df60e01b815260040160405180910390fd5b8254600160201b900463ffffffff164211612faf57604051637b1e25c560e01b815260040160405180910390fd5b8254600160201b900463ffffffff165f03612fd657825461ffff191661ffff178355612fed565b825462010000810461ffff1661ffff199091161783555b825463ffffffff909116600160201b0267ffffffff000000001961ffff90931662010000029290921667ffffffffffff00001990911617179055565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613085573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906130a991906143cc565b6001600160a01b0316336001600160a01b0316146113695760405163794821ff60e01b815260040160405180910390fd5b604051631beb2b9760e31b81526001600160a01b0382811660048301523360248301523060448301525f80356001600160e01b0319166064840152917f00000000000000000000000000000000000000000000000000000000000000009091169063df595cb890608401602060405180830381865afa15801561315f573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061133d9190613de4565b826131a15760405163796cc52560e01b815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff168163ffffffff1611156131ee57604051630dd0b9f560e21b815260040160405180910390fd5b6132187f0000000000000000000000000000000000000000000000000000000000000000826143fb565b63ffffffff161561323c5760405163ee66470560e01b815260040160405180910390fd5b5f8163ffffffff16116132625760405163cb3f434d60e01b815260040160405180910390fd5b61328c7f0000000000000000000000000000000000000000000000000000000000000000836143fb565b63ffffffff16156132b057604051633c1a94f160e21b815260040160405180910390fd5b8163ffffffff167f000000000000000000000000000000000000000000000000000000000000000063ffffffff16426132e991906140b6565b1115801561332357508163ffffffff167f000000000000000000000000000000000000000000000000000000000000000063ffffffff1611155b6133405760405163041aa75760e11b815260040160405180910390fd5b5f805b84811015611d5a575f86868381811061335e5761335e613dff565b61337492602060409092020190810191506138f6565b60405163198f077960e21b81526001600160a01b0380831660048301529192507f00000000000000000000000000000000000000000000000000000000000000009091169063663c1de490602401602060405180830381865afa1580156133dd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906134019190613de4565b8061342857506001600160a01b03811673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac0145b61344557604051632efd965160e11b815260040160405180910390fd5b806001600160a01b0316836001600160a01b0316106134775760405163dfad9ca160e01b815260040160405180910390fd5b9150600101613343565b5f6134d5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166136669092919063ffffffff16565b905080515f14806134f55750808060200190518101906134f59190613de4565b6110835760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401611c1b565b6040516001600160a01b03831660248201526044810182905261108390849063a9059cbb60e01b90606401612615565b61358f602083614422565b6001901b8463ffffffff16106135b75760405162c6c39d60e71b815260040160405180910390fd5b5f6135c182610ea2565b905061360b84848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508a92508591505063ffffffff891661367c565b611d5a576040516369ca16c960e01b815260040160405180910390fd5b613633602083614422565b6001901b8463ffffffff161061365c5760405163054ff4df60e51b815260040160405180910390fd5b5f6135c182611f0c565b606061367484845f856136b1565b949350505050565b5f8361369b576040516329e7276760e11b815260040160405180910390fd5b836136a7868585613788565b1495945050505050565b6060824710156137125760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401611c1b565b5f5f866001600160a01b0316858760405161372d9190614435565b5f6040518083038185875af1925050503d805f8114613767576040519150601f19603f3d011682016040523d82523d5f602084013e61376c565b606091505b509150915061377d87838387613845565b979650505050505050565b5f83515f0361379857508161168e565b602084516137a6919061444b565b156137c4576040516313717da960e21b815260040160405180910390fd5b8260205b85518111613825576137db60028561444b565b5f036137fc57815f528086015160205260405f209150600284049350613813565b808601515f528160205260405f2091506002840493505b61381e60208261407e565b90506137c8565b508215613674576040516363df817160e01b815260040160405180910390fd5b606083156138b35782515f036138ac576001600160a01b0385163b6138ac5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611c1b565b5081613674565b61367483838151156138c85781518083602001fd5b8060405162461bcd60e51b8152600401611c1b919061445e565b6001600160a01b0381168114611354575f5ffd5b5f60208284031215613906575f5ffd5b813561168e816138e2565b5f60408284031215613921575f5ffd5b50919050565b5f5f83601f840112613937575f5ffd5b5081356001600160401b0381111561394d575f5ffd5b6020830191508360208260051b8501011115613967575f5ffd5b9250929050565b5f5f5f60608486031215613980575f5ffd5b61398a8585613911565b925060408401356001600160401b038111156139a4575f5ffd5b6139b086828701613927565b9497909650939450505050565b8015158114611354575f5ffd5b5f5f604083850312156139db575f5ffd5b82356139e6816138e2565b915060208301356139f6816139bd565b809150509250929050565b5f60208284031215613a11575f5ffd5b5035919050565b5f60408284031215613a28575f5ffd5b61168e8383613911565b5f5f60208385031215613a43575f5ffd5b82356001600160401b03811115613a58575f5ffd5b613a6485828601613927565b90969095509350505050565b5f6101008284031215613921575f5ffd5b5f5f60408385031215613a92575f5ffd5b82356001600160401b03811115613aa7575f5ffd5b613ab385828601613a70565b92505060208301356139f6816138e2565b803563ffffffff81168114612b64575f5ffd5b5f5f60408385031215613ae8575f5ffd5b82359150613af860208401613ac4565b90509250929050565b5f5f5f60408486031215613b13575f5ffd5b83356001600160401b03811115613b28575f5ffd5b613b3486828701613927565b9094509250506020840135613b48816138e2565b809150509250925092565b5f60208284031215613b63575f5ffd5b61168e82613ac4565b5f60208284031215613b7c575f5ffd5b813560ff8116811461168e575f5ffd5b5f60208284031215613b9c575f5ffd5b81356001600160401b03811115613bb1575f5ffd5b61367484828501613a70565b5f5f60408385031215613bce575f5ffd5b8235613bd9816138e2565b946020939093013593505050565b5f5f60408385031215613bf8575f5ffd5b8235613c03816138e2565b915060208301356139f6816138e2565b5f5f5f60408486031215613c25575f5ffd5b8335613c30816138e2565b925060208401356001600160401b038111156139a4575f5ffd5b5f5f60608385031215613c5b575f5ffd5b8235613c66816138e2565b9150613af88460208501613911565b803561ffff81168114612b64575f5ffd5b5f60208284031215613c96575f5ffd5b61168e82613c75565b5f5f60408385031215613cb0575f5ffd5b8235613cbb816138e2565b9150613af860208401613c75565b5f5f5f60608486031215613cdb575f5ffd5b8335613ce6816138e2565b92506020840135613cf6816138e2565b9150613d0460408501613c75565b90509250925092565b5f5f5f5f5f60a08688031215613d21575f5ffd5b8535613d2c816138e2565b9450602086013593506040860135613d43816138e2565b9250613d5160608701613ac4565b9150613d5f60808701613c75565b90509295509295909350565b5f5f5f60808486031215613d7d575f5ffd5b8335613d88816138e2565b9250613d978560208601613911565b9150613d0460608501613c75565b8035613db0816138e2565b6001600160a01b0316825263ffffffff613dcc60208301613ac4565b1660208301525050565b6040810161133d8284613da5565b5f60208284031215613df4575f5ffd5b815161168e816139bd565b634e487b7160e01b5f52603260045260245ffd5b5f823560be19833603018112613e27575f5ffd5b9190910192915050565b5f5f8335601e19843603018112613e46575f5ffd5b83016020810192503590506001600160401b03811115613e64575f5ffd5b8060061b3603821315613967575f5ffd5b8183526020830192505f815f5b84811015613ed8578135613e95816138e2565b6001600160a01b0316865260208201356bffffffffffffffffffffffff8116808214613ebf575f5ffd5b6020880152506040958601959190910190600101613e82565b5093949350505050565b5f5f8335601e19843603018112613ef7575f5ffd5b83016020810192503590506001600160401b03811115613f15575f5ffd5b803603821315613967575f5ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f613f568283613e31565b60c08552613f6860c086018284613e75565b9150506020830135613f79816138e2565b6001600160a01b03166020850152613f946040840184613e31565b858303604087015280835290915f91906020015b81831015613fe3578335613fbb816138e2565b6001600160a01b03168152602084810135908201526040938401936001939093019201613fa8565b613fef60608701613ac4565b63ffffffff81166060890152935061400960808701613ac4565b63ffffffff81166080890152935061402460a0870187613ee2565b9450925086810360a088015261377d818585613f23565b60018060a01b0384168152826020820152606060408201525f6140616060830184613f4b565b95945050505050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561133d5761133d61406a565b61409b8185613da5565b826040820152608060608201525f6140616080830184613f4b565b8181038181111561133d5761133d61406a565b5f816140d7576140d761406a565b505f190190565b5f8235609e19833603018112613e27575f5ffd5b5f6140fd8283613e31565b60a0855261410f60a086018284613e75565b9150506020830135614120816138e2565b6001600160a01b031660208501526040838101359085015263ffffffff61414960608501613ac4565b16606085015263ffffffff61416060808501613ac4565b1660808501528091505092915050565b60018060a01b0384168152826020820152606060408201525f61406160608301846140f2565b602081525f61168e60208301846140f2565b63ffffffff818116838216019081111561133d5761133d61406a565b5f823560fe19833603018112613e27575f5ffd5b828152604060208201525f6136746040830184613f4b565b5f6040828403128015614201575f5ffd5b50604080519081016001600160401b038111828210171561423057634e487b7160e01b5f52604160045260245ffd5b604052823561423e816138e2565b815261424c60208401613ac4565b60208201529392505050565b63ffffffff828116828216039081111561133d5761133d61406a565b5f63ffffffff8216806142895761428961406a565b5f190192915050565b5f602082840312156142a2575f5ffd5b5051919050565b60a081016142b78287613da5565b63ffffffff94909416604082015261ffff92831660608201529116608090910152919050565b5f5f8335601e198436030181126142f2575f5ffd5b8301803591506001600160401b0382111561430b575f5ffd5b6020019150600681901b3603821315613967575f5ffd5b5f5f8335601e19843603018112614337575f5ffd5b8301803591506001600160401b03821115614350575f5ffd5b6020019150600581901b3603821315613967575f5ffd5b5f5f8335601e1984360301811261437c575f5ffd5b8301803591506001600160401b03821115614395575f5ffd5b602001915036819003821315613967575f5ffd5b80516020808301519190811015613921575f1960209190910360031b1b16919050565b5f602082840312156143dc575f5ffd5b815161168e816138e2565b634e487b7160e01b5f52601260045260245ffd5b5f63ffffffff831680614410576144106143e7565b8063ffffffff84160691505092915050565b5f82614430576144306143e7565b500490565b5f82518060208501845e5f920191825250919050565b5f82614459576144596143e7565b500690565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f8301168401019150509291505056fea2646970667358221220d27822035ddf1fd469a53d942647ec2995c0193604a2ebbde8b358676c71be5464736f6c634300081e0033", + Bin: "0x6101c0604052348015610010575f5ffd5b506040516148fa3803806148fa83398101604081905261002f91610263565b608081015181516020830151604084015160a085015160c086015160e087015161010088015161012089015160608a01516001600160a01b038116610087576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b031660805261009d858261032d565b63ffffffff16156100c157604051630e06bd3160e01b815260040160405180910390fd5b6100ce620151808661032d565b63ffffffff16156100f25760405163223c7b3960e11b815260040160405180910390fd5b6001600160a01b0397881660a05295871660c05293861660e05263ffffffff9283166101005290821661012052811661014052908116610160521661018052166101a05261013e610144565b50610360565b5f54610100900460ff16156101af5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff908116146101fe575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b60405161014081016001600160401b038111828210171561022f57634e487b7160e01b5f52604160045260245ffd5b60405290565b80516001600160a01b038116811461024b575f5ffd5b919050565b805163ffffffff8116811461024b575f5ffd5b5f610140828403128015610275575f5ffd5b5061027e610200565b61028783610235565b815261029560208401610235565b60208201526102a660408401610235565b60408201526102b760608401610235565b60608201526102c860808401610235565b60808201526102d960a08401610250565b60a08201526102ea60c08401610250565b60c08201526102fb60e08401610250565b60e082015261030d6101008401610250565b6101008201526103206101208401610250565b6101208201529392505050565b5f63ffffffff83168061034e57634e487b7160e01b5f52601260045260245ffd5b8063ffffffff84160691505092915050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516144c96104315f395f81816105e5015261311801525f818161049901526132fb01525f81816103e8015261281601525f818161054701526132b901525f818161085e01526131a301525f818161079f015281816131f3015261326701525f81816108b201528181610a9f01528181611b1e0152611d8e01525f818161056e015261339601525f81816109250152611a8e01525f8181610731015281816126bb015261302b01526144c95ff3fe608060405234801561000f575f5ffd5b50600436106103a8575f3560e01c80638da5cb5b116101ea578063de02e50311610114578063f6efbb59116100a9578063fabc1cbc11610079578063fabc1cbc14610a13578063fbf1e2c114610a26578063fce36c7d14610a39578063ff9f6cce14610a4c575f5ffd5b8063f6efbb59146109c7578063f74e8eac146109da578063f8cd8448146109ed578063f96abf2e14610a00575f5ffd5b8063ed71e6a2116100e4578063ed71e6a214610947578063f22cef8514610974578063f2f07ab414610987578063f2fde38b146109b4575f5ffd5b8063de02e503146108e7578063e063f81f146108fa578063e810ce211461090d578063ea4d3c9b14610920575f5ffd5b8063a50a1d9c1161018a578063bf21a8aa1161015a578063bf21a8aa14610859578063c46db60614610880578063ca8aa7c7146108ad578063dcbb03b3146108d4575f5ffd5b8063a50a1d9c146107e7578063aebd8bae146107fa578063b3dbb0e014610827578063bb7e451f1461083a575f5ffd5b80639cb9a5fa116101c55780639cb9a5fa146107875780639d45c2811461079a5780639de4b35f146107c1578063a0169ddd146107d4575f5ffd5b80638da5cb5b146107535780639104c319146107645780639be3d4e41461077f575f5ffd5b80634596021c116102d65780635e9d83481161026b5780637b8f8b051161023b5780637b8f8b05146106e7578063863cb9a9146106ef578063865c695314610702578063886f11951461072c575f5ffd5b80635e9d83481461068a57806363f6a7981461069d5780636d21117e146106b2578063715018a6146106df575f5ffd5b806358baaa3e116102a657806358baaa3e14610644578063595c6a67146106575780635ac86ab71461065f5780635c975abb14610682575f5ffd5b80634596021c146105cd5780634657e26a146105e05780634b943960146106075780634d18cc351461062d575f5ffd5b8063149bc8721161034c57806339b70e381161031c57806339b70e38146105695780633a8c0786146105905780633ccc861d146105a75780633efe1db6146105ba575f5ffd5b8063149bc872146104ce5780632b9f64a4146104ef57806336af41fa1461052f57806337838ed014610542575f5ffd5b80630e9a53cf116103875780630e9a53cf146104345780630eb3834514610481578063131433b414610494578063136439dd146104bb575f5ffd5b806218572c146103ac57806304a0c502146103e35780630ca298991461041f575b5f5ffd5b6103ce6103ba3660046138f6565b60d16020525f908152604090205460ff1681565b60405190151581526020015b60405180910390f35b61040a7f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016103da565b61043261042d36600461396e565b610a5f565b005b61043c610ce8565b6040516103da91905f6080820190508251825263ffffffff602084015116602083015263ffffffff604084015116604083015260608301511515606083015292915050565b61043261048f3660046139ca565b610de8565b61040a7f000000000000000000000000000000000000000000000000000000000000000081565b6104326104c9366004613a01565b610e68565b6104e16104dc366004613a18565b610ea2565b6040519081526020016103da565b6105176104fd3660046138f6565b60cc6020525f90815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016103da565b61043261053d366004613a32565b610f17565b61040a7f000000000000000000000000000000000000000000000000000000000000000081565b6105177f000000000000000000000000000000000000000000000000000000000000000081565b60cb5461040a90600160a01b900463ffffffff1681565b6104326105b5366004613a81565b611088565b6104326105c8366004613ad7565b6110af565b6104326105db366004613b01565b611285565b6105177f000000000000000000000000000000000000000000000000000000000000000081565b61061a6106153660046138f6565b6112e8565b60405161ffff90911681526020016103da565b60cb5461040a90600160c01b900463ffffffff1681565b610432610652366004613b53565b611343565b610432611357565b6103ce61066d366004613b6c565b606654600160ff9092169190911b9081161490565b6066546104e1565b6103ce610698366004613b8c565b61136b565b60cb5461061a90600160e01b900461ffff1681565b6103ce6106c0366004613bbd565b60cf60209081525f928352604080842090915290825290205460ff1681565b6104326113f6565b60ca546104e1565b6104326106fd3660046138f6565b611407565b6104e1610710366004613be7565b60cd60209081525f928352604080842090915290825290205481565b6105177f000000000000000000000000000000000000000000000000000000000000000081565b6033546001600160a01b0316610517565b61051773beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac081565b61043c611418565b610432610795366004613c13565b6114b4565b61040a7f000000000000000000000000000000000000000000000000000000000000000081565b61061a6107cf366004613c4a565b611612565b6104326107e23660046138f6565b611695565b6104326107f5366004613c86565b6116a0565b6103ce610808366004613bbd565b60d260209081525f928352604080842090915290825290205460ff1681565b610432610835366004613c9f565b6116b1565b6104e16108483660046138f6565b60ce6020525f908152604090205481565b61040a7f000000000000000000000000000000000000000000000000000000000000000081565b6103ce61088e366004613bbd565b60d060209081525f928352604080842090915290825290205460ff1681565b6105177f000000000000000000000000000000000000000000000000000000000000000081565b6104326108e2366004613cc9565b6117bf565b61043c6108f5366004613a01565b6118ef565b61061a610908366004613be7565b61197f565b61040a61091b366004613a01565b6119e4565b6105177f000000000000000000000000000000000000000000000000000000000000000081565b6103ce610955366004613bbd565b60d360209081525f928352604080842090915290825290205460ff1681565b610432610982366004613be7565b611a65565b6103ce610995366004613bbd565b60d760209081525f928352604080842090915290825290205460ff1681565b6104326109c23660046138f6565b611bb2565b6104326109d5366004613d0d565b611c2d565b6104326109e8366004613d6b565b611d62565b6104e16109fb366004613a18565b611f0c565b610432610a0e366004613b53565b611f1c565b610432610a21366004613a01565b61204d565b60cb54610517906001600160a01b031681565b610432610a47366004613a32565b6120ba565b610432610a5a366004613a32565b6121eb565b6009610a6a8161234c565b610a7760208501856138f6565b610a8081612377565b610a8861239d565b6040516304c1b8eb60e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063260dc75890610ad4908890600401613dd6565b602060405180830381865afa158015610aef573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b139190613de4565b610b3057604051631fb1705560e21b815260040160405180910390fd5b5f5b83811015610cd65736858583818110610b4d57610b4d613dff565b9050602002810190610b5f9190613e13565b90505f60ce81610b7260208b018b6138f6565b6001600160a01b031681526020808201929092526040015f90812054925090610b9d908a018a6138f6565b8284604051602001610bb19392919061403b565b6040516020818303038152906040528051906020012090505f610bd3846123f6565b9050600160d75f610be760208e018e6138f6565b6001600160a01b0316815260208082019290925260409081015f9081208682529092529020805460ff1916911515919091179055610c2683600161407e565b60ce5f610c3660208e018e6138f6565b6001600160a01b03166001600160a01b031681526020019081526020015f208190555081336001600160a01b03167ffff0759ccb371dfb5691798724e70b4fa61cb3bfe730a33ac19fb86a48efc7568c8688604051610c9793929190614091565b60405180910390a3610cc6333083610cb56040890160208a016138f6565b6001600160a01b03169291906125e1565b505060019092019150610b329050565b50610ce16001609755565b5050505050565b604080516080810182525f80825260208201819052918101829052606081019190915260ca545b8015610dc0575f60ca610d236001846140b6565b81548110610d3357610d33613dff565b5f91825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff161580156060830181905291925090610da25750806040015163ffffffff164210155b15610dad5792915050565b5080610db8816140c9565b915050610d0f565b5050604080516080810182525f80825260208201819052918101829052606081019190915290565b610df061264c565b6001600160a01b0382165f81815260d1602052604080822054905160ff9091169284151592841515927f4de6293e668df1398422e1def12118052c1539a03cbfedc145895d48d7685f1c9190a4506001600160a01b03919091165f90815260d160205260409020805460ff1916911515919091179055565b610e706126a6565b6066548181168114610e955760405163c61dca5d60e01b815260040160405180910390fd5b610e9e82612749565b5050565b5f80610eb160208401846138f6565b8360200135604051602001610efa9392919060f89390931b6001600160f81b031916835260609190911b6bffffffffffffffffffffffff19166001830152601582015260350190565b604051602081830303815290604052805190602001209050919050565b6001610f228161234c565b335f90815260d1602052604090205460ff16610f5157604051635c427cd960e01b815260040160405180910390fd5b610f5961239d565b5f5b828110156110785736848483818110610f7657610f76613dff565b9050602002810190610f8891906140de565b335f81815260ce60209081526040808320549051949550939192610fb29290918591879101614170565b604051602081830303815290604052805190602001209050610fd383612786565b335f90815260d0602090815260408083208484529091529020805460ff1916600190811790915561100590839061407e565b335f81815260ce602052604090819020929092559051829184917f51088b8c89628df3a8174002c2a034d0152fce6af8415d651b2a4734bf2704829061104c908890614196565b60405180910390a461106d333060408601803590610cb590602089016138f6565b505050600101610f5b565b506110836001609755565b505050565b60026110938161234c565b61109b61239d565b6110a58383612871565b6110836001609755565b60036110ba8161234c565b60cb546001600160a01b031633146110e557604051635c427cd960e01b815260040160405180910390fd5b60cb5463ffffffff600160c01b90910481169083161161111857604051631ca7e50b60e21b815260040160405180910390fd5b428263ffffffff161061113e576040516306957c9160e11b815260040160405180910390fd5b60ca5460cb545f9061115d90600160a01b900463ffffffff16426141a8565b6040805160808101825287815263ffffffff87811660208084018281528684168587018181525f6060880181815260ca8054600181018255925297517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee160029092029182015592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee290930180549151975193871667ffffffffffffffff1990921691909117600160201b978716979097029690961760ff60401b1916600160401b921515929092029190911790945560cb805463ffffffff60c01b1916600160c01b840217905593519283529394508892908616917fecd866c3c158fa00bf34d803d5f6023000b57080bcb48af004c2b4b46b3afd08910160405180910390a45050505050565b60026112908161234c565b61129861239d565b5f5b838110156112d7576112cf8585838181106112b7576112b7613dff565b90506020028101906112c991906141c4565b84612871565b60010161129a565b506112e26001609755565b50505050565b6001600160a01b0381165f90815260d5602090815260408083208151606081018352905461ffff80821683526201000082041693820193909352600160201b90920463ffffffff169082015261133d90612af9565b92915050565b61134b61264c565b61135481612b69565b50565b61135f6126a6565b6113695f19612749565b565b5f6113ee8260ca61137f6020830183613b53565b63ffffffff168154811061139557611395613dff565b5f91825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff1615156060820152612bda565b506001919050565b6113fe61264c565b6113695f612d7d565b61140f61264c565b61135481612dce565b604080516080810182525f80825260208201819052918101829052606081019190915260ca805461144b906001906140b6565b8154811061145b5761145b613dff565b5f91825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff1615156060820152919050565b60056114bf8161234c565b836114c981612377565b6114d161239d565b5f5b83811015610cd657368585838181106114ee576114ee613dff565b90506020028101906115009190613e13565b6001600160a01b0388165f90815260ce6020908152604080832054905193945092611531918b91859187910161403b565b6040516020818303038152906040528051906020012090505f611553846123f6565b6001600160a01b038b165f90815260d3602090815260408083208684529091529020805460ff1916600190811790915590915061159190849061407e565b6001600160a01b038b165f81815260ce60205260409081902092909255905183919033907ffc8888bffd711da60bc5092b33f677d81896fe80ecc677b84cfab8184462b6e0906115e49088908a906141d8565b60405180910390a4611602333083610cb56040890160208a016138f6565b5050600190920191506114d39050565b6001600160a01b0382165f90815260d66020526040812061168e9082611645611640368790038701876141f0565b612e29565b815260208082019290925260409081015f208151606081018352905461ffff80821683526201000082041693820193909352600160201b90920463ffffffff1690820152612af9565b9392505050565b33610e9e8183612e8c565b6116a861264c565b61135481612eef565b60076116bc8161234c565b826116c681612377565b60cb545f906116e290600160a01b900463ffffffff16426141a8565b6001600160a01b0386165f90815260d5602090815260408083208151606081018352905461ffff80821683526201000082041693820193909352600160201b90920463ffffffff16908201529192509061173b90612af9565b6001600160a01b0387165f90815260d560205260409020909150611760908684612f5a565b6040805163ffffffff8416815261ffff838116602083015287168183015290516001600160a01b0388169133917fd1e028bd664486a46ad26040e999cd2d22e1e9a094ee6afe19fcf64678f16f749181900360600190a3505050505050565b60066117ca8161234c565b836117d481612377565b60cb545f906117f090600160a01b900463ffffffff16426141a8565b6001600160a01b038781165f90815260d460209081526040808320938a1683529281528282208351606081018552905461ffff80821683526201000082041692820192909252600160201b90910463ffffffff169281019290925291925061185790612af9565b6001600160a01b038089165f90815260d460209081526040808320938b16835292905220909150611889908684612f5a565b6040805163ffffffff8416815261ffff838116602083015287168183015290516001600160a01b0388811692908a169133917f48e198b6ae357e529204ee53a8e514c470ff77d9cc8e4f7207f8b5d490ae6934919081900360600190a450505050505050565b604080516080810182525f80825260208201819052918101829052606081019190915260ca828154811061192557611925613dff565b5f91825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff161515606082015292915050565b6001600160a01b038281165f90815260d46020908152604080832093851683529281528282208351606081018552905461ffff80821683526201000082041692820192909252600160201b90910463ffffffff16928101929092529061168e90612af9565b60ca545f905b63ffffffff811615611a4b578260ca611a04600184614258565b63ffffffff1681548110611a1a57611a1a613dff565b905f5260205f2090600202015f015403611a395761168e600182614258565b80611a4381614274565b9150506119ea565b5060405163504570e360e01b815260040160405180910390fd5b81611a6f81612377565b6040516336b87bd760e11b81526001600160a01b0384811660048301527f00000000000000000000000000000000000000000000000000000000000000001690636d70f7ae90602401602060405180830381865afa158015611ad3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611af79190613de4565b80611b8b575060405163ba1a84e560e01b81526001600160a01b0384811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063ba1a84e590602401602060405180830381865afa158015611b65573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b899190614292565b115b611ba85760405163fb494ea160e01b815260040160405180910390fd5b6110838383612e8c565b611bba61264c565b6001600160a01b038116611c245760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61135481612d7d565b5f54610100900460ff1615808015611c4b57505f54600160ff909116105b80611c645750303b158015611c6457505f5460ff166001145b611cc75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401611c1b565b5f805460ff191660011790558015611ce8575f805461ff0019166101001790555b611cf185612749565b611cfa86612d7d565b611d0384612dce565b611d0c83612b69565b611d1582612eef565b8015611d5a575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b6008611d6d8161234c565b83611d7781612377565b6040516304c1b8eb60e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063260dc75890611dc3908790600401613dd6565b602060405180830381865afa158015611dde573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e029190613de4565b611e1f57604051631fb1705560e21b815260040160405180910390fd5b60cb545f90611e3b90600160a01b900463ffffffff16426141a8565b6001600160a01b0387165f90815260d66020526040812091925090611e6d9082611645611640368b90038b018b6141f0565b6001600160a01b0388165f90815260d660205260408120919250611eb29190611e9e611640368b90038b018b6141f0565b81526020019081526020015f208684612f5a565b866001600160a01b0316336001600160a01b03167f14918b3834ab6752eb2e1b489b6663a67810efb5f56f3944a97ede8ecf1fd9f18885858a604051611efb94939291906142a9565b60405180910390a350505050505050565b5f6001610eb160208401846138f6565b6003611f278161234c565b60cb546001600160a01b03163314611f5257604051635c427cd960e01b815260040160405180910390fd5b60ca5463ffffffff831610611f7a576040516394a8d38960e01b815260040160405180910390fd5b5f60ca8363ffffffff1681548110611f9457611f94613dff565b905f5260205f20906002020190508060010160089054906101000a900460ff1615611fd257604051631b14174b60e01b815260040160405180910390fd5b6001810154600160201b900463ffffffff16421061200357604051630c36f66560e21b815260040160405180910390fd5b60018101805460ff60401b1916600160401b17905560405163ffffffff8416907fd850e6e5dfa497b72661fa73df2923464eaed9dc2ff1d3cb82bccbfeabe5c41e905f90a2505050565b612055613029565b6066548019821981161461207c5760405163c61dca5d60e01b815260040160405180910390fd5b606682905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b5f6120c48161234c565b6120cc61239d565b5f5b8281101561107857368484838181106120e9576120e9613dff565b90506020028101906120fb91906140de565b335f81815260ce602090815260408083205490519495509391926121259290918591879101614170565b60405160208183030381529060405280519060200120905061214683612786565b335f90815260cf602090815260408083208484529091529020805460ff1916600190811790915561217890839061407e565b335f81815260ce602052604090819020929092559051829184917f450a367a380c4e339e5ae7340c8464ef27af7781ad9945cfe8abd828f89e6281906121bf908890614196565b60405180910390a46121e0333060408601803590610cb590602089016138f6565b5050506001016120ce565b60046121f68161234c565b335f90815260d1602052604090205460ff1661222557604051635c427cd960e01b815260040160405180910390fd5b61222d61239d565b5f5b82811015611078573684848381811061224a5761224a613dff565b905060200281019061225c91906140de565b335f81815260ce602090815260408083205490519495509391926122869290918591879101614170565b6040516020818303038152906040528051906020012090506122a783612786565b335f90815260d2602090815260408083208484529091529020805460ff191660019081179091556122d990839061407e565b335f81815260ce602052604090819020929092559051829184917f5251b6fdefcb5d81144e735f69ea4c695fd43b0289ca53dc075033f5fc80068b90612320908890614196565b60405180910390a4612341333060408601803590610cb590602089016138f6565b50505060010161222f565b606654600160ff83161b908116036113545760405163840a48d560e01b815260040160405180910390fd5b612380816130da565b6113545760405163932d94f760e01b815260040160405180910390fd5b6002609754036123ef5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611c1b565b6002609755565b5f61242961240483806142dd565b6124146080860160608701613b53565b61242460a0870160808801613b53565b613183565b5f61243760408401846142dd565b9050116124575760405163796cc52560e01b815260040160405180910390fd5b4261246860a0840160808501613b53565b6124786080850160608601613b53565b61248291906141a8565b63ffffffff16106124a65760405163150358a160e21b815260040160405180910390fd5b5f80805b6124b760408601866142dd565b90508110156125a857366124ce60408701876142dd565b838181106124de576124de613dff565b6040029190910191505f90506124f760208301836138f6565b6001600160a01b03160361251e57604051630863a45360e11b815260040160405180910390fd5b61252b60208201826138f6565b6001600160a01b0316836001600160a01b03161061255c576040516310fb47f160e31b815260040160405180910390fd5b5f816020013511612580576040516310eb483f60e21b815260040160405180910390fd5b61258d60208201826138f6565b925061259d60208201358561407e565b9350506001016124aa565b506f4b3b4ca85a86c47a098a223fffffffff8211156125da5760405163070b5a6f60e21b815260040160405180910390fd5b5092915050565b6040516001600160a01b03808516602483015283166044820152606481018290526112e29085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613481565b6033546001600160a01b031633146113695760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611c1b565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa158015612708573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061272c9190613de4565b61136957604051631d77d47760e21b815260040160405180910390fd5b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b6127b361279382806142dd565b6127a36080850160608601613b53565b61242460a0860160808701613b53565b5f8160400135116127d7576040516310eb483f60e21b815260040160405180910390fd5b6f4b3b4ca85a86c47a098a223fffffffff8160400135111561280c5760405163070b5a6f60e21b815260040160405180910390fd5b61283c63ffffffff7f0000000000000000000000000000000000000000000000000000000000000000164261407e565b61284c6080830160608401613b53565b63ffffffff16111561135457604051637ee2b44360e01b815260040160405180910390fd5b5f60ca6128816020850185613b53565b63ffffffff168154811061289757612897613dff565b5f91825260209182902060408051608081018252600293909302909101805483526001015463ffffffff80821694840194909452600160201b810490931690820152600160401b90910460ff161515606082015290506128f78382612bda565b5f61290860808501606086016138f6565b6001600160a01b038082165f90815260cc6020526040902054919250168061292d5750805b336001600160a01b0382161461295657604051635c427cd960e01b815260040160405180910390fd5b5f5b61296560a0870187614322565b9050811015611d5a573661297c60e08801886142dd565b8381811061298c5761298c613dff565b6001600160a01b0387165f90815260cd6020908152604080832093029490940194509290915082906129c0908501856138f6565b6001600160a01b03166001600160a01b031681526020019081526020015f2054905080826020013511612a065760405163aa385e8160e01b815260040160405180910390fd5b5f612a158260208501356140b6565b6001600160a01b0387165f90815260cd60209081526040822092935085018035929190612a4290876138f6565b6001600160a01b031681526020808201929092526040015f2091909155612a839089908390612a73908701876138f6565b6001600160a01b03169190613554565b86516001600160a01b03808a1691878216918916907f9543dbd55580842586a951f0386e24d68a5df99ae29e3b216588b45fd684ce3190612ac760208901896138f6565b604080519283526001600160a01b039091166020830152810186905260600160405180910390a4505050600101612958565b5f816040015163ffffffff165f1480612b2b5750815161ffff908116148015612b2b5750816040015163ffffffff1642105b15612b4357505060cb54600160e01b900461ffff1690565b816040015163ffffffff16421015612b5c57815161133d565b506020015190565b919050565b60cb546040805163ffffffff600160a01b9093048316815291831660208301527faf557c6c02c208794817a705609cfa935f827312a1adfdd26494b6b95dd2b4b3910160405180910390a160cb805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055565b806060015115612bfd57604051631b14174b60e01b815260040160405180910390fd5b806040015163ffffffff16421015612c2857604051631437a2bb60e31b815260040160405180910390fd5b612c3560c0830183614322565b9050612c4460a0840184614322565b905014612c64576040516343714afd60e01b815260040160405180910390fd5b612c7160e08301836142dd565b9050612c8060c0840184614322565b905014612ca0576040516343714afd60e01b815260040160405180910390fd5b8051612ccc90612cb66040850160208601613b53565b612cc36040860186614367565b86606001613584565b5f5b612cdb60a0840184614322565b905081101561108357612d756080840135612cf960a0860186614322565b84818110612d0957612d09613dff565b9050602002016020810190612d1e9190613b53565b612d2b60c0870187614322565b85818110612d3b57612d3b613dff565b9050602002810190612d4d9190614367565b612d5a60e08901896142dd565b87818110612d6a57612d6a613dff565b905060400201613628565b600101612cce565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b60cb546040516001600160a01b038084169216907f237b82f438d75fc568ebab484b75b01d9287b9e98b490b7c23221623b6705dbb905f90a360cb80546001600160a01b0319166001600160a01b0392909216919091179055565b5f815f0151826020015163ffffffff16604051602001612e7492919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b60405160208183030381529060405261133d906143a9565b6001600160a01b038083165f81815260cc602052604080822080548686166001600160a01b0319821681179092559151919094169392849290917fbab947934d42e0ad206f25c9cab18b5bb6ae144acfb00f40b4e3aa59590ca3129190a4505050565b60cb546040805161ffff600160e01b9093048316815291831660208301527fe6cd4edfdcc1f6d130ab35f73d72378f3a642944fb4ee5bd84b7807a81ea1c4e910160405180910390a160cb805461ffff909216600160e01b0261ffff60e01b19909216919091179055565b61271061ffff83161115612f815760405163891c63df60e01b815260040160405180910390fd5b8254600160201b900463ffffffff164211612faf57604051637b1e25c560e01b815260040160405180910390fd5b8254600160201b900463ffffffff165f03612fd657825461ffff191661ffff178355612fed565b825462010000810461ffff1661ffff199091161783555b825463ffffffff909116600160201b0267ffffffff000000001961ffff90931662010000029290921667ffffffffffff00001990911617179055565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613085573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906130a991906143cc565b6001600160a01b0316336001600160a01b0316146113695760405163794821ff60e01b815260040160405180910390fd5b604051631beb2b9760e31b81526001600160a01b0382811660048301523360248301523060448301525f80356001600160e01b0319166064840152917f00000000000000000000000000000000000000000000000000000000000000009091169063df595cb890608401602060405180830381865afa15801561315f573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061133d9190613de4565b826131a15760405163796cc52560e01b815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff168163ffffffff1611156131ee57604051630dd0b9f560e21b815260040160405180910390fd5b6132187f0000000000000000000000000000000000000000000000000000000000000000826143fb565b63ffffffff161561323c5760405163ee66470560e01b815260040160405180910390fd5b5f8163ffffffff16116132625760405163cb3f434d60e01b815260040160405180910390fd5b61328c7f0000000000000000000000000000000000000000000000000000000000000000836143fb565b63ffffffff16156132b057604051633c1a94f160e21b815260040160405180910390fd5b8163ffffffff167f000000000000000000000000000000000000000000000000000000000000000063ffffffff16426132e991906140b6565b1115801561332357508163ffffffff167f000000000000000000000000000000000000000000000000000000000000000063ffffffff1611155b6133405760405163041aa75760e11b815260040160405180910390fd5b5f805b84811015611d5a575f86868381811061335e5761335e613dff565b61337492602060409092020190810191506138f6565b60405163198f077960e21b81526001600160a01b0380831660048301529192507f00000000000000000000000000000000000000000000000000000000000000009091169063663c1de490602401602060405180830381865afa1580156133dd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906134019190613de4565b8061342857506001600160a01b03811673beac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac0145b61344557604051632efd965160e11b815260040160405180910390fd5b806001600160a01b0316836001600160a01b0316106134775760405163dfad9ca160e01b815260040160405180910390fd5b9150600101613343565b5f6134d5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166136669092919063ffffffff16565b905080515f14806134f55750808060200190518101906134f59190613de4565b6110835760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401611c1b565b6040516001600160a01b03831660248201526044810182905261108390849063a9059cbb60e01b90606401612615565b61358f602083614422565b6001901b8463ffffffff16106135b75760405162c6c39d60e71b815260040160405180910390fd5b5f6135c182610ea2565b905061360b84848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508a92508591505063ffffffff891661367c565b611d5a576040516369ca16c960e01b815260040160405180910390fd5b613633602083614422565b6001901b8463ffffffff161061365c5760405163054ff4df60e51b815260040160405180910390fd5b5f6135c182611f0c565b606061367484845f856136b1565b949350505050565b5f8361369b576040516329e7276760e11b815260040160405180910390fd5b836136a7868585613788565b1495945050505050565b6060824710156137125760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401611c1b565b5f5f866001600160a01b0316858760405161372d9190614435565b5f6040518083038185875af1925050503d805f8114613767576040519150601f19603f3d011682016040523d82523d5f602084013e61376c565b606091505b509150915061377d87838387613845565b979650505050505050565b5f83515f0361379857508161168e565b602084516137a6919061444b565b156137c4576040516313717da960e21b815260040160405180910390fd5b8260205b85518111613825576137db60028561444b565b5f036137fc57815f528086015160205260405f209150600284049350613813565b808601515f528160205260405f2091506002840493505b61381e60208261407e565b90506137c8565b508215613674576040516363df817160e01b815260040160405180910390fd5b606083156138b35782515f036138ac576001600160a01b0385163b6138ac5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611c1b565b5081613674565b61367483838151156138c85781518083602001fd5b8060405162461bcd60e51b8152600401611c1b919061445e565b6001600160a01b0381168114611354575f5ffd5b5f60208284031215613906575f5ffd5b813561168e816138e2565b5f60408284031215613921575f5ffd5b50919050565b5f5f83601f840112613937575f5ffd5b5081356001600160401b0381111561394d575f5ffd5b6020830191508360208260051b8501011115613967575f5ffd5b9250929050565b5f5f5f60608486031215613980575f5ffd5b61398a8585613911565b925060408401356001600160401b038111156139a4575f5ffd5b6139b086828701613927565b9497909650939450505050565b8015158114611354575f5ffd5b5f5f604083850312156139db575f5ffd5b82356139e6816138e2565b915060208301356139f6816139bd565b809150509250929050565b5f60208284031215613a11575f5ffd5b5035919050565b5f60408284031215613a28575f5ffd5b61168e8383613911565b5f5f60208385031215613a43575f5ffd5b82356001600160401b03811115613a58575f5ffd5b613a6485828601613927565b90969095509350505050565b5f6101008284031215613921575f5ffd5b5f5f60408385031215613a92575f5ffd5b82356001600160401b03811115613aa7575f5ffd5b613ab385828601613a70565b92505060208301356139f6816138e2565b803563ffffffff81168114612b64575f5ffd5b5f5f60408385031215613ae8575f5ffd5b82359150613af860208401613ac4565b90509250929050565b5f5f5f60408486031215613b13575f5ffd5b83356001600160401b03811115613b28575f5ffd5b613b3486828701613927565b9094509250506020840135613b48816138e2565b809150509250925092565b5f60208284031215613b63575f5ffd5b61168e82613ac4565b5f60208284031215613b7c575f5ffd5b813560ff8116811461168e575f5ffd5b5f60208284031215613b9c575f5ffd5b81356001600160401b03811115613bb1575f5ffd5b61367484828501613a70565b5f5f60408385031215613bce575f5ffd5b8235613bd9816138e2565b946020939093013593505050565b5f5f60408385031215613bf8575f5ffd5b8235613c03816138e2565b915060208301356139f6816138e2565b5f5f5f60408486031215613c25575f5ffd5b8335613c30816138e2565b925060208401356001600160401b038111156139a4575f5ffd5b5f5f60608385031215613c5b575f5ffd5b8235613c66816138e2565b9150613af88460208501613911565b803561ffff81168114612b64575f5ffd5b5f60208284031215613c96575f5ffd5b61168e82613c75565b5f5f60408385031215613cb0575f5ffd5b8235613cbb816138e2565b9150613af860208401613c75565b5f5f5f60608486031215613cdb575f5ffd5b8335613ce6816138e2565b92506020840135613cf6816138e2565b9150613d0460408501613c75565b90509250925092565b5f5f5f5f5f60a08688031215613d21575f5ffd5b8535613d2c816138e2565b9450602086013593506040860135613d43816138e2565b9250613d5160608701613ac4565b9150613d5f60808701613c75565b90509295509295909350565b5f5f5f60808486031215613d7d575f5ffd5b8335613d88816138e2565b9250613d978560208601613911565b9150613d0460608501613c75565b8035613db0816138e2565b6001600160a01b0316825263ffffffff613dcc60208301613ac4565b1660208301525050565b6040810161133d8284613da5565b5f60208284031215613df4575f5ffd5b815161168e816139bd565b634e487b7160e01b5f52603260045260245ffd5b5f823560be19833603018112613e27575f5ffd5b9190910192915050565b5f5f8335601e19843603018112613e46575f5ffd5b83016020810192503590506001600160401b03811115613e64575f5ffd5b8060061b3603821315613967575f5ffd5b8183526020830192505f815f5b84811015613ed8578135613e95816138e2565b6001600160a01b0316865260208201356bffffffffffffffffffffffff8116808214613ebf575f5ffd5b6020880152506040958601959190910190600101613e82565b5093949350505050565b5f5f8335601e19843603018112613ef7575f5ffd5b83016020810192503590506001600160401b03811115613f15575f5ffd5b803603821315613967575f5ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f613f568283613e31565b60c08552613f6860c086018284613e75565b9150506020830135613f79816138e2565b6001600160a01b03166020850152613f946040840184613e31565b858303604087015280835290915f91906020015b81831015613fe3578335613fbb816138e2565b6001600160a01b03168152602084810135908201526040938401936001939093019201613fa8565b613fef60608701613ac4565b63ffffffff81166060890152935061400960808701613ac4565b63ffffffff81166080890152935061402460a0870187613ee2565b9450925086810360a088015261377d818585613f23565b60018060a01b0384168152826020820152606060408201525f6140616060830184613f4b565b95945050505050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561133d5761133d61406a565b61409b8185613da5565b826040820152608060608201525f6140616080830184613f4b565b8181038181111561133d5761133d61406a565b5f816140d7576140d761406a565b505f190190565b5f8235609e19833603018112613e27575f5ffd5b5f6140fd8283613e31565b60a0855261410f60a086018284613e75565b9150506020830135614120816138e2565b6001600160a01b031660208501526040838101359085015263ffffffff61414960608501613ac4565b16606085015263ffffffff61416060808501613ac4565b1660808501528091505092915050565b60018060a01b0384168152826020820152606060408201525f61406160608301846140f2565b602081525f61168e60208301846140f2565b63ffffffff818116838216019081111561133d5761133d61406a565b5f823560fe19833603018112613e27575f5ffd5b828152604060208201525f6136746040830184613f4b565b5f6040828403128015614201575f5ffd5b50604080519081016001600160401b038111828210171561423057634e487b7160e01b5f52604160045260245ffd5b604052823561423e816138e2565b815261424c60208401613ac4565b60208201529392505050565b63ffffffff828116828216039081111561133d5761133d61406a565b5f63ffffffff8216806142895761428961406a565b5f190192915050565b5f602082840312156142a2575f5ffd5b5051919050565b60a081016142b78287613da5565b63ffffffff94909416604082015261ffff92831660608201529116608090910152919050565b5f5f8335601e198436030181126142f2575f5ffd5b8301803591506001600160401b0382111561430b575f5ffd5b6020019150600681901b3603821315613967575f5ffd5b5f5f8335601e19843603018112614337575f5ffd5b8301803591506001600160401b03821115614350575f5ffd5b6020019150600581901b3603821315613967575f5ffd5b5f5f8335601e1984360301811261437c575f5ffd5b8301803591506001600160401b03821115614395575f5ffd5b602001915036819003821315613967575f5ffd5b80516020808301519190811015613921575f1960209190910360031b1b16919050565b5f602082840312156143dc575f5ffd5b815161168e816138e2565b634e487b7160e01b5f52601260045260245ffd5b5f63ffffffff831680614410576144106143e7565b8063ffffffff84160691505092915050565b5f82614430576144306143e7565b500490565b5f82518060208501845e5f920191825250919050565b5f82614459576144596143e7565b500690565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f8301168401019150509291505056fea26469706673582212200e321d0b0d886fcdd9472b101964f84c3d6c19f324542081560975cb2115d43364736f6c634300081e0033", } // RewardsCoordinatorABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/SlashingLib/binding.go b/pkg/bindings/SlashingLib/binding.go index 6ecea90664..500031782f 100644 --- a/pkg/bindings/SlashingLib/binding.go +++ b/pkg/bindings/SlashingLib/binding.go @@ -32,7 +32,7 @@ var ( // SlashingLibMetaData contains all meta data concerning the SlashingLib contract. var SlashingLibMetaData = &bind.MetaData{ ABI: "[{\"type\":\"error\",\"name\":\"InvalidDepositScalingFactor\",\"inputs\":[]}]", - Bin: "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212205d60ae665204d3c9f6165c798df312de65baa13e163c9b38dc9c83049ed267dc64736f6c634300081e0033", + Bin: "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220fd91b2132d25363c07e3138f9c6387e1144a28227e0643785efd62afc97a3bbf64736f6c634300081e0033", } // SlashingLibABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/Snapshots/binding.go b/pkg/bindings/Snapshots/binding.go index e0c867e596..1328446701 100644 --- a/pkg/bindings/Snapshots/binding.go +++ b/pkg/bindings/Snapshots/binding.go @@ -32,7 +32,7 @@ var ( // SnapshotsMetaData contains all meta data concerning the Snapshots contract. var SnapshotsMetaData = &bind.MetaData{ ABI: "[{\"type\":\"error\",\"name\":\"InvalidSnapshotOrdering\",\"inputs\":[]}]", - Bin: "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220732ebdb9ea984b4b0e07bad7dd898517c055524962904f8fc1155d1a5442e0b664736f6c634300081e0033", + Bin: "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212208749f41bfc2d132fd89d9e755d226c134a6cf2121d2516fa5a19f55481ed317264736f6c634300081e0033", } // SnapshotsABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/StrategyBase/binding.go b/pkg/bindings/StrategyBase/binding.go index 248de1b4df..aeb50b8471 100644 --- a/pkg/bindings/StrategyBase/binding.go +++ b/pkg/bindings/StrategyBase/binding.go @@ -32,7 +32,7 @@ var ( // StrategyBaseMetaData contains all meta data concerning the StrategyBase contract. var StrategyBaseMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_strategyManager\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"deposit\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"newShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"explanation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_underlyingToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"shares\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"sharesToUnderlying\",\"inputs\":[{\"name\":\"amountShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"sharesToUnderlyingView\",\"inputs\":[{\"name\":\"amountShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalShares\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"underlyingToShares\",\"inputs\":[{\"name\":\"amountUnderlying\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"underlyingToSharesView\",\"inputs\":[{\"name\":\"amountUnderlying\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"underlyingToken\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"userUnderlying\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"userUnderlyingView\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdraw\",\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amountShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"amountOut\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"ExchangeRateEmitted\",\"inputs\":[{\"name\":\"rate\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyTokenSet\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"},{\"name\":\"decimals\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"BalanceExceedsMaxTotalDeposits\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CurrentlyPaused\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidNewPausedStatus\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"MaxPerDepositExceedsMax\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NewSharesZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyPauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyStrategyManager\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyUnderlyingToken\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyUnpauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TotalSharesExceedsMax\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawalAmountExceedsTotalDeposits\",\"inputs\":[]}]", - Bin: "0x60c060405234801561000f575f5ffd5b5060405161131a38038061131a83398101604081905261002e9161014b565b806001600160a01b038116610056576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b03908116608052821660a052610071610078565b5050610183565b5f54610100900460ff16156100e35760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610132575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610148575f5ffd5b50565b5f5f6040838503121561015c575f5ffd5b825161016781610134565b602084015190925061017881610134565b809150509250929050565b60805160a0516111536101c75f395f81816101750152818161034a0152818161064301526106c501525f818161022b015281816108730152610bf101526111535ff3fe608060405234801561000f575f5ffd5b5060043610610127575f3560e01c8063886f1195116100a9578063ce7c2ac21161006e578063ce7c2ac21461029b578063d9caed12146102ae578063e3dae51c146102c1578063f3e73875146102d4578063fabc1cbc146102e7575f5ffd5b8063886f1195146102265780638c8710191461024d5780638f6a624014610260578063ab5921e114610273578063c4d66de814610288575f5ffd5b8063553ca5f8116100ef578063553ca5f8146101c1578063595c6a67146101d45780635ac86ab7146101dc5780635c975abb1461020b5780637a8b263714610213575f5ffd5b8063136439dd1461012b5780632495a5991461014057806339b70e38146101705780633a98ef391461019757806347e7ef24146101ae575b5f5ffd5b61013e610139366004610ecb565b6102fa565b005b603254610153906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101537f000000000000000000000000000000000000000000000000000000000000000081565b6101a060335481565b604051908152602001610167565b6101a06101bc366004610ef6565b610334565b6101a06101cf366004610f20565b610463565b61013e610476565b6101fb6101ea366004610f50565b6001805460ff9092161b9081161490565b6040519015158152602001610167565b6001546101a0565b6101a0610221366004610ecb565b61048a565b6101537f000000000000000000000000000000000000000000000000000000000000000081565b6101a061025b366004610ecb565b6104d3565b6101a061026e366004610f20565b6104dd565b61027b6104ea565b6040516101679190610f6b565b61013e610296366004610f20565b61050a565b6101a06102a9366004610f20565b61061c565b6101a06102bc366004610fa0565b6106ae565b6101a06102cf366004610ecb565b6107b0565b6101a06102e2366004610ecb565b6107e7565b61013e6102f5366004610ecb565b6107f1565b61030261085e565b60015481811681146103275760405163c61dca5d60e01b815260040160405180910390fd5b61033082610901565b5050565b5f5f61033f8161093e565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610388576040516348da714f60e01b815260040160405180910390fd5b6103928484610974565b6033545f6103a26103e883610ff2565b90505f6103e86103b06109a2565b6103ba9190610ff2565b90505f6103c78783611005565b9050806103d48489611018565b6103de919061102f565b9550855f0361040057604051630c392ed360e11b815260040160405180910390fd5b61040a8685610ff2565b60338190556f4b3b4ca85a86c47a098a223fffffffff101561043f57604051632f14e8a360e11b815260040160405180910390fd5b610458826103e86033546104539190610ff2565b610a11565b505050505092915050565b5f6104706102218361061c565b92915050565b61047e61085e565b6104885f19610901565b565b5f5f6103e860335461049c9190610ff2565b90505f6103e86104aa6109a2565b6104b49190610ff2565b9050816104c18583611018565b6104cb919061102f565b949350505050565b5f610470826107b0565b5f6104706102e28361061c565b60606040518060800160405280604d81526020016110d1604d9139905090565b5f54610100900460ff161580801561052857505f54600160ff909116105b806105415750303b15801561054157505f5460ff166001145b6105a95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff1916600117905580156105ca575f805461ff0019166101001790555b6105d382610a5d565b8015610330575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b60405163fe243a1760e01b81526001600160a01b0382811660048301523060248301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063fe243a1790604401602060405180830381865afa15801561068a573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610470919061104e565b5f60016106ba8161093e565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610703576040516348da714f60e01b815260040160405180910390fd5b61070e858585610ba8565b6033548084111561073257604051630b469df360e41b815260040160405180910390fd5b5f61073f6103e883610ff2565b90505f6103e861074d6109a2565b6107579190610ff2565b9050816107648783611018565b61076e919061102f565b945061077a8684611005565b60335561079a61078a8683611005565b6103e86033546104539190610ff2565b6107a5888887610bdb565b505050509392505050565b5f5f6103e86033546107c29190610ff2565b90505f6103e86107d06109a2565b6107da9190610ff2565b9050806104c18386611018565b5f6104708261048a565b6107f9610bef565b600154801982198116146108205760405163c61dca5d60e01b815260040160405180910390fd5b600182905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa1580156108c0573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108e49190611065565b61048857604051631d77d47760e21b815260040160405180910390fd5b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b610953816001805460ff9092161b9081161490565b156109715760405163840a48d560e01b815260040160405180910390fd5b50565b6032546001600160a01b0383811691161461033057604051630312abdd60e61b815260040160405180910390fd5b6032546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa1580156109e8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a0c919061104e565b905090565b7fd2494f3479e5da49d386657c292c610b5b01df313d07c62eb0cfa49924a31be881610a4584670de0b6b3a7640000611018565b610a4f919061102f565b604051908152602001610610565b5f54610100900460ff16610ac75760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016105a0565b603280546001600160a01b0319166001600160a01b038316179055610aeb5f610901565b7f1c540707b00eb5427b6b774fc799d756516a54aee108b64b327acc55af55750760325f9054906101000a90046001600160a01b0316826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b5d573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b819190611084565b604080516001600160a01b03909316835260ff90911660208301520160405180910390a150565b6032546001600160a01b03838116911614610bd657604051630312abdd60e61b815260040160405180910390fd5b505050565b610bd66001600160a01b0383168483610ca0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c4b573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c6f919061109f565b6001600160a01b0316336001600160a01b0316146104885760405163794821ff60e01b815260040160405180910390fd5b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656490840152610bd6928692915f91610d2f918516908490610dae565b905080515f1480610d4f575080806020019051810190610d4f9190611065565b610bd65760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105a0565b60606104cb84845f85855f5f866001600160a01b03168587604051610dd391906110ba565b5f6040518083038185875af1925050503d805f8114610e0d576040519150601f19603f3d011682016040523d82523d5f602084013e610e12565b606091505b5091509150610e2387838387610e2e565b979650505050505050565b60608315610e9c5782515f03610e95576001600160a01b0385163b610e955760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105a0565b50816104cb565b6104cb8383815115610eb15781518083602001fd5b8060405162461bcd60e51b81526004016105a09190610f6b565b5f60208284031215610edb575f5ffd5b5035919050565b6001600160a01b0381168114610971575f5ffd5b5f5f60408385031215610f07575f5ffd5b8235610f1281610ee2565b946020939093013593505050565b5f60208284031215610f30575f5ffd5b8135610f3b81610ee2565b9392505050565b60ff81168114610971575f5ffd5b5f60208284031215610f60575f5ffd5b8135610f3b81610f42565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f5f5f60608486031215610fb2575f5ffd5b8335610fbd81610ee2565b92506020840135610fcd81610ee2565b929592945050506040919091013590565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561047057610470610fde565b8181038181111561047057610470610fde565b808202811582820484141761047057610470610fde565b5f8261104957634e487b7160e01b5f52601260045260245ffd5b500490565b5f6020828403121561105e575f5ffd5b5051919050565b5f60208284031215611075575f5ffd5b81518015158114610f3b575f5ffd5b5f60208284031215611094575f5ffd5b8151610f3b81610f42565b5f602082840312156110af575f5ffd5b8151610f3b81610ee2565b5f82518060208501845e5f92019182525091905056fe4261736520537472617465677920696d706c656d656e746174696f6e20746f20696e68657269742066726f6d20666f72206d6f726520636f6d706c657820696d706c656d656e746174696f6e73a2646970667358221220f59ebf5750243b032f2595e2fdc9e231c645474f438160a7e73ce584f44c9b1364736f6c634300081e0033", + Bin: "0x60c060405234801561000f575f5ffd5b5060405161131a38038061131a83398101604081905261002e9161014b565b806001600160a01b038116610056576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b03908116608052821660a052610071610078565b5050610183565b5f54610100900460ff16156100e35760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610132575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610148575f5ffd5b50565b5f5f6040838503121561015c575f5ffd5b825161016781610134565b602084015190925061017881610134565b809150509250929050565b60805160a0516111536101c75f395f81816101750152818161034a0152818161064301526106c501525f818161022b015281816108730152610bf101526111535ff3fe608060405234801561000f575f5ffd5b5060043610610127575f3560e01c8063886f1195116100a9578063ce7c2ac21161006e578063ce7c2ac21461029b578063d9caed12146102ae578063e3dae51c146102c1578063f3e73875146102d4578063fabc1cbc146102e7575f5ffd5b8063886f1195146102265780638c8710191461024d5780638f6a624014610260578063ab5921e114610273578063c4d66de814610288575f5ffd5b8063553ca5f8116100ef578063553ca5f8146101c1578063595c6a67146101d45780635ac86ab7146101dc5780635c975abb1461020b5780637a8b263714610213575f5ffd5b8063136439dd1461012b5780632495a5991461014057806339b70e38146101705780633a98ef391461019757806347e7ef24146101ae575b5f5ffd5b61013e610139366004610ecb565b6102fa565b005b603254610153906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101537f000000000000000000000000000000000000000000000000000000000000000081565b6101a060335481565b604051908152602001610167565b6101a06101bc366004610ef6565b610334565b6101a06101cf366004610f20565b610463565b61013e610476565b6101fb6101ea366004610f50565b6001805460ff9092161b9081161490565b6040519015158152602001610167565b6001546101a0565b6101a0610221366004610ecb565b61048a565b6101537f000000000000000000000000000000000000000000000000000000000000000081565b6101a061025b366004610ecb565b6104d3565b6101a061026e366004610f20565b6104dd565b61027b6104ea565b6040516101679190610f6b565b61013e610296366004610f20565b61050a565b6101a06102a9366004610f20565b61061c565b6101a06102bc366004610fa0565b6106ae565b6101a06102cf366004610ecb565b6107b0565b6101a06102e2366004610ecb565b6107e7565b61013e6102f5366004610ecb565b6107f1565b61030261085e565b60015481811681146103275760405163c61dca5d60e01b815260040160405180910390fd5b61033082610901565b5050565b5f5f61033f8161093e565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610388576040516348da714f60e01b815260040160405180910390fd5b6103928484610974565b6033545f6103a26103e883610ff2565b90505f6103e86103b06109a2565b6103ba9190610ff2565b90505f6103c78783611005565b9050806103d48489611018565b6103de919061102f565b9550855f0361040057604051630c392ed360e11b815260040160405180910390fd5b61040a8685610ff2565b60338190556f4b3b4ca85a86c47a098a223fffffffff101561043f57604051632f14e8a360e11b815260040160405180910390fd5b610458826103e86033546104539190610ff2565b610a11565b505050505092915050565b5f6104706102218361061c565b92915050565b61047e61085e565b6104885f19610901565b565b5f5f6103e860335461049c9190610ff2565b90505f6103e86104aa6109a2565b6104b49190610ff2565b9050816104c18583611018565b6104cb919061102f565b949350505050565b5f610470826107b0565b5f6104706102e28361061c565b60606040518060800160405280604d81526020016110d1604d9139905090565b5f54610100900460ff161580801561052857505f54600160ff909116105b806105415750303b15801561054157505f5460ff166001145b6105a95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff1916600117905580156105ca575f805461ff0019166101001790555b6105d382610a5d565b8015610330575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b60405163fe243a1760e01b81526001600160a01b0382811660048301523060248301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063fe243a1790604401602060405180830381865afa15801561068a573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610470919061104e565b5f60016106ba8161093e565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610703576040516348da714f60e01b815260040160405180910390fd5b61070e858585610ba8565b6033548084111561073257604051630b469df360e41b815260040160405180910390fd5b5f61073f6103e883610ff2565b90505f6103e861074d6109a2565b6107579190610ff2565b9050816107648783611018565b61076e919061102f565b945061077a8684611005565b60335561079a61078a8683611005565b6103e86033546104539190610ff2565b6107a5888887610bdb565b505050509392505050565b5f5f6103e86033546107c29190610ff2565b90505f6103e86107d06109a2565b6107da9190610ff2565b9050806104c18386611018565b5f6104708261048a565b6107f9610bef565b600154801982198116146108205760405163c61dca5d60e01b815260040160405180910390fd5b600182905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa1580156108c0573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108e49190611065565b61048857604051631d77d47760e21b815260040160405180910390fd5b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b610953816001805460ff9092161b9081161490565b156109715760405163840a48d560e01b815260040160405180910390fd5b50565b6032546001600160a01b0383811691161461033057604051630312abdd60e61b815260040160405180910390fd5b6032546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa1580156109e8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a0c919061104e565b905090565b7fd2494f3479e5da49d386657c292c610b5b01df313d07c62eb0cfa49924a31be881610a4584670de0b6b3a7640000611018565b610a4f919061102f565b604051908152602001610610565b5f54610100900460ff16610ac75760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016105a0565b603280546001600160a01b0319166001600160a01b038316179055610aeb5f610901565b7f1c540707b00eb5427b6b774fc799d756516a54aee108b64b327acc55af55750760325f9054906101000a90046001600160a01b0316826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b5d573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b819190611084565b604080516001600160a01b03909316835260ff90911660208301520160405180910390a150565b6032546001600160a01b03838116911614610bd657604051630312abdd60e61b815260040160405180910390fd5b505050565b610bd66001600160a01b0383168483610ca0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c4b573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c6f919061109f565b6001600160a01b0316336001600160a01b0316146104885760405163794821ff60e01b815260040160405180910390fd5b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656490840152610bd6928692915f91610d2f918516908490610dae565b905080515f1480610d4f575080806020019051810190610d4f9190611065565b610bd65760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105a0565b60606104cb84845f85855f5f866001600160a01b03168587604051610dd391906110ba565b5f6040518083038185875af1925050503d805f8114610e0d576040519150601f19603f3d011682016040523d82523d5f602084013e610e12565b606091505b5091509150610e2387838387610e2e565b979650505050505050565b60608315610e9c5782515f03610e95576001600160a01b0385163b610e955760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105a0565b50816104cb565b6104cb8383815115610eb15781518083602001fd5b8060405162461bcd60e51b81526004016105a09190610f6b565b5f60208284031215610edb575f5ffd5b5035919050565b6001600160a01b0381168114610971575f5ffd5b5f5f60408385031215610f07575f5ffd5b8235610f1281610ee2565b946020939093013593505050565b5f60208284031215610f30575f5ffd5b8135610f3b81610ee2565b9392505050565b60ff81168114610971575f5ffd5b5f60208284031215610f60575f5ffd5b8135610f3b81610f42565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f5f5f60608486031215610fb2575f5ffd5b8335610fbd81610ee2565b92506020840135610fcd81610ee2565b929592945050506040919091013590565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561047057610470610fde565b8181038181111561047057610470610fde565b808202811582820484141761047057610470610fde565b5f8261104957634e487b7160e01b5f52601260045260245ffd5b500490565b5f6020828403121561105e575f5ffd5b5051919050565b5f60208284031215611075575f5ffd5b81518015158114610f3b575f5ffd5b5f60208284031215611094575f5ffd5b8151610f3b81610f42565b5f602082840312156110af575f5ffd5b8151610f3b81610ee2565b5f82518060208501845e5f92019182525091905056fe4261736520537472617465677920696d706c656d656e746174696f6e20746f20696e68657269742066726f6d20666f72206d6f726520636f6d706c657820696d706c656d656e746174696f6e73a26469706673582212203abe60d9a70d35e0604b29d164d1198d947fd7386d0235addc35df381d625d9264736f6c634300081e0033", } // StrategyBaseABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/StrategyBaseTVLLimits/binding.go b/pkg/bindings/StrategyBaseTVLLimits/binding.go index 93f351fbdb..b55e95c3fe 100644 --- a/pkg/bindings/StrategyBaseTVLLimits/binding.go +++ b/pkg/bindings/StrategyBaseTVLLimits/binding.go @@ -32,7 +32,7 @@ var ( // StrategyBaseTVLLimitsMetaData contains all meta data concerning the StrategyBaseTVLLimits contract. var StrategyBaseTVLLimitsMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_strategyManager\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"deposit\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"newShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"explanation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getTVLLimits\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_maxPerDeposit\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_maxTotalDeposits\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_underlyingToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_underlyingToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"maxPerDeposit\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxTotalDeposits\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setTVLLimits\",\"inputs\":[{\"name\":\"newMaxPerDeposit\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"newMaxTotalDeposits\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"shares\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"sharesToUnderlying\",\"inputs\":[{\"name\":\"amountShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"sharesToUnderlyingView\",\"inputs\":[{\"name\":\"amountShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalShares\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"underlyingToShares\",\"inputs\":[{\"name\":\"amountUnderlying\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"underlyingToSharesView\",\"inputs\":[{\"name\":\"amountUnderlying\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"underlyingToken\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"userUnderlying\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"userUnderlyingView\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdraw\",\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amountShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"amountOut\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"ExchangeRateEmitted\",\"inputs\":[{\"name\":\"rate\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MaxPerDepositUpdated\",\"inputs\":[{\"name\":\"previousValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MaxTotalDepositsUpdated\",\"inputs\":[{\"name\":\"previousValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newValue\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyTokenSet\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"},{\"name\":\"decimals\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"BalanceExceedsMaxTotalDeposits\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CurrentlyPaused\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidNewPausedStatus\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"MaxPerDepositExceedsMax\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NewSharesZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyPauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyStrategyManager\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyUnderlyingToken\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyUnpauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TotalSharesExceedsMax\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawalAmountExceedsTotalDeposits\",\"inputs\":[]}]", - Bin: "0x60c060405234801561000f575f5ffd5b506040516115f73803806115f783398101604081905261002e9161014f565b8181806001600160a01b038116610058576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b03908116608052821660a05261007361007c565b50505050610187565b5f54610100900460ff16156100e75760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610136575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b038116811461014c575f5ffd5b50565b5f5f60408385031215610160575f5ffd5b825161016b81610138565b602084015190925061017c81610138565b809150509250929050565b60805160a05161142c6101cb5f395f81816101ce015281816103f50152818161077d01526107ff01525f81816102960152818161099a0152610b02015261142c5ff3fe608060405234801561000f575f5ffd5b506004361061016d575f3560e01c80637a8b2637116100d9578063c4d66de811610093578063df6fadc11161006e578063df6fadc11461033f578063e3dae51c1461035a578063f3e738751461036d578063fabc1cbc14610380575f5ffd5b8063c4d66de814610306578063ce7c2ac214610319578063d9caed121461032c575f5ffd5b80637a8b26371461027e578063886f1195146102915780638c871019146102b85780638f6a6240146102cb578063a6ab36f2146102de578063ab5921e1146102f1575f5ffd5b806347e7ef241161012a57806347e7ef2414610210578063553ca5f814610223578063595c6a67146102365780635ac86ab71461023e5780635c975abb1461026d57806361b01b5d14610275575f5ffd5b806311c70c9d14610171578063136439dd146101865780632495a5991461019957806339b70e38146101c95780633a98ef39146101f057806343fe08b014610207575b5f5ffd5b61018461017f366004611100565b610393565b005b610184610194366004611120565b6103a9565b6032546101ac906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101ac7f000000000000000000000000000000000000000000000000000000000000000081565b6101f960335481565b6040519081526020016101c0565b6101f960645481565b6101f961021e36600461114b565b6103df565b6101f9610231366004611175565b61050e565b610184610521565b61025d61024c3660046111a5565b6001805460ff9092161b9081161490565b60405190151581526020016101c0565b6001546101f9565b6101f960655481565b6101f961028c366004611120565b610535565b6101ac7f000000000000000000000000000000000000000000000000000000000000000081565b6101f96102c6366004611120565b61057e565b6101f96102d9366004611175565b610588565b6101846102ec3660046111c0565b610595565b6102f9610670565b6040516101c091906111f6565b610184610314366004611175565b610690565b6101f9610327366004611175565b610756565b6101f961033a36600461122b565b6107e8565b606454606554604080519283526020830191909152016101c0565b6101f9610368366004611120565b6108ea565b6101f961037b366004611120565b610921565b61018461038e366004611120565b61092b565b61039b610998565b6103a58282610a49565b5050565b6103b1610aed565b60015481811681146103d65760405163c61dca5d60e01b815260040160405180910390fd5b6103a582610b90565b5f5f6103ea81610bcd565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610433576040516348da714f60e01b815260040160405180910390fd5b61043d8484610c03565b6033545f61044d6103e88361127d565b90505f6103e861045b610c5a565b610465919061127d565b90505f6104728783611290565b90508061047f84896112a3565b61048991906112ba565b9550855f036104ab57604051630c392ed360e11b815260040160405180910390fd5b6104b5868561127d565b60338190556f4b3b4ca85a86c47a098a223fffffffff10156104ea57604051632f14e8a360e11b815260040160405180910390fd5b610503826103e86033546104fe919061127d565b610cc9565b505050505092915050565b5f61051b61028c83610756565b92915050565b610529610aed565b6105335f19610b90565b565b5f5f6103e8603354610547919061127d565b90505f6103e8610555610c5a565b61055f919061127d565b90508161056c85836112a3565b61057691906112ba565b949350505050565b5f61051b826108ea565b5f61051b61037b83610756565b5f54610100900460ff16158080156105b357505f54600160ff909116105b806105cc5750303b1580156105cc57505f5460ff166001145b6105f15760405162461bcd60e51b81526004016105e8906112d9565b60405180910390fd5b5f805460ff191660011790558015610612575f805461ff0019166101001790555b61061c8484610a49565b61062582610d15565b801561066a575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b60606040518060800160405280604d81526020016113aa604d9139905090565b5f54610100900460ff16158080156106ae57505f54600160ff909116105b806106c75750303b1580156106c757505f5460ff166001145b6106e35760405162461bcd60e51b81526004016105e8906112d9565b5f805460ff191660011790558015610704575f805461ff0019166101001790555b61070d82610d15565b80156103a5575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b60405163fe243a1760e01b81526001600160a01b0382811660048301523060248301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063fe243a1790604401602060405180830381865afa1580156107c4573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061051b9190611327565b5f60016107f481610bcd565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461083d576040516348da714f60e01b815260040160405180910390fd5b610848858585610e60565b6033548084111561086c57604051630b469df360e41b815260040160405180910390fd5b5f6108796103e88361127d565b90505f6103e8610887610c5a565b610891919061127d565b90508161089e87836112a3565b6108a891906112ba565b94506108b48684611290565b6033556108d46108c48683611290565b6103e86033546104fe919061127d565b6108df888887610e93565b505050509392505050565b5f5f6103e86033546108fc919061127d565b90505f6103e861090a610c5a565b610914919061127d565b90508061056c83866112a3565b5f61051b82610535565b610933610998565b6001548019821981161461095a5760405163c61dca5d60e01b815260040160405180910390fd5b600182905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109f4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a18919061133e565b6001600160a01b0316336001600160a01b0316146105335760405163794821ff60e01b815260040160405180910390fd5b60645460408051918252602082018490527ff97ed4e083acac67830025ecbc756d8fe847cdbdca4cee3fe1e128e98b54ecb5910160405180910390a160655460408051918252602082018390527f6ab181e0440bfbf4bacdf2e99674735ce6638005490688c5f994f5399353e452910160405180910390a180821115610ae25760405163052b07b760e21b815260040160405180910390fd5b606491909155606555565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa158015610b4f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b739190611359565b61053357604051631d77d47760e21b815260040160405180910390fd5b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b610be2816001805460ff9092161b9081161490565b15610c005760405163840a48d560e01b815260040160405180910390fd5b50565b606454811115610c265760405163052b07b760e21b815260040160405180910390fd5b606554610c31610c5a565b1115610c505760405163d86bae6760e01b815260040160405180910390fd5b6103a58282610ea7565b6032546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610ca0573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cc49190611327565b905090565b7fd2494f3479e5da49d386657c292c610b5b01df313d07c62eb0cfa49924a31be881610cfd84670de0b6b3a76400006112a3565b610d0791906112ba565b60405190815260200161074a565b5f54610100900460ff16610d7f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016105e8565b603280546001600160a01b0319166001600160a01b038316179055610da35f610b90565b7f1c540707b00eb5427b6b774fc799d756516a54aee108b64b327acc55af55750760325f9054906101000a90046001600160a01b0316826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e15573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e399190611378565b604080516001600160a01b03909316835260ff90911660208301520160405180910390a150565b6032546001600160a01b03838116911614610e8e57604051630312abdd60e61b815260040160405180910390fd5b505050565b610e8e6001600160a01b0383168483610ed5565b6032546001600160a01b038381169116146103a557604051630312abdd60e61b815260040160405180910390fd5b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656490840152610e8e928692915f91610f64918516908490610fe3565b905080515f1480610f84575080806020019051810190610f849190611359565b610e8e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105e8565b606061057684845f85855f5f866001600160a01b031685876040516110089190611393565b5f6040518083038185875af1925050503d805f8114611042576040519150601f19603f3d011682016040523d82523d5f602084013e611047565b606091505b509150915061105887838387611063565b979650505050505050565b606083156110d15782515f036110ca576001600160a01b0385163b6110ca5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105e8565b5081610576565b61057683838151156110e65781518083602001fd5b8060405162461bcd60e51b81526004016105e891906111f6565b5f5f60408385031215611111575f5ffd5b50508035926020909101359150565b5f60208284031215611130575f5ffd5b5035919050565b6001600160a01b0381168114610c00575f5ffd5b5f5f6040838503121561115c575f5ffd5b823561116781611137565b946020939093013593505050565b5f60208284031215611185575f5ffd5b813561119081611137565b9392505050565b60ff81168114610c00575f5ffd5b5f602082840312156111b5575f5ffd5b813561119081611197565b5f5f5f606084860312156111d2575f5ffd5b833592506020840135915060408401356111eb81611137565b809150509250925092565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f5f5f6060848603121561123d575f5ffd5b833561124881611137565b9250602084013561125881611137565b929592945050506040919091013590565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561051b5761051b611269565b8181038181111561051b5761051b611269565b808202811582820484141761051b5761051b611269565b5f826112d457634e487b7160e01b5f52601260045260245ffd5b500490565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b5f60208284031215611337575f5ffd5b5051919050565b5f6020828403121561134e575f5ffd5b815161119081611137565b5f60208284031215611369575f5ffd5b81518015158114611190575f5ffd5b5f60208284031215611388575f5ffd5b815161119081611197565b5f82518060208501845e5f92019182525091905056fe4261736520537472617465677920696d706c656d656e746174696f6e20746f20696e68657269742066726f6d20666f72206d6f726520636f6d706c657820696d706c656d656e746174696f6e73a26469706673582212204bceb7d2d7b1fc606710564317cd99f1b7efc3ef07c2c238ba767d013f12ba7564736f6c634300081e0033", + Bin: "0x60c060405234801561000f575f5ffd5b506040516115f73803806115f783398101604081905261002e9161014f565b8181806001600160a01b038116610058576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b03908116608052821660a05261007361007c565b50505050610187565b5f54610100900460ff16156100e75760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610136575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b038116811461014c575f5ffd5b50565b5f5f60408385031215610160575f5ffd5b825161016b81610138565b602084015190925061017c81610138565b809150509250929050565b60805160a05161142c6101cb5f395f81816101ce015281816103f50152818161077d01526107ff01525f81816102960152818161099a0152610b02015261142c5ff3fe608060405234801561000f575f5ffd5b506004361061016d575f3560e01c80637a8b2637116100d9578063c4d66de811610093578063df6fadc11161006e578063df6fadc11461033f578063e3dae51c1461035a578063f3e738751461036d578063fabc1cbc14610380575f5ffd5b8063c4d66de814610306578063ce7c2ac214610319578063d9caed121461032c575f5ffd5b80637a8b26371461027e578063886f1195146102915780638c871019146102b85780638f6a6240146102cb578063a6ab36f2146102de578063ab5921e1146102f1575f5ffd5b806347e7ef241161012a57806347e7ef2414610210578063553ca5f814610223578063595c6a67146102365780635ac86ab71461023e5780635c975abb1461026d57806361b01b5d14610275575f5ffd5b806311c70c9d14610171578063136439dd146101865780632495a5991461019957806339b70e38146101c95780633a98ef39146101f057806343fe08b014610207575b5f5ffd5b61018461017f366004611100565b610393565b005b610184610194366004611120565b6103a9565b6032546101ac906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101ac7f000000000000000000000000000000000000000000000000000000000000000081565b6101f960335481565b6040519081526020016101c0565b6101f960645481565b6101f961021e36600461114b565b6103df565b6101f9610231366004611175565b61050e565b610184610521565b61025d61024c3660046111a5565b6001805460ff9092161b9081161490565b60405190151581526020016101c0565b6001546101f9565b6101f960655481565b6101f961028c366004611120565b610535565b6101ac7f000000000000000000000000000000000000000000000000000000000000000081565b6101f96102c6366004611120565b61057e565b6101f96102d9366004611175565b610588565b6101846102ec3660046111c0565b610595565b6102f9610670565b6040516101c091906111f6565b610184610314366004611175565b610690565b6101f9610327366004611175565b610756565b6101f961033a36600461122b565b6107e8565b606454606554604080519283526020830191909152016101c0565b6101f9610368366004611120565b6108ea565b6101f961037b366004611120565b610921565b61018461038e366004611120565b61092b565b61039b610998565b6103a58282610a49565b5050565b6103b1610aed565b60015481811681146103d65760405163c61dca5d60e01b815260040160405180910390fd5b6103a582610b90565b5f5f6103ea81610bcd565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610433576040516348da714f60e01b815260040160405180910390fd5b61043d8484610c03565b6033545f61044d6103e88361127d565b90505f6103e861045b610c5a565b610465919061127d565b90505f6104728783611290565b90508061047f84896112a3565b61048991906112ba565b9550855f036104ab57604051630c392ed360e11b815260040160405180910390fd5b6104b5868561127d565b60338190556f4b3b4ca85a86c47a098a223fffffffff10156104ea57604051632f14e8a360e11b815260040160405180910390fd5b610503826103e86033546104fe919061127d565b610cc9565b505050505092915050565b5f61051b61028c83610756565b92915050565b610529610aed565b6105335f19610b90565b565b5f5f6103e8603354610547919061127d565b90505f6103e8610555610c5a565b61055f919061127d565b90508161056c85836112a3565b61057691906112ba565b949350505050565b5f61051b826108ea565b5f61051b61037b83610756565b5f54610100900460ff16158080156105b357505f54600160ff909116105b806105cc5750303b1580156105cc57505f5460ff166001145b6105f15760405162461bcd60e51b81526004016105e8906112d9565b60405180910390fd5b5f805460ff191660011790558015610612575f805461ff0019166101001790555b61061c8484610a49565b61062582610d15565b801561066a575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b60606040518060800160405280604d81526020016113aa604d9139905090565b5f54610100900460ff16158080156106ae57505f54600160ff909116105b806106c75750303b1580156106c757505f5460ff166001145b6106e35760405162461bcd60e51b81526004016105e8906112d9565b5f805460ff191660011790558015610704575f805461ff0019166101001790555b61070d82610d15565b80156103a5575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b60405163fe243a1760e01b81526001600160a01b0382811660048301523060248301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063fe243a1790604401602060405180830381865afa1580156107c4573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061051b9190611327565b5f60016107f481610bcd565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461083d576040516348da714f60e01b815260040160405180910390fd5b610848858585610e60565b6033548084111561086c57604051630b469df360e41b815260040160405180910390fd5b5f6108796103e88361127d565b90505f6103e8610887610c5a565b610891919061127d565b90508161089e87836112a3565b6108a891906112ba565b94506108b48684611290565b6033556108d46108c48683611290565b6103e86033546104fe919061127d565b6108df888887610e93565b505050509392505050565b5f5f6103e86033546108fc919061127d565b90505f6103e861090a610c5a565b610914919061127d565b90508061056c83866112a3565b5f61051b82610535565b610933610998565b6001548019821981161461095a5760405163c61dca5d60e01b815260040160405180910390fd5b600182905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109f4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a18919061133e565b6001600160a01b0316336001600160a01b0316146105335760405163794821ff60e01b815260040160405180910390fd5b60645460408051918252602082018490527ff97ed4e083acac67830025ecbc756d8fe847cdbdca4cee3fe1e128e98b54ecb5910160405180910390a160655460408051918252602082018390527f6ab181e0440bfbf4bacdf2e99674735ce6638005490688c5f994f5399353e452910160405180910390a180821115610ae25760405163052b07b760e21b815260040160405180910390fd5b606491909155606555565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa158015610b4f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b739190611359565b61053357604051631d77d47760e21b815260040160405180910390fd5b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b610be2816001805460ff9092161b9081161490565b15610c005760405163840a48d560e01b815260040160405180910390fd5b50565b606454811115610c265760405163052b07b760e21b815260040160405180910390fd5b606554610c31610c5a565b1115610c505760405163d86bae6760e01b815260040160405180910390fd5b6103a58282610ea7565b6032546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610ca0573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cc49190611327565b905090565b7fd2494f3479e5da49d386657c292c610b5b01df313d07c62eb0cfa49924a31be881610cfd84670de0b6b3a76400006112a3565b610d0791906112ba565b60405190815260200161074a565b5f54610100900460ff16610d7f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016105e8565b603280546001600160a01b0319166001600160a01b038316179055610da35f610b90565b7f1c540707b00eb5427b6b774fc799d756516a54aee108b64b327acc55af55750760325f9054906101000a90046001600160a01b0316826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e15573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e399190611378565b604080516001600160a01b03909316835260ff90911660208301520160405180910390a150565b6032546001600160a01b03838116911614610e8e57604051630312abdd60e61b815260040160405180910390fd5b505050565b610e8e6001600160a01b0383168483610ed5565b6032546001600160a01b038381169116146103a557604051630312abdd60e61b815260040160405180910390fd5b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656490840152610e8e928692915f91610f64918516908490610fe3565b905080515f1480610f84575080806020019051810190610f849190611359565b610e8e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105e8565b606061057684845f85855f5f866001600160a01b031685876040516110089190611393565b5f6040518083038185875af1925050503d805f8114611042576040519150601f19603f3d011682016040523d82523d5f602084013e611047565b606091505b509150915061105887838387611063565b979650505050505050565b606083156110d15782515f036110ca576001600160a01b0385163b6110ca5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105e8565b5081610576565b61057683838151156110e65781518083602001fd5b8060405162461bcd60e51b81526004016105e891906111f6565b5f5f60408385031215611111575f5ffd5b50508035926020909101359150565b5f60208284031215611130575f5ffd5b5035919050565b6001600160a01b0381168114610c00575f5ffd5b5f5f6040838503121561115c575f5ffd5b823561116781611137565b946020939093013593505050565b5f60208284031215611185575f5ffd5b813561119081611137565b9392505050565b60ff81168114610c00575f5ffd5b5f602082840312156111b5575f5ffd5b813561119081611197565b5f5f5f606084860312156111d2575f5ffd5b833592506020840135915060408401356111eb81611137565b809150509250925092565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f5f5f6060848603121561123d575f5ffd5b833561124881611137565b9250602084013561125881611137565b929592945050506040919091013590565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561051b5761051b611269565b8181038181111561051b5761051b611269565b808202811582820484141761051b5761051b611269565b5f826112d457634e487b7160e01b5f52601260045260245ffd5b500490565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b5f60208284031215611337575f5ffd5b5051919050565b5f6020828403121561134e575f5ffd5b815161119081611137565b5f60208284031215611369575f5ffd5b81518015158114611190575f5ffd5b5f60208284031215611388575f5ffd5b815161119081611197565b5f82518060208501845e5f92019182525091905056fe4261736520537472617465677920696d706c656d656e746174696f6e20746f20696e68657269742066726f6d20666f72206d6f726520636f6d706c657820696d706c656d656e746174696f6e73a2646970667358221220d3746c383368871009e44f7ae962ddb31f64bef2f69a89f96760599304322c1c64736f6c634300081e0033", } // StrategyBaseTVLLimitsABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/StrategyFactory/binding.go b/pkg/bindings/StrategyFactory/binding.go index 2f0ab252e4..574ccade1c 100644 --- a/pkg/bindings/StrategyFactory/binding.go +++ b/pkg/bindings/StrategyFactory/binding.go @@ -32,7 +32,7 @@ var ( // StrategyFactoryMetaData contains all meta data concerning the StrategyFactory contract. var StrategyFactoryMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_strategyManager\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"blacklistTokens\",\"inputs\":[{\"name\":\"tokens\",\"type\":\"address[]\",\"internalType\":\"contractIERC20[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"deployNewStrategy\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[{\"name\":\"newStrategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"deployedStrategies\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_initialOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_initialPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_strategyBeacon\",\"type\":\"address\",\"internalType\":\"contractIBeacon\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isBlacklisted\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeStrategiesFromWhitelist\",\"inputs\":[{\"name\":\"strategiesToRemoveFromWhitelist\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"strategyBeacon\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIBeacon\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategyManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"whitelistStrategies\",\"inputs\":[{\"name\":\"strategiesToWhitelist\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"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\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyBeaconModified\",\"inputs\":[{\"name\":\"previousBeacon\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIBeacon\"},{\"name\":\"newBeacon\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIBeacon\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategySetForToken\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TokenBlacklisted\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIERC20\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AlreadyBlacklisted\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"BlacklistedToken\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CurrentlyPaused\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidNewPausedStatus\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyPauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyUnpauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StrategyAlreadyExists\",\"inputs\":[]}]", - Bin: "0x60c060405234801561000f575f5ffd5b506040516118d83803806118d883398101604081905261002e9161014e565b806001600160a01b038116610056576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b03908116608052821660a052610071610078565b5050610186565b603354610100900460ff16156100e45760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60335460ff90811614610135576033805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b038116811461014b575f5ffd5b50565b5f5f6040838503121561015f575f5ffd5b825161016a81610137565b602084015190925061017b81610137565b809150509250929050565b60805160a0516117076101d15f395f81816101420152818161053a01528181610714015281816107b10152610a4901525f818161021501528181610a950152610d0901526117075ff3fe608060405234801561000f575f5ffd5b5060043610610111575f3560e01c8063886f11951161009e578063f0062d9a1161006e578063f0062d9a1461026e578063f2fde38b14610280578063fabc1cbc14610293578063fe38b32d146102a6578063fe575a87146102b9575f5ffd5b8063886f1195146102105780638da5cb5b14610237578063b768ebc914610248578063c350a1b51461025b575f5ffd5b8063595c6a67116100e4578063595c6a67146101a95780635ac86ab7146101b15780635c975abb146101e45780636b9b6229146101f5578063715018a614610208575f5ffd5b8063136439dd1461011557806323103c411461012a57806339b70e381461013d578063581dfd6514610181575b5f5ffd5b610128610123366004610dc5565b6102db565b005b610128610138366004610e24565b610315565b6101647f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b61016461018f366004610e77565b60016020525f90815260409020546001600160a01b031681565b6101286105a3565b6101d46101bf366004610e99565b609954600160ff9092169190911b9081161490565b6040519015158152602001610178565b609954604051908152602001610178565b610164610203366004610e77565b6105b7565b610128610781565b6101647f000000000000000000000000000000000000000000000000000000000000000081565b6066546001600160a01b0316610164565b610128610256366004610e24565b610792565b610128610269366004610eb9565b610819565b5f54610164906001600160a01b031681565b61012861028e366004610e77565b610944565b6101286102a1366004610dc5565b6109bd565b6101286102b4366004610e24565b610a2a565b6101d46102c7366004610e77565b60026020525f908152604090205460ff1681565b6102e3610a80565b60995481811681146103085760405163c61dca5d60e01b815260040160405180910390fd5b61031182610b23565b5050565b61031d610b60565b5f8167ffffffffffffffff81111561033757610337610ef8565b604051908082528060200260200182016040528015610360578160200160208202803683370190505b5090505f805b838110156105195760025f86868481811061038357610383610f0c565b90506020020160208101906103989190610e77565b6001600160a01b0316815260208101919091526040015f205460ff16156103d25760405163f53de75f60e01b815260040160405180910390fd5b600160025f8787858181106103e9576103e9610f0c565b90506020020160208101906103fe9190610e77565b6001600160a01b0316815260208101919091526040015f20805460ff19169115159190911790557f75519c51f39873ec0e27dd3bbc09549e4865a113f505393fb9eab5898f6418b385858381811061045857610458610f0c565b905060200201602081019061046d9190610e77565b6040516001600160a01b03909116815260200160405180910390a15f60015f87878581811061049e5761049e610f0c565b90506020020160208101906104b39190610e77565b6001600160a01b03908116825260208201929092526040015f2054169050801561051057808484815181106104ea576104ea610f0c565b6001600160a01b03909216602092830291909101909101528261050c81610f20565b9350505b50600101610366565b50808252801561059d576040516316bb16b760e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063b5d8b5b89061056f908590600401610f44565b5f604051808303815f87803b158015610586575f5ffd5b505af1158015610598573d5f5f3e3d5ffd5b505050505b50505050565b6105ab610a80565b6105b55f19610b23565b565b5f5f6105c281610bba565b6001600160a01b0383165f9081526002602052604090205460ff16156105fb5760405163091867bd60e11b815260040160405180910390fd5b6001600160a01b038381165f9081526001602052604090205416156106335760405163c45546f760e01b815260040160405180910390fd5b5f8054604080516001600160a01b0387811660248084019190915283518084039091018152604490920183526020820180516001600160e01b031663189acdbd60e31b179052915191909216919061068a90610db8565b610695929190610f8f565b604051809103905ff0801580156106ae573d5f5f3e3d5ffd5b5090506106bb8482610be5565b6040805160018082528183019092525f916020808301908036833701905050905081815f815181106106ef576106ef610f0c565b6001600160a01b039283166020918202929092010152604051632ef047f960e11b81527f000000000000000000000000000000000000000000000000000000000000000090911690635de08ff29061074b908490600401610f44565b5f604051808303815f87803b158015610762575f5ffd5b505af1158015610774573d5f5f3e3d5ffd5b5093979650505050505050565b610789610b60565b6105b55f610c4f565b61079a610b60565b604051632ef047f960e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635de08ff2906107e89085908590600401610fd3565b5f604051808303815f87803b1580156107ff575f5ffd5b505af1158015610811573d5f5f3e3d5ffd5b505050505050565b603354610100900460ff16158080156108395750603354600160ff909116105b806108535750303b158015610853575060335460ff166001145b6108bb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6033805460ff1916600117905580156108de576033805461ff0019166101001790555b6108e784610c4f565b6108f083610b23565b6108f982610ca0565b801561059d576033805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b61094c610b60565b6001600160a01b0381166109b15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108b2565b6109ba81610c4f565b50565b6109c5610d07565b609954801982198116146109ec5760405163c61dca5d60e01b815260040160405180910390fd5b609982905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b610a32610b60565b6040516316bb16b760e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063b5d8b5b8906107e89085908590600401610fd3565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa158015610ae2573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b06919061101f565b6105b557604051631d77d47760e21b815260040160405180910390fd5b609981905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b6066546001600160a01b031633146105b55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108b2565b609954600160ff83161b908116036109ba5760405163840a48d560e01b815260040160405180910390fd5b6001600160a01b038281165f8181526001602090815260409182902080546001600160a01b031916948616948517905581519283528201929092527f6852a55230ef089d785bce7ffbf757985de34026df90a87d7b4a6e56f95d251f910160405180910390a15050565b606680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54604080516001600160a01b03928316815291831660208301527fe21755962a7d7e100b59b9c3e4d4b54085b146313719955efb6a7a25c5c7feee910160405180910390a15f80546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d63573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d87919061103e565b6001600160a01b0316336001600160a01b0316146105b55760405163794821ff60e01b815260040160405180910390fd5b6106788061105a83390190565b5f60208284031215610dd5575f5ffd5b5035919050565b5f5f83601f840112610dec575f5ffd5b50813567ffffffffffffffff811115610e03575f5ffd5b6020830191508360208260051b8501011115610e1d575f5ffd5b9250929050565b5f5f60208385031215610e35575f5ffd5b823567ffffffffffffffff811115610e4b575f5ffd5b610e5785828601610ddc565b90969095509350505050565b6001600160a01b03811681146109ba575f5ffd5b5f60208284031215610e87575f5ffd5b8135610e9281610e63565b9392505050565b5f60208284031215610ea9575f5ffd5b813560ff81168114610e92575f5ffd5b5f5f5f60608486031215610ecb575f5ffd5b8335610ed681610e63565b9250602084013591506040840135610eed81610e63565b809150509250925092565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b5f60018201610f3d57634e487b7160e01b5f52601160045260245ffd5b5060010190565b602080825282518282018190525f918401906040840190835b81811015610f845783516001600160a01b0316835260209384019390920191600101610f5d565b509095945050505050565b60018060a01b0383168152604060208201525f82518060408401528060208501606085015e5f606082850101526060601f19601f8301168401019150509392505050565b602080825281018290525f8360408301825b85811015611015578235610ff881610e63565b6001600160a01b0316825260209283019290910190600101610fe5565b5095945050505050565b5f6020828403121561102f575f5ffd5b81518015158114610e92575f5ffd5b5f6020828403121561104e575f5ffd5b8151610e9281610e6356fe6080604052604051610678380380610678833981016040819052610022916103ed565b61002d82825f610034565b5050610513565b61003d836100f1565b6040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e905f90a25f8251118061007c5750805b156100ec576100ea836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c0573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100e491906104af565b83610273565b505b505050565b6001600160a01b0381163b61015b5760405162461bcd60e51b815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e6044820152641d1c9858dd60da1b60648201526084015b60405180910390fd5b6101cd816001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561019a573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101be91906104af565b6001600160a01b03163b151590565b6102325760405162461bcd60e51b815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201526f1cc81b9bdd08184818dbdb9d1c9858dd60821b6064820152608401610152565b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080546001600160a01b0319166001600160a01b0392909216919091179055565b606061029883836040518060600160405280602781526020016106516027913961029f565b9392505050565b60605f5f856001600160a01b0316856040516102bb91906104c8565b5f60405180830381855af49150503d805f81146102f3576040519150601f19603f3d011682016040523d82523d5f602084013e6102f8565b606091505b50909250905061030a86838387610314565b9695505050505050565b606083156103825782515f0361037b576001600160a01b0385163b61037b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610152565b508161038c565b61038c8383610394565b949350505050565b8151156103a45781518083602001fd5b8060405162461bcd60e51b815260040161015291906104de565b80516001600160a01b03811681146103d4575f5ffd5b919050565b634e487b7160e01b5f52604160045260245ffd5b5f5f604083850312156103fe575f5ffd5b610407836103be565b60208401519092506001600160401b03811115610422575f5ffd5b8301601f81018513610432575f5ffd5b80516001600160401b0381111561044b5761044b6103d9565b604051601f8201601f19908116603f011681016001600160401b0381118282101715610479576104796103d9565b604052818152828201602001871015610490575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b5f602082840312156104bf575f5ffd5b610298826103be565b5f82518060208501845e5f920191825250919050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b610131806105205f395ff3fe608060405236601057600e6013565b005b600e5b601f601b6021565b60b3565b565b5f60527fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546001600160a01b031690565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015608c573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019060ae919060d0565b905090565b365f5f375f5f365f845af43d5f5f3e80801560cc573d5ff35b3d5ffd5b5f6020828403121560df575f5ffd5b81516001600160a01b038116811460f4575f5ffd5b939250505056fea26469706673582212207b94aecb5f7696f142cc1acc4dea07c18e8f9d41766baf4a3c001a89adb8a8a764736f6c634300081e0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207047c8c0de18e13a98ca9f8e2128ab250c892bc6b94bc188477aefe7b92c797d64736f6c634300081e0033", + Bin: "0x60c060405234801561000f575f5ffd5b506040516118d83803806118d883398101604081905261002e9161014e565b806001600160a01b038116610056576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b03908116608052821660a052610071610078565b5050610186565b603354610100900460ff16156100e45760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60335460ff90811614610135576033805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b038116811461014b575f5ffd5b50565b5f5f6040838503121561015f575f5ffd5b825161016a81610137565b602084015190925061017b81610137565b809150509250929050565b60805160a0516117076101d15f395f81816101420152818161053a01528181610714015281816107b10152610a4901525f818161021501528181610a950152610d0901526117075ff3fe608060405234801561000f575f5ffd5b5060043610610111575f3560e01c8063886f11951161009e578063f0062d9a1161006e578063f0062d9a1461026e578063f2fde38b14610280578063fabc1cbc14610293578063fe38b32d146102a6578063fe575a87146102b9575f5ffd5b8063886f1195146102105780638da5cb5b14610237578063b768ebc914610248578063c350a1b51461025b575f5ffd5b8063595c6a67116100e4578063595c6a67146101a95780635ac86ab7146101b15780635c975abb146101e45780636b9b6229146101f5578063715018a614610208575f5ffd5b8063136439dd1461011557806323103c411461012a57806339b70e381461013d578063581dfd6514610181575b5f5ffd5b610128610123366004610dc5565b6102db565b005b610128610138366004610e24565b610315565b6101647f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b61016461018f366004610e77565b60016020525f90815260409020546001600160a01b031681565b6101286105a3565b6101d46101bf366004610e99565b609954600160ff9092169190911b9081161490565b6040519015158152602001610178565b609954604051908152602001610178565b610164610203366004610e77565b6105b7565b610128610781565b6101647f000000000000000000000000000000000000000000000000000000000000000081565b6066546001600160a01b0316610164565b610128610256366004610e24565b610792565b610128610269366004610eb9565b610819565b5f54610164906001600160a01b031681565b61012861028e366004610e77565b610944565b6101286102a1366004610dc5565b6109bd565b6101286102b4366004610e24565b610a2a565b6101d46102c7366004610e77565b60026020525f908152604090205460ff1681565b6102e3610a80565b60995481811681146103085760405163c61dca5d60e01b815260040160405180910390fd5b61031182610b23565b5050565b61031d610b60565b5f8167ffffffffffffffff81111561033757610337610ef8565b604051908082528060200260200182016040528015610360578160200160208202803683370190505b5090505f805b838110156105195760025f86868481811061038357610383610f0c565b90506020020160208101906103989190610e77565b6001600160a01b0316815260208101919091526040015f205460ff16156103d25760405163f53de75f60e01b815260040160405180910390fd5b600160025f8787858181106103e9576103e9610f0c565b90506020020160208101906103fe9190610e77565b6001600160a01b0316815260208101919091526040015f20805460ff19169115159190911790557f75519c51f39873ec0e27dd3bbc09549e4865a113f505393fb9eab5898f6418b385858381811061045857610458610f0c565b905060200201602081019061046d9190610e77565b6040516001600160a01b03909116815260200160405180910390a15f60015f87878581811061049e5761049e610f0c565b90506020020160208101906104b39190610e77565b6001600160a01b03908116825260208201929092526040015f2054169050801561051057808484815181106104ea576104ea610f0c565b6001600160a01b03909216602092830291909101909101528261050c81610f20565b9350505b50600101610366565b50808252801561059d576040516316bb16b760e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063b5d8b5b89061056f908590600401610f44565b5f604051808303815f87803b158015610586575f5ffd5b505af1158015610598573d5f5f3e3d5ffd5b505050505b50505050565b6105ab610a80565b6105b55f19610b23565b565b5f5f6105c281610bba565b6001600160a01b0383165f9081526002602052604090205460ff16156105fb5760405163091867bd60e11b815260040160405180910390fd5b6001600160a01b038381165f9081526001602052604090205416156106335760405163c45546f760e01b815260040160405180910390fd5b5f8054604080516001600160a01b0387811660248084019190915283518084039091018152604490920183526020820180516001600160e01b031663189acdbd60e31b179052915191909216919061068a90610db8565b610695929190610f8f565b604051809103905ff0801580156106ae573d5f5f3e3d5ffd5b5090506106bb8482610be5565b6040805160018082528183019092525f916020808301908036833701905050905081815f815181106106ef576106ef610f0c565b6001600160a01b039283166020918202929092010152604051632ef047f960e11b81527f000000000000000000000000000000000000000000000000000000000000000090911690635de08ff29061074b908490600401610f44565b5f604051808303815f87803b158015610762575f5ffd5b505af1158015610774573d5f5f3e3d5ffd5b5093979650505050505050565b610789610b60565b6105b55f610c4f565b61079a610b60565b604051632ef047f960e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635de08ff2906107e89085908590600401610fd3565b5f604051808303815f87803b1580156107ff575f5ffd5b505af1158015610811573d5f5f3e3d5ffd5b505050505050565b603354610100900460ff16158080156108395750603354600160ff909116105b806108535750303b158015610853575060335460ff166001145b6108bb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6033805460ff1916600117905580156108de576033805461ff0019166101001790555b6108e784610c4f565b6108f083610b23565b6108f982610ca0565b801561059d576033805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b61094c610b60565b6001600160a01b0381166109b15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108b2565b6109ba81610c4f565b50565b6109c5610d07565b609954801982198116146109ec5760405163c61dca5d60e01b815260040160405180910390fd5b609982905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b610a32610b60565b6040516316bb16b760e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063b5d8b5b8906107e89085908590600401610fd3565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa158015610ae2573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b06919061101f565b6105b557604051631d77d47760e21b815260040160405180910390fd5b609981905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b6066546001600160a01b031633146105b55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108b2565b609954600160ff83161b908116036109ba5760405163840a48d560e01b815260040160405180910390fd5b6001600160a01b038281165f8181526001602090815260409182902080546001600160a01b031916948616948517905581519283528201929092527f6852a55230ef089d785bce7ffbf757985de34026df90a87d7b4a6e56f95d251f910160405180910390a15050565b606680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54604080516001600160a01b03928316815291831660208301527fe21755962a7d7e100b59b9c3e4d4b54085b146313719955efb6a7a25c5c7feee910160405180910390a15f80546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d63573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d87919061103e565b6001600160a01b0316336001600160a01b0316146105b55760405163794821ff60e01b815260040160405180910390fd5b6106788061105a83390190565b5f60208284031215610dd5575f5ffd5b5035919050565b5f5f83601f840112610dec575f5ffd5b50813567ffffffffffffffff811115610e03575f5ffd5b6020830191508360208260051b8501011115610e1d575f5ffd5b9250929050565b5f5f60208385031215610e35575f5ffd5b823567ffffffffffffffff811115610e4b575f5ffd5b610e5785828601610ddc565b90969095509350505050565b6001600160a01b03811681146109ba575f5ffd5b5f60208284031215610e87575f5ffd5b8135610e9281610e63565b9392505050565b5f60208284031215610ea9575f5ffd5b813560ff81168114610e92575f5ffd5b5f5f5f60608486031215610ecb575f5ffd5b8335610ed681610e63565b9250602084013591506040840135610eed81610e63565b809150509250925092565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b5f60018201610f3d57634e487b7160e01b5f52601160045260245ffd5b5060010190565b602080825282518282018190525f918401906040840190835b81811015610f845783516001600160a01b0316835260209384019390920191600101610f5d565b509095945050505050565b60018060a01b0383168152604060208201525f82518060408401528060208501606085015e5f606082850101526060601f19601f8301168401019150509392505050565b602080825281018290525f8360408301825b85811015611015578235610ff881610e63565b6001600160a01b0316825260209283019290910190600101610fe5565b5095945050505050565b5f6020828403121561102f575f5ffd5b81518015158114610e92575f5ffd5b5f6020828403121561104e575f5ffd5b8151610e9281610e6356fe6080604052604051610678380380610678833981016040819052610022916103ed565b61002d82825f610034565b5050610513565b61003d836100f1565b6040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e905f90a25f8251118061007c5750805b156100ec576100ea836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c0573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100e491906104af565b83610273565b505b505050565b6001600160a01b0381163b61015b5760405162461bcd60e51b815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e6044820152641d1c9858dd60da1b60648201526084015b60405180910390fd5b6101cd816001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561019a573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101be91906104af565b6001600160a01b03163b151590565b6102325760405162461bcd60e51b815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201526f1cc81b9bdd08184818dbdb9d1c9858dd60821b6064820152608401610152565b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080546001600160a01b0319166001600160a01b0392909216919091179055565b606061029883836040518060600160405280602781526020016106516027913961029f565b9392505050565b60605f5f856001600160a01b0316856040516102bb91906104c8565b5f60405180830381855af49150503d805f81146102f3576040519150601f19603f3d011682016040523d82523d5f602084013e6102f8565b606091505b50909250905061030a86838387610314565b9695505050505050565b606083156103825782515f0361037b576001600160a01b0385163b61037b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610152565b508161038c565b61038c8383610394565b949350505050565b8151156103a45781518083602001fd5b8060405162461bcd60e51b815260040161015291906104de565b80516001600160a01b03811681146103d4575f5ffd5b919050565b634e487b7160e01b5f52604160045260245ffd5b5f5f604083850312156103fe575f5ffd5b610407836103be565b60208401519092506001600160401b03811115610422575f5ffd5b8301601f81018513610432575f5ffd5b80516001600160401b0381111561044b5761044b6103d9565b604051601f8201601f19908116603f011681016001600160401b0381118282101715610479576104796103d9565b604052818152828201602001871015610490575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b5f602082840312156104bf575f5ffd5b610298826103be565b5f82518060208501845e5f920191825250919050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b610131806105205f395ff3fe608060405236601057600e6013565b005b600e5b601f601b6021565b60b3565b565b5f60527fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546001600160a01b031690565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015608c573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019060ae919060d0565b905090565b365f5f375f5f365f845af43d5f5f3e80801560cc573d5ff35b3d5ffd5b5f6020828403121560df575f5ffd5b81516001600160a01b038116811460f4575f5ffd5b939250505056fea26469706673582212207b94aecb5f7696f142cc1acc4dea07c18e8f9d41766baf4a3c001a89adb8a8a764736f6c634300081e0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122079e99ec0e4da1dd64a17d71556c45401acdb4d52d3fe3ffd913386d5e9055a8064736f6c634300081e0033", } // StrategyFactoryABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/StrategyManager/binding.go b/pkg/bindings/StrategyManager/binding.go index 5cdf736135..ab5f9526f3 100644 --- a/pkg/bindings/StrategyManager/binding.go +++ b/pkg/bindings/StrategyManager/binding.go @@ -38,7 +38,7 @@ type OperatorSet struct { // StrategyManagerMetaData contains all meta data concerning the StrategyManager contract. var StrategyManagerMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_allocationManager\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"},{\"name\":\"_delegation\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"DEFAULT_BURN_ADDRESS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DEPOSIT_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addStrategiesToDepositWhitelist\",\"inputs\":[{\"name\":\"strategiesToWhitelist\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"allocationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"burnShares\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"calculateStrategyDepositDigestHash\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"clearBurnOrRedistributableShares\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"slashId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"clearBurnOrRedistributableSharesByStrategy\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"slashId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"depositIntoStrategy\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"depositShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"depositIntoStrategyWithSignature\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"depositShares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBurnOrRedistributableCount\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"slashId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBurnOrRedistributableShares\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"slashId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBurnOrRedistributableShares\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"slashId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBurnableShares\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDeposits\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPendingOperatorSets\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structOperatorSet[]\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPendingSlashIds\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakerStrategyList\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStrategiesWithBurnableShares\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"increaseBurnOrRedistributableShares\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"slashId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"sharesToBurn\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"initialStrategyWhitelister\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"initialPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"nonces\",\"inputs\":[{\"name\":\"signer\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeDepositShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"depositSharesToRemove\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeStrategiesFromDepositWhitelist\",\"inputs\":[{\"name\":\"strategiesToRemoveFromWhitelist\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setStrategyWhitelister\",\"inputs\":[{\"name\":\"newStrategyWhitelister\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"stakerDepositShares\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerStrategyList\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"strategies\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"stakerStrategyListLength\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyIsWhitelistedForDeposit\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"whitelisted\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyWhitelister\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawSharesAsTokens\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"shares\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"BurnOrRedistributableSharesDecreased\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"slashId\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BurnOrRedistributableSharesIncreased\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"slashId\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BurnableSharesDecreased\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Deposit\",\"inputs\":[{\"name\":\"staker\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"shares\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"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\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyAddedToDepositWhitelist\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyRemovedFromDepositWhitelist\",\"inputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyWhitelisterChanged\",\"inputs\":[{\"name\":\"previousAddress\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newAddress\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"CurrentlyPaused\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidNewPausedStatus\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"MaxStrategiesExceeded\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyDelegationManager\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyPauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyStrategyWhitelister\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyUnpauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SharesAmountTooHigh\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SharesAmountZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignatureExpired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StakerAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StrategyAlreadyInSlash\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StrategyNotFound\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StrategyNotWhitelisted\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]}]", - Bin: "0x610100604052348015610010575f5ffd5b506040516139d73803806139d783398101604081905261002f916101bc565b80808585856001600160a01b03811661005b576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b0390811660805291821660a0521660c05261007c81610093565b60e0525061008a90506100d9565b50505050610301565b5f5f829050601f815111156100c6578260405163305a27a960e01b81526004016100bd91906102a6565b60405180910390fd5b80516100d1826102db565b179392505050565b5f54610100900460ff16156101405760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b60648201526084016100bd565b5f5460ff9081161461018f575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146101a5575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b5f5f5f5f608085870312156101cf575f5ffd5b84516101da81610191565b60208601519094506101eb81610191565b60408601519093506101fc81610191565b60608601519092506001600160401b03811115610217575f5ffd5b8501601f81018713610227575f5ffd5b80516001600160401b03811115610240576102406101a8565b604051601f8201601f19908116603f011681016001600160401b038111828210171561026e5761026e6101a8565b604052818152828201602001891015610285575f5ffd5b8160208401602083015e5f6020838301015280935050505092959194509250565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b805160208083015191908110156102fb575f198160200360031b1b821691505b50919050565b60805160a05160c05160e05161365d61037a5f395f81816110a8015261247401525f81816105fa015281816108c101528181610da30152818161103a0152818161125501526120a901525f81816105a001528181610815015261141a01525f81816104b601528181611aaa01526124e3015261365d5ff3fe608060405234801561000f575f5ffd5b506004361061026b575f3560e01c80637ecebe001161014b578063ca8aa7c7116100bf578063f2fde38b11610084578063f2fde38b1461062f578063f3b4a00014610642578063f698da251461064c578063fabc1cbc14610654578063fd98042314610667578063fe243a171461067a575f5ffd5b8063ca8aa7c71461059b578063cbc2bd62146105c2578063de44acb6146105d5578063df5cf723146105f5578063e7a050aa1461061c575f5ffd5b80638da5cb5b116101105780638da5cb5b1461052b57806394f649dd1461053c578063967fc0d21461054f5780639ac01d6114610562578063b5d8b5b814610575578063c665670214610588575f5ffd5b80637ecebe001461047f578063829fca731461049e578063886f1195146104b157806388c10299146104f05780638b8aac3c14610503575f5ffd5b806350ff7225116101e25780635de08ff2116101a75780635de08ff2146103fc578063663c1de41461040f578063715018a614610431578063724af4231461043957806376fb162b1461044c5780637def15641461045f575f5ffd5b806350ff72251461037c57806354fd4d50146103a4578063595c6a67146103b95780635ac86ab7146103c15780635c975abb146103f4575f5ffd5b806332e89ace1161023357806332e89ace146102f157806336a8c500146103045780633f292b081461031a5780633fb99ca51461032f57806348825e94146103425780634b6d5d6e14610369575f5ffd5b8063136439dd1461026f5780631794bb3c146102845780632d44def6146102975780632eae418c146102bd57806331f8fb4c146102d0575b5f5ffd5b61028261027d366004612e33565b6106a4565b005b610282610292366004612e5e565b6106de565b6102aa6102a5366004612eb2565b610804565b6040519081526020015b60405180910390f35b6102826102cb366004612ef0565b6108b6565b6102e36102de366004612f3e565b610982565b6040516102b4929190612fda565b6102aa6102ff36600461304b565b610b10565b61030c610b95565b6040516102b4929190613125565b610322610cb0565b6040516102b4919061317b565b61028261033d3660046131d8565b610d98565b6102aa7f4337f82d142e41f2a8c10547cd8c859bddb92262a61058e77842e24d9dea922481565b61028261037736600461321c565b610ee0565b61038f61038a366004612e5e565b61102d565b604080519283526020830191909152016102b4565b6103ac6110a1565b6040516102b49190613265565b6102826110d1565b6103e46103cf366004613277565b609854600160ff9092169190911b9081161490565b60405190151581526020016102b4565b6098546102aa565b61028261040a366004613297565b6110e5565b6103e461041d36600461321c565b60d16020525f908152604090205460ff1681565b610282611238565b6102aa610447366004612e5e565b611249565b6102aa61045a366004612eb2565b6112a6565b61047261046d366004613306565b6112f5565b6040516102b49190613320565b6102aa61048d36600461321c565b60ca6020525f908152604090205481565b6102aa6104ac366004612f3e565b611327565b6104d87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102b4565b6104726104fe366004612f3e565b611361565b6102aa61051136600461321c565b6001600160a01b03165f90815260ce602052604090205490565b6033546001600160a01b03166104d8565b6102e361054a36600461321c565b611498565b60cb546104d8906001600160a01b031681565b6102aa610570366004613332565b61160f565b610282610583366004613297565b6116a0565b61028261059636600461321c565b6117e7565b6104d87f000000000000000000000000000000000000000000000000000000000000000081565b6104d86105d0366004613393565b61180a565b6105e86105e336600461321c565b61183e565b6040516102b491906133bd565b6104d87f000000000000000000000000000000000000000000000000000000000000000081565b6102aa61062a366004612e5e565b6118b1565b61028261063d36600461321c565b6118e4565b6104d8620e16e481565b6102aa61195a565b610282610662366004612e33565b611a13565b6102aa61067536600461321c565b611a80565b6102aa6106883660046133cf565b60cd60209081525f928352604080842090915290825290205481565b6106ac611a95565b60985481811681146106d15760405163c61dca5d60e01b815260040160405180910390fd5b6106da82611b38565b5050565b5f54610100900460ff16158080156106fc57505f54600160ff909116105b806107155750303b15801561071557505f5460ff166001145b61077d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff19166001179055801561079e575f805461ff0019166101001790555b6107a782611b38565b6107b084611b75565b6107b983611bc6565b80156107fe575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b5f61080d611c2f565b6108a38484847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630f3df50e896040518263ffffffff1660e01b815260040161085f919061344f565b602060405180830381865afa15801561087a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061089e919061345d565b611c88565b90506108af6001606555565b9392505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108ff5760405163f739589b60e01b815260040160405180910390fd5b610907611c2f565b604051636ce5768960e11b81526001600160a01b0384169063d9caed129061093790879086908690600401613478565b6020604051808303815f875af1158015610953573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610977919061349c565b506107fe6001606555565b6060805f60d7816109a061099b368990038901896134b3565b611e90565b81526020019081526020015f205f8581526020019081526020015f2090505f6109c882611ef3565b90505f81516001600160401b038111156109e4576109e4613007565b604051908082528060200260200182016040528015610a0d578160200160208202803683370190505b5090505f82516001600160401b03811115610a2a57610a2a613007565b604051908082528060200260200182016040528015610a53578160200160208202803683370190505b5090505f5b8351811015610b0057838181518110610a7357610a7361350f565b6020026020010151838281518110610a8d57610a8d61350f565b60200260200101906001600160a01b031690816001600160a01b031681525050610ad9848281518110610ac257610ac261350f565b602002602001015186611eff90919063ffffffff16565b9050828281518110610aed57610aed61350f565b6020908102919091010152600101610a58565b50909450925050505b9250929050565b5f5f610b1b81611f23565b610b23611c2f565b6001600160a01b0385165f90815260ca6020526040902054610b5486610b4d818c8c8c878c61160f565b8688611f4e565b6001600160a01b0386165f90815260ca60205260409020600182019055610b7d868a8a8a611fa0565b925050610b8a6001606555565b509695505050505050565b6060805f610ba360d461210d565b90505f816001600160401b03811115610bbe57610bbe613007565b604051908082528060200260200182016040528015610be7578160200160208202803683370190505b5090505f826001600160401b03811115610c0357610c03613007565b604051908082528060200260200182016040528015610c2c578160200160208202803683370190505b5090505f5b83811015610ca5575f5f610c4660d484612117565b9150915081858481518110610c5d57610c5d61350f565b60200260200101906001600160a01b031690816001600160a01b03168152505080848481518110610c9057610c9061350f565b60209081029190910101525050600101610c31565b509094909350915050565b60605f610cbd60d8612125565b90505f816001600160401b03811115610cd857610cd8613007565b604051908082528060200260200182016040528015610d1c57816020015b604080518082019091525f8082526020820152815260200190600190039081610cf65790505b5090505f5b82811015610d9157610d6c610d3760d88361212e565b604080518082019091525f80825260208201525060408051808201909152606082901c815263ffffffff909116602082015290565b828281518110610d7e57610d7e61350f565b6020908102919091010152600101610d21565b5092915050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610de15760405163f739589b60e01b815260040160405180910390fd5b610de9611c2f565b5f60d781610dff61099b368990038901896134b3565b815260208082019290925260409081015f90812087825290925290209050610e28818484612139565b610e455760405163ca354fa360e01b815260040160405180910390fd5b610e62610e5a61099b368890038801886134b3565b60d89061214e565b50610e978460da5f610e7c61099b368b90038b018b6134b3565b81526020019081526020015f2061214e90919063ffffffff16565b507f5f5209798bbac45a16d2dc3bc67319fab26ee00153916d6f07b69f8a134a1e8b85858585604051610ecd9493929190613523565b60405180910390a1506107fe6001606555565b610ee8611c2f565b5f610ef460d483611eff565b915050610f0260d483612159565b50604080516001600160a01b0384168152602081018390527fd9d082c3ec4f3a3ffa55c324939a06407f5fbcb87d5e0ce3b9508c92c84ed839910160405180910390a1801561101f57816001600160a01b031663d9caed12620e16e4846001600160a01b0316632495a5996040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f9a573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fbe919061345d565b846040518463ffffffff1660e01b8152600401610fdd93929190613478565b6020604051808303815f875af1158015610ff9573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061101d919061349c565b505b5061102a6001606555565b50565b5f80336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146110785760405163f739589b60e01b815260040160405180910390fd5b611080611c2f565b61108b85858561216d565b915091506110996001606555565b935093915050565b60606110cc7f00000000000000000000000000000000000000000000000000000000000000006122d5565b905090565b6110d9611a95565b6110e35f19611b38565b565b60cb546001600160a01b03163314611110576040516320ba3ff960e21b815260040160405180910390fd5b611118611c2f565b805f5b8181101561122c5760d15f8585848181106111385761113861350f565b905060200201602081019061114d919061321c565b6001600160a01b0316815260208101919091526040015f205460ff1661122457600160d15f8686858181106111845761118461350f565b9050602002016020810190611199919061321c565b6001600160a01b0316815260208101919091526040015f20805460ff19169115159190911790557f0c35b17d91c96eb2751cd456e1252f42a386e524ef9ff26ecc9950859fdc04fe8484838181106111f3576111f361350f565b9050602002016020810190611208919061321c565b6040516001600160a01b03909116815260200160405180910390a15b60010161111b565b50506106da6001606555565b611240612312565b6110e35f611b75565b5f336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146112935760405163f739589b60e01b815260040160405180910390fd5b61129b611c2f565b6108a384848461236c565b5f806112eb8360d7836112c161099b368b90038b018b6134b3565b81526020019081526020015f205f8781526020019081526020015f20611eff90919063ffffffff16565b9695505050505050565b606061132160da5f61130f61099b368790038701876134b3565b81526020019081526020015f2061241a565b92915050565b5f6108af60d78261134061099b368890038801886134b3565b81526020019081526020015f205f8481526020019081526020015f2061210d565b606061136b611c2f565b5f6113a560d78261138461099b368990038901896134b3565b81526020019081526020015f205f8581526020019081526020015f20611ef3565b80519091505f816001600160401b038111156113c3576113c3613007565b6040519080825280602002602001820160405280156113ec578160200160208202803683370190505b5090505f5b828110156114895761146487878684815181106114105761141061350f565b60200260200101517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630f3df50e8c6040518263ffffffff1660e01b815260040161085f919061344f565b8282815181106114765761147661350f565b60209081029190910101526001016113f1565b50925050506113216001606555565b6001600160a01b0381165f90815260ce6020526040812054606091829190816001600160401b038111156114ce576114ce613007565b6040519080825280602002602001820160405280156114f7578160200160208202803683370190505b5090505f5b82811015611585576001600160a01b0386165f90815260cd6020908152604080832060ce909252822080549192918490811061153a5761153a61350f565b5f9182526020808320909101546001600160a01b0316835282019290925260400190205482518390839081106115725761157261350f565b60209081029190910101526001016114fc565b5060ce5f866001600160a01b03166001600160a01b031681526020019081526020015f2081818054806020026020016040519081016040528092919081815260200182805480156115fd57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116115df575b50505050509150935093505050915091565b604080517f4337f82d142e41f2a8c10547cd8c859bddb92262a61058e77842e24d9dea922460208201526001600160a01b03808916928201929092528187166060820152908516608082015260a0810184905260c0810183905260e081018290525f90611695906101000160405160208183030381529060405280519060200120612426565b979650505050505050565b60cb546001600160a01b031633146116cb576040516320ba3ff960e21b815260040160405180910390fd5b6116d3611c2f565b805f5b8181101561122c5760d15f8585848181106116f3576116f361350f565b9050602002016020810190611708919061321c565b6001600160a01b0316815260208101919091526040015f205460ff16156117df575f60d15f86868581811061173f5761173f61350f565b9050602002016020810190611754919061321c565b6001600160a01b0316815260208101919091526040015f20805460ff19169115159190911790557f4074413b4b443e4e58019f2855a8765113358c7c72e39509c6af45fc0f5ba0308484838181106117ae576117ae61350f565b90506020020160208101906117c3919061321c565b6040516001600160a01b03909116815260200160405180910390a15b6001016116d6565b6117ef612312565b6117f7611c2f565b61180081611bc6565b61102a6001606555565b60ce602052815f5260405f208181548110611823575f80fd5b5f918252602090912001546001600160a01b03169150829050565b6001600160a01b0381165f90815260ce60209081526040918290208054835181840281018401909452808452606093928301828280156118a557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611887575b50505050509050919050565b5f5f6118bc81611f23565b6118c4611c2f565b6118d033868686611fa0565b91506118dc6001606555565b509392505050565b6118ec612312565b6001600160a01b0381166119515760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610774565b61102a81611b75565b60408051808201909152600a81526922b4b3b2b72630bcb2b960b11b6020909101525f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea6119c761246c565b805160209182012060408051928301949094529281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b611a1b6124e1565b60985480198219811614611a425760405163c61dca5d60e01b815260040160405180910390fd5b609882905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b5f5f611a8d60d484611eff565b949350505050565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa158015611af7573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b1b9190613555565b6110e357604051631d77d47760e21b815260040160405180910390fd5b609881905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b60cb54604080516001600160a01b03928316815291831660208301527f4264275e593955ff9d6146a51a4525f6ddace2e81db9391abcc9d1ca48047d29910160405180910390a160cb80546001600160a01b0319166001600160a01b0392909216919091179055565b600260655403611c815760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610774565b6002606555565b5f8060d781611c9f61099b368a90038a018a6134b3565b815260208082019290925260409081015f90812088825290925281209150611cc78286611eff565b9150611cd590508286612159565b505f8115611dec57856001600160a01b031663d9caed1286886001600160a01b0316632495a5996040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d29573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d4d919061345d565b856040518463ffffffff1660e01b8152600401611d6c93929190613478565b6020604051808303815f875af1158015611d88573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611dac919061349c565b90507fe6413aa0c789e437b0a06bf64b20926584f066c79a2d8b80a759c85472f7b0af88888885604051611de39493929190613523565b60405180910390a15b5f611df684611ef3565b519050805f03611e8457611e348860da5f611e1961099b368f90038f018f6134b3565b81526020019081526020015f2061259290919063ffffffff16565b50611e5f60da5f611e4d61099b368e90038e018e6134b3565b81526020019081526020015f20612125565b5f03611e8457611e82611e7a61099b368c90038c018c6134b3565b60d890612592565b505b50979650505050505050565b5f815f0151826020015163ffffffff16604051602001611edb92919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b60405160208183030381529060405261132190613574565b60605f6108af8361259d565b5f808080611f16866001600160a01b0387166125a8565b9097909650945050505050565b609854600160ff83161b9081160361102a5760405163840a48d560e01b815260040160405180910390fd5b42811015611f6f57604051630819bdcd60e01b815260040160405180910390fd5b611f836001600160a01b03851684846125e0565b6107fe57604051638baa579f60e01b815260040160405180910390fd5b6001600160a01b0383165f90815260d16020526040812054849060ff16611fda57604051632efd965160e11b815260040160405180910390fd5b611fef6001600160a01b038516338786612634565b6040516311f9fbc960e21b81526001600160a01b038581166004830152602482018590528616906347e7ef24906044016020604051808303815f875af115801561203b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061205f919061349c565b91505f5f61206e88888661216d565b604051631e328e7960e11b81526001600160a01b038b811660048301528a8116602483015260448201849052606482018390529294509092507f000000000000000000000000000000000000000000000000000000000000000090911690633c651cf2906084015f604051808303815f87803b1580156120ec575f5ffd5b505af11580156120fe573d5f5f3e3d5ffd5b50505050505050949350505050565b5f6113218261268c565b5f808080611f168686612696565b5f611321825490565b5f6108af83836126bf565b5f611a8d846001600160a01b038516846126e5565b5f6108af8383612701565b5f6108af836001600160a01b03841661274d565b5f806001600160a01b038516612196576040516316f2ccc960e01b815260040160405180910390fd5b825f036121b6576040516342061b2560e11b815260040160405180910390fd5b6001600160a01b038086165f90815260cd602090815260408083209388168352929052908120549081900361225c576001600160a01b0386165f90815260ce60209081526040909120541061221e576040516301a1443960e31b815260040160405180910390fd5b6001600160a01b038681165f90815260ce602090815260408220805460018101825590835291200180546001600160a01b0319169187169190911790555b61226684826135ab565b6001600160a01b038088165f90815260cd60209081526040808320938a16835292905281902091909155517f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f62906122c290889088908890613478565b60405180910390a1959294509192505050565b60605f6122e183612769565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b6033546001600160a01b031633146110e35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610774565b5f815f0361238d576040516342061b2560e11b815260040160405180910390fd5b6001600160a01b038085165f90815260cd6020908152604080832093871683529290522054808311156123d357604051634b18b19360e01b815260040160405180910390fd5b6123dd83826135be565b6001600160a01b038087165f90815260cd602090815260408083209389168352929052908120829055909150819003611a8d57611a8d8585612790565b60605f6108af8361290e565b5f61242f61195a565b60405161190160f01b6020820152602281019190915260428101839052606201604051602081830303815290604052805190602001209050919050565b60605f6124987f00000000000000000000000000000000000000000000000000000000000000006122d5565b9050805f815181106124ac576124ac61350f565b016020908101516040516001600160f81b03199091169181019190915260210160405160208183030381529060405291505090565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561253d573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612561919061345d565b6001600160a01b0316336001600160a01b0316146110e35760405163794821ff60e01b815260040160405180910390fd5b5f6108af8383612966565b60606113218261241a565b5f8181526002830160205260408120548190806125d5576125c98585612a49565b92505f9150610b099050565b600192509050610b09565b5f5f5f6125ed8585612a54565b90925090505f816004811115612605576126056135d1565b1480156126235750856001600160a01b0316826001600160a01b0316145b806112eb57506112eb868686612a93565b6107fe846323b872dd60e01b85858560405160240161265593929190613478565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612b7a565b5f61132182612125565b5f80806126a3858561212e565b5f81815260029690960160205260409095205494959350505050565b5f825f0182815481106126d4576126d461350f565b905f5260205f200154905092915050565b5f8281526002840160205260408120829055611a8d848461214e565b5f81815260018301602052604081205461274657508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155611321565b505f611321565b5f81815260028301602052604081208190556108af8383612592565b5f60ff8216601f81111561132157604051632cd44ac360e21b815260040160405180910390fd5b6001600160a01b0382165f90815260ce6020526040812054905b818110156128a2576001600160a01b038481165f90815260ce60205260409020805491851691839081106127e0576127e061350f565b5f918252602090912001546001600160a01b03160361289a576001600160a01b0384165f90815260ce60205260409020805461281e906001906135be565b8154811061282e5761282e61350f565b5f9182526020808320909101546001600160a01b03878116845260ce909252604090922080549190921691908390811061286a5761286a61350f565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506128a2565b6001016127aa565b8181036128c257604051632df15a4160e11b815260040160405180910390fd5b6001600160a01b0384165f90815260ce602052604090208054806128e8576128e86135e5565b5f8281526020902081015f1990810180546001600160a01b031916905501905550505050565b6060815f018054806020026020016040519081016040528092919081815260200182805480156118a557602002820191905f5260205f20905b8154815260200190600101908083116129475750505050509050919050565b5f8181526001830160205260408120548015612a40575f6129886001836135be565b85549091505f9061299b906001906135be565b90508181146129fa575f865f0182815481106129b9576129b961350f565b905f5260205f200154905080875f0184815481106129d9576129d961350f565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080612a0b57612a0b6135e5565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050611321565b5f915050611321565b5f6108af8383612c52565b5f5f8251604103612a88576020830151604084015160608501515f1a612a7c87828585612c69565b94509450505050610b09565b505f90506002610b09565b5f5f5f856001600160a01b0316631626ba7e60e01b8686604051602401612abb9291906135f9565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051612af99190613611565b5f60405180830381855afa9150503d805f8114612b31576040519150601f19603f3d011682016040523d82523d5f602084013e612b36565b606091505b5091509150818015612b4a57506020815110155b80156112eb57508051630b135d3f60e11b90612b6f908301602090810190840161349c565b149695505050505050565b5f612bce826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612d269092919063ffffffff16565b905080515f1480612bee575080806020019051810190612bee9190613555565b612c4d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610774565b505050565b5f81815260018301602052604081205415156108af565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612c9e57505f90506003612d1d565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612cef573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116612d17575f60019250925050612d1d565b91505f90505b94509492505050565b6060611a8d84845f85855f5f866001600160a01b03168587604051612d4b9190613611565b5f6040518083038185875af1925050503d805f8114612d85576040519150601f19603f3d011682016040523d82523d5f602084013e612d8a565b606091505b50915091506116958783838760608315612e045782515f03612dfd576001600160a01b0385163b612dfd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610774565b5081611a8d565b611a8d8383815115612e195781518083602001fd5b8060405162461bcd60e51b81526004016107749190613265565b5f60208284031215612e43575f5ffd5b5035919050565b6001600160a01b038116811461102a575f5ffd5b5f5f5f60608486031215612e70575f5ffd5b8335612e7b81612e4a565b92506020840135612e8b81612e4a565b929592945050506040919091013590565b5f60408284031215612eac575f5ffd5b50919050565b5f5f5f60808486031215612ec4575f5ffd5b612ece8585612e9c565b9250604084013591506060840135612ee581612e4a565b809150509250925092565b5f5f5f5f60808587031215612f03575f5ffd5b8435612f0e81612e4a565b93506020850135612f1e81612e4a565b92506040850135612f2e81612e4a565b9396929550929360600135925050565b5f5f60608385031215612f4f575f5ffd5b612f598484612e9c565b946040939093013593505050565b5f8151808452602084019350602083015f5b82811015612fa05781516001600160a01b0316865260209586019590910190600101612f79565b5093949350505050565b5f8151808452602084019350602083015f5b82811015612fa0578151865260209586019590910190600101612fbc565b604081525f612fec6040830185612f67565b8281036020840152612ffe8185612faa565b95945050505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b038111828210171561304357613043613007565b604052919050565b5f5f5f5f5f5f60c08789031215613060575f5ffd5b863561306b81612e4a565b9550602087013561307b81612e4a565b945060408701359350606087013561309281612e4a565b92506080870135915060a08701356001600160401b038111156130b3575f5ffd5b8701601f810189136130c3575f5ffd5b80356001600160401b038111156130dc576130dc613007565b6130ef601f8201601f191660200161301b565b8181528a6020838501011115613103575f5ffd5b816020840160208301375f602083830101528093505050509295509295509295565b604080825283519082018190525f9060208501906060840190835b818110156131675783516001600160a01b0316835260209384019390920191600101613140565b505083810360208501526112eb8186612faa565b602080825282518282018190525f918401906040840190835b818110156131cd57835180516001600160a01b0316845260209081015163ffffffff168185015290930192604090920191600101613194565b509095945050505050565b5f5f5f5f60a085870312156131eb575f5ffd5b6131f58686612e9c565b935060408501359250606085013561320c81612e4a565b9396929550929360800135925050565b5f6020828403121561322c575f5ffd5b81356108af81612e4a565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6108af6020830184613237565b5f60208284031215613287575f5ffd5b813560ff811681146108af575f5ffd5b5f5f602083850312156132a8575f5ffd5b82356001600160401b038111156132bd575f5ffd5b8301601f810185136132cd575f5ffd5b80356001600160401b038111156132e2575f5ffd5b8560208260051b84010111156132f6575f5ffd5b6020919091019590945092505050565b5f60408284031215613316575f5ffd5b6108af8383612e9c565b602081525f6108af6020830184612faa565b5f5f5f5f5f5f60c08789031215613347575f5ffd5b863561335281612e4a565b9550602087013561336281612e4a565b9450604087013561337281612e4a565b959894975094956060810135955060808101359460a0909101359350915050565b5f5f604083850312156133a4575f5ffd5b82356133af81612e4a565b946020939093013593505050565b602081525f6108af6020830184612f67565b5f5f604083850312156133e0575f5ffd5b82356133eb81612e4a565b915060208301356133fb81612e4a565b809150509250929050565b803563ffffffff81168114613419575f5ffd5b919050565b803561342981612e4a565b6001600160a01b0316825263ffffffff61344560208301613406565b1660208301525050565b60408101611321828461341e565b5f6020828403121561346d575f5ffd5b81516108af81612e4a565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f602082840312156134ac575f5ffd5b5051919050565b5f60408284031280156134c4575f5ffd5b50604080519081016001600160401b03811182821017156134e7576134e7613007565b60405282356134f581612e4a565b815261350360208401613406565b60208201529392505050565b634e487b7160e01b5f52603260045260245ffd5b60a08101613531828761341e565b60408201949094526001600160a01b03929092166060830152608090910152919050565b5f60208284031215613565575f5ffd5b815180151581146108af575f5ffd5b80516020808301519190811015612eac575f1960209190910360031b1b16919050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561132157611321613597565b8181038181111561132157611321613597565b634e487b7160e01b5f52602160045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b828152604060208201525f611a8d6040830184613237565b5f82518060208501845e5f92019182525091905056fea2646970667358221220b1bedd5fdd4bc818f929aa1ce4bdccff161cf1863a6ee6ebbb78baa293114c0a64736f6c634300081e0033", + Bin: "0x610100604052348015610010575f5ffd5b506040516139d73803806139d783398101604081905261002f916101bc565b80808585856001600160a01b03811661005b576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b0390811660805291821660a0521660c05261007c81610093565b60e0525061008a90506100d9565b50505050610301565b5f5f829050601f815111156100c6578260405163305a27a960e01b81526004016100bd91906102a6565b60405180910390fd5b80516100d1826102db565b179392505050565b5f54610100900460ff16156101405760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b60648201526084016100bd565b5f5460ff9081161461018f575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146101a5575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b5f5f5f5f608085870312156101cf575f5ffd5b84516101da81610191565b60208601519094506101eb81610191565b60408601519093506101fc81610191565b60608601519092506001600160401b03811115610217575f5ffd5b8501601f81018713610227575f5ffd5b80516001600160401b03811115610240576102406101a8565b604051601f8201601f19908116603f011681016001600160401b038111828210171561026e5761026e6101a8565b604052818152828201602001891015610285575f5ffd5b8160208401602083015e5f6020838301015280935050505092959194509250565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b805160208083015191908110156102fb575f198160200360031b1b821691505b50919050565b60805160a05160c05160e05161365d61037a5f395f81816110a8015261247401525f81816105fa015281816108c101528181610da30152818161103a0152818161125501526120a901525f81816105a001528181610815015261141a01525f81816104b601528181611aaa01526124e3015261365d5ff3fe608060405234801561000f575f5ffd5b506004361061026b575f3560e01c80637ecebe001161014b578063ca8aa7c7116100bf578063f2fde38b11610084578063f2fde38b1461062f578063f3b4a00014610642578063f698da251461064c578063fabc1cbc14610654578063fd98042314610667578063fe243a171461067a575f5ffd5b8063ca8aa7c71461059b578063cbc2bd62146105c2578063de44acb6146105d5578063df5cf723146105f5578063e7a050aa1461061c575f5ffd5b80638da5cb5b116101105780638da5cb5b1461052b57806394f649dd1461053c578063967fc0d21461054f5780639ac01d6114610562578063b5d8b5b814610575578063c665670214610588575f5ffd5b80637ecebe001461047f578063829fca731461049e578063886f1195146104b157806388c10299146104f05780638b8aac3c14610503575f5ffd5b806350ff7225116101e25780635de08ff2116101a75780635de08ff2146103fc578063663c1de41461040f578063715018a614610431578063724af4231461043957806376fb162b1461044c5780637def15641461045f575f5ffd5b806350ff72251461037c57806354fd4d50146103a4578063595c6a67146103b95780635ac86ab7146103c15780635c975abb146103f4575f5ffd5b806332e89ace1161023357806332e89ace146102f157806336a8c500146103045780633f292b081461031a5780633fb99ca51461032f57806348825e94146103425780634b6d5d6e14610369575f5ffd5b8063136439dd1461026f5780631794bb3c146102845780632d44def6146102975780632eae418c146102bd57806331f8fb4c146102d0575b5f5ffd5b61028261027d366004612e33565b6106a4565b005b610282610292366004612e5e565b6106de565b6102aa6102a5366004612eb2565b610804565b6040519081526020015b60405180910390f35b6102826102cb366004612ef0565b6108b6565b6102e36102de366004612f3e565b610982565b6040516102b4929190612fda565b6102aa6102ff36600461304b565b610b10565b61030c610b95565b6040516102b4929190613125565b610322610cb0565b6040516102b4919061317b565b61028261033d3660046131d8565b610d98565b6102aa7f4337f82d142e41f2a8c10547cd8c859bddb92262a61058e77842e24d9dea922481565b61028261037736600461321c565b610ee0565b61038f61038a366004612e5e565b61102d565b604080519283526020830191909152016102b4565b6103ac6110a1565b6040516102b49190613265565b6102826110d1565b6103e46103cf366004613277565b609854600160ff9092169190911b9081161490565b60405190151581526020016102b4565b6098546102aa565b61028261040a366004613297565b6110e5565b6103e461041d36600461321c565b60d16020525f908152604090205460ff1681565b610282611238565b6102aa610447366004612e5e565b611249565b6102aa61045a366004612eb2565b6112a6565b61047261046d366004613306565b6112f5565b6040516102b49190613320565b6102aa61048d36600461321c565b60ca6020525f908152604090205481565b6102aa6104ac366004612f3e565b611327565b6104d87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102b4565b6104726104fe366004612f3e565b611361565b6102aa61051136600461321c565b6001600160a01b03165f90815260ce602052604090205490565b6033546001600160a01b03166104d8565b6102e361054a36600461321c565b611498565b60cb546104d8906001600160a01b031681565b6102aa610570366004613332565b61160f565b610282610583366004613297565b6116a0565b61028261059636600461321c565b6117e7565b6104d87f000000000000000000000000000000000000000000000000000000000000000081565b6104d86105d0366004613393565b61180a565b6105e86105e336600461321c565b61183e565b6040516102b491906133bd565b6104d87f000000000000000000000000000000000000000000000000000000000000000081565b6102aa61062a366004612e5e565b6118b1565b61028261063d36600461321c565b6118e4565b6104d8620e16e481565b6102aa61195a565b610282610662366004612e33565b611a13565b6102aa61067536600461321c565b611a80565b6102aa6106883660046133cf565b60cd60209081525f928352604080842090915290825290205481565b6106ac611a95565b60985481811681146106d15760405163c61dca5d60e01b815260040160405180910390fd5b6106da82611b38565b5050565b5f54610100900460ff16158080156106fc57505f54600160ff909116105b806107155750303b15801561071557505f5460ff166001145b61077d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff19166001179055801561079e575f805461ff0019166101001790555b6107a782611b38565b6107b084611b75565b6107b983611bc6565b80156107fe575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b5f61080d611c2f565b6108a38484847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630f3df50e896040518263ffffffff1660e01b815260040161085f919061344f565b602060405180830381865afa15801561087a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061089e919061345d565b611c88565b90506108af6001606555565b9392505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108ff5760405163f739589b60e01b815260040160405180910390fd5b610907611c2f565b604051636ce5768960e11b81526001600160a01b0384169063d9caed129061093790879086908690600401613478565b6020604051808303815f875af1158015610953573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610977919061349c565b506107fe6001606555565b6060805f60d7816109a061099b368990038901896134b3565b611e90565b81526020019081526020015f205f8581526020019081526020015f2090505f6109c882611ef3565b90505f81516001600160401b038111156109e4576109e4613007565b604051908082528060200260200182016040528015610a0d578160200160208202803683370190505b5090505f82516001600160401b03811115610a2a57610a2a613007565b604051908082528060200260200182016040528015610a53578160200160208202803683370190505b5090505f5b8351811015610b0057838181518110610a7357610a7361350f565b6020026020010151838281518110610a8d57610a8d61350f565b60200260200101906001600160a01b031690816001600160a01b031681525050610ad9848281518110610ac257610ac261350f565b602002602001015186611eff90919063ffffffff16565b9050828281518110610aed57610aed61350f565b6020908102919091010152600101610a58565b50909450925050505b9250929050565b5f5f610b1b81611f23565b610b23611c2f565b6001600160a01b0385165f90815260ca6020526040902054610b5486610b4d818c8c8c878c61160f565b8688611f4e565b6001600160a01b0386165f90815260ca60205260409020600182019055610b7d868a8a8a611fa0565b925050610b8a6001606555565b509695505050505050565b6060805f610ba360d461210d565b90505f816001600160401b03811115610bbe57610bbe613007565b604051908082528060200260200182016040528015610be7578160200160208202803683370190505b5090505f826001600160401b03811115610c0357610c03613007565b604051908082528060200260200182016040528015610c2c578160200160208202803683370190505b5090505f5b83811015610ca5575f5f610c4660d484612117565b9150915081858481518110610c5d57610c5d61350f565b60200260200101906001600160a01b031690816001600160a01b03168152505080848481518110610c9057610c9061350f565b60209081029190910101525050600101610c31565b509094909350915050565b60605f610cbd60d8612125565b90505f816001600160401b03811115610cd857610cd8613007565b604051908082528060200260200182016040528015610d1c57816020015b604080518082019091525f8082526020820152815260200190600190039081610cf65790505b5090505f5b82811015610d9157610d6c610d3760d88361212e565b604080518082019091525f80825260208201525060408051808201909152606082901c815263ffffffff909116602082015290565b828281518110610d7e57610d7e61350f565b6020908102919091010152600101610d21565b5092915050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610de15760405163f739589b60e01b815260040160405180910390fd5b610de9611c2f565b5f60d781610dff61099b368990038901896134b3565b815260208082019290925260409081015f90812087825290925290209050610e28818484612139565b610e455760405163ca354fa360e01b815260040160405180910390fd5b610e62610e5a61099b368890038801886134b3565b60d89061214e565b50610e978460da5f610e7c61099b368b90038b018b6134b3565b81526020019081526020015f2061214e90919063ffffffff16565b507f5f5209798bbac45a16d2dc3bc67319fab26ee00153916d6f07b69f8a134a1e8b85858585604051610ecd9493929190613523565b60405180910390a1506107fe6001606555565b610ee8611c2f565b5f610ef460d483611eff565b915050610f0260d483612159565b50604080516001600160a01b0384168152602081018390527fd9d082c3ec4f3a3ffa55c324939a06407f5fbcb87d5e0ce3b9508c92c84ed839910160405180910390a1801561101f57816001600160a01b031663d9caed12620e16e4846001600160a01b0316632495a5996040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f9a573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fbe919061345d565b846040518463ffffffff1660e01b8152600401610fdd93929190613478565b6020604051808303815f875af1158015610ff9573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061101d919061349c565b505b5061102a6001606555565b50565b5f80336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146110785760405163f739589b60e01b815260040160405180910390fd5b611080611c2f565b61108b85858561216d565b915091506110996001606555565b935093915050565b60606110cc7f00000000000000000000000000000000000000000000000000000000000000006122d5565b905090565b6110d9611a95565b6110e35f19611b38565b565b60cb546001600160a01b03163314611110576040516320ba3ff960e21b815260040160405180910390fd5b611118611c2f565b805f5b8181101561122c5760d15f8585848181106111385761113861350f565b905060200201602081019061114d919061321c565b6001600160a01b0316815260208101919091526040015f205460ff1661122457600160d15f8686858181106111845761118461350f565b9050602002016020810190611199919061321c565b6001600160a01b0316815260208101919091526040015f20805460ff19169115159190911790557f0c35b17d91c96eb2751cd456e1252f42a386e524ef9ff26ecc9950859fdc04fe8484838181106111f3576111f361350f565b9050602002016020810190611208919061321c565b6040516001600160a01b03909116815260200160405180910390a15b60010161111b565b50506106da6001606555565b611240612312565b6110e35f611b75565b5f336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146112935760405163f739589b60e01b815260040160405180910390fd5b61129b611c2f565b6108a384848461236c565b5f806112eb8360d7836112c161099b368b90038b018b6134b3565b81526020019081526020015f205f8781526020019081526020015f20611eff90919063ffffffff16565b9695505050505050565b606061132160da5f61130f61099b368790038701876134b3565b81526020019081526020015f2061241a565b92915050565b5f6108af60d78261134061099b368890038801886134b3565b81526020019081526020015f205f8481526020019081526020015f2061210d565b606061136b611c2f565b5f6113a560d78261138461099b368990038901896134b3565b81526020019081526020015f205f8581526020019081526020015f20611ef3565b80519091505f816001600160401b038111156113c3576113c3613007565b6040519080825280602002602001820160405280156113ec578160200160208202803683370190505b5090505f5b828110156114895761146487878684815181106114105761141061350f565b60200260200101517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630f3df50e8c6040518263ffffffff1660e01b815260040161085f919061344f565b8282815181106114765761147661350f565b60209081029190910101526001016113f1565b50925050506113216001606555565b6001600160a01b0381165f90815260ce6020526040812054606091829190816001600160401b038111156114ce576114ce613007565b6040519080825280602002602001820160405280156114f7578160200160208202803683370190505b5090505f5b82811015611585576001600160a01b0386165f90815260cd6020908152604080832060ce909252822080549192918490811061153a5761153a61350f565b5f9182526020808320909101546001600160a01b0316835282019290925260400190205482518390839081106115725761157261350f565b60209081029190910101526001016114fc565b5060ce5f866001600160a01b03166001600160a01b031681526020019081526020015f2081818054806020026020016040519081016040528092919081815260200182805480156115fd57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116115df575b50505050509150935093505050915091565b604080517f4337f82d142e41f2a8c10547cd8c859bddb92262a61058e77842e24d9dea922460208201526001600160a01b03808916928201929092528187166060820152908516608082015260a0810184905260c0810183905260e081018290525f90611695906101000160405160208183030381529060405280519060200120612426565b979650505050505050565b60cb546001600160a01b031633146116cb576040516320ba3ff960e21b815260040160405180910390fd5b6116d3611c2f565b805f5b8181101561122c5760d15f8585848181106116f3576116f361350f565b9050602002016020810190611708919061321c565b6001600160a01b0316815260208101919091526040015f205460ff16156117df575f60d15f86868581811061173f5761173f61350f565b9050602002016020810190611754919061321c565b6001600160a01b0316815260208101919091526040015f20805460ff19169115159190911790557f4074413b4b443e4e58019f2855a8765113358c7c72e39509c6af45fc0f5ba0308484838181106117ae576117ae61350f565b90506020020160208101906117c3919061321c565b6040516001600160a01b03909116815260200160405180910390a15b6001016116d6565b6117ef612312565b6117f7611c2f565b61180081611bc6565b61102a6001606555565b60ce602052815f5260405f208181548110611823575f80fd5b5f918252602090912001546001600160a01b03169150829050565b6001600160a01b0381165f90815260ce60209081526040918290208054835181840281018401909452808452606093928301828280156118a557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611887575b50505050509050919050565b5f5f6118bc81611f23565b6118c4611c2f565b6118d033868686611fa0565b91506118dc6001606555565b509392505050565b6118ec612312565b6001600160a01b0381166119515760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610774565b61102a81611b75565b60408051808201909152600a81526922b4b3b2b72630bcb2b960b11b6020909101525f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea6119c761246c565b805160209182012060408051928301949094529281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b611a1b6124e1565b60985480198219811614611a425760405163c61dca5d60e01b815260040160405180910390fd5b609882905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b5f5f611a8d60d484611eff565b949350505050565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa158015611af7573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b1b9190613555565b6110e357604051631d77d47760e21b815260040160405180910390fd5b609881905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b60cb54604080516001600160a01b03928316815291831660208301527f4264275e593955ff9d6146a51a4525f6ddace2e81db9391abcc9d1ca48047d29910160405180910390a160cb80546001600160a01b0319166001600160a01b0392909216919091179055565b600260655403611c815760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610774565b6002606555565b5f8060d781611c9f61099b368a90038a018a6134b3565b815260208082019290925260409081015f90812088825290925281209150611cc78286611eff565b9150611cd590508286612159565b505f8115611dec57856001600160a01b031663d9caed1286886001600160a01b0316632495a5996040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d29573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d4d919061345d565b856040518463ffffffff1660e01b8152600401611d6c93929190613478565b6020604051808303815f875af1158015611d88573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611dac919061349c565b90507fe6413aa0c789e437b0a06bf64b20926584f066c79a2d8b80a759c85472f7b0af88888885604051611de39493929190613523565b60405180910390a15b5f611df684611ef3565b519050805f03611e8457611e348860da5f611e1961099b368f90038f018f6134b3565b81526020019081526020015f2061259290919063ffffffff16565b50611e5f60da5f611e4d61099b368e90038e018e6134b3565b81526020019081526020015f20612125565b5f03611e8457611e82611e7a61099b368c90038c018c6134b3565b60d890612592565b505b50979650505050505050565b5f815f0151826020015163ffffffff16604051602001611edb92919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b60405160208183030381529060405261132190613574565b60605f6108af8361259d565b5f808080611f16866001600160a01b0387166125a8565b9097909650945050505050565b609854600160ff83161b9081160361102a5760405163840a48d560e01b815260040160405180910390fd5b42811015611f6f57604051630819bdcd60e01b815260040160405180910390fd5b611f836001600160a01b03851684846125e0565b6107fe57604051638baa579f60e01b815260040160405180910390fd5b6001600160a01b0383165f90815260d16020526040812054849060ff16611fda57604051632efd965160e11b815260040160405180910390fd5b611fef6001600160a01b038516338786612634565b6040516311f9fbc960e21b81526001600160a01b038581166004830152602482018590528616906347e7ef24906044016020604051808303815f875af115801561203b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061205f919061349c565b91505f5f61206e88888661216d565b604051631e328e7960e11b81526001600160a01b038b811660048301528a8116602483015260448201849052606482018390529294509092507f000000000000000000000000000000000000000000000000000000000000000090911690633c651cf2906084015f604051808303815f87803b1580156120ec575f5ffd5b505af11580156120fe573d5f5f3e3d5ffd5b50505050505050949350505050565b5f6113218261268c565b5f808080611f168686612696565b5f611321825490565b5f6108af83836126bf565b5f611a8d846001600160a01b038516846126e5565b5f6108af8383612701565b5f6108af836001600160a01b03841661274d565b5f806001600160a01b038516612196576040516316f2ccc960e01b815260040160405180910390fd5b825f036121b6576040516342061b2560e11b815260040160405180910390fd5b6001600160a01b038086165f90815260cd602090815260408083209388168352929052908120549081900361225c576001600160a01b0386165f90815260ce60209081526040909120541061221e576040516301a1443960e31b815260040160405180910390fd5b6001600160a01b038681165f90815260ce602090815260408220805460018101825590835291200180546001600160a01b0319169187169190911790555b61226684826135ab565b6001600160a01b038088165f90815260cd60209081526040808320938a16835292905281902091909155517f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f62906122c290889088908890613478565b60405180910390a1959294509192505050565b60605f6122e183612769565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b6033546001600160a01b031633146110e35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610774565b5f815f0361238d576040516342061b2560e11b815260040160405180910390fd5b6001600160a01b038085165f90815260cd6020908152604080832093871683529290522054808311156123d357604051634b18b19360e01b815260040160405180910390fd5b6123dd83826135be565b6001600160a01b038087165f90815260cd602090815260408083209389168352929052908120829055909150819003611a8d57611a8d8585612790565b60605f6108af8361290e565b5f61242f61195a565b60405161190160f01b6020820152602281019190915260428101839052606201604051602081830303815290604052805190602001209050919050565b60605f6124987f00000000000000000000000000000000000000000000000000000000000000006122d5565b9050805f815181106124ac576124ac61350f565b016020908101516040516001600160f81b03199091169181019190915260210160405160208183030381529060405291505090565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561253d573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612561919061345d565b6001600160a01b0316336001600160a01b0316146110e35760405163794821ff60e01b815260040160405180910390fd5b5f6108af8383612966565b60606113218261241a565b5f8181526002830160205260408120548190806125d5576125c98585612a49565b92505f9150610b099050565b600192509050610b09565b5f5f5f6125ed8585612a54565b90925090505f816004811115612605576126056135d1565b1480156126235750856001600160a01b0316826001600160a01b0316145b806112eb57506112eb868686612a93565b6107fe846323b872dd60e01b85858560405160240161265593929190613478565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612b7a565b5f61132182612125565b5f80806126a3858561212e565b5f81815260029690960160205260409095205494959350505050565b5f825f0182815481106126d4576126d461350f565b905f5260205f200154905092915050565b5f8281526002840160205260408120829055611a8d848461214e565b5f81815260018301602052604081205461274657508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155611321565b505f611321565b5f81815260028301602052604081208190556108af8383612592565b5f60ff8216601f81111561132157604051632cd44ac360e21b815260040160405180910390fd5b6001600160a01b0382165f90815260ce6020526040812054905b818110156128a2576001600160a01b038481165f90815260ce60205260409020805491851691839081106127e0576127e061350f565b5f918252602090912001546001600160a01b03160361289a576001600160a01b0384165f90815260ce60205260409020805461281e906001906135be565b8154811061282e5761282e61350f565b5f9182526020808320909101546001600160a01b03878116845260ce909252604090922080549190921691908390811061286a5761286a61350f565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506128a2565b6001016127aa565b8181036128c257604051632df15a4160e11b815260040160405180910390fd5b6001600160a01b0384165f90815260ce602052604090208054806128e8576128e86135e5565b5f8281526020902081015f1990810180546001600160a01b031916905501905550505050565b6060815f018054806020026020016040519081016040528092919081815260200182805480156118a557602002820191905f5260205f20905b8154815260200190600101908083116129475750505050509050919050565b5f8181526001830160205260408120548015612a40575f6129886001836135be565b85549091505f9061299b906001906135be565b90508181146129fa575f865f0182815481106129b9576129b961350f565b905f5260205f200154905080875f0184815481106129d9576129d961350f565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080612a0b57612a0b6135e5565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050611321565b5f915050611321565b5f6108af8383612c52565b5f5f8251604103612a88576020830151604084015160608501515f1a612a7c87828585612c69565b94509450505050610b09565b505f90506002610b09565b5f5f5f856001600160a01b0316631626ba7e60e01b8686604051602401612abb9291906135f9565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051612af99190613611565b5f60405180830381855afa9150503d805f8114612b31576040519150601f19603f3d011682016040523d82523d5f602084013e612b36565b606091505b5091509150818015612b4a57506020815110155b80156112eb57508051630b135d3f60e11b90612b6f908301602090810190840161349c565b149695505050505050565b5f612bce826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612d269092919063ffffffff16565b905080515f1480612bee575080806020019051810190612bee9190613555565b612c4d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610774565b505050565b5f81815260018301602052604081205415156108af565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612c9e57505f90506003612d1d565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612cef573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116612d17575f60019250925050612d1d565b91505f90505b94509492505050565b6060611a8d84845f85855f5f866001600160a01b03168587604051612d4b9190613611565b5f6040518083038185875af1925050503d805f8114612d85576040519150601f19603f3d011682016040523d82523d5f602084013e612d8a565b606091505b50915091506116958783838760608315612e045782515f03612dfd576001600160a01b0385163b612dfd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610774565b5081611a8d565b611a8d8383815115612e195781518083602001fd5b8060405162461bcd60e51b81526004016107749190613265565b5f60208284031215612e43575f5ffd5b5035919050565b6001600160a01b038116811461102a575f5ffd5b5f5f5f60608486031215612e70575f5ffd5b8335612e7b81612e4a565b92506020840135612e8b81612e4a565b929592945050506040919091013590565b5f60408284031215612eac575f5ffd5b50919050565b5f5f5f60808486031215612ec4575f5ffd5b612ece8585612e9c565b9250604084013591506060840135612ee581612e4a565b809150509250925092565b5f5f5f5f60808587031215612f03575f5ffd5b8435612f0e81612e4a565b93506020850135612f1e81612e4a565b92506040850135612f2e81612e4a565b9396929550929360600135925050565b5f5f60608385031215612f4f575f5ffd5b612f598484612e9c565b946040939093013593505050565b5f8151808452602084019350602083015f5b82811015612fa05781516001600160a01b0316865260209586019590910190600101612f79565b5093949350505050565b5f8151808452602084019350602083015f5b82811015612fa0578151865260209586019590910190600101612fbc565b604081525f612fec6040830185612f67565b8281036020840152612ffe8185612faa565b95945050505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b038111828210171561304357613043613007565b604052919050565b5f5f5f5f5f5f60c08789031215613060575f5ffd5b863561306b81612e4a565b9550602087013561307b81612e4a565b945060408701359350606087013561309281612e4a565b92506080870135915060a08701356001600160401b038111156130b3575f5ffd5b8701601f810189136130c3575f5ffd5b80356001600160401b038111156130dc576130dc613007565b6130ef601f8201601f191660200161301b565b8181528a6020838501011115613103575f5ffd5b816020840160208301375f602083830101528093505050509295509295509295565b604080825283519082018190525f9060208501906060840190835b818110156131675783516001600160a01b0316835260209384019390920191600101613140565b505083810360208501526112eb8186612faa565b602080825282518282018190525f918401906040840190835b818110156131cd57835180516001600160a01b0316845260209081015163ffffffff168185015290930192604090920191600101613194565b509095945050505050565b5f5f5f5f60a085870312156131eb575f5ffd5b6131f58686612e9c565b935060408501359250606085013561320c81612e4a565b9396929550929360800135925050565b5f6020828403121561322c575f5ffd5b81356108af81612e4a565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6108af6020830184613237565b5f60208284031215613287575f5ffd5b813560ff811681146108af575f5ffd5b5f5f602083850312156132a8575f5ffd5b82356001600160401b038111156132bd575f5ffd5b8301601f810185136132cd575f5ffd5b80356001600160401b038111156132e2575f5ffd5b8560208260051b84010111156132f6575f5ffd5b6020919091019590945092505050565b5f60408284031215613316575f5ffd5b6108af8383612e9c565b602081525f6108af6020830184612faa565b5f5f5f5f5f5f60c08789031215613347575f5ffd5b863561335281612e4a565b9550602087013561336281612e4a565b9450604087013561337281612e4a565b959894975094956060810135955060808101359460a0909101359350915050565b5f5f604083850312156133a4575f5ffd5b82356133af81612e4a565b946020939093013593505050565b602081525f6108af6020830184612f67565b5f5f604083850312156133e0575f5ffd5b82356133eb81612e4a565b915060208301356133fb81612e4a565b809150509250929050565b803563ffffffff81168114613419575f5ffd5b919050565b803561342981612e4a565b6001600160a01b0316825263ffffffff61344560208301613406565b1660208301525050565b60408101611321828461341e565b5f6020828403121561346d575f5ffd5b81516108af81612e4a565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f602082840312156134ac575f5ffd5b5051919050565b5f60408284031280156134c4575f5ffd5b50604080519081016001600160401b03811182821017156134e7576134e7613007565b60405282356134f581612e4a565b815261350360208401613406565b60208201529392505050565b634e487b7160e01b5f52603260045260245ffd5b60a08101613531828761341e565b60408201949094526001600160a01b03929092166060830152608090910152919050565b5f60208284031215613565575f5ffd5b815180151581146108af575f5ffd5b80516020808301519190811015612eac575f1960209190910360031b1b16919050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561132157611321613597565b8181038181111561132157611321613597565b634e487b7160e01b5f52602160045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b828152604060208201525f611a8d6040830184613237565b5f82518060208501845e5f92019182525091905056fea26469706673582212202e71b414d18dbaf8bc607977509621e17f44f48e26ff801950a46bbd43e04aa964736f6c634300081e0033", } // StrategyManagerABI is the input ABI used to generate the binding from.