diff --git a/.size-after-commit0 b/.size-after-commit0 new file mode 100644 index 0000000000..a4f0af7574 --- /dev/null +++ b/.size-after-commit0 @@ -0,0 +1,246 @@ +Compiling 91 files with Solc 0.8.27 +Solc 0.8.27 finished in 136.21s +Compiler run successful! + +╭--------------------------------------------------+------------------+-------------------+--------------------+---------------------╮ +| Contract | Runtime Size (B) | Initcode Size (B) | Runtime Margin (B) | Initcode Margin (B) | ++====================================================================================================================================+ +| AVSDirectory | 5,423 | 6,233 | 19,153 | 42,919 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AVSRegistrar | 615 | 643 | 23,961 | 48,509 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AVSTaskHookReentrantAttacker | 5,236 | 5,370 | 19,340 | 43,782 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Address | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AddressUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AllocationManager | 23,757 | 24,793 | 819 | 24,359 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AllocationManagerHarness | 23,912 | 24,819 | 664 | 24,333 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ArrayLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BN254 | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BN254CertificateVerifier | 11,182 | 11,889 | 13,394 | 37,263 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BN254SignatureVerifier | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BN256G2 | 2,859 | 2,911 | 21,717 | 46,241 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BackingEigen | 11,186 | 11,537 | 13,390 | 37,615 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BeaconChainProofs | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BeaconChainProofs_DeprecatedM1 | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BeaconProxy | 305 | 1,656 | 24,271 | 47,496 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BytesLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BytesLibHarness | 2,135 | 2,163 | 22,441 | 46,989 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| CountersUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Create2 | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| CrossChainRegistry | 9,264 | 10,181 | 15,312 | 38,971 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| CrosschainDeployLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| DelegationManager | 23,552 | 24,662 | 1,024 | 24,490 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| DelegationManagerHarness | 23,977 | 24,955 | 599 | 24,197 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| DoubleEndedQueue | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ECDSA | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ECDSACertificateVerifier | 8,268 | 8,985 | 16,308 | 40,167 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ECDSAUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EIP_4788_Oracle_Mock | 654 | 682 | 23,922 | 48,470 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EIP_7002_Mock | 2,094 | 2,122 | 22,482 | 47,030 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EIP_7251_Mock | 2,267 | 2,295 | 22,309 | 46,857 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC1271MaliciousMock | 366 | 394 | 24,210 | 48,758 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC1271WalletMock | 1,492 | 1,916 | 23,084 | 47,236 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC1967Proxy | 170 | 1,191 | 24,406 | 47,961 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC20 | 2,074 | 2,742 | 22,502 | 46,410 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC20Mock | 1,217 | 1,510 | 23,359 | 47,642 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC20PresetFixedSupply | 2,509 | 3,473 | 22,067 | 45,679 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC20Upgradeable | 2,081 | 2,109 | 22,495 | 47,043 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC20_OneWeiFeeOnTransfer | 2,542 | 3,361 | 22,034 | 45,791 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC20_SetTransferReverting_Mock | 2,665 | 3,510 | 21,911 | 45,642 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ETHPOSDepositMock | 485 | 513 | 24,091 | 48,639 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Eigen | 13,521 | 14,235 | 11,055 | 34,917 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EigenHarness | 13,643 | 14,206 | 10,933 | 34,946 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EigenPod | 17,941 | 18,778 | 6,635 | 30,374 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EigenPodHarness | 18,518 | 19,361 | 6,058 | 29,791 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EigenPodManager | 11,108 | 12,033 | 13,468 | 37,119 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EigenPodManagerWrapper | 11,450 | 12,385 | 13,126 | 36,767 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EigenStrategy | 5,336 | 6,162 | 19,240 | 42,990 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EmptyContract (src/test/mocks/Dummy.sol) | 115 | 141 | 24,461 | 49,011 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EmptyContract (src/test/mocks/EmptyContract.sol) | 115 | 141 | 24,461 | 49,011 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Encode | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Endian | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EnumerableMap | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EnumerableSet | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Env | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| KeyRegistrar | 11,997 | 12,568 | 12,579 | 36,584 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| LibProofGen | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| LibValidator | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Math | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MathUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Merkle | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockAVSRegistrar | 174 | 200 | 24,402 | 48,952 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockAVSTaskHook | 1,168 | 1,221 | 23,408 | 47,931 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockBN254CertificateVerifier | 3,933 | 3,986 | 20,643 | 45,166 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockBN254CertificateVerifierFailure | 3,741 | 3,769 | 20,835 | 45,383 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockDecimals | 116 | 142 | 24,460 | 49,010 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockECDSACertificateVerifier | 3,488 | 3,541 | 21,088 | 45,611 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockECDSACertificateVerifierFailure | 3,305 | 3,333 | 21,271 | 45,819 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockERC20 | 3,606 | 3,634 | 20,970 | 45,518 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockSigner | 702 | 730 | 23,874 | 48,422 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockSimpleERC20 | 2,309 | 2,776 | 22,267 | 46,376 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OpenZeppelin_ERC20 | 2,074 | 2,742 | 22,502 | 46,410 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OpenZeppelin_ERC20PresetFixedSupply | 2,509 | 3,473 | 22,067 | 45,679 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OperatorKeyOperationsLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OperatorSetLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OperatorTableCalculatorMock | 2,872 | 2,900 | 21,704 | 46,252 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OperatorTableUpdater | 10,988 | 11,882 | 13,588 | 37,270 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OperatorWalletLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OwnableMock | 538 | 656 | 24,038 | 48,496 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| PausableHarness | 1,110 | 1,296 | 23,466 | 47,856 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| PauserRegistry | 777 | 1,480 | 23,799 | 47,672 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| PermissionController | 4,152 | 4,791 | 20,424 | 44,361 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ProxyAdmin | 1,618 | 1,736 | 22,958 | 47,416 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Random | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ReleaseManager | 5,049 | 5,748 | 19,527 | 43,404 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Reverter | 167 | 193 | 24,409 | 48,959 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ReverterWithDecimals | 210 | 236 | 24,366 | 48,916 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| RewardsCoordinator | 17,789 | 19,275 | 6,787 | 29,877 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SafeCast | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SafeCastUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SafeERC20 | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ScriptHelpers | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SemVerMixinMock | 502 | 955 | 24,074 | 48,197 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ShortStringsUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SignatureCheckerUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SignedMath | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SignedMathUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SigningKeyOperationsLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SlashingLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SlashingLibHarness | 797 | 825 | 23,779 | 48,327 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Snapshots | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SnapshotsHarness | 1,341 | 1,369 | 23,235 | 47,783 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StorageSlot | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StorageSlotUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StrategyBase | 4,597 | 5,417 | 19,979 | 43,735 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StrategyBaseTVLLimits | 5,341 | 6,167 | 19,235 | 42,985 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StrategyFactory | 6,120 | 6,950 | 18,456 | 42,202 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StrategyManager | 13,917 | 14,807 | 10,659 | 34,345 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StringUtils | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Strings | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StringsUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| TaskMailbox | 22,993 | 23,835 | 1,583 | 25,317 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| TestConstants | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| TimelockController | 7,492 | 8,707 | 17,084 | 40,445 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| TransparentUpgradeableProxy | 2,115 | 3,446 | 22,461 | 45,706 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| UpgradeableBeacon | 826 | 1,196 | 23,750 | 47,956 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| WETH | 2,950 | 3,420 | 21,626 | 45,732 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ZEnvHelpers | 2,259 | 2,311 | 22,317 | 46,841 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| print | 85 | 135 | 24,491 | 49,017 | +╰--------------------------------------------------+------------------+-------------------+--------------------+---------------------╯ + diff --git a/.size-after-removing-semver b/.size-after-removing-semver new file mode 100644 index 0000000000..98f7b31e68 --- /dev/null +++ b/.size-after-removing-semver @@ -0,0 +1,244 @@ +No files changed, compilation skipped + +╭--------------------------------------------------+------------------+-------------------+--------------------+---------------------╮ +| Contract | Runtime Size (B) | Initcode Size (B) | Runtime Margin (B) | Initcode Margin (B) | ++====================================================================================================================================+ +| AVSDirectory | 5,423 | 6,233 | 19,153 | 42,919 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AVSRegistrar | 615 | 643 | 23,961 | 48,509 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AVSTaskHookReentrantAttacker | 5,236 | 5,370 | 19,340 | 43,782 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Address | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AddressUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AllocationManager | 23,509 | 24,180 | 1,067 | 24,972 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AllocationManagerHarness | 23,664 | 24,347 | 912 | 24,805 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ArrayLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BN254 | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BN254CertificateVerifier | 10,949 | 11,293 | 13,627 | 37,859 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BN254SignatureVerifier | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BN256G2 | 2,859 | 2,911 | 21,717 | 46,241 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BackingEigen | 11,186 | 11,537 | 13,390 | 37,615 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BeaconChainProofs | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BeaconChainProofs_DeprecatedM1 | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BeaconProxy | 305 | 1,656 | 24,271 | 47,496 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BytesLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BytesLibHarness | 2,135 | 2,163 | 22,441 | 46,989 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| CountersUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Create2 | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| CrossChainRegistry | 9,102 | 9,655 | 15,474 | 39,497 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| CrosschainDeployLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| DelegationManager | 23,552 | 24,662 | 1,024 | 24,490 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| DelegationManagerHarness | 23,977 | 24,955 | 599 | 24,197 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| DoubleEndedQueue | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ECDSA | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ECDSACertificateVerifier | 8,268 | 8,985 | 16,308 | 40,167 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ECDSAUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EIP_4788_Oracle_Mock | 654 | 682 | 23,922 | 48,470 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EIP_7002_Mock | 2,094 | 2,122 | 22,482 | 47,030 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EIP_7251_Mock | 2,267 | 2,295 | 22,309 | 46,857 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC1271MaliciousMock | 366 | 394 | 24,210 | 48,758 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC1271WalletMock | 1,492 | 1,916 | 23,084 | 47,236 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC1967Proxy | 170 | 1,191 | 24,406 | 47,961 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC20 | 2,074 | 2,742 | 22,502 | 46,410 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC20Mock | 1,217 | 1,510 | 23,359 | 47,642 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC20PresetFixedSupply | 2,509 | 3,473 | 22,067 | 45,679 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC20Upgradeable | 2,081 | 2,109 | 22,495 | 47,043 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC20_OneWeiFeeOnTransfer | 2,542 | 3,361 | 22,034 | 45,791 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC20_SetTransferReverting_Mock | 2,665 | 3,510 | 21,911 | 45,642 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ETHPOSDepositMock | 485 | 513 | 24,091 | 48,639 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Eigen | 13,359 | 13,710 | 11,217 | 35,442 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EigenHarness | 13,481 | 13,834 | 11,095 | 35,318 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EigenPod | 17,754 | 18,232 | 6,822 | 30,920 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EigenPodHarness | 18,331 | 18,813 | 6,245 | 30,339 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EigenPodManager | 10,863 | 11,424 | 13,713 | 37,728 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EigenPodManagerWrapper | 11,205 | 11,774 | 13,371 | 37,378 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EigenStrategy | 5,174 | 5,633 | 19,402 | 43,519 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EmptyContract (src/test/mocks/Dummy.sol) | 115 | 141 | 24,461 | 49,011 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EmptyContract (src/test/mocks/EmptyContract.sol) | 115 | 141 | 24,461 | 49,011 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Encode | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Endian | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EnumerableMap | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EnumerableSet | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Env | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| KeyRegistrar | 11,997 | 12,568 | 12,579 | 36,584 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| LibProofGen | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| LibValidator | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Math | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MathUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Merkle | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockAVSRegistrar | 174 | 200 | 24,402 | 48,952 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockAVSTaskHook | 1,168 | 1,221 | 23,408 | 47,931 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockBN254CertificateVerifier | 3,933 | 3,986 | 20,643 | 45,166 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockBN254CertificateVerifierFailure | 3,741 | 3,769 | 20,835 | 45,383 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockDecimals | 116 | 142 | 24,460 | 49,010 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockECDSACertificateVerifier | 3,488 | 3,541 | 21,088 | 45,611 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockECDSACertificateVerifierFailure | 3,305 | 3,333 | 21,271 | 45,819 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockERC20 | 3,606 | 3,634 | 20,970 | 45,518 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockSigner | 702 | 730 | 23,874 | 48,422 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockSimpleERC20 | 2,309 | 2,776 | 22,267 | 46,376 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OpenZeppelin_ERC20 | 2,074 | 2,742 | 22,502 | 46,410 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OpenZeppelin_ERC20PresetFixedSupply | 2,509 | 3,473 | 22,067 | 45,679 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OperatorKeyOperationsLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OperatorSetLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OperatorTableCalculatorMock | 2,872 | 2,900 | 21,704 | 46,252 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OperatorTableUpdater | 10,760 | 11,292 | 13,816 | 37,860 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OperatorWalletLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OwnableMock | 538 | 656 | 24,038 | 48,496 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| PausableHarness | 1,110 | 1,296 | 23,466 | 47,856 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| PauserRegistry | 777 | 1,480 | 23,799 | 47,672 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| PermissionController | 3,904 | 4,128 | 20,672 | 45,024 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ProxyAdmin | 1,618 | 1,736 | 22,958 | 47,416 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Random | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ReleaseManager | 4,882 | 5,218 | 19,694 | 43,934 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Reverter | 167 | 193 | 24,409 | 48,959 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ReverterWithDecimals | 210 | 236 | 24,366 | 48,916 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| RewardsCoordinator | 17,609 | 18,682 | 6,967 | 30,470 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SafeCast | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SafeCastUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SafeERC20 | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ScriptHelpers | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SemVerMixinMock | 502 | 955 | 24,074 | 48,197 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ShortStringsUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SignatureCheckerUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SignedMath | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SignedMathUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SigningKeyOperationsLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SlashingLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SlashingLibHarness | 797 | 825 | 23,779 | 48,327 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Snapshots | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SnapshotsHarness | 1,341 | 1,369 | 23,235 | 47,783 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StorageSlot | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StorageSlotUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StrategyBase | 4,435 | 4,890 | 20,141 | 44,262 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StrategyBaseTVLLimits | 5,164 | 5,623 | 19,412 | 43,529 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StrategyFactory | 5,895 | 6,360 | 18,681 | 42,792 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StrategyManager | 13,917 | 14,807 | 10,659 | 34,345 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StringUtils | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Strings | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StringsUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| TaskMailbox | 22,811 | 23,291 | 1,765 | 25,861 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| TestConstants | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| TimelockController | 7,492 | 8,707 | 17,084 | 40,445 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| TransparentUpgradeableProxy | 2,115 | 3,446 | 22,461 | 45,706 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| UpgradeableBeacon | 826 | 1,196 | 23,750 | 47,956 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| WETH | 2,950 | 3,420 | 21,626 | 45,732 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ZEnvHelpers | 2,259 | 2,311 | 22,317 | 46,841 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| print | 85 | 135 | 24,491 | 49,017 | +╰--------------------------------------------------+------------------+-------------------+--------------------+---------------------╯ + diff --git a/.size-before-commit0 b/.size-before-commit0 new file mode 100644 index 0000000000..2d293e1c11 --- /dev/null +++ b/.size-before-commit0 @@ -0,0 +1,246 @@ +Compiling 334 files with Solc 0.8.27 +Solc 0.8.27 finished in 145.45s +Compiler run successful! + +╭--------------------------------------------------+------------------+-------------------+--------------------+---------------------╮ +| Contract | Runtime Size (B) | Initcode Size (B) | Runtime Margin (B) | Initcode Margin (B) | ++====================================================================================================================================+ +| AVSDirectory | 5,423 | 6,233 | 19,153 | 42,919 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AVSRegistrar | 615 | 643 | 23,961 | 48,509 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AVSTaskHookReentrantAttacker | 5,236 | 5,370 | 19,340 | 43,782 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Address | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AddressUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AllocationManager | 24,010 | 25,046 | 566 | 24,106 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AllocationManagerHarness | 24,165 | 25,072 | 411 | 24,080 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ArrayLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BN254 | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BN254CertificateVerifier | 11,182 | 11,889 | 13,394 | 37,263 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BN254SignatureVerifier | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BN256G2 | 2,859 | 2,911 | 21,717 | 46,241 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BackingEigen | 11,186 | 11,537 | 13,390 | 37,615 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BeaconChainProofs | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BeaconChainProofs_DeprecatedM1 | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BeaconProxy | 305 | 1,656 | 24,271 | 47,496 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BytesLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| BytesLibHarness | 2,135 | 2,163 | 22,441 | 46,989 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| CountersUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Create2 | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| CrossChainRegistry | 9,343 | 10,260 | 15,233 | 38,892 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| CrosschainDeployLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| DelegationManager | 23,573 | 24,683 | 1,003 | 24,469 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| DelegationManagerHarness | 23,998 | 24,976 | 578 | 24,176 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| DoubleEndedQueue | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ECDSA | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ECDSACertificateVerifier | 8,268 | 8,985 | 16,308 | 40,167 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ECDSAUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EIP_4788_Oracle_Mock | 654 | 682 | 23,922 | 48,470 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EIP_7002_Mock | 2,094 | 2,122 | 22,482 | 47,030 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EIP_7251_Mock | 2,267 | 2,295 | 22,309 | 46,857 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC1271MaliciousMock | 366 | 394 | 24,210 | 48,758 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC1271WalletMock | 1,492 | 1,916 | 23,084 | 47,236 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC1967Proxy | 170 | 1,191 | 24,406 | 47,961 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC20 | 2,074 | 2,742 | 22,502 | 46,410 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC20Mock | 1,217 | 1,510 | 23,359 | 47,642 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC20PresetFixedSupply | 2,509 | 3,473 | 22,067 | 45,679 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC20Upgradeable | 2,081 | 2,109 | 22,495 | 47,043 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC20_OneWeiFeeOnTransfer | 2,542 | 3,361 | 22,034 | 45,791 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC20_SetTransferReverting_Mock | 2,665 | 3,510 | 21,911 | 45,642 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ETHPOSDepositMock | 485 | 513 | 24,091 | 48,639 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Eigen | 13,521 | 14,235 | 11,055 | 34,917 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EigenHarness | 13,643 | 14,206 | 10,933 | 34,946 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EigenPod | 17,941 | 18,778 | 6,635 | 30,374 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EigenPodHarness | 18,518 | 19,361 | 6,058 | 29,791 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EigenPodManager | 11,108 | 12,033 | 13,468 | 37,119 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EigenPodManagerWrapper | 11,450 | 12,385 | 13,126 | 36,767 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EigenStrategy | 5,336 | 6,162 | 19,240 | 42,990 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EmptyContract (src/test/mocks/Dummy.sol) | 115 | 141 | 24,461 | 49,011 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EmptyContract (src/test/mocks/EmptyContract.sol) | 115 | 141 | 24,461 | 49,011 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Encode | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Endian | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EnumerableMap | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EnumerableSet | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Env | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| KeyRegistrar | 12,047 | 12,618 | 12,529 | 36,534 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| LibProofGen | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| LibValidator | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Math | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MathUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Merkle | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockAVSRegistrar | 174 | 200 | 24,402 | 48,952 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockAVSTaskHook | 1,168 | 1,221 | 23,408 | 47,931 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockBN254CertificateVerifier | 3,933 | 3,986 | 20,643 | 45,166 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockBN254CertificateVerifierFailure | 3,741 | 3,769 | 20,835 | 45,383 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockDecimals | 116 | 142 | 24,460 | 49,010 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockECDSACertificateVerifier | 3,488 | 3,541 | 21,088 | 45,611 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockECDSACertificateVerifierFailure | 3,305 | 3,333 | 21,271 | 45,819 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockERC20 | 3,606 | 3,634 | 20,970 | 45,518 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockSigner | 702 | 730 | 23,874 | 48,422 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockSimpleERC20 | 2,309 | 2,776 | 22,267 | 46,376 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OpenZeppelin_ERC20 | 2,074 | 2,742 | 22,502 | 46,410 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OpenZeppelin_ERC20PresetFixedSupply | 2,509 | 3,473 | 22,067 | 45,679 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OperatorKeyOperationsLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OperatorSetLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OperatorTableCalculatorMock | 2,872 | 2,900 | 21,704 | 46,252 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OperatorTableUpdater | 10,988 | 11,882 | 13,588 | 37,270 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OperatorWalletLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OwnableMock | 538 | 656 | 24,038 | 48,496 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| PausableHarness | 1,110 | 1,296 | 23,466 | 47,856 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| PauserRegistry | 777 | 1,480 | 23,799 | 47,672 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| PermissionController | 4,152 | 4,791 | 20,424 | 44,361 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ProxyAdmin | 1,618 | 1,736 | 22,958 | 47,416 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Random | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ReleaseManager | 5,070 | 5,769 | 19,506 | 43,383 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Reverter | 167 | 193 | 24,409 | 48,959 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ReverterWithDecimals | 210 | 236 | 24,366 | 48,916 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| RewardsCoordinator | 17,926 | 19,412 | 6,650 | 29,740 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SafeCast | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SafeCastUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SafeERC20 | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ScriptHelpers | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SemVerMixinMock | 502 | 955 | 24,074 | 48,197 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ShortStringsUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SignatureCheckerUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SignedMath | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SignedMathUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SigningKeyOperationsLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SlashingLib | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SlashingLibHarness | 797 | 825 | 23,779 | 48,327 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Snapshots | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SnapshotsHarness | 1,341 | 1,369 | 23,235 | 47,783 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StorageSlot | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StorageSlotUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StrategyBase | 4,597 | 5,417 | 19,979 | 43,735 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StrategyBaseTVLLimits | 5,341 | 6,167 | 19,235 | 42,985 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StrategyFactory | 6,120 | 6,950 | 18,456 | 42,202 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StrategyManager | 13,917 | 14,807 | 10,659 | 34,345 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StringUtils | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Strings | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StringsUpgradeable | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| TaskMailbox | 22,993 | 23,835 | 1,583 | 25,317 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| TestConstants | 85 | 135 | 24,491 | 49,017 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| TimelockController | 7,492 | 8,707 | 17,084 | 40,445 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| TransparentUpgradeableProxy | 2,115 | 3,446 | 22,461 | 45,706 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| UpgradeableBeacon | 826 | 1,196 | 23,750 | 47,956 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| WETH | 2,950 | 3,420 | 21,626 | 45,732 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ZEnvHelpers | 2,259 | 2,311 | 22,317 | 46,841 | +|--------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| print | 85 | 135 | 24,491 | 49,017 | +╰--------------------------------------------------+------------------+-------------------+--------------------+---------------------╯ + diff --git a/script/deploy/devnet/deploy_from_scratch.s.sol b/script/deploy/devnet/deploy_from_scratch.s.sol index 03f25cde8e..9dc16d79b4 100644 --- a/script/deploy/devnet/deploy_from_scratch.s.sol +++ b/script/deploy/devnet/deploy_from_scratch.s.sol @@ -225,7 +225,7 @@ contract DeployFromScratch is Script, Test { if (chainId == 1) ethPOSDeposit = IETHPOSDeposit(0x00000000219ab540356cBB839Cbe05303d7705Fa); // if not on mainnet, deploy a mock else ethPOSDeposit = IETHPOSDeposit(stdJson.readAddress(config_data, ".ethPOSDepositAddress")); - eigenPodImplementation = new EigenPod(ethPOSDeposit, eigenPodManager, SEMVER); + eigenPodImplementation = new EigenPod(ethPOSDeposit, eigenPodManager); eigenPodBeacon = new UpgradeableBeacon(address(eigenPodImplementation)); @@ -245,7 +245,7 @@ contract DeployFromScratch is Script, Test { new StrategyManager(IAllocationManager(address(allocationManager)), delegation, eigenLayerPauserReg, SEMVER); avsDirectoryImplementation = new AVSDirectory(delegation, eigenLayerPauserReg, SEMVER); eigenPodManagerImplementation = - new EigenPodManager(ethPOSDeposit, eigenPodBeacon, delegation, eigenLayerPauserReg, SEMVER); + new EigenPodManager(ethPOSDeposit, eigenPodBeacon, delegation, eigenLayerPauserReg); rewardsCoordinatorImplementation = new RewardsCoordinator( IRewardsCoordinatorTypes.RewardsCoordinatorConstructorParams( delegation, @@ -257,8 +257,7 @@ contract DeployFromScratch is Script, Test { REWARDS_COORDINATOR_MAX_REWARDS_DURATION, REWARDS_COORDINATOR_MAX_RETROACTIVE_LENGTH, REWARDS_COORDINATOR_MAX_FUTURE_LENGTH, - REWARDS_COORDINATOR_GENESIS_REWARDS_TIMESTAMP, - SEMVER + REWARDS_COORDINATOR_GENESIS_REWARDS_TIMESTAMP ) ); allocationManagerImplementation = new AllocationManager( @@ -268,13 +267,12 @@ contract DeployFromScratch is Script, Test { eigenLayerPauserReg, permissionController, DEALLOCATION_DELAY, - ALLOCATION_CONFIGURATION_DELAY, - SEMVER + ALLOCATION_CONFIGURATION_DELAY ); allocationManagerViewImplementation = new AllocationManagerView(delegation, eigenStrategy, DEALLOCATION_DELAY, ALLOCATION_CONFIGURATION_DELAY); - permissionControllerImplementation = new PermissionController(SEMVER); - strategyFactoryImplementation = new StrategyFactory(strategyManager, eigenLayerPauserReg, SEMVER); + permissionControllerImplementation = new PermissionController(); + strategyFactoryImplementation = new StrategyFactory(strategyManager, eigenLayerPauserReg); // Third, upgrade the proxy contracts to use the correct implementation contracts and initialize them. { @@ -341,7 +339,7 @@ contract DeployFromScratch is Script, Test { // Deploy strategyFactory & base // Create base strategy implementation - baseStrategyImplementation = new StrategyBase(strategyManager, eigenLayerPauserReg, SEMVER); + baseStrategyImplementation = new StrategyBase(strategyManager, eigenLayerPauserReg); // Create a proxy beacon for base strategy implementation strategyBeacon = new UpgradeableBeacon(address(baseStrategyImplementation)); diff --git a/script/deploy/local/deploy_from_scratch.slashing.s.sol b/script/deploy/local/deploy_from_scratch.slashing.s.sol index 2d5c0cd95e..36a28b90af 100644 --- a/script/deploy/local/deploy_from_scratch.slashing.s.sol +++ b/script/deploy/local/deploy_from_scratch.slashing.s.sol @@ -229,13 +229,13 @@ contract DeployFromScratch is Script, Test { address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) ); - eigenStrategy = IStrategy(new EigenStrategy(strategyManager, eigenLayerPauserReg, SEMVER)); + eigenStrategy = IStrategy(new EigenStrategy(strategyManager, eigenLayerPauserReg)); // if on mainnet, use the ETH2 deposit contract address if (chainId == 1) ethPOSDeposit = IETHPOSDeposit(0x00000000219ab540356cBB839Cbe05303d7705Fa); // if not on mainnet, deploy a mock else ethPOSDeposit = IETHPOSDeposit(stdJson.readAddress(config_data, ".ethPOSDepositAddress")); - eigenPodImplementation = new EigenPod(ethPOSDeposit, eigenPodManager, SEMVER); + eigenPodImplementation = new EigenPod(ethPOSDeposit, eigenPodManager); eigenPodBeacon = new UpgradeableBeacon(address(eigenPodImplementation)); @@ -254,7 +254,7 @@ contract DeployFromScratch is Script, Test { new StrategyManager(IAllocationManager(address(allocationManager)), delegation, eigenLayerPauserReg, SEMVER); avsDirectoryImplementation = new AVSDirectory(delegation, eigenLayerPauserReg, SEMVER); eigenPodManagerImplementation = - new EigenPodManager(ethPOSDeposit, eigenPodBeacon, delegation, eigenLayerPauserReg, SEMVER); + new EigenPodManager(ethPOSDeposit, eigenPodBeacon, delegation, eigenLayerPauserReg); rewardsCoordinatorImplementation = new RewardsCoordinator( IRewardsCoordinatorTypes.RewardsCoordinatorConstructorParams( delegation, @@ -266,8 +266,7 @@ contract DeployFromScratch is Script, Test { REWARDS_COORDINATOR_MAX_REWARDS_DURATION, REWARDS_COORDINATOR_MAX_RETROACTIVE_LENGTH, REWARDS_COORDINATOR_MAX_FUTURE_LENGTH, - REWARDS_COORDINATOR_GENESIS_REWARDS_TIMESTAMP, - SEMVER + REWARDS_COORDINATOR_GENESIS_REWARDS_TIMESTAMP ) ); allocationManagerImplementation = new AllocationManager( @@ -277,12 +276,11 @@ contract DeployFromScratch is Script, Test { eigenLayerPauserReg, permissionController, DEALLOCATION_DELAY, - ALLOCATION_CONFIGURATION_DELAY, - SEMVER + ALLOCATION_CONFIGURATION_DELAY ); allocationManagerViewImplementation = new AllocationManagerView(delegation, eigenStrategy, DEALLOCATION_DELAY, ALLOCATION_CONFIGURATION_DELAY); - permissionControllerImplementation = new PermissionController(SEMVER); + permissionControllerImplementation = new PermissionController(); // Third, upgrade the proxy contracts to use the correct implementation contracts and initialize them. { @@ -355,7 +353,7 @@ contract DeployFromScratch is Script, Test { ); // deploy StrategyBaseTVLLimits contract implementation - baseStrategyImplementation = new StrategyBaseTVLLimits(strategyManager, eigenLayerPauserReg, SEMVER); + baseStrategyImplementation = new StrategyBaseTVLLimits(strategyManager, eigenLayerPauserReg); // create upgradeable proxies that each point to the implementation and initialize them for (uint256 i = 0; i < strategyConfigs.length; ++i) { if (strategyConfigs[i].tokenAddress == address(0)) { diff --git a/script/releases/v1.7.0-v1.8.0-multichain-hourglass-combined/1-deploySourceChain.s.sol b/script/releases/v1.7.0-v1.8.0-multichain-hourglass-combined/1-deploySourceChain.s.sol index 6dc0d3f12c..caa5693dc4 100644 --- a/script/releases/v1.7.0-v1.8.0-multichain-hourglass-combined/1-deploySourceChain.s.sol +++ b/script/releases/v1.7.0-v1.8.0-multichain-hourglass-combined/1-deploySourceChain.s.sol @@ -51,8 +51,7 @@ contract DeploySourceChain is EOADeployer { _allocationManager: IAllocationManager(address(Env.proxy.allocationManager())), _keyRegistrar: Env.proxy.keyRegistrar(), _permissionController: Env.proxy.permissionController(), - _pauserRegistry: Env.impl.pauserRegistry(), - _version: Env.deployVersion() + _pauserRegistry: Env.impl.pauserRegistry() }) ) }); @@ -80,7 +79,7 @@ contract DeploySourceChain is EOADeployer { deployImpl({ name: type(ReleaseManager).name, deployedTo: address( - new ReleaseManager({_permissionController: Env.proxy.permissionController(), _version: Env.deployVersion()}) + new ReleaseManager({_permissionController: Env.proxy.permissionController()}) ) }); @@ -180,7 +179,6 @@ contract DeploySourceChain is EOADeployer { address(crossChainRegistry.pauserRegistry()) == address(Env.impl.pauserRegistry()), "ccr.pauserRegistry invalid" ); - assertEq(crossChainRegistry.version(), Env.deployVersion(), "ccr.version failed"); } { @@ -190,7 +188,6 @@ contract DeploySourceChain is EOADeployer { releaseManager.permissionController() == Env.proxy.permissionController(), "rm.permissionController invalid" ); - assertEq(releaseManager.version(), Env.deployVersion(), "rm.version failed"); } } @@ -216,7 +213,6 @@ contract DeploySourceChain is EOADeployer { ); CrossChainRegistry crossChainRegistry = Env.proxy.crossChainRegistry(); - assertEq(crossChainRegistry.version(), Env.deployVersion(), "crossChainRegistry version mismatch"); assertTrue( crossChainRegistry.allocationManager() == Env.proxy.allocationManager(), "crossChainRegistry allocationManager mismatch" @@ -234,7 +230,6 @@ contract DeploySourceChain is EOADeployer { ); ReleaseManager releaseManager = Env.proxy.releaseManager(); - assertEq(releaseManager.version(), Env.deployVersion(), "releaseManager version mismatch"); assertTrue( releaseManager.permissionController() == Env.proxy.permissionController(), "releaseManager permissionController mismatch" diff --git a/script/releases/v1.7.0-v1.8.0-multichain-hourglass-combined/3-deployDestinationChainImpls.s.sol b/script/releases/v1.7.0-v1.8.0-multichain-hourglass-combined/3-deployDestinationChainImpls.s.sol index 4dd95dfb57..383082975a 100644 --- a/script/releases/v1.7.0-v1.8.0-multichain-hourglass-combined/3-deployDestinationChainImpls.s.sol +++ b/script/releases/v1.7.0-v1.8.0-multichain-hourglass-combined/3-deployDestinationChainImpls.s.sol @@ -36,8 +36,7 @@ contract DeployDestinationChainImpls is EOADeployer, DeployDestinationChainProxi new OperatorTableUpdater({ _bn254CertificateVerifier: Env.proxy.bn254CertificateVerifier(), _ecdsaCertificateVerifier: Env.proxy.ecdsaCertificateVerifier(), - _pauserRegistry: Env.impl.pauserRegistry(), - _version: Env.deployVersion() + _pauserRegistry: Env.impl.pauserRegistry() }) ) }); @@ -56,12 +55,7 @@ contract DeployDestinationChainImpls is EOADeployer, DeployDestinationChainProxi // BN254CertificateVerifier deployImpl({ name: type(BN254CertificateVerifier).name, - deployedTo: address( - new BN254CertificateVerifier({ - _operatorTableUpdater: Env.proxy.operatorTableUpdater(), - _version: Env.deployVersion() - }) - ) + deployedTo: address(new BN254CertificateVerifier({_operatorTableUpdater: Env.proxy.operatorTableUpdater()})) }); // TaskMailbox @@ -72,8 +66,7 @@ contract DeployDestinationChainImpls is EOADeployer, DeployDestinationChainProxi new TaskMailbox({ _bn254CertificateVerifier: address(Env.proxy.bn254CertificateVerifier()), _ecdsaCertificateVerifier: address(Env.proxy.ecdsaCertificateVerifier()), - _maxTaskSLA: Env.MAX_TASK_SLA(), - _version: Env.deployVersion() + _maxTaskSLA: Env.MAX_TASK_SLA() }) ) }); @@ -121,7 +114,6 @@ contract DeployDestinationChainImpls is EOADeployer, DeployDestinationChainProxi == address(Env.proxy.ecdsaCertificateVerifier()), "out.ecdsaCertificateVerifier invalid" ); - assertEq(operatorTableUpdater.version(), Env.deployVersion(), "out.version failed"); } { @@ -141,7 +133,6 @@ contract DeployDestinationChainImpls is EOADeployer, DeployDestinationChainProxi address(bn254CertificateVerifier.operatorTableUpdater()) == address(Env.proxy.operatorTableUpdater()), "b254cv.operatorTableUpdater invalid" ); - assertEq(bn254CertificateVerifier.version(), Env.deployVersion(), "b254cv.version failed"); } { @@ -156,7 +147,6 @@ contract DeployDestinationChainImpls is EOADeployer, DeployDestinationChainProxi "tm.ecdsaCertificateVerifier invalid" ); assertEq(taskMailbox.MAX_TASK_SLA(), Env.MAX_TASK_SLA(), "tm.maxTaskSLA failed"); - assertEq(taskMailbox.version(), Env.deployVersion(), "tm.version failed"); } } @@ -191,12 +181,5 @@ contract DeployDestinationChainImpls is EOADeployer, DeployDestinationChainProxi // ECDSACertificateVerifier and BN254CertificateVerifier don't have initialize functions } - function _validateVersion() internal view { - string memory expected = Env.deployVersion(); - - assertEq(Env.impl.operatorTableUpdater().version(), expected, "operatorTableUpdater version mismatch"); - assertEq(Env.impl.ecdsaCertificateVerifier().version(), expected, "ecdsaCertificateVerifier version mismatch"); - assertEq(Env.impl.bn254CertificateVerifier().version(), expected, "bn254CertificateVerifier version mismatch"); - assertEq(Env.impl.taskMailbox().version(), expected, "taskMailbox version mismatch"); - } + function _validateVersion() internal view {} } diff --git a/script/releases/v1.7.0-v1.8.0-multichain-hourglass-combined/4-instantiateDestinationChainProxies.s.sol b/script/releases/v1.7.0-v1.8.0-multichain-hourglass-combined/4-instantiateDestinationChainProxies.s.sol index d5113b2653..84fbad4880 100644 --- a/script/releases/v1.7.0-v1.8.0-multichain-hourglass-combined/4-instantiateDestinationChainProxies.s.sol +++ b/script/releases/v1.7.0-v1.8.0-multichain-hourglass-combined/4-instantiateDestinationChainProxies.s.sol @@ -283,7 +283,6 @@ contract InstantiateDestinationChainProxies is DeployDestinationChainImpls { /// OperatorTableUpdater { OperatorTableUpdater operatorTableUpdater = Env.proxy.operatorTableUpdater(); - assertEq(operatorTableUpdater.version(), Env.deployVersion(), "operatorTableUpdater version mismatch"); assertTrue( operatorTableUpdater.bn254CertificateVerifier() == Env.proxy.bn254CertificateVerifier(), "out.bn254CertificateVerifier mismatch" @@ -309,9 +308,6 @@ contract InstantiateDestinationChainProxies is DeployDestinationChainImpls { /// BN254CertificateVerifier { BN254CertificateVerifier bn254CertificateVerifier = Env.proxy.bn254CertificateVerifier(); - assertEq( - bn254CertificateVerifier.version(), Env.deployVersion(), "bn254CertificateVerifier version mismatch" - ); assertTrue( bn254CertificateVerifier.operatorTableUpdater() == Env.proxy.operatorTableUpdater(), "bn254CertificateVerifier operatorTableUpdater mismatch" @@ -321,7 +317,6 @@ contract InstantiateDestinationChainProxies is DeployDestinationChainImpls { /// TaskMailbox { TaskMailbox taskMailbox = Env.proxy.taskMailbox(); - assertEq(taskMailbox.version(), Env.deployVersion(), "taskMailbox version mismatch"); assertTrue( taskMailbox.BN254_CERTIFICATE_VERIFIER() == address(Env.proxy.bn254CertificateVerifier()), "taskMailbox.BN254_CERTIFICATE_VERIFIER mismatch" diff --git a/script/releases/v1.8.1-hourglass-testnet-replay-fix/1-deployTaskMailboxImpl.s.sol b/script/releases/v1.8.1-hourglass-testnet-replay-fix/1-deployTaskMailboxImpl.s.sol index a4fa863721..2feee8e8e5 100644 --- a/script/releases/v1.8.1-hourglass-testnet-replay-fix/1-deployTaskMailboxImpl.s.sol +++ b/script/releases/v1.8.1-hourglass-testnet-replay-fix/1-deployTaskMailboxImpl.s.sol @@ -29,8 +29,7 @@ contract DeployTaskMailboxImpl is EOADeployer { new TaskMailbox({ _bn254CertificateVerifier: address(Env.proxy.bn254CertificateVerifier()), _ecdsaCertificateVerifier: address(Env.proxy.ecdsaCertificateVerifier()), - _maxTaskSLA: Env.MAX_TASK_SLA(), - _version: Env.deployVersion() + _maxTaskSLA: Env.MAX_TASK_SLA() }) ) }); @@ -72,13 +71,6 @@ contract DeployTaskMailboxImpl is EOADeployer { function _validateImplConstructor() internal view { TaskMailbox taskMailboxImpl = Env.impl.taskMailbox(); - // Validate version - assertEq( - keccak256(bytes(taskMailboxImpl.version())), - keccak256(bytes(Env.deployVersion())), - "TaskMailbox impl version mismatch" - ); - // Validate certificate verifiers assertTrue( taskMailboxImpl.BN254_CERTIFICATE_VERIFIER() == address(Env.proxy.bn254CertificateVerifier()), @@ -108,11 +100,5 @@ contract DeployTaskMailboxImpl is EOADeployer { } /// @dev Validate the version is correctly set - function _validateVersion() internal view { - assertEq( - keccak256(bytes(Env.impl.taskMailbox().version())), - keccak256(bytes(Env.deployVersion())), - "TaskMailbox version should match deploy version" - ); - } + function _validateVersion() internal view {} } diff --git a/script/releases/v1.8.1-hourglass-testnet-replay-fix/3-executeTaskMailboxUpgrade.s.sol b/script/releases/v1.8.1-hourglass-testnet-replay-fix/3-executeTaskMailboxUpgrade.s.sol index 92139ba38d..ec49399381 100644 --- a/script/releases/v1.8.1-hourglass-testnet-replay-fix/3-executeTaskMailboxUpgrade.s.sol +++ b/script/releases/v1.8.1-hourglass-testnet-replay-fix/3-executeTaskMailboxUpgrade.s.sol @@ -86,13 +86,6 @@ contract ExecuteTaskMailboxUpgrade is QueueTaskMailboxUpgrade { function _validateProxyConstructor() internal view { TaskMailbox taskMailbox = Env.proxy.taskMailbox(); - // Validate version - assertEq( - keccak256(bytes(taskMailbox.version())), - keccak256(bytes(Env.deployVersion())), - "TaskMailbox version mismatch" - ); - // Validate certificate verifiers assertTrue( taskMailbox.BN254_CERTIFICATE_VERIFIER() == address(Env.proxy.bn254CertificateVerifier()), diff --git a/script/utils/ExistingDeploymentParser.sol b/script/utils/ExistingDeploymentParser.sol index 83ac446ec5..df63463284 100644 --- a/script/utils/ExistingDeploymentParser.sol +++ b/script/utils/ExistingDeploymentParser.sol @@ -224,7 +224,7 @@ contract ExistingDeploymentParser is Script, Logger { eigenLayerPauserReg = PauserRegistry(json.readAddress(".addresses.eigenLayerPauserReg")); // FIXME: hotfix - remove later... - permissionControllerImplementation = new PermissionController(SEMVER); + permissionControllerImplementation = new PermissionController(); permissionController = PermissionController( address( new TransparentUpgradeableProxy( diff --git a/src/contracts/avs/task/TaskMailbox.sol b/src/contracts/avs/task/TaskMailbox.sol index f6cc96fd38..7dcc126900 100644 --- a/src/contracts/avs/task/TaskMailbox.sol +++ b/src/contracts/avs/task/TaskMailbox.sol @@ -19,7 +19,6 @@ import {IBaseCertificateVerifier} from "../../interfaces/IBaseCertificateVerifie import {IKeyRegistrarTypes} from "../../interfaces/IKeyRegistrar.sol"; import {ITaskMailbox} from "../../interfaces/ITaskMailbox.sol"; import {OperatorSet} from "../../libraries/OperatorSetLib.sol"; -import {SemVerMixin} from "../../mixins/SemVerMixin.sol"; import {TaskMailboxStorage} from "./TaskMailboxStorage.sol"; /** @@ -27,13 +26,7 @@ import {TaskMailboxStorage} from "./TaskMailboxStorage.sol"; * @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, - SemVerMixin -{ +contract TaskMailbox is Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, TaskMailboxStorage { using SafeERC20 for IERC20; using SafeCast for *; @@ -42,14 +35,12 @@ contract TaskMailbox is * @param _bn254CertificateVerifier Address of the BN254 certificate verifier * @param _ecdsaCertificateVerifier Address of the ECDSA certificate verifier * @param _maxTaskSLA Maximum task SLA in seconds - * @param _version The semantic version of the contract */ constructor( address _bn254CertificateVerifier, address _ecdsaCertificateVerifier, - uint96 _maxTaskSLA, - string memory _version - ) TaskMailboxStorage(_bn254CertificateVerifier, _ecdsaCertificateVerifier, _maxTaskSLA) SemVerMixin(_version) { + uint96 _maxTaskSLA + ) TaskMailboxStorage(_bn254CertificateVerifier, _ecdsaCertificateVerifier, _maxTaskSLA) { _disableInitializers(); } diff --git a/src/contracts/core/AllocationManager.sol b/src/contracts/core/AllocationManager.sol index 4a7827f659..d90ea2d817 100644 --- a/src/contracts/core/AllocationManager.sol +++ b/src/contracts/core/AllocationManager.sol @@ -6,7 +6,6 @@ import "@openzeppelin-upgrades/contracts/security/ReentrancyGuardUpgradeable.sol import "../mixins/Deprecated_OwnableUpgradeable.sol"; import "../mixins/SplitContractMixin.sol"; import "../mixins/PermissionControllerMixin.sol"; -import "../mixins/SemVerMixin.sol"; import "../permissions/Pausable.sol"; import "../libraries/SlashingLib.sol"; import "../libraries/OperatorSetLib.sol"; @@ -20,7 +19,6 @@ contract AllocationManager is ReentrancyGuardUpgradeable, SplitContractMixin, PermissionControllerMixin, - SemVerMixin, IAllocationManager { using DoubleEndedQueue for DoubleEndedQueue.Bytes32Deque; @@ -46,14 +44,12 @@ contract AllocationManager is IPauserRegistry _pauserRegistry, IPermissionController _permissionController, uint32 _DEALLOCATION_DELAY, - uint32 _ALLOCATION_CONFIGURATION_DELAY, - string memory _version + uint32 _ALLOCATION_CONFIGURATION_DELAY ) AllocationManagerStorage(_delegation, _eigenStrategy, _DEALLOCATION_DELAY, _ALLOCATION_CONFIGURATION_DELAY) Pausable(_pauserRegistry) SplitContractMixin(address(_allocationManagerView)) PermissionControllerMixin(_permissionController) - SemVerMixin(_version) { _disableInitializers(); } @@ -86,7 +82,7 @@ contract AllocationManager is ) external onlyWhenNotPaused(PAUSED_MODIFY_ALLOCATIONS) { // Check that the caller is allowed to modify allocations on behalf of the operator // We do not use a modifier to avoid `stack too deep` errors - require(_checkCanCall(operator), InvalidCaller()); + _checkCanCall(operator); // Check that the operator exists and has configured an allocation delay uint32 operatorAllocationDelay; @@ -215,7 +211,7 @@ contract AllocationManager is DeregisterParams calldata params ) external onlyWhenNotPaused(PAUSED_OPERATOR_SET_REGISTRATION_AND_DEREGISTRATION) { // Check that the caller is either authorized on behalf of the operator or AVS - require(_checkCanCall(params.operator) || _checkCanCall(params.avs), InvalidCaller()); + require(_canCall(params.operator) || _canCall(params.avs), InvalidCaller()); for (uint256 i = 0; i < params.operatorSetIds.length; i++) { // Check the operator set exists and the operator is registered to it @@ -248,7 +244,7 @@ contract AllocationManager is // If we're not newly registered, check that the caller (not the delegationManager) is authorized to set the allocation delay for the operator if (!newlyRegistered) { - require(_checkCanCall(operator), InvalidCaller()); + _checkCanCall(operator); require(delegation.isOperator(operator), InvalidOperator()); } diff --git a/src/contracts/core/DelegationManager.sol b/src/contracts/core/DelegationManager.sol index 01b61951a4..94e27db81b 100644 --- a/src/contracts/core/DelegationManager.sol +++ b/src/contracts/core/DelegationManager.sol @@ -159,7 +159,7 @@ contract DelegationManager is if (msg.sender != staker) { address operator = delegatedTo[staker]; - require(_checkCanCall(operator) || msg.sender == delegationApprover(operator), CallerCannotUndelegate()); + require(_canCall(operator) || msg.sender == delegationApprover(operator), CallerCannotUndelegate()); emit StakerForceUndelegated(staker, operator); } diff --git a/src/contracts/core/ProtocolRegistry.sol b/src/contracts/core/ProtocolRegistry.sol new file mode 100644 index 0000000000..a66f360525 --- /dev/null +++ b/src/contracts/core/ProtocolRegistry.sol @@ -0,0 +1,79 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +import "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol"; +import "@openzeppelin-upgrades/contracts/access/OwnableUpgradeable.sol"; +import "./ProtocolRegistryStorage.sol"; + +contract ProtocolRegistry is Initializable, OwnableUpgradeable, ProtocolRegistryStorage { + using ShortStringsUpgradeable for *; + + /** + * + * INITIALIZING FUNCTIONS + * + */ + constructor() { + _disableInitializers(); + } + + /// @inheritdoc IProtocolRegistry + function initialize( + address initialOwner + ) external initializer { + _transferOwnership(initialOwner); + } + + /** + * + * INITIALIZING FUNCTIONS + * + */ + + /// @inheritdoc IProtocolRegistry + function setVersion(address addr, string calldata semver) external onlyOwner { + _setVersion(addr, semver); + } + + /// @inheritdoc IProtocolRegistry + function setVersions(address[] calldata addresses, string calldata semver) external onlyOwner { + for (uint256 i = 0; i < addresses.length; ++i) { + _setVersion(addresses[i], semver); + } + } + + /// @inheritdoc IProtocolRegistry + function setVersions(address[] calldata addresses, string[] calldata semvers) external onlyOwner { + require(addresses.length == semvers.length, InputArrayLengthMismatch()); + for (uint256 i = 0; i < addresses.length; ++i) { + _setVersion(addresses[i], semvers[i]); + } + } + + /// @dev Internal function to set the version for a given address. + function _setVersion(address addr, string calldata semver) internal { + _semver[addr] = semver.toShortString(); + emit VersionSet(addr, semver); + } + + /** + * + * VIEW FUNCTIONS + * + */ + + /// @inheritdoc IProtocolRegistry + function version( + address addr + ) external view returns (string memory) { + return _semver[addr].toString(); + } + + /// @inheritdoc IProtocolRegistry + function majorVersion( + address addr + ) external view returns (string memory) { + bytes memory v = bytes(_semver[addr].toString()); + return string(abi.encodePacked(v[0])); + } +} diff --git a/src/contracts/core/ProtocolRegistryStorage.sol b/src/contracts/core/ProtocolRegistryStorage.sol new file mode 100644 index 0000000000..32e6260a59 --- /dev/null +++ b/src/contracts/core/ProtocolRegistryStorage.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +import "@openzeppelin-upgrades/contracts/utils/ShortStringsUpgradeable.sol"; +import "../interfaces/IProtocolRegistry.sol"; + +abstract contract ProtocolRegistryStorage is IProtocolRegistry { + /// @notice Mapping from an address to its semantic version. + mapping(address addr => ShortString semver) internal _semver; + + /** + * @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/core/ReleaseManager.sol b/src/contracts/core/ReleaseManager.sol index a5f08a555a..5e91e9131a 100644 --- a/src/contracts/core/ReleaseManager.sol +++ b/src/contracts/core/ReleaseManager.sol @@ -3,10 +3,9 @@ pragma solidity ^0.8.27; import "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol"; import "../mixins/PermissionControllerMixin.sol"; -import "../mixins/SemVerMixin.sol"; import "./storage/ReleaseManagerStorage.sol"; -contract ReleaseManager is Initializable, ReleaseManagerStorage, PermissionControllerMixin, SemVerMixin { +contract ReleaseManager is Initializable, ReleaseManagerStorage, PermissionControllerMixin { using OperatorSetLib for OperatorSet; /** @@ -15,9 +14,8 @@ contract ReleaseManager is Initializable, ReleaseManagerStorage, PermissionContr * */ constructor( - IPermissionController _permissionController, - string memory _version - ) PermissionControllerMixin(_permissionController) SemVerMixin(_version) { + IPermissionController _permissionController + ) PermissionControllerMixin(_permissionController) { _disableInitializers(); } diff --git a/src/contracts/core/RewardsCoordinator.sol b/src/contracts/core/RewardsCoordinator.sol index 54a6d82b87..03309ba632 100644 --- a/src/contracts/core/RewardsCoordinator.sol +++ b/src/contracts/core/RewardsCoordinator.sol @@ -10,7 +10,6 @@ import "../libraries/Merkle.sol"; import "../permissions/Pausable.sol"; import "./storage/RewardsCoordinatorStorage.sol"; import "../mixins/PermissionControllerMixin.sol"; -import "../mixins/SemVerMixin.sol"; /** * @title RewardsCoordinator @@ -27,8 +26,7 @@ contract RewardsCoordinator is Pausable, ReentrancyGuardUpgradeable, RewardsCoordinatorStorage, - PermissionControllerMixin, - SemVerMixin + PermissionControllerMixin { using SafeERC20 for IERC20; using OperatorSetLib for OperatorSet; @@ -59,7 +57,6 @@ contract RewardsCoordinator is ) Pausable(params.pauserRegistry) PermissionControllerMixin(params.permissionController) - SemVerMixin(params.version) { _disableInitializers(); } diff --git a/src/contracts/interfaces/IAllocationManager.sol b/src/contracts/interfaces/IAllocationManager.sol index 05d63b0e26..d70bf6f1df 100644 --- a/src/contracts/interfaces/IAllocationManager.sol +++ b/src/contracts/interfaces/IAllocationManager.sol @@ -7,7 +7,6 @@ import "./IPauserRegistry.sol"; import "./IPausable.sol"; import "./IStrategy.sol"; import "./IAVSRegistrar.sol"; -import "./ISemVerMixin.sol"; interface IAllocationManagerErrors { /// Input Validation @@ -250,12 +249,7 @@ interface IAllocationManagerStorage { function ALLOCATION_CONFIGURATION_DELAY() external view returns (uint32); } -interface IAllocationManagerActions is - IAllocationManagerErrors, - IAllocationManagerEvents, - IAllocationManagerStorage, - ISemVerMixin -{ +interface IAllocationManagerActions is IAllocationManagerErrors, IAllocationManagerEvents, IAllocationManagerStorage { /** * @dev Initializes the initial owner and paused status. */ diff --git a/src/contracts/interfaces/IEigenPod.sol b/src/contracts/interfaces/IEigenPod.sol index c36f1fce98..70119b082f 100644 --- a/src/contracts/interfaces/IEigenPod.sol +++ b/src/contracts/interfaces/IEigenPod.sol @@ -4,7 +4,6 @@ pragma solidity >=0.5.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../libraries/BeaconChainProofs.sol"; -import "./ISemVerMixin.sol"; import "./IEigenPodManager.sol"; interface IEigenPodErrors { @@ -190,7 +189,7 @@ interface IEigenPodEvents is IEigenPodTypes { * @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, ISemVerMixin { +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( address owner diff --git a/src/contracts/interfaces/IEigenPodManager.sol b/src/contracts/interfaces/IEigenPodManager.sol index b7814e9888..fe9d1ac0b2 100644 --- a/src/contracts/interfaces/IEigenPodManager.sol +++ b/src/contracts/interfaces/IEigenPodManager.sol @@ -8,7 +8,6 @@ import "./IEigenPod.sol"; import "./IShareManager.sol"; import "./IPausable.sol"; import "./IStrategy.sol"; -import "./ISemVerMixin.sol"; interface IEigenPodManagerErrors { /// @dev Thrown when caller is not a EigenPod. @@ -94,8 +93,7 @@ interface IEigenPodManager is IEigenPodManagerEvents, IEigenPodManagerTypes, IShareManager, - IPausable, - ISemVerMixin + IPausable { /** * @notice Creates an EigenPod for the sender. diff --git a/src/contracts/interfaces/IKeyRegistrar.sol b/src/contracts/interfaces/IKeyRegistrar.sol index 79f570cf27..d9f41e3259 100644 --- a/src/contracts/interfaces/IKeyRegistrar.sol +++ b/src/contracts/interfaces/IKeyRegistrar.sol @@ -3,7 +3,6 @@ pragma solidity >=0.5.0; import {OperatorSet} from "../libraries/OperatorSetLib.sol"; import {BN254} from "../libraries/BN254.sol"; -import "./ISemVerMixin.sol"; interface IKeyRegistrarErrors { /// @notice Error thrown when a key is already registered @@ -92,7 +91,7 @@ interface IKeyRegistrarEvents is IKeyRegistrarTypes { /// @dev This contract requires that keys are unique across all operatorSets, globally /// @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, ISemVerMixin { +interface IKeyRegistrar is IKeyRegistrarErrors, IKeyRegistrarEvents { /** * @notice Configures an operator set with curve type * @param operatorSet The operator set to configure diff --git a/src/contracts/interfaces/IPermissionController.sol b/src/contracts/interfaces/IPermissionController.sol index b8e2153736..643d35cbbf 100644 --- a/src/contracts/interfaces/IPermissionController.sol +++ b/src/contracts/interfaces/IPermissionController.sol @@ -1,8 +1,6 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; -import "./ISemVerMixin.sol"; - interface IPermissionControllerErrors { /// @notice Thrown when a non-admin caller attempts to perform an admin-only action. error NotAdmin(); @@ -42,7 +40,7 @@ interface IPermissionControllerEvents { event AdminRemoved(address indexed account, address admin); } -interface IPermissionController is IPermissionControllerErrors, IPermissionControllerEvents, ISemVerMixin { +interface IPermissionController is IPermissionControllerErrors, IPermissionControllerEvents { /** * @notice Sets a pending admin for an account. * @param account The account to set the pending admin for. @@ -145,7 +143,7 @@ interface IPermissionController is IPermissionControllerErrors, IPermissionContr * 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 returns (bool); + 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. diff --git a/src/contracts/interfaces/IProtocolRegistry.sol b/src/contracts/interfaces/IProtocolRegistry.sol new file mode 100644 index 0000000000..9677a070f8 --- /dev/null +++ b/src/contracts/interfaces/IProtocolRegistry.sol @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +interface IProtocolRegistryErrors { + /// @notice Thrown when two array parameters have mismatching lengths. + error InputArrayLengthMismatch(); +} + +interface IProtocolRegistryTypes {} + +interface IProtocolRegistryEvents is IProtocolRegistryTypes { + /// @notice Emitted when the version is set for a given address. + /// @param addr The address for which the version is set. + /// @param semver The semantic version string set for the address. + event VersionSet(address indexed addr, string semver); +} + +interface IProtocolRegistry is IProtocolRegistryErrors, IProtocolRegistryEvents { + /** + * @notice Initializes the ProtocolRegistry with the initial owner. + * @param initialOwner The address to set as the initial owner. + */ + function initialize( + address initialOwner + ) external; + + /** + * @notice Sets the semantic version for a single address. + * @dev Only callable by the contract owner. + * @param addr The address for which to set the version. + * @param semver The semantic version string to set for the address. + */ + function setVersion(address addr, string calldata semver) external; + + /** + * @notice Sets the same semantic version for each address in the provided array. + * @dev Only callable by the contract owner. + * @param addresses The addresses for which to set the version. + * @param semver The semantic version string to set for all addresses. + */ + function setVersions(address[] calldata addresses, string calldata semver) external; + + /** + * @notice Sets a distinct semantic version for each address in the provided array. + * @dev Only callable by the contract owner. + * @param addresses The addresses for which to set the version. + * @param semvers The semantic version strings to set, one for each address. + */ + function setVersions(address[] calldata addresses, string[] calldata semvers) external; + + /** + * @notice Returns the semantic version string for a given address. + * @param addr The address to query. + * @return The semantic version string associated with the address. + */ + function version( + address addr + ) external view returns (string memory); + + /** + * @notice Returns the major version string for a given address. + * @param addr The address to query. + * @return The major version string associated with the address. + */ + function majorVersion( + address addr + ) external view returns (string memory); +} diff --git a/src/contracts/interfaces/IRewardsCoordinator.sol b/src/contracts/interfaces/IRewardsCoordinator.sol index 1baf624e41..bfd30cb803 100644 --- a/src/contracts/interfaces/IRewardsCoordinator.sol +++ b/src/contracts/interfaces/IRewardsCoordinator.sol @@ -10,7 +10,6 @@ import "./IStrategyManager.sol"; import "./IPauserRegistry.sol"; import "./IPermissionController.sol"; import "./IStrategy.sol"; -import "./ISemVerMixin.sol"; interface IRewardsCoordinatorErrors { /// @dev Thrown when msg.sender is not allowed to call a function @@ -272,7 +271,6 @@ interface IRewardsCoordinatorTypes { uint32 MAX_RETROACTIVE_LENGTH; uint32 MAX_FUTURE_LENGTH; uint32 GENESIS_REWARDS_TIMESTAMP; - string version; } } @@ -427,7 +425,7 @@ interface IRewardsCoordinatorEvents is IRewardsCoordinatorTypes { * 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, ISemVerMixin { +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. diff --git a/src/contracts/interfaces/ISignatureUtilsMixin.sol b/src/contracts/interfaces/ISignatureUtilsMixin.sol index 7b9c8c372f..a34e17e475 100644 --- a/src/contracts/interfaces/ISignatureUtilsMixin.sol +++ b/src/contracts/interfaces/ISignatureUtilsMixin.sol @@ -1,8 +1,6 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.5.0; -import "./ISemVerMixin.sol"; - interface ISignatureUtilsMixinErrors { /// @notice Thrown when a signature is invalid. error InvalidSignature(); @@ -37,7 +35,7 @@ interface ISignatureUtilsMixinTypes { * @author Layr Labs, Inc. * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service */ -interface ISignatureUtilsMixin is ISignatureUtilsMixinErrors, ISignatureUtilsMixinTypes, ISemVerMixin { +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: /// - The hardcoded name "EigenLayer" diff --git a/src/contracts/interfaces/IStrategy.sol b/src/contracts/interfaces/IStrategy.sol index bb60597940..0cea069598 100644 --- a/src/contracts/interfaces/IStrategy.sol +++ b/src/contracts/interfaces/IStrategy.sol @@ -3,7 +3,6 @@ pragma solidity >=0.5.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../libraries/SlashingLib.sol"; -import "./ISemVerMixin.sol"; interface IStrategyErrors { /// @dev Thrown when called by an account that is not strategy manager. @@ -48,7 +47,7 @@ interface IStrategyEvents { * @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, ISemVerMixin { +interface IStrategy is IStrategyErrors, IStrategyEvents { /** * @notice Used to deposit tokens into this Strategy * @param token is the ERC20 token being deposited diff --git a/src/contracts/interfaces/IStrategyFactory.sol b/src/contracts/interfaces/IStrategyFactory.sol index c019695b4a..137659cc34 100644 --- a/src/contracts/interfaces/IStrategyFactory.sol +++ b/src/contracts/interfaces/IStrategyFactory.sol @@ -4,7 +4,6 @@ pragma solidity ^0.8.27; import "@openzeppelin/contracts/proxy/beacon/IBeacon.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./IStrategy.sol"; -import "./ISemVerMixin.sol"; /** * @title Interface for the `StrategyFactory` contract. @@ -12,7 +11,7 @@ import "./ISemVerMixin.sol"; * @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 is ISemVerMixin { +interface IStrategyFactory { /// @dev Thrown when attempting to deploy a strategy for a blacklisted token. error BlacklistedToken(); /// @dev Thrown when attempting to deploy a strategy that already exists. diff --git a/src/contracts/interfaces/IStrategyManager.sol b/src/contracts/interfaces/IStrategyManager.sol index 15f0c098f0..05aa079899 100644 --- a/src/contracts/interfaces/IStrategyManager.sol +++ b/src/contracts/interfaces/IStrategyManager.sol @@ -5,7 +5,6 @@ import "./IStrategy.sol"; import "./IShareManager.sol"; import "./IDelegationManager.sol"; import "./IEigenPodManager.sol"; -import "./ISemVerMixin.sol"; interface IStrategyManagerErrors { /// @dev Thrown when total strategies deployed exceeds max. @@ -67,7 +66,7 @@ interface IStrategyManagerEvents { * @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, ISemVerMixin { +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`. diff --git a/src/contracts/mixins/PermissionControllerMixin.sol b/src/contracts/mixins/PermissionControllerMixin.sol index 88fceff918..ab6de40547 100644 --- a/src/contracts/mixins/PermissionControllerMixin.sol +++ b/src/contracts/mixins/PermissionControllerMixin.sol @@ -20,19 +20,31 @@ abstract contract PermissionControllerMixin { modifier checkCanCall( address account ) { - require(_checkCanCall(account), InvalidPermissions()); + _checkCanCall(account); _; } /** - * @notice Checks if the caller is allowed to call a function on behalf of an account. - * @param account the account to check - * @dev `msg.sender` is the caller to check that can call the function on behalf of `account`. - * @dev Returns a bool, instead of reverting + * @notice Checks if the caller (msg.sender) 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 if the caller is not permitted to call the current function on behalf of the given account. + * @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 _checkCanCall( address account - ) internal returns (bool) { + ) internal view { + require(_canCall(account), InvalidPermissions()); + } + + /** + * @notice Checks if the caller (msg.sender) 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. + */ + function _canCall( + address account + ) internal view returns (bool allowed) { return permissionController.canCall(account, msg.sender, address(this), msg.sig); } } diff --git a/src/contracts/multichain/BN254CertificateVerifier.sol b/src/contracts/multichain/BN254CertificateVerifier.sol index 210f4e8474..6be8db7567 100644 --- a/src/contracts/multichain/BN254CertificateVerifier.sol +++ b/src/contracts/multichain/BN254CertificateVerifier.sol @@ -7,7 +7,6 @@ import "../libraries/BN254.sol"; import "../libraries/BN254SignatureVerifier.sol"; import "../libraries/Merkle.sol"; import "../libraries/OperatorSetLib.sol"; -import "../mixins/SemVerMixin.sol"; import "../mixins/LeafCalculatorMixin.sol"; import "./BN254CertificateVerifierStorage.sol"; @@ -17,12 +16,7 @@ import "./BN254CertificateVerifierStorage.sol"; * @dev This contract uses BN254 curves for signature verification and * caches operator information for efficient verification */ -contract BN254CertificateVerifier is - Initializable, - BN254CertificateVerifierStorage, - SemVerMixin, - LeafCalculatorMixin -{ +contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStorage, LeafCalculatorMixin { using Merkle for bytes; using BN254 for BN254.G1Point; @@ -48,12 +42,10 @@ contract BN254CertificateVerifier is * @notice Constructor for the certificate verifier * @dev Disables initializers to prevent implementation initialization * @param _operatorTableUpdater Address authorized to update operator tables - * @param _version The semantic version of the contract */ constructor( - IOperatorTableUpdater _operatorTableUpdater, - string memory _version - ) BN254CertificateVerifierStorage(_operatorTableUpdater) SemVerMixin(_version) { + IOperatorTableUpdater _operatorTableUpdater + ) BN254CertificateVerifierStorage(_operatorTableUpdater) { _disableInitializers(); } diff --git a/src/contracts/multichain/CrossChainRegistry.sol b/src/contracts/multichain/CrossChainRegistry.sol index fb4e62c91b..88d4b173d8 100644 --- a/src/contracts/multichain/CrossChainRegistry.sol +++ b/src/contracts/multichain/CrossChainRegistry.sol @@ -4,7 +4,6 @@ pragma solidity ^0.8.27; import "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin-upgrades/contracts/access/OwnableUpgradeable.sol"; import "../mixins/PermissionControllerMixin.sol"; -import "../mixins/SemVerMixin.sol"; import "../permissions/Pausable.sol"; import "../interfaces/IKeyRegistrar.sol"; import "./CrossChainRegistryStorage.sol"; @@ -20,8 +19,7 @@ contract CrossChainRegistry is OwnableUpgradeable, Pausable, CrossChainRegistryStorage, - PermissionControllerMixin, - SemVerMixin + PermissionControllerMixin { using EnumerableMap for EnumerableMap.UintToAddressMap; using EnumerableSet for EnumerableSet.Bytes32Set; @@ -64,19 +62,16 @@ contract CrossChainRegistry is * @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 - * @param _version The semantic version of the contract */ constructor( IAllocationManager _allocationManager, IKeyRegistrar _keyRegistrar, IPermissionController _permissionController, - IPauserRegistry _pauserRegistry, - string memory _version + IPauserRegistry _pauserRegistry ) CrossChainRegistryStorage(_allocationManager, _keyRegistrar) PermissionControllerMixin(_permissionController) Pausable(_pauserRegistry) - SemVerMixin(_version) { _disableInitializers(); } diff --git a/src/contracts/multichain/OperatorTableUpdater.sol b/src/contracts/multichain/OperatorTableUpdater.sol index 91a4ccb321..5babf85596 100644 --- a/src/contracts/multichain/OperatorTableUpdater.sol +++ b/src/contracts/multichain/OperatorTableUpdater.sol @@ -7,7 +7,6 @@ import "@openzeppelin-upgrades/contracts/security/ReentrancyGuardUpgradeable.sol import "../libraries/Merkle.sol"; import "../permissions/Pausable.sol"; -import "../mixins/SemVerMixin.sol"; import "../mixins/LeafCalculatorMixin.sol"; import "./OperatorTableUpdaterStorage.sol"; @@ -16,7 +15,6 @@ contract OperatorTableUpdater is OwnableUpgradeable, Pausable, OperatorTableUpdaterStorage, - SemVerMixin, LeafCalculatorMixin, ReentrancyGuardUpgradeable { @@ -28,13 +26,8 @@ contract OperatorTableUpdater is constructor( IBN254CertificateVerifier _bn254CertificateVerifier, IECDSACertificateVerifier _ecdsaCertificateVerifier, - IPauserRegistry _pauserRegistry, - string memory _version - ) - OperatorTableUpdaterStorage(_bn254CertificateVerifier, _ecdsaCertificateVerifier) - Pausable(_pauserRegistry) - SemVerMixin(_version) - { + IPauserRegistry _pauserRegistry + ) OperatorTableUpdaterStorage(_bn254CertificateVerifier, _ecdsaCertificateVerifier) Pausable(_pauserRegistry) { _disableInitializers(); } diff --git a/src/contracts/permissions/PermissionController.sol b/src/contracts/permissions/PermissionController.sol index ee367d79d8..46bdea5bde 100644 --- a/src/contracts/permissions/PermissionController.sol +++ b/src/contracts/permissions/PermissionController.sol @@ -2,10 +2,9 @@ pragma solidity ^0.8.27; import "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol"; -import "../mixins/SemVerMixin.sol"; import "./PermissionControllerStorage.sol"; -contract PermissionController is Initializable, SemVerMixin, PermissionControllerStorage { +contract PermissionController is Initializable, PermissionControllerStorage { using EnumerableSet for *; modifier onlyAdmin( @@ -20,9 +19,7 @@ contract PermissionController is Initializable, SemVerMixin, PermissionControlle * INITIALIZING FUNCTIONS * */ - constructor( - string memory _version - ) SemVerMixin(_version) { + constructor() { _disableInitializers(); } diff --git a/src/contracts/pods/EigenPod.sol b/src/contracts/pods/EigenPod.sol index 94117ddca1..626342ddf9 100644 --- a/src/contracts/pods/EigenPod.sol +++ b/src/contracts/pods/EigenPod.sol @@ -7,8 +7,6 @@ import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../libraries/BeaconChainProofs.sol"; -import "../mixins/SemVerMixin.sol"; - import "../interfaces/IETHPOSDeposit.sol"; import "../interfaces/IEigenPodManager.sol"; import "../interfaces/IPausable.sol"; @@ -24,13 +22,7 @@ import "./EigenPodStorage.sol"; * @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, - SemVerMixin -{ +contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingConstants, EigenPodStorage { using SafeERC20 for IERC20; using BeaconChainProofs for *; @@ -105,11 +97,7 @@ contract EigenPod is * CONSTRUCTOR / INIT * */ - constructor( - IETHPOSDeposit _ethPOS, - IEigenPodManager _eigenPodManager, - string memory _version - ) SemVerMixin(_version) { + constructor(IETHPOSDeposit _ethPOS, IEigenPodManager _eigenPodManager) { ethPOS = _ethPOS; eigenPodManager = _eigenPodManager; _disableInitializers(); diff --git a/src/contracts/pods/EigenPodManager.sol b/src/contracts/pods/EigenPodManager.sol index 1c5822e921..a021a06073 100644 --- a/src/contracts/pods/EigenPodManager.sol +++ b/src/contracts/pods/EigenPodManager.sol @@ -8,7 +8,6 @@ import "@openzeppelin-upgrades/contracts/access/OwnableUpgradeable.sol"; import "@openzeppelin-upgrades/contracts/security/ReentrancyGuardUpgradeable.sol"; import "../libraries/SlashingLib.sol"; -import "../mixins/SemVerMixin.sol"; import "../permissions/Pausable.sol"; import "./EigenPodPausingConstants.sol"; import "./EigenPodManagerStorage.sol"; @@ -29,8 +28,7 @@ contract EigenPodManager is Pausable, EigenPodPausingConstants, EigenPodManagerStorage, - ReentrancyGuardUpgradeable, - SemVerMixin + ReentrancyGuardUpgradeable { using SlashingLib for *; using Math for *; @@ -57,13 +55,8 @@ contract EigenPodManager is IETHPOSDeposit _ethPOS, IBeacon _eigenPodBeacon, IDelegationManager _delegationManager, - IPauserRegistry _pauserRegistry, - string memory _version - ) - EigenPodManagerStorage(_ethPOS, _eigenPodBeacon, _delegationManager) - Pausable(_pauserRegistry) - SemVerMixin(_version) - { + IPauserRegistry _pauserRegistry + ) EigenPodManagerStorage(_ethPOS, _eigenPodBeacon, _delegationManager) Pausable(_pauserRegistry) { _disableInitializers(); } diff --git a/src/contracts/strategies/EigenStrategy.sol b/src/contracts/strategies/EigenStrategy.sol index 1bde13901d..e8d47ac910 100644 --- a/src/contracts/strategies/EigenStrategy.sol +++ b/src/contracts/strategies/EigenStrategy.sol @@ -38,9 +38,8 @@ contract EigenStrategy is StrategyBase { /// @notice Since this contract is designed to be initializable, the constructor simply sets `strategyManager`, the only immutable variable. constructor( IStrategyManager _strategyManager, - IPauserRegistry _pauserRegistry, - string memory _version - ) StrategyBase(_strategyManager, _pauserRegistry, _version) {} + IPauserRegistry _pauserRegistry + ) StrategyBase(_strategyManager, _pauserRegistry) {} function initialize(IEigen _EIGEN, IERC20 _bEIGEN) public virtual initializer { EIGEN = _EIGEN; diff --git a/src/contracts/strategies/StrategyBase.sol b/src/contracts/strategies/StrategyBase.sol index 18824c7bb5..09d8c3b55f 100644 --- a/src/contracts/strategies/StrategyBase.sol +++ b/src/contracts/strategies/StrategyBase.sol @@ -3,7 +3,6 @@ pragma solidity ^0.8.27; import "../interfaces/IStrategyManager.sol"; import "../permissions/Pausable.sol"; -import "../mixins/SemVerMixin.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; @@ -29,7 +28,7 @@ import "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol"; * [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, SemVerMixin { +contract StrategyBase is Initializable, Pausable, IStrategy { using SafeERC20 for IERC20; uint8 internal constant PAUSED_DEPOSITS = 0; @@ -70,11 +69,7 @@ contract StrategyBase is Initializable, Pausable, IStrategy, SemVerMixin { } /// @notice Since this contract is designed to be initializable, the constructor simply sets `strategyManager`, the only immutable variable. - constructor( - IStrategyManager _strategyManager, - IPauserRegistry _pauserRegistry, - string memory _version - ) Pausable(_pauserRegistry) SemVerMixin(_version) { + constructor(IStrategyManager _strategyManager, IPauserRegistry _pauserRegistry) Pausable(_pauserRegistry) { strategyManager = _strategyManager; _disableInitializers(); } diff --git a/src/contracts/strategies/StrategyBaseTVLLimits.sol b/src/contracts/strategies/StrategyBaseTVLLimits.sol index 65eca55877..ac972822e8 100644 --- a/src/contracts/strategies/StrategyBaseTVLLimits.sol +++ b/src/contracts/strategies/StrategyBaseTVLLimits.sol @@ -26,9 +26,8 @@ contract StrategyBaseTVLLimits is StrategyBase { // solhint-disable-next-line no-empty-blocks constructor( IStrategyManager _strategyManager, - IPauserRegistry _pauserRegistry, - string memory _version - ) StrategyBase(_strategyManager, _pauserRegistry, _version) {} + IPauserRegistry _pauserRegistry + ) StrategyBase(_strategyManager, _pauserRegistry) {} function initialize( uint256 _maxPerDeposit, diff --git a/src/contracts/strategies/StrategyFactory.sol b/src/contracts/strategies/StrategyFactory.sol index 385bdcd839..20ded2db2e 100644 --- a/src/contracts/strategies/StrategyFactory.sol +++ b/src/contracts/strategies/StrategyFactory.sol @@ -3,7 +3,6 @@ pragma solidity ^0.8.27; import "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol"; import "@openzeppelin-upgrades/contracts/access/OwnableUpgradeable.sol"; -import "../mixins/SemVerMixin.sol"; import "./StrategyFactoryStorage.sol"; import "./StrategyBase.sol"; import "../permissions/Pausable.sol"; @@ -15,18 +14,14 @@ import "../permissions/Pausable.sol"; * @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, SemVerMixin { +contract StrategyFactory is StrategyFactoryStorage, OwnableUpgradeable, Pausable { uint8 internal constant PAUSED_NEW_STRATEGIES = 0; /// @notice EigenLayer's StrategyManager contract 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, - string memory _version - ) Pausable(_pauserRegistry) SemVerMixin(_version) { + constructor(IStrategyManager _strategyManager, IPauserRegistry _pauserRegistry) Pausable(_pauserRegistry) { strategyManager = _strategyManager; _disableInitializers(); } diff --git a/src/contracts/token/Eigen.sol b/src/contracts/token/Eigen.sol index b53b9790b0..cc605a6ac1 100644 --- a/src/contracts/token/Eigen.sol +++ b/src/contracts/token/Eigen.sol @@ -5,9 +5,7 @@ import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin-upgrades/contracts/token/ERC20/extensions/ERC20VotesUpgradeable.sol"; import "@openzeppelin-upgrades/contracts/access/OwnableUpgradeable.sol"; -import "../mixins/SemVerMixin.sol"; - -contract Eigen is OwnableUpgradeable, ERC20VotesUpgradeable, SemVerMixin { +contract Eigen is OwnableUpgradeable, ERC20VotesUpgradeable { /// CONSTANTS & IMMUTABLES /// @notice the address of the backing Eigen token bEIGEN IERC20 public immutable bEIGEN; @@ -40,7 +38,9 @@ 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 + ) { bEIGEN = _bEIGEN; _disableInitializers(); } diff --git a/src/test/harnesses/AllocationManagerHarness.sol b/src/test/harnesses/AllocationManagerHarness.sol index d983fe870e..848a979d43 100644 --- a/src/test/harnesses/AllocationManagerHarness.sol +++ b/src/test/harnesses/AllocationManagerHarness.sol @@ -24,8 +24,7 @@ contract AllocationManagerHarness is AllocationManager { _pauserRegistry, _permissionController, _DEALLOCATION_DELAY, - _ALLOCATION_CONFIGURATION_DELAY, - TestConstants.TEST_VERSION + _ALLOCATION_CONFIGURATION_DELAY ) {} diff --git a/src/test/harnesses/EigenHarness.sol b/src/test/harnesses/EigenHarness.sol index 2252921965..69e81865d2 100644 --- a/src/test/harnesses/EigenHarness.sol +++ b/src/test/harnesses/EigenHarness.sol @@ -5,7 +5,7 @@ import "../../contracts/token/Eigen.sol"; import "../TestConstants.sol"; contract EigenHarness is Eigen { - constructor(IERC20 _bEIGEN) Eigen(_bEIGEN, TestConstants.TEST_VERSION) {} + constructor(IERC20 _bEIGEN) Eigen(_bEIGEN) {} /// expose internal mint function function mint(address to, uint amount) public { diff --git a/src/test/harnesses/EigenPodHarness.sol b/src/test/harnesses/EigenPodHarness.sol index ae912b3a0a..8d590c4447 100644 --- a/src/test/harnesses/EigenPodHarness.sol +++ b/src/test/harnesses/EigenPodHarness.sol @@ -5,9 +5,7 @@ import "../../contracts/pods/EigenPod.sol"; import "forge-std/Test.sol"; contract EigenPodHarness is EigenPod { - constructor(IETHPOSDeposit _ethPOS, IEigenPodManager _eigenPodManager, string memory _version) - EigenPod(_ethPOS, _eigenPodManager, _version) - {} + constructor(IETHPOSDeposit _ethPOS, IEigenPodManager _eigenPodManager) EigenPod(_ethPOS, _eigenPodManager) {} function getActiveValidatorCount() public view returns (uint) { return activeValidatorCount; diff --git a/src/test/harnesses/EigenPodManagerWrapper.sol b/src/test/harnesses/EigenPodManagerWrapper.sol index 34f5738c0f..bc4a8b6d31 100644 --- a/src/test/harnesses/EigenPodManagerWrapper.sol +++ b/src/test/harnesses/EigenPodManagerWrapper.sol @@ -5,13 +5,9 @@ import "../../contracts/pods/EigenPodManager.sol"; ///@notice This contract exposes a manual setter for podShares in order to initialize podShares as negative contract EigenPodManagerWrapper is EigenPodManager { - constructor( - IETHPOSDeposit _ethPOS, - IBeacon _eigenPodBeacon, - IDelegationManager _delegationManager, - IPauserRegistry _pauserRegistry, - string memory _version - ) EigenPodManager(_ethPOS, _eigenPodBeacon, _delegationManager, _pauserRegistry, _version) {} + constructor(IETHPOSDeposit _ethPOS, IBeacon _eigenPodBeacon, IDelegationManager _delegationManager, IPauserRegistry _pauserRegistry) + EigenPodManager(_ethPOS, _eigenPodBeacon, _delegationManager, _pauserRegistry) + {} function setPodOwnerShares(address owner, IEigenPod pod) external { ownerToPod[owner] = pod; diff --git a/src/test/integration/IntegrationDeployer.t.sol b/src/test/integration/IntegrationDeployer.t.sol index 4304a4922d..c7be185cf9 100644 --- a/src/test/integration/IntegrationDeployer.t.sol +++ b/src/test/integration/IntegrationDeployer.t.sol @@ -345,12 +345,11 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { eigenLayerPauserReg, permissionController, DEALLOCATION_DELAY, - ALLOCATION_CONFIGURATION_DELAY, - version + ALLOCATION_CONFIGURATION_DELAY ) ) ); - permissionControllerImplementation = new PermissionController(version); + permissionControllerImplementation = new PermissionController(); delegationManagerImplementation = new DelegationManager( strategyManager, eigenPodManager, @@ -372,18 +371,16 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { MAX_REWARDS_DURATION: REWARDS_COORDINATOR_MAX_REWARDS_DURATION, MAX_RETROACTIVE_LENGTH: REWARDS_COORDINATOR_MAX_RETROACTIVE_LENGTH, MAX_FUTURE_LENGTH: REWARDS_COORDINATOR_MAX_FUTURE_LENGTH, - GENESIS_REWARDS_TIMESTAMP: REWARDS_COORDINATOR_GENESIS_REWARDS_TIMESTAMP, - version: version + GENESIS_REWARDS_TIMESTAMP: REWARDS_COORDINATOR_GENESIS_REWARDS_TIMESTAMP }) ); avsDirectoryImplementation = new AVSDirectory(delegationManager, eigenLayerPauserReg, version); - eigenPodManagerImplementation = - new EigenPodManager(DEPOSIT_CONTRACT, eigenPodBeacon, delegationManager, eigenLayerPauserReg, "9.9.9"); - strategyFactoryImplementation = new StrategyFactory(strategyManager, eigenLayerPauserReg, "9.9.9"); + eigenPodManagerImplementation = new EigenPodManager(DEPOSIT_CONTRACT, eigenPodBeacon, delegationManager, eigenLayerPauserReg); + strategyFactoryImplementation = new StrategyFactory(strategyManager, eigenLayerPauserReg); // Beacon implementations - eigenPodImplementation = new EigenPod(DEPOSIT_CONTRACT, eigenPodManager, "v9.9.9"); - baseStrategyImplementation = new StrategyBase(strategyManager, eigenLayerPauserReg, "v9.9.9"); + eigenPodImplementation = new EigenPod(DEPOSIT_CONTRACT, eigenPodManager); + baseStrategyImplementation = new StrategyBase(strategyManager, eigenLayerPauserReg); // Pre-longtail StrategyBaseTVLLimits implementation // TODO - need to update ExistingDeploymentParser diff --git a/src/test/integration/MultichainIntegrationBase.t.sol b/src/test/integration/MultichainIntegrationBase.t.sol index 7562bc4814..62476f6cea 100644 --- a/src/test/integration/MultichainIntegrationBase.t.sol +++ b/src/test/integration/MultichainIntegrationBase.t.sol @@ -77,7 +77,7 @@ abstract contract MultichainIntegrationBase is IntegrationBase { // Deploy CrossChainRegistry with required dependencies crossChainRegistryImplementation = - new CrossChainRegistry(allocationManager, keyRegistrar, permissionController, eigenLayerPauserReg, "1.0.0"); + new CrossChainRegistry(allocationManager, keyRegistrar, permissionController, eigenLayerPauserReg); crossChainRegistry = CrossChainRegistry( address(new TransparentUpgradeableProxy(address(crossChainRegistryImplementation), address(eigenLayerProxyAdmin), "")) @@ -96,7 +96,7 @@ abstract contract MultichainIntegrationBase is IntegrationBase { OperatorTableUpdater(address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), ""))); // Deploy BN254CertificateVerifier - bn254CertificateVerifierImplementation = new BN254CertificateVerifier(IOperatorTableUpdater(address(operatorTableUpdater)), "1.0.0"); + bn254CertificateVerifierImplementation = new BN254CertificateVerifier(IOperatorTableUpdater(address(operatorTableUpdater))); bn254CertificateVerifier = BN254CertificateVerifier( address(new TransparentUpgradeableProxy(address(bn254CertificateVerifierImplementation), address(eigenLayerProxyAdmin), "")) @@ -113,8 +113,7 @@ abstract contract MultichainIntegrationBase is IntegrationBase { OperatorTableUpdater newOperatorTableUpdaterImplementation = new OperatorTableUpdater( IBN254CertificateVerifier(address(bn254CertificateVerifier)), IECDSACertificateVerifier(address(ecdsaCertificateVerifier)), - eigenLayerPauserReg, - "1.0.0" + eigenLayerPauserReg ); // Upgrade the proxy to use the new implementation with correct addresses diff --git a/src/test/integration/tests/eigenpod/SlashBC_OneBCSF.t.sol b/src/test/integration/tests/eigenpod/SlashBC_OneBCSF.t.sol index c1b1e5a66f..a4159a608e 100644 --- a/src/test/integration/tests/eigenpod/SlashBC_OneBCSF.t.sol +++ b/src/test/integration/tests/eigenpod/SlashBC_OneBCSF.t.sol @@ -36,7 +36,7 @@ contract Integration_SlashBC_OneBCSF is IntegrationCheckUtils { function _init() internal override { // 1. etch a new implementation to set staker's beaconChainSlashingFactor to 1 EigenPodManagerWrapper eigenPodManagerWrapper = - new EigenPodManagerWrapper(DEPOSIT_CONTRACT, eigenPodBeacon, delegationManager, eigenLayerPauserReg, "9.9.9"); + new EigenPodManagerWrapper(DEPOSIT_CONTRACT, eigenPodBeacon, delegationManager, eigenLayerPauserReg); address targetAddr = address(eigenPodManagerImplementation); cheats.etch(targetAddr, address(eigenPodManagerWrapper).code); diff --git a/src/test/unit/AllocationManagerUnit.t.sol b/src/test/unit/AllocationManagerUnit.t.sol index d2caebda0a..e8b4da9a13 100644 --- a/src/test/unit/AllocationManagerUnit.t.sol +++ b/src/test/unit/AllocationManagerUnit.t.sol @@ -67,7 +67,7 @@ contract AllocationManagerUnitTests is EigenLayerUnitTestSetup, IAllocationManag strategyMock = StrategyBase( address( new TransparentUpgradeableProxy( - address(new StrategyBase(IStrategyManager(address(strategyManagerMock)), pauserRegistry, "9.9.9")), + address(new StrategyBase(IStrategyManager(address(strategyManagerMock)), pauserRegistry)), address(eigenLayerProxyAdmin), abi.encodeWithSelector(StrategyBase.initialize.selector, tokenMock) ) @@ -1792,6 +1792,9 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe using OperatorSetLib for *; using SlashingLib for *; + /// @dev Thrown when the caller is not allowed to call a function on behalf of an account. + error InvalidPermissions(); + function test_revert_paused() public { allocationManager.pause(2 ** PAUSED_MODIFY_ALLOCATIONS); cheats.expectRevert(IPausable.CurrentlyPaused.selector); @@ -1800,7 +1803,7 @@ contract AllocationManagerUnitTests_ModifyAllocations is AllocationManagerUnitTe function test_revert_InvalidCaller() public { address invalidOperator = address(0x2); - cheats.expectRevert(InvalidCaller.selector); + cheats.expectRevert(InvalidPermissions.selector); allocationManager.modifyAllocations(invalidOperator, new AllocateParams[](0)); } @@ -3269,6 +3272,8 @@ contract AllocationManagerUnitTests_SetAllocationDelay is AllocationManagerUnitT /// ----------------------------------------------------------------------- /// setAllocationDelay() + getAllocationDelay() /// ----------------------------------------------------------------------- + /// @dev Thrown when the caller is not allowed to call a function on behalf of an account. + error InvalidPermissions(); address operatorToSet = address(0x1); @@ -3285,7 +3290,7 @@ contract AllocationManagerUnitTests_SetAllocationDelay is AllocationManagerUnitT } function test_revert_callerNotAuthorized() public { - cheats.expectRevert(InvalidCaller.selector); + cheats.expectRevert(InvalidPermissions.selector); allocationManager.setAllocationDelay(operatorToSet, 1); } diff --git a/src/test/unit/BN254CertificateVerifierUnit.t.sol b/src/test/unit/BN254CertificateVerifierUnit.t.sol index 09d8c24b4d..5fab075f21 100644 --- a/src/test/unit/BN254CertificateVerifierUnit.t.sol +++ b/src/test/unit/BN254CertificateVerifierUnit.t.sol @@ -60,8 +60,7 @@ contract BN254CertificateVerifierUnitTests is defaultOperatorSetConfig = OperatorSetConfig({owner: operatorSetOwner, maxStalenessPeriod: defaultMaxStaleness}); // Deploy Contracts - bn254CertificateVerifierImplementation = - new BN254CertificateVerifier(IOperatorTableUpdater(address(operatorTableUpdaterMock)), "1.0.0"); + bn254CertificateVerifierImplementation = new BN254CertificateVerifier(IOperatorTableUpdater(address(operatorTableUpdaterMock))); verifier = BN254CertificateVerifier( address(new TransparentUpgradeableProxy(address(bn254CertificateVerifierImplementation), address(eigenLayerProxyAdmin), "")) ); diff --git a/src/test/unit/CrossChainRegistryUnit.t.sol b/src/test/unit/CrossChainRegistryUnit.t.sol index 8c5ee5e252..d88ad2071c 100644 --- a/src/test/unit/CrossChainRegistryUnit.t.sol +++ b/src/test/unit/CrossChainRegistryUnit.t.sol @@ -44,8 +44,7 @@ contract CrossChainRegistryUnitTests is IAllocationManager(address(allocationManagerMock)), IKeyRegistrar(address(keyRegistrar)), IPermissionController(address(permissionController)), - pauserRegistry, - "1.0.0" + pauserRegistry ); // Deploy CrossChainRegistry proxy @@ -147,8 +146,7 @@ contract CrossChainRegistryUnitTests_initialize is CrossChainRegistryUnitTests { IAllocationManager(address(allocationManagerMock)), IKeyRegistrar(address(keyRegistrar)), IPermissionController(address(permissionController)), - pauserRegistry, - "1.0.0" + pauserRegistry ); address newOwner = cheats.randomAddress(); diff --git a/src/test/unit/DelegationUnit.t.sol b/src/test/unit/DelegationUnit.t.sol index ae8ebecac5..8528f2893f 100644 --- a/src/test/unit/DelegationUnit.t.sol +++ b/src/test/unit/DelegationUnit.t.sol @@ -113,7 +113,7 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag // Deploy mock token and strategy tokenMock = new ERC20PresetFixedSupply("Mock Token", "MOCK", tokenMockInitialSupply, address(this)); - strategyImplementation = new StrategyBase(IStrategyManager(address(strategyManagerMock)), pauserRegistry, "9.9.9"); + strategyImplementation = new StrategyBase(IStrategyManager(address(strategyManagerMock)), pauserRegistry); strategyMock = StrategyBase( address( new TransparentUpgradeableProxy( diff --git a/src/test/unit/EigenPodManagerUnit.t.sol b/src/test/unit/EigenPodManagerUnit.t.sol index 1e9e475146..950a4cde5e 100644 --- a/src/test/unit/EigenPodManagerUnit.t.sol +++ b/src/test/unit/EigenPodManagerUnit.t.sol @@ -43,7 +43,7 @@ contract EigenPodManagerUnitTests is EigenLayerUnitTestSetup, IEigenPodManagerEv // Deploy EPM Implementation & Proxy eigenPodManagerImplementation = - new EigenPodManager(ethPOSMock, eigenPodBeacon, IDelegationManager(address(delegationManagerMock)), pauserRegistry, "9.9.9"); + new EigenPodManager(ethPOSMock, eigenPodBeacon, IDelegationManager(address(delegationManagerMock)), pauserRegistry); eigenPodManager = EigenPodManager( address( new TransparentUpgradeableProxy( @@ -233,9 +233,8 @@ contract EigenPodManagerUnitTests_ShareUpdateTests is EigenPodManagerUnitTests { super.setUp(); // Upgrade eigenPodManager to wrapper - eigenPodManagerWrapper = new EigenPodManagerWrapper( - ethPOSMock, eigenPodBeacon, IDelegationManager(address(delegationManagerMock)), pauserRegistry, "9.9.9" - ); + eigenPodManagerWrapper = + new EigenPodManagerWrapper(ethPOSMock, eigenPodBeacon, IDelegationManager(address(delegationManagerMock)), pauserRegistry); eigenLayerProxyAdmin.upgrade(ITransparentUpgradeableProxy(payable(address(eigenPodManager))), address(eigenPodManagerWrapper)); } @@ -424,9 +423,8 @@ contract EigenPodManagerUnitTests_WithdrawSharesAsTokensTests is EigenPodManager super.setUp(); // Upgrade eigenPodManager to wrapper - eigenPodManagerWrapper = new EigenPodManagerWrapper( - ethPOSMock, eigenPodBeacon, IDelegationManager(address(delegationManagerMock)), pauserRegistry, "9.9.9" - ); + eigenPodManagerWrapper = + new EigenPodManagerWrapper(ethPOSMock, eigenPodBeacon, IDelegationManager(address(delegationManagerMock)), pauserRegistry); eigenLayerProxyAdmin.upgrade(ITransparentUpgradeableProxy(payable(address(eigenPodManager))), address(eigenPodManagerWrapper)); } /** @@ -545,9 +543,8 @@ contract EigenPodManagerUnitTests_BeaconChainETHBalanceUpdateTests is EigenPodMa super.setUp(); // Upgrade eigenPodManager to wrapper - eigenPodManagerWrapper = new EigenPodManagerWrapper( - ethPOSMock, eigenPodBeacon, IDelegationManager(address(delegationManagerMock)), pauserRegistry, "9.9.9" - ); + eigenPodManagerWrapper = + new EigenPodManagerWrapper(ethPOSMock, eigenPodBeacon, IDelegationManager(address(delegationManagerMock)), pauserRegistry); eigenLayerProxyAdmin.upgrade(ITransparentUpgradeableProxy(payable(address(eigenPodManager))), address(eigenPodManagerWrapper)); } diff --git a/src/test/unit/EigenPodUnit.t.sol b/src/test/unit/EigenPodUnit.t.sol index 2654fefcd4..1e67290231 100644 --- a/src/test/unit/EigenPodUnit.t.sol +++ b/src/test/unit/EigenPodUnit.t.sol @@ -59,7 +59,7 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, beaconChain = new BeaconChainMock(EigenPodManager(address(eigenPodManagerMock)), GENESIS_TIME_LOCAL); // Deploy EigenPod - podImplementation = new EigenPod(ethPOSDepositMock, IEigenPodManager(address(eigenPodManagerMock)), "v9.9.9"); + podImplementation = new EigenPod(ethPOSDepositMock, IEigenPodManager(address(eigenPodManagerMock))); // Deploy Beacon eigenPodBeacon = new UpgradeableBeacon(address(podImplementation)); @@ -305,7 +305,7 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, contract EigenPodUnitTests_Initialization is EigenPodUnitTests { function test_constructor() public { - EigenPod pod = new EigenPod(ethPOSDepositMock, IEigenPodManager(address(eigenPodManagerMock)), "v9.9.9"); + EigenPod pod = new EigenPod(ethPOSDepositMock, IEigenPodManager(address(eigenPodManagerMock))); assertTrue(pod.ethPOS() == ethPOSDepositMock, "should have set ethPOS correctly"); assertTrue(address(pod.eigenPodManager()) == address(eigenPodManagerMock), "should have set eigenpodmanager correctly"); @@ -331,7 +331,7 @@ contract EigenPodUnitTests_Initialization is EigenPodUnitTests { } function test_initialize_revert_emptyPodOwner() public { - EigenPod pod = new EigenPod(ethPOSDepositMock, IEigenPodManager(address(eigenPodManagerMock)), "v9.9.9"); + EigenPod pod = new EigenPod(ethPOSDepositMock, IEigenPodManager(address(eigenPodManagerMock))); // un-initialize pod cheats.store(address(pod), 0, 0); @@ -1973,7 +1973,7 @@ contract EigenPodHarnessSetup is EigenPodUnitTests { EigenPodUnitTests.setUp(); // Deploy EP Harness - eigenPodHarnessImplementation = new EigenPodHarness(ethPOSDepositMock, IEigenPodManager(address(eigenPodManagerMock)), "v9.9.9"); + eigenPodHarnessImplementation = new EigenPodHarness(ethPOSDepositMock, IEigenPodManager(address(eigenPodManagerMock))); // Upgrade eigenPod to harness UpgradeableBeacon(address(eigenPodBeacon)).upgradeTo(address(eigenPodHarnessImplementation)); diff --git a/src/test/unit/OperatorTableUpdaterUnit.t.sol b/src/test/unit/OperatorTableUpdaterUnit.t.sol index bfd94964a1..02fc962e8d 100644 --- a/src/test/unit/OperatorTableUpdaterUnit.t.sol +++ b/src/test/unit/OperatorTableUpdaterUnit.t.sol @@ -48,8 +48,7 @@ contract OperatorTableUpdaterUnitTests is operatorTableUpdaterImplementation = new OperatorTableUpdater( IBN254CertificateVerifier(address(bn254CertificateVerifierMock)), IECDSACertificateVerifier(address(ecdsaCertificateVerifierMock)), - pauserRegistry, - "1.0.0" + pauserRegistry ); eigenLayerProxyAdmin.upgradeAndCall( diff --git a/src/test/unit/ReleaseManagerUnit.t.sol b/src/test/unit/ReleaseManagerUnit.t.sol index 6d2bc6ab96..920a39d1c9 100644 --- a/src/test/unit/ReleaseManagerUnit.t.sol +++ b/src/test/unit/ReleaseManagerUnit.t.sol @@ -44,7 +44,7 @@ contract ReleaseManagerUnitTests is EigenLayerUnitTestSetup, IReleaseManagerErro vm.warp(1 days); // Deploy ReleaseManager - releaseManager = new ReleaseManager(permissionController, "1.0.0"); + releaseManager = new ReleaseManager(permissionController); // Setup default test data defaultOperatorSet = OperatorSet(defaultAVS, 0); @@ -108,7 +108,6 @@ contract ReleaseManagerUnitTests_Initialization is ReleaseManagerUnitTests { function test_constructor() public { // Test that constructor sets the correct values assertEq(address(releaseManager.permissionController()), address(permissionController), "permissionController not set correctly"); - assertEq(releaseManager.version(), "1.0.0", "version not set correctly"); } } diff --git a/src/test/unit/RewardsCoordinatorUnit.t.sol b/src/test/unit/RewardsCoordinatorUnit.t.sol index 9f98ff320e..bf31c7975d 100644 --- a/src/test/unit/RewardsCoordinatorUnit.t.sol +++ b/src/test/unit/RewardsCoordinatorUnit.t.sol @@ -118,8 +118,7 @@ contract RewardsCoordinatorUnitTests is EigenLayerUnitTestSetup, IRewardsCoordin MAX_REWARDS_DURATION: MAX_REWARDS_DURATION, MAX_RETROACTIVE_LENGTH: MAX_RETROACTIVE_LENGTH, MAX_FUTURE_LENGTH: MAX_FUTURE_LENGTH, - GENESIS_REWARDS_TIMESTAMP: GENESIS_REWARDS_TIMESTAMP, - version: "9.9.9" + GENESIS_REWARDS_TIMESTAMP: GENESIS_REWARDS_TIMESTAMP }) ); @@ -145,7 +144,7 @@ contract RewardsCoordinatorUnitTests is EigenLayerUnitTestSetup, IRewardsCoordin token2 = new ERC20PresetFixedSupply("jeo boden", "MOCK2", mockTokenInitialSupply, address(this)); token3 = new ERC20PresetFixedSupply("pepe wif avs", "MOCK3", mockTokenInitialSupply, address(this)); - strategyImplementation = new StrategyBase(IStrategyManager(address(strategyManagerMock)), pauserRegistry, "9.9.9"); + strategyImplementation = new StrategyBase(IStrategyManager(address(strategyManagerMock)), pauserRegistry); strategyMock1 = StrategyBase( address( new TransparentUpgradeableProxy( diff --git a/src/test/unit/StrategyBaseTVLLimitsUnit.sol b/src/test/unit/StrategyBaseTVLLimitsUnit.sol index 15a8040655..fecc9eeb24 100644 --- a/src/test/unit/StrategyBaseTVLLimitsUnit.sol +++ b/src/test/unit/StrategyBaseTVLLimitsUnit.sol @@ -24,7 +24,7 @@ contract StrategyBaseTVLLimitsUnitTests is StrategyBaseUnitTests { StrategyBaseUnitTests.setUp(); // depoloy the TVL-limited strategy - strategyBaseTVLLimitsImplementation = new StrategyBaseTVLLimits(strategyManager, pauserRegistry, "9.9.9"); + strategyBaseTVLLimitsImplementation = new StrategyBaseTVLLimits(strategyManager, pauserRegistry); strategyWithTVLLimits = StrategyBaseTVLLimits( address( new TransparentUpgradeableProxy( diff --git a/src/test/unit/StrategyBaseUnit.t.sol b/src/test/unit/StrategyBaseUnit.t.sol index aa0e20e36c..6680bde9a7 100644 --- a/src/test/unit/StrategyBaseUnit.t.sol +++ b/src/test/unit/StrategyBaseUnit.t.sol @@ -55,7 +55,7 @@ contract StrategyBaseUnitTests is Test { underlyingToken = new ERC20PresetFixedSupply("Test Token", "TEST", initialSupply, initialOwner); - strategyImplementation = new StrategyBase(strategyManager, pauserRegistry, "9.9.9"); + strategyImplementation = new StrategyBase(strategyManager, pauserRegistry); strategy = StrategyBase( address( @@ -160,7 +160,7 @@ contract StrategyBaseUnitTests is Test { // Deploy token with 1e39 total supply underlyingToken = new ERC20PresetFixedSupply("Test Token", "TEST", 1e39, initialOwner); - strategyImplementation = new StrategyBase(strategyManager, pauserRegistry, "9.9.9"); + strategyImplementation = new StrategyBase(strategyManager, pauserRegistry); strategy = StrategyBase( address( diff --git a/src/test/unit/StrategyFactoryUnit.t.sol b/src/test/unit/StrategyFactoryUnit.t.sol index 65f47e783d..5bc3869927 100644 --- a/src/test/unit/StrategyFactoryUnit.t.sol +++ b/src/test/unit/StrategyFactoryUnit.t.sol @@ -46,12 +46,12 @@ contract StrategyFactoryUnitTests is EigenLayerUnitTestSetup { underlyingToken = new ERC20PresetFixedSupply("Test Token", "TEST", initialSupply, initialOwner); - strategyImplementation = new StrategyBase(IStrategyManager(address(strategyManagerMock)), pauserRegistry, "9.9.9"); + strategyImplementation = new StrategyBase(IStrategyManager(address(strategyManagerMock)), pauserRegistry); strategyBeacon = new UpgradeableBeacon(address(strategyImplementation)); strategyBeacon.transferOwnership(beaconProxyOwner); - strategyFactoryImplementation = new StrategyFactory(IStrategyManager(address(strategyManagerMock)), pauserRegistry, "9.9.9"); + strategyFactoryImplementation = new StrategyFactory(IStrategyManager(address(strategyManagerMock)), pauserRegistry); strategyFactory = StrategyFactory( address( diff --git a/src/test/unit/StrategyManagerUnit.t.sol b/src/test/unit/StrategyManagerUnit.t.sol index d86ea93a85..eace3ca1e1 100644 --- a/src/test/unit/StrategyManagerUnit.t.sol +++ b/src/test/unit/StrategyManagerUnit.t.sol @@ -81,7 +81,7 @@ contract StrategyManagerUnitTests is EigenLayerUnitTestSetup, IStrategyManagerEv public returns (StrategyBase) { - StrategyBase newStrategyImplementation = new StrategyBase(_strategyManager, _pauserRegistry, "9.9.9"); + StrategyBase newStrategyImplementation = new StrategyBase(_strategyManager, _pauserRegistry); StrategyBase newStrategy = StrategyBase(address(new TransparentUpgradeableProxy(address(newStrategyImplementation), address(admin), ""))); newStrategy.initialize(_token); diff --git a/src/test/unit/TaskMailboxUnit.t.sol b/src/test/unit/TaskMailboxUnit.t.sol index 8017a45e12..7c08c8d486 100644 --- a/src/test/unit/TaskMailboxUnit.t.sol +++ b/src/test/unit/TaskMailboxUnit.t.sol @@ -68,7 +68,7 @@ contract TaskMailboxUnitTests is Test, ITaskMailboxTypes, ITaskMailboxErrors, IT // Deploy TaskMailbox with proxy pattern proxyAdmin = new ProxyAdmin(); TaskMailbox taskMailboxImpl = - new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifier), MAX_TASK_SLA, "1.0.0"); + new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifier), MAX_TASK_SLA); TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy( address(taskMailboxImpl), address(proxyAdmin), @@ -176,7 +176,7 @@ contract TaskMailboxUnitTests_Constructor is TaskMailboxUnitTests { // Deploy with proxy pattern ProxyAdmin proxyAdmin = new ProxyAdmin(); - TaskMailbox taskMailboxImpl = new TaskMailbox(bn254Verifier, ecdsaVerifier, MAX_TASK_SLA, "1.0.0"); + TaskMailbox taskMailboxImpl = new TaskMailbox(bn254Verifier, ecdsaVerifier, MAX_TASK_SLA); TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy( address(taskMailboxImpl), address(proxyAdmin), @@ -186,7 +186,6 @@ contract TaskMailboxUnitTests_Constructor is TaskMailboxUnitTests { assertEq(newTaskMailbox.BN254_CERTIFICATE_VERIFIER(), bn254Verifier); assertEq(newTaskMailbox.ECDSA_CERTIFICATE_VERIFIER(), ecdsaVerifier); - assertEq(newTaskMailbox.version(), "1.0.0"); assertEq(newTaskMailbox.owner(), owner); assertEq(newTaskMailbox.feeSplit(), 0); assertEq(newTaskMailbox.feeSplitCollector(), feeSplitCollector); @@ -199,7 +198,7 @@ contract TaskMailboxUnitTests_Constructor is TaskMailboxUnitTests { uint96 customMaxTaskSLA = 14 days; // Deploy with custom MAX_TASK_SLA - TaskMailbox taskMailboxImpl = new TaskMailbox(bn254Verifier, ecdsaVerifier, customMaxTaskSLA, "1.0.0"); + TaskMailbox taskMailboxImpl = new TaskMailbox(bn254Verifier, ecdsaVerifier, customMaxTaskSLA); ProxyAdmin proxyAdmin = new ProxyAdmin(); TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy( address(taskMailboxImpl), @@ -1250,8 +1249,7 @@ contract TaskMailboxUnitTests_submitResult is TaskMailboxUnitTests { // Deploy a new TaskMailbox with the failing verifier using proxy pattern ProxyAdmin proxyAdmin = new ProxyAdmin(); - TaskMailbox taskMailboxImpl = - new TaskMailbox(address(mockFailingVerifier), address(mockECDSACertificateVerifier), MAX_TASK_SLA, "1.0.0"); + TaskMailbox taskMailboxImpl = new TaskMailbox(address(mockFailingVerifier), address(mockECDSACertificateVerifier), MAX_TASK_SLA); TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy( address(taskMailboxImpl), address(proxyAdmin), @@ -1302,7 +1300,7 @@ contract TaskMailboxUnitTests_submitResult is TaskMailboxUnitTests { // Deploy a new TaskMailbox with the failing ECDSA verifier using proxy pattern ProxyAdmin proxyAdmin = new ProxyAdmin(); TaskMailbox taskMailboxImpl = - new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifierFailure), MAX_TASK_SLA, "1.0.0"); + new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifierFailure), MAX_TASK_SLA); TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy( address(taskMailboxImpl), address(proxyAdmin), @@ -3005,7 +3003,6 @@ contract TaskMailboxUnitTests_ViewFunctions is TaskMailboxUnitTests { // Test that we can read the immutable certificate verifiers assertEq(taskMailbox.BN254_CERTIFICATE_VERIFIER(), address(mockBN254CertificateVerifier)); assertEq(taskMailbox.ECDSA_CERTIFICATE_VERIFIER(), address(mockECDSACertificateVerifier)); - assertEq(taskMailbox.version(), "1.0.0"); assertEq(taskMailbox.owner(), owner); // Test fee split getters @@ -3272,8 +3269,7 @@ contract TaskMailboxUnitTests_Upgradeable is TaskMailboxUnitTests { function test_Implementation_CannotBeInitialized() public { // Deploy a new implementation - TaskMailbox newImpl = - new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifier), MAX_TASK_SLA, "1.0.1"); + TaskMailbox newImpl = new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifier), MAX_TASK_SLA); // Try to initialize the implementation directly, should revert vm.expectRevert("Initializable: contract is already initialized"); @@ -3284,18 +3280,11 @@ contract TaskMailboxUnitTests_Upgradeable is TaskMailboxUnitTests { address newOwner = address(0x1234); // Deploy new implementation with different version - TaskMailbox newImpl = - new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifier), MAX_TASK_SLA, "2.0.0"); - - // Check version before upgrade - assertEq(taskMailbox.version(), "1.0.0"); + TaskMailbox newImpl = new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifier), MAX_TASK_SLA); // Upgrade proxy to new implementation proxyAdmin.upgrade(ITransparentUpgradeableProxy(address(taskMailbox)), address(newImpl)); - // Check version after upgrade - assertEq(taskMailbox.version(), "2.0.0"); - // Verify state is preserved (owner should still be the same) assertEq(taskMailbox.owner(), owner); } @@ -3304,8 +3293,7 @@ contract TaskMailboxUnitTests_Upgradeable is TaskMailboxUnitTests { address attacker = address(0x9999); // Deploy new implementation - TaskMailbox newImpl = - new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifier), MAX_TASK_SLA, "2.0.0"); + TaskMailbox newImpl = new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifier), MAX_TASK_SLA); // Try to upgrade from non-owner, should revert vm.prank(attacker); @@ -3339,8 +3327,7 @@ contract TaskMailboxUnitTests_Upgradeable is TaskMailboxUnitTests { assertEq(address(retrievedConfig.taskHook), address(config.taskHook)); // Deploy new implementation - TaskMailbox newImpl = - new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifier), MAX_TASK_SLA, "2.0.0"); + TaskMailbox newImpl = new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifier), MAX_TASK_SLA); // Upgrade vm.prank(address(this)); // proxyAdmin owner @@ -3348,7 +3335,6 @@ contract TaskMailboxUnitTests_Upgradeable is TaskMailboxUnitTests { // Verify all state is preserved after upgrade assertEq(taskMailbox.owner(), newOwner); - assertEq(taskMailbox.version(), "2.0.0"); // Verify the executor operator set config is still there ExecutorOperatorSetTaskConfig memory configAfterUpgrade = taskMailbox.getExecutorOperatorSetTaskConfig(operatorSet); @@ -3361,7 +3347,7 @@ contract TaskMailboxUnitTests_Upgradeable is TaskMailboxUnitTests { function test_InitializerModifier_PreventsReinitialization() public { // Deploy a new proxy without initialization data TransparentUpgradeableProxy uninitializedProxy = new TransparentUpgradeableProxy( - address(new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifier), MAX_TASK_SLA, "1.0.0")), + address(new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifier), MAX_TASK_SLA)), address(new ProxyAdmin()), "" ); diff --git a/src/test/utils/EigenLayerUnitTestSetup.sol b/src/test/utils/EigenLayerUnitTestSetup.sol index 6563d67925..f1fbdc02ea 100644 --- a/src/test/utils/EigenLayerUnitTestSetup.sol +++ b/src/test/utils/EigenLayerUnitTestSetup.sol @@ -70,7 +70,7 @@ abstract contract EigenLayerUnitTestSetup is Test { eigenLayerProxyAdmin = new ProxyAdmin(); // Deploy permission controller - permissionControllerImplementation = new PermissionController("9.9.9"); + permissionControllerImplementation = new PermissionController(); permissionController = PermissionController( address(new TransparentUpgradeableProxy(address(permissionControllerImplementation), address(eigenLayerProxyAdmin), "")) );