├── .example.env ├── .github └── workflows │ ├── claim_remainder.yaml │ └── run-forge-tests.yaml ├── .gitignore ├── .gitmodules ├── README.md ├── audits ├── 2023.02.25 - CertiK.png ├── 2023.05.16 - Omniscia.pdf ├── 2023.07.05 - Nethermind.pdf ├── 2023.10.26 - Solidified.pdf ├── 2023.12.20 - Hats Finance.md ├── 2024.01.11 - Zellic.pdf ├── 2024.03.13 - Zellic.pdf ├── 2024.04.08 - Decurity.pdf ├── 2024.06.25 - Halborn - EtherFi_L2_Governance_Token_Smart_Contract_Security_Assessment_Report.pdf ├── 2024.08.02 - Halborn - EtherFi_EFIP_5_&_EFIP_8_Implementation_Smart_Contract_Security_Assessment.pdf ├── 2024.09.30 - Paladin_EtherFi_OFT_Adapter_Migration.pdf ├── 2024.10.08 - Certora - EtherFi draft.pdf ├── 2025.01.16 - Certora - EETH share inflation by burn shares.pdf ├── 2025.01.23 - Certora - EtherFi - Withdrawal Fee.pdf ├── 2025.03.26 - Certora - EtherFi - Instant Withdrawal Merge into v2.49.pdf ├── 2025.03.26 - Certora - EtherFi - v2.49.pdf ├── 2025.04.12 - Certora - EigenLayer Slashing.pdf ├── 2025.05.07 - Certora - EtherFi - Cumulative Merkle Distributor.pdf ├── NM-0217 - EtherFi Deposit Adapter Contract.md └── NM-0217 - EtherFi Restaking Of stETH Holdings.md ├── cache_hardhat └── solidity-files-cache.json ├── certora ├── config │ └── EtherFiOracle.conf └── specs │ └── EtherFiOracle.spec ├── deployment └── deployed-contracts.json ├── docs ├── .gitignore ├── book.css ├── book.toml ├── solidity.min.js └── src │ ├── README.md │ ├── SUMMARY.md │ └── src │ ├── AuctionManager.sol │ └── contract.AuctionManager.md │ ├── BNFT.sol │ └── contract.BNFT.md │ ├── ClaimReceiverPool.sol │ └── contract.ConversionPool.md │ ├── EETH.sol │ └── contract.EETH.md │ ├── EarlyAdopterPool.sol │ └── contract.EarlyAdopterPool.md │ ├── EtherFiNode.sol │ └── contract.EtherFiNode.md │ ├── EtherFiNodesManager.sol │ └── contract.EtherFiNodesManager.md │ ├── LiquidityPool.sol │ └── contract.LiquidityPool.md │ ├── NodeOperatorManager.sol │ └── contract.NodeOperatorManager.md │ ├── ProtocolRevenueManager.sol │ └── contract.ProtocolRevenueManager.md │ ├── README.md │ ├── StakingManager.sol │ └── contract.StakingManager.md │ ├── TNFT.sol │ └── contract.TNFT.md │ ├── Treasury.sol │ └── contract.Treasury.md │ └── interfaces │ ├── IAuctionManager.sol │ └── interface.IAuctionManager.md │ ├── IBNFT.sol │ └── interface.IBNFT.md │ ├── IDepositContract.sol │ └── interface.IDepositContract.md │ ├── IEETH.sol │ └── interface.IEETH.md │ ├── IEtherFiNode.sol │ └── interface.IEtherFiNode.md │ ├── IEtherFiNodesManager.sol │ └── interface.IEtherFiNodesManager.md │ ├── INodeOperatorManager.sol │ └── interface.INodeOperatorManager.md │ ├── IProtocolRevenueManager.sol │ └── interface.IProtocolRevenueManager.md │ ├── IStakingManager.sol │ └── interface.IStakingManager.md │ ├── ITNFT.sol │ └── interface.ITNFT.md │ ├── ITreasury.sol │ └── interface.ITreasury.md │ ├── IWeth.sol │ └── interface.IWETH.md │ └── README.md ├── documentation └── src │ └── README.md ├── foundry.toml ├── lib ├── BucketLimiter.sol └── Constants.sol ├── operations ├── 20241014_whitelist_RewardsCoordinator_processClaim.json ├── 20241015_update_eEth_fee_recipient_treasury.json ├── 20241018_upgrade_liquifier.json ├── 20241025_update_lockbox_address_executeTransaction.json ├── 20241025_update_lockbox_address_scheduleTransaction.json ├── 20241025_whitelist_DelegationManager.json ├── 20241028_upgrade_liquifier.json ├── 20241203_oft_adapter_upgrade_add_rate_limits │ ├── execute-oft-adapter-upgrade.json │ └── schedule-oft-adapter-upgrade.json ├── 20241212_unpause_liquifier.json ├── 20241212_upgrade_liquifier.json ├── 20241219_native_minting_scroll │ ├── L1NativeMintingExecuteTransactions.json │ ├── L1NativeMintingScheduleTransactions.json │ └── L1NativeMintingSetConfig.json ├── 20250124_update_oracle_committee │ ├── execute_committee_member_replacement.json │ └── schedule_committee_member_replacement.json ├── 20250128_upgrade_instant_withdrawal_execute.json ├── 20250128_upgrade_instant_withdrawal_schedule.json ├── 20250304_whitelist_DelegationManager_completeQueuedWithdrawals │ ├── execute.json │ └── schedule.json ├── 20250413_upgrade_eigenlayer_slashing_execute.json ├── 20250413_upgrade_eigenlayer_slashing_schedule.json ├── 22047042_accept_role_registry_ownership_execute.json ├── 22047042_accept_role_registry_ownership_schedule.json ├── execute-v249-upgrade.json └── schedule-v249-upgrade.json ├── proposals ├── EFIP-1.md ├── EFIP-10.md ├── EFIP-15-OFT-Adapter-Migration.md ├── EFIP-2.md ├── EFIP-3.md ├── EFIP-4.md ├── EFIP-5.md ├── EFIP-6.md ├── EFIP-7.md ├── EFIP-8.md ├── EFIP-template.md ├── README.md └── references │ ├── Liquifier_ pricing of stETH via CurvePool & fixed rate fee.md │ ├── NM-0217-efip1271-for-etherfinode-contract.md │ ├── NM-0217-el-pepe-integration.md │ ├── NM-0217-extension-of-withdrawal-with-EL-m2.md │ ├── NM-0217-seize-withdrawalNFT.md │ ├── NM-0217-whitelisted-delegate-calls-for-efip-10.md │ ├── NM-0217-withdrawal-with-eigenlayer-m2.md │ ├── [NM-0217]-OFT-Security-Upgrades.md │ ├── efip-4-nethermind-review.md │ └── multisig │ └── 20240712_upgrade.json ├── release ├── abis │ ├── AuctionManager.json │ ├── BNFT.json │ ├── EETH.json │ ├── EarlyAdopterPool.json │ ├── EtherFiAdmin.json │ ├── EtherFiNode.json │ ├── EtherFiNodesManager.json │ ├── EtherFiOracle.json │ ├── EtherFiTimelock.json │ ├── LiquidityPool.json │ ├── Liquifier.json │ ├── LoyaltyPointsMarketSafe.json │ ├── MembershipManager.json │ ├── MembershipManagerV0.json │ ├── MembershipNFT.json │ ├── NFTExchange.json │ ├── NodeOperatorManager.json │ ├── ProtocolRevenueManager.json │ ├── RegulationsManager.json │ ├── RegulationsManagerV2.json │ ├── StakingManager.json │ ├── TNFT.json │ ├── TVLOracle.json │ ├── Treasury.json │ ├── UUPSProxy.json │ ├── WithdrawRequestNFT.json │ └── weEth.json └── logs │ ├── EtherFiSuite │ ├── 0.release │ ├── 1.release │ ├── 10.release │ ├── 11.release │ ├── 12.release │ ├── 13.release │ ├── 14.release │ ├── 15.release │ ├── 16.release │ ├── 17.release │ ├── 18.release │ ├── 19.release │ ├── 2.release │ ├── 20.release │ ├── 21.release │ ├── 22.release │ ├── 23.release │ ├── 24.release │ ├── 25.release │ ├── 26.release │ ├── 27.release │ ├── 28.release │ ├── 5.release │ ├── 6.release │ ├── 7.release │ ├── 8.release │ ├── 9.release │ └── version.txt │ └── PhaseOne │ ├── 1.release │ ├── 2.release │ ├── 3.release │ ├── 4.release │ └── version.txt ├── remappings.txt ├── roles.md ├── script ├── ContractCodeChecker.sol ├── Create2Factory.sol ├── DeployEigenlayerSlashing.s.sol ├── DeployOnlyAddressCheck.js ├── DeployPatch2.s.sol ├── Deploy_Instructions_Phase_One.md ├── EigenlayerSlashingUpgrade.s.sol ├── GnosisHelpers.sol ├── Merkletree.js ├── README.md ├── addressConfig.json ├── contracts.json ├── deploys │ ├── BucketRateLimiter.s.sol │ ├── DeployAndPopulateAddressProviderScript.s.sol │ ├── DeployBucketLimiter.s.sol │ ├── DeployCumulativeMerkleRewardsDistributor.sol │ ├── DeployEarlyAdopterPool.s.sol │ ├── DeployEtherFISuite.s.sol │ ├── DeployEtherFiOperationParameters.s.sol │ ├── DeployEtherFiRestaker.s.sol │ ├── DeployEtherFiRewardsRouter.s.sol │ ├── DeployEtherFiViewer.s.sol │ ├── DeployEtherFiWithdrawalBuffer.s.sol │ ├── DeployImplementationContract.s.sol │ ├── DeployLiquifier.s.sol │ ├── DeployLoyaltyPointsMarketSafe.sol │ ├── DeployMultiCall.s.sol │ ├── DeployPhaseOne.s.sol │ ├── DeployPhaseOnePointFive.s.sol │ ├── DeployPhaseTwo.s.sol │ ├── DeployRoleRegistry.s.sol │ ├── DeployTVLOracle.s.sol │ ├── DeployV2Dot49.s.sol │ └── EtherFiTimelock.sol ├── extractABI.sh ├── generateTransactionBatch.sh ├── specialized │ ├── DeployNewNodeOperatorManager.s.sol │ ├── DeployProxyForMock.s.sol │ ├── RegisterValidator.s.sol │ ├── TransferOwnership.s.sol │ ├── UpdateAdminScripts.s.sol │ └── weEth_withdrawal_v2.s.sol ├── upgrade_v1.5.sh └── upgrades │ ├── AuctionManagerUpgradeScript.s.sol │ ├── BNFTUpgradeScript.s.sol │ ├── BucketRateLimiter.s.sol │ ├── EETHUpgradeScript.s.sol │ ├── EtherFiAdminUpgradeScript.s.sol │ ├── EtherFiNodeScript.s.sol │ ├── EtherFiNodesManagerUpgradeScript.s.sol │ ├── EtherFiOracleUpgradeScript.s.sol │ ├── LiquidityPoolUpgradeScript.s.sol │ ├── Liquifier.s.sol │ ├── MembershipManagerUpgradeScript.s.sol │ ├── MembershipNFTUpgradeScript.s.sol │ ├── MultipleValidatorsPerSafe.s.sol │ ├── NFTExchangeUpgradeScript.s.sol │ ├── NodeOperatorManagerUpgradeScript.s.sol │ ├── ProtocolRevenueManagerUpgradeScript.s.sol │ ├── RegulationsManagerUpgradeScript.s.sol │ ├── StakingManagerUpgradeScript.s.sol │ ├── TNFTUpgradeScript.s.sol │ ├── UpgradeForEigenLayerM2.s.sol │ ├── WeETHUpgradeScript.s.sol │ └── WithdrawRequestNFTUpgradeScript.s.sol ├── src ├── AuctionManager.sol ├── BNFT.sol ├── BucketRateLimiter.sol ├── CumulativeMerkleRewardsDistributor.sol ├── DepositAdapter.sol ├── EETH.sol ├── EarlyAdopterPool.sol ├── EtherFiAdmin.sol ├── EtherFiNode.sol ├── EtherFiNodesManager.sol ├── EtherFiOracle.sol ├── EtherFiRedemptionManager.sol ├── EtherFiRestaker.sol ├── EtherFiRewardsRouter.sol ├── EtherFiTimelock.sol ├── LiquidityPool.sol ├── Liquifier.sol ├── LoyaltyPointsMarketSafe.sol ├── MembershipManager.sol ├── MembershipNFT.sol ├── NFTExchange.sol ├── NodeOperatorManager.sol ├── RoleRegistry.sol ├── StakingManager.sol ├── TNFT.sol ├── TVLOracle.sol ├── Treasury.sol ├── UUPSProxy.sol ├── WeETH.sol ├── WithdrawRequestNFT.sol ├── archive │ ├── MembershipManagerV0.sol │ ├── ProtocolRevenueManager.sol │ ├── RegulationsManager.sol │ └── RegulationsManagerV2.sol ├── eigenlayer-interfaces │ ├── IAVSDirectory.sol │ ├── IAVSRegistrar.sol │ ├── IAllocationManager.sol │ ├── IBackingEigen.sol │ ├── IBeaconChainOracle.sol │ ├── IDelayedWithdrawalRouter.sol │ ├── IDelegationFaucet.sol │ ├── IDelegationManager.sol │ ├── IDelegationTerms.sol │ ├── IETHPOSDeposit.sol │ ├── IEigen.sol │ ├── IEigenPod.sol │ ├── IEigenPodManager.sol │ ├── IPausable.sol │ ├── IPauserRegistry.sol │ ├── IPermissionController.sol │ ├── IRewardsCoordinator.sol │ ├── ISemVerMixin.sol │ ├── IShareManager.sol │ ├── ISignatureUtils.sol │ ├── ISignatureUtilsMixin.sol │ ├── ISlasher.sol │ ├── ISocketUpdater.sol │ ├── IStrategy.sol │ ├── IStrategyFactory.sol │ ├── IStrategyManager.sol │ ├── ITimelock.sol │ └── IWhitelister.sol ├── eigenlayer-libraries │ ├── BeaconChainProofs.sol │ ├── BytesLib.sol │ ├── EIP1271SignatureUtils.sol │ ├── EigenlayerMerkle.sol │ ├── Endian.sol │ ├── LegacyBeaconChainProofs.sol │ ├── Merkle.sol │ ├── OperatorSetLib.sol │ ├── SlashingLib.sol │ └── StructuredLinkedList.sol ├── helpers │ ├── AddressProvider.sol │ ├── EtherFiOperationParameters.sol │ └── EtherFiViewer.sol ├── interfaces │ ├── IAuctionManager.sol │ ├── IBNFT.sol │ ├── ICumulativeMerkleRewardsDistributor.sol │ ├── IDepositContract.sol │ ├── IEtherFiAdmin.sol │ ├── IEtherFiNode.sol │ ├── IEtherFiNodesManager.sol │ ├── IEtherFiOracle.sol │ ├── ILiquidityPool.sol │ ├── ILiquifier.sol │ ├── IMembershipManager.sol │ ├── IMembershipManagerV0.sol │ ├── IMembershipNFT.sol │ ├── INodeOperatorManager.sol │ ├── IPausableEF.sol │ ├── IProtocolRevenueManager.sol │ ├── IRateLimiter.sol │ ├── IRateProvider.sol │ ├── IRegulationsManager.sol │ ├── IStakingManager.sol │ ├── ITNFT.sol │ ├── ITVLOracle.sol │ ├── ITreasury.sol │ ├── IWETH.sol │ ├── IWeETH.sol │ ├── IWithdrawRequestNFT.sol │ ├── IeETH.sol │ └── IwstETH.sol └── libraries │ ├── DepositRootGenerator.sol │ └── GlobalIndexLibrary.sol ├── test ├── AddressProvider.t.sol ├── AuctionManager.t.sol ├── BNFT.t.sol ├── BucketRaterLimiter.t.sol ├── ContractCodeChecker.t.sol ├── CumulativeMerkleRewardsDistributor.t.sol ├── DepositAdapter.t.sol ├── EETH.t.sol ├── EigenLayerIntegration.t.sol ├── EtherFiAdminUpgrade.t.sol ├── EtherFiNode.t.sol ├── EtherFiNodesManager.t.sol ├── EtherFiOperationParameters.t.sol ├── EtherFiOracle.t.sol ├── EtherFiRedemptionManager.t.sol ├── EtherFiRestaker.t.sol ├── EtherFiTimelock.sol ├── EtherFiViewer.t.sol ├── L2Constants.sol ├── LiquidityPool.t.sol ├── Liquifier.t.sol ├── MembershipManager.t.sol ├── MembershipManagerV0.t.sol ├── MembershipNFT.t.sol ├── NodeOperatorManager.t.sol ├── RoleRegistry.t.sol ├── StakingManager.t.sol ├── TNFT.t.sol ├── TVLOracle.t.sol ├── TestERC20.sol ├── TestSetup.sol ├── Treasury.t.sol ├── WeETH.t.sol ├── WithdrawRequestNFT.t.sol ├── common │ ├── ArrayTestHelper.sol │ ├── DepositContract.sol │ └── DepositDataGeneration.sol ├── eethPayoutUpgrade.t.sol ├── eethPayoutUpgradeFork.t.sol ├── eigenlayer-mocks │ ├── BeaconChainOracleMock.sol │ ├── ETHDepositMock.sol │ └── IBeaconChainOracleMock.sol ├── eigenlayer-utils │ ├── Operators.sol │ ├── Owners.sol │ ├── ProofParsing.sol │ ├── SignatureCompaction.sol │ └── test-data │ │ ├── BalanceUpdateProof_1256324_8746783.json │ │ ├── BalanceUpdateProof_1293592_8654000.json │ │ ├── BalanceUpdateProof_1293592_8746783.json │ │ ├── BalanceUpdateProof_1644305_1320800.json │ │ ├── ValidatorFieldsProof_1256324_8746783.json │ │ ├── ValidatorFieldsProof_1293592_8654000.json │ │ ├── ValidatorFieldsProof_1293592_8746783.json │ │ ├── ValidatorFieldsProof_1644305_1320800.json │ │ ├── balanceUpdateProof_balance28ETH_302913.json │ │ ├── balanceUpdateProof_notOverCommitted_302913.json │ │ ├── balanceUpdateProof_notOverCommitted_302913_incrementedBlockBy100.json │ │ ├── balanceUpdateProof_updated_to_0ETH_302913.json │ │ ├── balanceUpdateProof_updated_to_30ETH_302913.json │ │ ├── fullWithdrawalCapellaAgainstDenebRoot.json │ │ ├── fullWithdrawalDeneb.json │ │ ├── fullWithdrawalProof_Latest.json │ │ ├── fullWithdrawalProof_Latest_1SlotAdvanced.json │ │ ├── fullWithdrawalProof_Latest_28ETH.json │ │ ├── mainnet_withdrawal_credential_proof_1285801.json │ │ ├── mainnet_withdrawal_credential_proof_1293592.json │ │ ├── mainnet_withdrawal_credential_proof_1293592_1712964563.json │ │ ├── mainnet_withdrawal_credential_proof_1293592_1718734943.json │ │ ├── operators.json │ │ ├── owners.json │ │ ├── partialWithdrawalProof_Latest.json │ │ ├── reputedOwners.json │ │ ├── slashedProofs │ │ ├── balanceUpdateProof_Overcommitted_61511.json │ │ ├── balanceUpdateProof_notOvercommitted_61511.json │ │ └── balanceUpdateProof_notOvercommitted_61511_incrementedBlockBy100.json │ │ ├── withdrawalCredentialAndBalanceProof_61068.json │ │ ├── withdrawalCredentialAndBalanceProof_61336.json │ │ ├── withdrawal_credential_proof_1644305_1317759.json │ │ ├── withdrawal_credential_proof_302913.json │ │ ├── withdrawal_credential_proof_302913_30ETHBalance.json │ │ ├── withdrawal_credential_proof_302913_exited.json │ │ └── withdrawal_credential_proof_510257.json ├── mocks │ ├── MockDelegationManager.sol │ ├── MockDelegationManagerBase.sol │ ├── MockEigenPod.sol │ ├── MockEigenPodBase.sol │ ├── MockEigenPodManager.sol │ ├── MockEigenPodManagerBase.sol │ ├── MockPausableBase.sol │ ├── MockShareManagerBase.sol │ └── MockStrategy.sol └── renzo.t.sol └── workflows ├── deploy-early-adopter.yml ├── deploy-lp.yml ├── deploy-protocol.yml ├── goerli-deploy-phaseOnePointFive.yml ├── goerli-upgrade-auction-manager.yml ├── goerli-upgrade-bnft.yml ├── goerli-upgrade-eeth.yml ├── goerli-upgrade-etherfi-nodes-manager.yml ├── goerli-upgrade-liquidity-pool.yml ├── goerli-upgrade-membership-manager.yml ├── goerli-upgrade-node-operator-manager.yml ├── goerli-upgrade-protocol-revenue-manager.yml ├── goerli-upgrade-regulations-manager.yml ├── goerli-upgrade-staking-manager.yml ├── goerli-upgrade-tnft.yml ├── goerli-upgrade-weth.yml ├── mainnet-deploy-phaseOnePointFive.yml ├── mainnet-upgrade-auction-manager.yml ├── mainnet-upgrade-bnft.yml ├── mainnet-upgrade-eeth.yml ├── mainnet-upgrade-etherfi-nodes-manager.yml ├── mainnet-upgrade-liquidity-pool.yml ├── mainnet-upgrade-membership-manager.yml ├── mainnet-upgrade-node-operator-manager.yml ├── mainnet-upgrade-protocol-revenue-manager.yml ├── mainnet-upgrade-regulations-manager.yml ├── mainnet-upgrade-staking-manager.yml ├── mainnet-upgrade-tnft.yml ├── mainnet-upgrade-weth.yml └── test.yml /.example.env: -------------------------------------------------------------------------------- 1 | GOERLI_RPC_URL= 2 | MAINNET_RPC_URL= 3 | PRIVATE_KEY= 4 | ETHERSCAN_API_KEY= 5 | 6 | TREASURY_ADDRESS= 7 | STAKING_MANAGER_PROXY_ADDRESS= 8 | AUCTION_MANAGER_PROXY_ADDRESS= 9 | TNFT_PROXY_ADDRESS= 10 | BNFT_PROXY_ADDRESS= 11 | EETH_PROXY_ADDRESS= 12 | ETHERFI_NODES_MANAGER_PROXY_ADDRESS= 13 | LIQUIDITY_POOL_PROXY_ADDRESS= 14 | MEMBERSHIP_MANAGER_PROXY_ADDRESS= 15 | MEMBERSHIP_NFT_PROXY_ADDRESS= 16 | NODE_OPERATOR_MANAGER_ADDRESS= 17 | PROTOCOL_REVENUE_MANAGER_PROXY_ADDRESS= 18 | REGULATIONS_MANAGER_PROXY_ADDRESS= 19 | NFT_EXCHANGE= 20 | WEETH_PROXY_ADDRESS= 21 | EARLY_ADOPTER_POOL= 22 | ETHERFI_NODE= 23 | CONTRACT_REGISTRY= 24 | 25 | DEPLOYER= 26 | 27 | BEACON_GENESIS_TIME= -------------------------------------------------------------------------------- /.github/workflows/claim_remainder.yaml: -------------------------------------------------------------------------------- 1 | name: test 2 | 3 | on: 4 | schedule: 5 | - cron: "0 0 * * 1" 6 | workflow_dispatch: 7 | 8 | env: 9 | FOUNDRY_PROFILE: ci 10 | 11 | jobs: 12 | check: 13 | name: Foundry project 14 | runs-on: ubuntu-latest 15 | 16 | 17 | steps: 18 | - uses: actions/checkout@v3 19 | with: 20 | submodules: recursive 21 | 22 | - name: Install Foundry 23 | uses: foundry-rs/foundry-toolchain@v1 24 | with: 25 | version: nightly 26 | 27 | - name: Create logs directory 28 | run: mkdir -p ./release/logs/txns 29 | 30 | - name: Run tests 31 | run: forge test --match-test test_handle_remainder 32 | env: 33 | MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }} 34 | 35 | - name: Upload transaction logs 36 | uses: actions/upload-artifact@v4 37 | if: always() # This ensures the step runs even if tests fail 38 | with: 39 | name: transaction-logs 40 | path: ./release/logs/txns/ 41 | retention-days: 7 # Keeps artifacts for 7 days -------------------------------------------------------------------------------- /.github/workflows/run-forge-tests.yaml: -------------------------------------------------------------------------------- 1 | name: Run Forge Tests 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - staging-2.5 7 | - master 8 | workflow_dispatch: 9 | 10 | 11 | jobs: 12 | check: 13 | name: Foundry project 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | - uses: actions/checkout@v3 18 | with: 19 | submodules: recursive 20 | 21 | - name: Install Foundry 22 | uses: foundry-rs/foundry-toolchain@v1 23 | with: 24 | version: nightly 25 | 26 | - name: Run tests 27 | run: forge test -vvv 28 | env: 29 | MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }} 30 | HISTORICAL_PROOF_812_WITHDRAWAL_RPC_URL: ${{ secrets.HISTORICAL_PROOF_812_WITHDRAWAL_RPC_URL }} 31 | HISTORICAL_PROOF_RPC_URL: ${{ secrets.HISTORICAL_PROOF_RPC_URL }} 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiler files 2 | cache/ 3 | out/ 4 | 5 | # Ignores development broadcast logs 6 | !/broadcast 7 | /broadcast/* 8 | /broadcast/*/31337/ 9 | 10 | # Dotenv file 11 | .env 12 | node_modules 13 | node_modules 14 | .env.* 15 | coverage 16 | coverage.json 17 | typechain 18 | typechain-types 19 | .vscode/ 20 | release/logs/txns/* 21 | 22 | # Hardhat files 23 | cache 24 | artifacts 25 | 26 | .DS_Store 27 | .certora_internal/* 28 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/forge-std"] 2 | path = lib/forge-std 3 | url = https://github.com/foundry-rs/forge-std 4 | [submodule "lib/openzeppelin-contracts.git"] 5 | path = lib/openzeppelin-contracts.git 6 | url = https://github.com/OpenZeppelin/openzeppelin-contracts.git 7 | [submodule "lib/openzeppelin-contracts"] 8 | path = lib/openzeppelin-contracts 9 | url = https://github.com/openzeppelin/openzeppelin-contracts 10 | branch = v4.8.0 11 | [submodule "lib/v3-core"] 12 | path = lib/v3-core 13 | url = https://github.com/Uniswap/v3-core 14 | [submodule "lib/v3-periphery"] 15 | path = lib/v3-periphery 16 | url = https://github.com/Uniswap/v3-periphery 17 | 18 | [submodule "lib/openzeppelin-contracts-upgradeable"] 19 | path = lib/openzeppelin-contracts-upgradeable 20 | url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable 21 | branch = v4.8.2 22 | [submodule "lib/eigenlayer-contracts"] 23 | path = lib/eigenlayer-contracts 24 | url = https://github.com/Layr-Labs/eigenlayer-contracts 25 | [submodule "lib/solady"] 26 | path = lib/solady 27 | url = https://github.com/Vectorized/solady 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ether.fi Liquid Restaking Protocol 2 | 3 | 4 | 5 | ## Overview 6 | 7 | The ether.fi Liquid Restaking Protocol represents the core infrastructure powering ether.fi's vision of becoming the most secure and efficient liquid staking solution in DeFi. This protocol enables: 8 | 9 | - **Liquid Staking**: Seamless ETH staking with immediate liquidity through eETH 10 | - **Native Restaking**: Effortless & Secure restaking of staked ETH. Restaking & AVS management is strictly controlled by the Protocol via ether.fi's AVS operator contracts ([link](https://github.com/etherfi-protocol/etherfi-avs-operator)). Restaking rewards are distributed via KING ([link](https://github.com/orgs/King-Protocol/repositories)) 11 | - **Massive Integration with DeFi**: Wide integration with DeFi protocols 12 | - **Cross-Chain Capabilities**: Native support for cross-chain staking & bridging of weETH ([link](https://github.com/etherfi-protocol/weETH-cross-chain/)) 13 | - **Enterprise-Grade Security**: Rigorous security measures through audits, formal verification, and continuous monitoring 14 | 15 | 16 | ## 🔒 Security 17 | 18 | Security is paramount at ether.fi. Our protocol undergoes: 19 | 20 | - Regular & Continuous audits by industry leaders 21 | - Formal verification through Certora 22 | - Continuous monitoring and testing 23 | 24 | 25 | 26 | ## 🛠️ Development Setup 27 | 28 | 29 | ```bash 30 | # Install & Setup 31 | curl -L https://foundry.paradigm.xyz | bash 32 | git clone https://github.com/etherfi-protocol/smart-contracts.git && cd smart-contracts 33 | git submodule update --init --recursive 34 | forge build 35 | 36 | # Testing 37 | forge test # Run all tests 38 | forge test --fork-url # Fork testing 39 | certoraRun certora/conf/.conf # Formal verification 40 | ``` 41 | 42 | ## 📚 Documentation 43 | 44 | - [Protocol Documentation](https://etherfi.gitbook.io/etherfi/) 45 | 46 | 47 | 48 | ## 📄 License 49 | 50 | ether.fi is open-source and licensed under the [MIT License](LICENSE). 51 | 52 | --- 53 | 54 |

Built with ❤️ by the ether.fi team

-------------------------------------------------------------------------------- /audits/2023.02.25 - CertiK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etherfi-protocol/smart-contracts/3666d0e4723b5f3a34ec9619a2decfb18f996e12/audits/2023.02.25 - CertiK.png -------------------------------------------------------------------------------- /audits/2023.05.16 - Omniscia.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etherfi-protocol/smart-contracts/3666d0e4723b5f3a34ec9619a2decfb18f996e12/audits/2023.05.16 - Omniscia.pdf -------------------------------------------------------------------------------- /audits/2023.07.05 - Nethermind.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etherfi-protocol/smart-contracts/3666d0e4723b5f3a34ec9619a2decfb18f996e12/audits/2023.07.05 - Nethermind.pdf -------------------------------------------------------------------------------- /audits/2023.10.26 - Solidified.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etherfi-protocol/smart-contracts/3666d0e4723b5f3a34ec9619a2decfb18f996e12/audits/2023.10.26 - Solidified.pdf -------------------------------------------------------------------------------- /audits/2024.01.11 - Zellic.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etherfi-protocol/smart-contracts/3666d0e4723b5f3a34ec9619a2decfb18f996e12/audits/2024.01.11 - Zellic.pdf -------------------------------------------------------------------------------- /audits/2024.03.13 - Zellic.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etherfi-protocol/smart-contracts/3666d0e4723b5f3a34ec9619a2decfb18f996e12/audits/2024.03.13 - Zellic.pdf -------------------------------------------------------------------------------- /audits/2024.04.08 - Decurity.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etherfi-protocol/smart-contracts/3666d0e4723b5f3a34ec9619a2decfb18f996e12/audits/2024.04.08 - Decurity.pdf -------------------------------------------------------------------------------- /audits/2024.06.25 - Halborn - EtherFi_L2_Governance_Token_Smart_Contract_Security_Assessment_Report.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etherfi-protocol/smart-contracts/3666d0e4723b5f3a34ec9619a2decfb18f996e12/audits/2024.06.25 - Halborn - EtherFi_L2_Governance_Token_Smart_Contract_Security_Assessment_Report.pdf -------------------------------------------------------------------------------- /audits/2024.08.02 - Halborn - EtherFi_EFIP_5_&_EFIP_8_Implementation_Smart_Contract_Security_Assessment.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etherfi-protocol/smart-contracts/3666d0e4723b5f3a34ec9619a2decfb18f996e12/audits/2024.08.02 - Halborn - EtherFi_EFIP_5_&_EFIP_8_Implementation_Smart_Contract_Security_Assessment.pdf -------------------------------------------------------------------------------- /audits/2024.09.30 - Paladin_EtherFi_OFT_Adapter_Migration.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etherfi-protocol/smart-contracts/3666d0e4723b5f3a34ec9619a2decfb18f996e12/audits/2024.09.30 - Paladin_EtherFi_OFT_Adapter_Migration.pdf -------------------------------------------------------------------------------- /audits/2024.10.08 - Certora - EtherFi draft.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etherfi-protocol/smart-contracts/3666d0e4723b5f3a34ec9619a2decfb18f996e12/audits/2024.10.08 - Certora - EtherFi draft.pdf -------------------------------------------------------------------------------- /audits/2025.01.16 - Certora - EETH share inflation by burn shares.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etherfi-protocol/smart-contracts/3666d0e4723b5f3a34ec9619a2decfb18f996e12/audits/2025.01.16 - Certora - EETH share inflation by burn shares.pdf -------------------------------------------------------------------------------- /audits/2025.01.23 - Certora - EtherFi - Withdrawal Fee.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etherfi-protocol/smart-contracts/3666d0e4723b5f3a34ec9619a2decfb18f996e12/audits/2025.01.23 - Certora - EtherFi - Withdrawal Fee.pdf -------------------------------------------------------------------------------- /audits/2025.03.26 - Certora - EtherFi - Instant Withdrawal Merge into v2.49.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etherfi-protocol/smart-contracts/3666d0e4723b5f3a34ec9619a2decfb18f996e12/audits/2025.03.26 - Certora - EtherFi - Instant Withdrawal Merge into v2.49.pdf -------------------------------------------------------------------------------- /audits/2025.03.26 - Certora - EtherFi - v2.49.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etherfi-protocol/smart-contracts/3666d0e4723b5f3a34ec9619a2decfb18f996e12/audits/2025.03.26 - Certora - EtherFi - v2.49.pdf -------------------------------------------------------------------------------- /audits/2025.04.12 - Certora - EigenLayer Slashing.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etherfi-protocol/smart-contracts/3666d0e4723b5f3a34ec9619a2decfb18f996e12/audits/2025.04.12 - Certora - EigenLayer Slashing.pdf -------------------------------------------------------------------------------- /audits/2025.05.07 - Certora - EtherFi - Cumulative Merkle Distributor.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etherfi-protocol/smart-contracts/3666d0e4723b5f3a34ec9619a2decfb18f996e12/audits/2025.05.07 - Certora - EtherFi - Cumulative Merkle Distributor.pdf -------------------------------------------------------------------------------- /audits/NM-0217 - EtherFi Restaking Of stETH Holdings.md: -------------------------------------------------------------------------------- 1 | # [NM-0217] Restaking of stETH holdings 2 | 3 | **File(s)**: [EtherFiRestaker.sol](https://github.com/etherfi-protocol/smart-contracts/blob/41836a2523b735fab8aad8ebfe4b25ed81fbc367/src/EtherFiRestaker.sol#L19), [Liquifier.sol](https://github.com/etherfi-protocol/smart-contracts/blob/41836a2523b735fab8aad8ebfe4b25ed81fbc367/src/Liquifier.sol#L50), 4 | [ILiquifier.sol](https://github.com/etherfi-protocol/smart-contracts/blob/41836a2523b735fab8aad8ebfe4b25ed81fbc367/src/interfaces/ILiquifier.sol) 5 | 6 | ### Summary 7 | 8 | Restaking of stETH holdings. Ether.fi is holding ~250k stETH in deVamp contract. However, it is suffering from the low capital efficiency being not deployed to EigenLayer restaking. This PR addresses this issue. 9 | 10 | --- 11 | 12 | ### Findings 13 | 14 | ### [Best practice] Lack of access control in the `undelegate` function 15 | 16 | **File(s)**: [EtherFiRestaker.sol](https://github.com/etherfi-protocol/smart-contracts/blob/41836a2523b735fab8aad8ebfe4b25ed81fbc367/src/EtherFiRestaker.sol#L147) 17 | 18 | **Description**: The `EtherFiRestaker::undelegate` function lacks access controls. The call will still revert because of the `onlyOwner` modifier that's used on the `queueWithdrawals` function, but this is the only "main" function in the contract without access controls. 19 | 20 | **Recommendation(s)**: Consider adding access control to this function. 21 | 22 | **Update from client**: fixed 23 | 24 | --- 25 | 26 | ### [Best practice] Typo in function name `getEthAmountInEigenLayerPnedingForWithdrawals` 27 | 28 | **File(s)**: [EtherFiRestaker.sol](https://github.com/etherfi-protocol/smart-contracts/blob/41836a2523b735fab8aad8ebfe4b25ed81fbc367/src/EtherFiRestaker.sol#L330) 29 | 30 | **Description**: The function name has a typo `getEthAmountInEigenLayerPnedingForWithdrawals`. Instead if Pending, it is written Pneding. 31 | 32 | **Recommendation(s)**: Rename the function accordingly. 33 | 34 | **Update from client**: fixed 35 | 36 | --- 37 | -------------------------------------------------------------------------------- /certora/config/EtherFiOracle.conf: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "src/EtherFiOracle.sol" 4 | ], 5 | "packages": [ 6 | "@openzeppelin=lib/openzeppelin-contracts", 7 | "@openzeppelin-upgradeable=lib/openzeppelin-contracts-upgradeable", 8 | "forge-std=lib/forge-std/src", 9 | "./interfaces=src/interfaces" 10 | ], 11 | "verify": "EtherFiOracle:certora/specs/EtherFiOracle.spec", 12 | "rule_sanity": "basic", 13 | "optimistic_loop": true, 14 | "loop_iter": "3", 15 | "msg": "Invariant and parametric examples" 16 | } -------------------------------------------------------------------------------- /deployment/deployed-contracts.json: -------------------------------------------------------------------------------- 1 | { 2 | "EtherFiRedemptionManagerImplementation": "0xe6f40295A7500509faD08E924c91b0F050a7b84b", 3 | "EtherFiRedemptionManagerInstance": "0xDadEf1fFBFeaAB4f68A9fD181395F68b4e4E7Ae0", 4 | "EtherFiAdminImplementation": "0x683583979C8be7Bcfa41E788Ab38857dfF792f49", 5 | "EtherFiRewardsRouterImplementation": "0xe94bF0DF71002ff0165CF4daB461dEBC3978B0fa", 6 | "LiquidityPoolImplementation": "0xA6099d83A67a2c653feB5e4e48ec24C5aeE1C515", 7 | "WeETHImplementation": "0x353E98F34b6E5a8D9d1876Bf6dF01284d05837cB", 8 | "WithdrawRequestNFTImplementation": "0x685870a508b56c7f1002EEF5eFCFa01304474F61", 9 | "EtherFiNodesManagerImplementation": "0x572E25fD70b6eB9a3CaD1CE1D48E3CfB938767F1" 10 | } -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | book/ -------------------------------------------------------------------------------- /docs/book.css: -------------------------------------------------------------------------------- 1 | table { 2 | margin: 0 auto; 3 | border-collapse: collapse; 4 | width: 100%; 5 | } 6 | 7 | table td:first-child { 8 | width: 15%; 9 | } 10 | 11 | table td:nth-child(2) { 12 | width: 25%; 13 | } -------------------------------------------------------------------------------- /docs/book.toml: -------------------------------------------------------------------------------- 1 | [book] 2 | src = 'src' 3 | title = '' 4 | [output.html] 5 | no-section-label = true 6 | additional-js = ['solidity.min.js'] 7 | additional-css = ['book.css'] 8 | git-repository-url = 'https://github.com/GadzeFinance/dappContracts' 9 | 10 | [output.html.fold] 11 | enable = true 12 | -------------------------------------------------------------------------------- /docs/src/SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | - [Home](README.md) 3 | # src 4 | - [❱ interfaces](src/interfaces/README.md) 5 | - [IAuctionManager](src/interfaces/IAuctionManager.sol/interface.IAuctionManager.md) 6 | - [IBNFT](src/interfaces/IBNFT.sol/interface.IBNFT.md) 7 | - [IDepositContract](src/interfaces/IDepositContract.sol/interface.IDepositContract.md) 8 | - [IEETH](src/interfaces/IEETH.sol/interface.IEETH.md) 9 | - [IEtherFiNode](src/interfaces/IEtherFiNode.sol/interface.IEtherFiNode.md) 10 | - [IEtherFiNodesManager](src/interfaces/IEtherFiNodesManager.sol/interface.IEtherFiNodesManager.md) 11 | - [INodeOperatorManager](src/interfaces/INodeOperatorManager.sol/interface.INodeOperatorManager.md) 12 | - [IProtocolRevenueManager](src/interfaces/IProtocolRevenueManager.sol/interface.IProtocolRevenueManager.md) 13 | - [IStakingManager](src/interfaces/IStakingManager.sol/interface.IStakingManager.md) 14 | - [ITNFT](src/interfaces/ITNFT.sol/interface.ITNFT.md) 15 | - [ITreasury](src/interfaces/ITreasury.sol/interface.ITreasury.md) 16 | - [IWETH](src/interfaces/IWeth.sol/interface.IWETH.md) 17 | - [AuctionManager](src/AuctionManager.sol/contract.AuctionManager.md) 18 | - [BNFT](src/BNFT.sol/contract.BNFT.md) 19 | - [ConversionPool](src/ClaimReceiverPool.sol/contract.ConversionPool.md) 20 | - [EETH](src/EETH.sol/contract.EETH.md) 21 | - [EarlyAdopterPool](src/EarlyAdopterPool.sol/contract.EarlyAdopterPool.md) 22 | - [EtherFiNode](src/EtherFiNode.sol/contract.EtherFiNode.md) 23 | - [EtherFiNodesManager](src/EtherFiNodesManager.sol/contract.EtherFiNodesManager.md) 24 | - [LiquidityPool](src/LiquidityPool.sol/contract.LiquidityPool.md) 25 | - [NodeOperatorManager](src/NodeOperatorManager.sol/contract.NodeOperatorManager.md) 26 | - [ProtocolRevenueManager](src/ProtocolRevenueManager.sol/contract.ProtocolRevenueManager.md) 27 | - [StakingManager](src/StakingManager.sol/contract.StakingManager.md) 28 | - [TNFT](src/TNFT.sol/contract.TNFT.md) 29 | - [Treasury](src/Treasury.sol/contract.Treasury.md) 30 | -------------------------------------------------------------------------------- /docs/src/src/BNFT.sol/contract.BNFT.md: -------------------------------------------------------------------------------- 1 | # BNFT 2 | [Git Source](https://github.com/GadzeFinance/dappContracts/blob/c722006f91e5a8b00322356d0c967de90bbae6e0/src/BNFT.sol) 3 | 4 | **Inherits:** 5 | ERC721 6 | 7 | 8 | ## State Variables 9 | ### tokenIds 10 | 11 | ```solidity 12 | uint256 private tokenIds; 13 | ``` 14 | 15 | 16 | ### nftValue 17 | 18 | ```solidity 19 | uint256 public nftValue = 0.002 ether; 20 | ``` 21 | 22 | 23 | ### stakingManagerContractAddress 24 | 25 | ```solidity 26 | address public stakingManagerContractAddress; 27 | ``` 28 | 29 | 30 | ## Functions 31 | ### constructor 32 | 33 | 34 | ```solidity 35 | constructor() ERC721("Bond NFT", "BNFT"); 36 | ``` 37 | 38 | ### mint 39 | 40 | 41 | ```solidity 42 | function mint(address _reciever, uint256 _validatorId) external onlyStakingManagerContract; 43 | ``` 44 | 45 | ### transferFrom 46 | 47 | 48 | ```solidity 49 | function transferFrom(address from, address to, uint256 tokenId) public virtual override(ERC721); 50 | ``` 51 | 52 | ### onlyStakingManagerContract 53 | 54 | 55 | ```solidity 56 | modifier onlyStakingManagerContract(); 57 | ``` 58 | 59 | -------------------------------------------------------------------------------- /docs/src/src/EETH.sol/contract.EETH.md: -------------------------------------------------------------------------------- 1 | # EETH 2 | [Git Source](https://github.com/GadzeFinance/dappContracts/blob/c722006f91e5a8b00322356d0c967de90bbae6e0/src/EETH.sol) 3 | 4 | **Inherits:** 5 | ERC20 6 | 7 | 8 | ## State Variables 9 | ### liquidityPool 10 | 11 | ```solidity 12 | address public liquidityPool; 13 | ``` 14 | 15 | 16 | ## Functions 17 | ### constructor 18 | 19 | 20 | ```solidity 21 | constructor(address _liquidityPool) ERC20("EtherFi ETH", "eETH"); 22 | ``` 23 | 24 | ### mint 25 | 26 | function to mint eETH 27 | 28 | *only able to mint from LiquidityPool contract* 29 | 30 | 31 | ```solidity 32 | function mint(address _account, uint256 _amount) external onlyPoolContract; 33 | ``` 34 | 35 | ### burn 36 | 37 | function to burn eETH 38 | 39 | *only able to burn from LiquidityPool contract* 40 | 41 | 42 | ```solidity 43 | function burn(address _account, uint256 _amount) external onlyPoolContract; 44 | ``` 45 | 46 | ### onlyPoolContract 47 | 48 | 49 | ```solidity 50 | modifier onlyPoolContract(); 51 | ``` 52 | 53 | -------------------------------------------------------------------------------- /docs/src/src/LiquidityPool.sol/contract.LiquidityPool.md: -------------------------------------------------------------------------------- 1 | # LiquidityPool 2 | [Git Source](https://github.com/GadzeFinance/dappContracts/blob/c722006f91e5a8b00322356d0c967de90bbae6e0/src/LiquidityPool.sol) 3 | 4 | **Inherits:** 5 | Ownable 6 | 7 | 8 | ## State Variables 9 | ### eETH 10 | 11 | ```solidity 12 | address public eETH; 13 | ``` 14 | 15 | 16 | ## Functions 17 | ### constructor 18 | 19 | initializes owner address 20 | 21 | 22 | ```solidity 23 | constructor(); 24 | ``` 25 | 26 | ### setTokenAddress 27 | 28 | sets the contract address for eETH 29 | 30 | *can't do it in constructor due to circular dependencies* 31 | 32 | 33 | ```solidity 34 | function setTokenAddress(address _eETH) external; 35 | ``` 36 | **Parameters** 37 | 38 | |Name|Type|Description| 39 | |----|----|-----------| 40 | |`_eETH`|`address`|address of eETH contract| 41 | 42 | 43 | ### deposit 44 | 45 | deposit into pool 46 | 47 | *mints the amount of eTH 1:1 with ETH sent* 48 | 49 | 50 | ```solidity 51 | function deposit() external payable; 52 | ``` 53 | 54 | ### withdraw 55 | 56 | withdraw from pool 57 | 58 | *Burns user balance from msg.senders account & Sends equal amount of ETH back to user* 59 | 60 | 61 | ```solidity 62 | function withdraw(uint256 _amount) external payable; 63 | ``` 64 | **Parameters** 65 | 66 | |Name|Type|Description| 67 | |----|----|-----------| 68 | |`_amount`|`uint256`|the amount to withdraw from contract| 69 | 70 | 71 | ### receive 72 | 73 | Allows ether to be sent to this contract 74 | 75 | 76 | ```solidity 77 | receive() external payable; 78 | ``` 79 | 80 | ## Events 81 | ### Received 82 | 83 | ```solidity 84 | event Received(address indexed sender, uint256 value); 85 | ``` 86 | 87 | ### TokenAddressChanged 88 | 89 | ```solidity 90 | event TokenAddressChanged(address indexed newAddress); 91 | ``` 92 | 93 | ### Deposit 94 | 95 | ```solidity 96 | event Deposit(address indexed sender, uint256 amount); 97 | ``` 98 | 99 | ### Withdraw 100 | 101 | ```solidity 102 | event Withdraw(address indexed sender, uint256 amount); 103 | ``` 104 | 105 | -------------------------------------------------------------------------------- /docs/src/src/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Contents 4 | - [interfaces](/src/interfaces) 5 | - [AuctionManager](AuctionManager.sol/contract.AuctionManager.md) 6 | - [BNFT](BNFT.sol/contract.BNFT.md) 7 | - [ConversionPool](ClaimReceiverPool.sol/contract.ConversionPool.md) 8 | - [EETH](EETH.sol/contract.EETH.md) 9 | - [EarlyAdopterPool](EarlyAdopterPool.sol/contract.EarlyAdopterPool.md) 10 | - [EtherFiNode](EtherFiNode.sol/contract.EtherFiNode.md) 11 | - [EtherFiNodesManager](EtherFiNodesManager.sol/contract.EtherFiNodesManager.md) 12 | - [LiquidityPool](LiquidityPool.sol/contract.LiquidityPool.md) 13 | - [NodeOperatorManager](NodeOperatorManager.sol/contract.NodeOperatorManager.md) 14 | - [ProtocolRevenueManager](ProtocolRevenueManager.sol/contract.ProtocolRevenueManager.md) 15 | - [StakingManager](StakingManager.sol/contract.StakingManager.md) 16 | - [TNFT](TNFT.sol/contract.TNFT.md) 17 | - [Treasury](Treasury.sol/contract.Treasury.md) 18 | -------------------------------------------------------------------------------- /docs/src/src/TNFT.sol/contract.TNFT.md: -------------------------------------------------------------------------------- 1 | # TNFT 2 | [Git Source](https://github.com/GadzeFinance/dappContracts/blob/c722006f91e5a8b00322356d0c967de90bbae6e0/src/TNFT.sol) 3 | 4 | **Inherits:** 5 | ERC721 6 | 7 | 8 | ## State Variables 9 | ### tokenIds 10 | 11 | ```solidity 12 | uint256 private tokenIds; 13 | ``` 14 | 15 | 16 | ### nftValue 17 | 18 | ```solidity 19 | uint256 public nftValue; 20 | ``` 21 | 22 | 23 | ### stakingManagerContractAddress 24 | 25 | ```solidity 26 | address public stakingManagerContractAddress; 27 | ``` 28 | 29 | 30 | ## Functions 31 | ### constructor 32 | 33 | 34 | ```solidity 35 | constructor() ERC721("Transferrable NFT", "TNFT"); 36 | ``` 37 | 38 | ### mint 39 | 40 | 41 | ```solidity 42 | function mint(address _reciever, uint256 _validatorId) external onlyStakingManagerContract; 43 | ``` 44 | 45 | ### onlyStakingManagerContract 46 | 47 | 48 | ```solidity 49 | modifier onlyStakingManagerContract(); 50 | ``` 51 | 52 | -------------------------------------------------------------------------------- /docs/src/src/Treasury.sol/contract.Treasury.md: -------------------------------------------------------------------------------- 1 | # Treasury 2 | [Git Source](https://github.com/GadzeFinance/dappContracts/blob/c722006f91e5a8b00322356d0c967de90bbae6e0/src/Treasury.sol) 3 | 4 | **Inherits:** 5 | [ITreasury](/src/interfaces/ITreasury.sol/interface.ITreasury.md), Ownable 6 | 7 | 8 | ## Functions 9 | ### withdraw 10 | 11 | Function allows only the owner to withdraw all the funds in the contract 12 | 13 | 14 | ```solidity 15 | function withdraw(uint256 _amount) external onlyOwner; 16 | ``` 17 | 18 | ### receive 19 | 20 | 21 | ```solidity 22 | receive() external payable; 23 | ``` 24 | 25 | -------------------------------------------------------------------------------- /docs/src/src/interfaces/IAuctionManager.sol/interface.IAuctionManager.md: -------------------------------------------------------------------------------- 1 | # IAuctionManager 2 | [Git Source](https://github.com/GadzeFinance/dappContracts/blob/c722006f91e5a8b00322356d0c967de90bbae6e0/src/interfaces/IAuctionManager.sol) 3 | 4 | 5 | ## Functions 6 | ### createBid 7 | 8 | 9 | ```solidity 10 | function createBid(uint256 _bidSize, uint256 _bidAmount) external payable returns (uint256[] memory); 11 | ``` 12 | 13 | ### updateSelectedBidInformation 14 | 15 | 16 | ```solidity 17 | function updateSelectedBidInformation(uint256 _bidId) external; 18 | ``` 19 | 20 | ### cancelBid 21 | 22 | 23 | ```solidity 24 | function cancelBid(uint256 _bidId) external; 25 | ``` 26 | 27 | ### getBidOwner 28 | 29 | 30 | ```solidity 31 | function getBidOwner(uint256 _bidId) external view returns (address); 32 | ``` 33 | 34 | ### reEnterAuction 35 | 36 | 37 | ```solidity 38 | function reEnterAuction(uint256 _bidId) external; 39 | ``` 40 | 41 | ### setStakingManagerContractAddress 42 | 43 | 44 | ```solidity 45 | function setStakingManagerContractAddress(address _stakingManagerContractAddress) external; 46 | ``` 47 | 48 | ### processAuctionFeeTransfer 49 | 50 | 51 | ```solidity 52 | function processAuctionFeeTransfer(uint256 _validatorId) external; 53 | ``` 54 | 55 | ### isBidActive 56 | 57 | 58 | ```solidity 59 | function isBidActive(uint256 _bidId) external view returns (bool); 60 | ``` 61 | 62 | ### numberOfActiveBids 63 | 64 | 65 | ```solidity 66 | function numberOfActiveBids() external view returns (uint256); 67 | ``` 68 | 69 | ### setProtocolRevenueManager 70 | 71 | 72 | ```solidity 73 | function setProtocolRevenueManager(address _protocolRevenueManager) external; 74 | ``` 75 | 76 | ## Structs 77 | ### Bid 78 | 79 | ```solidity 80 | struct Bid { 81 | uint256 amount; 82 | uint64 bidderPubKeyIndex; 83 | address bidderAddress; 84 | bool isActive; 85 | } 86 | ``` 87 | 88 | -------------------------------------------------------------------------------- /docs/src/src/interfaces/IBNFT.sol/interface.IBNFT.md: -------------------------------------------------------------------------------- 1 | # IBNFT 2 | [Git Source](https://github.com/GadzeFinance/dappContracts/blob/c722006f91e5a8b00322356d0c967de90bbae6e0/src/interfaces/IBNFT.sol) 3 | 4 | 5 | ## Functions 6 | ### mint 7 | 8 | 9 | ```solidity 10 | function mint(address _reciever, uint256 _validatorId) external; 11 | ``` 12 | 13 | -------------------------------------------------------------------------------- /docs/src/src/interfaces/IDepositContract.sol/interface.IDepositContract.md: -------------------------------------------------------------------------------- 1 | # IDepositContract 2 | [Git Source](https://github.com/GadzeFinance/dappContracts/blob/c722006f91e5a8b00322356d0c967de90bbae6e0/src/interfaces/IDepositContract.sol) 3 | 4 | This is the Ethereum 2.0 deposit contract interface. 5 | For more information see the Phase 0 specification under https://github.com/ethereum/eth2.0-specs 6 | https://github.com/ethereum/eth2.0-specs/blob/dev/solidity_deposit_contract/deposit_contract.sol 7 | 8 | 9 | ## Functions 10 | ### deposit 11 | 12 | Submit a Phase 0 DepositData object. 13 | 14 | 15 | ```solidity 16 | function deposit( 17 | bytes calldata pubkey, 18 | bytes calldata withdrawal_credentials, 19 | bytes calldata signature, 20 | bytes32 deposit_data_root 21 | ) external payable; 22 | ``` 23 | **Parameters** 24 | 25 | |Name|Type|Description| 26 | |----|----|-----------| 27 | |`pubkey`|`bytes`|A BLS12-381 public key.| 28 | |`withdrawal_credentials`|`bytes`|Commitment to a public key for withdrawals.| 29 | |`signature`|`bytes`|A BLS12-381 signature.| 30 | |`deposit_data_root`|`bytes32`|The SHA-256 hash of the SSZ-encoded DepositData object. Used as a protection against malformed input.| 31 | 32 | 33 | ### get_deposit_root 34 | 35 | Query the current deposit root hash. 36 | 37 | 38 | ```solidity 39 | function get_deposit_root() external view returns (bytes32); 40 | ``` 41 | **Returns** 42 | 43 | |Name|Type|Description| 44 | |----|----|-----------| 45 | |``|`bytes32`|The deposit root hash.| 46 | 47 | 48 | ### get_deposit_count 49 | 50 | Query the current deposit count. 51 | 52 | 53 | ```solidity 54 | function get_deposit_count() external view returns (bytes memory); 55 | ``` 56 | **Returns** 57 | 58 | |Name|Type|Description| 59 | |----|----|-----------| 60 | |``|`bytes`|The deposit count encoded as a little endian 64-bit number.| 61 | 62 | 63 | ## Events 64 | ### DepositEvent 65 | A processed deposit event. 66 | 67 | 68 | ```solidity 69 | event DepositEvent(bytes pubkey, bytes withdrawal_credentials, bytes amount, bytes signature, bytes index); 70 | ``` 71 | 72 | -------------------------------------------------------------------------------- /docs/src/src/interfaces/IEETH.sol/interface.IEETH.md: -------------------------------------------------------------------------------- 1 | # IEETH 2 | [Git Source](https://github.com/GadzeFinance/dappContracts/blob/c722006f91e5a8b00322356d0c967de90bbae6e0/src/interfaces/IEETH.sol) 3 | 4 | 5 | ## Functions 6 | ### mint 7 | 8 | 9 | ```solidity 10 | function mint(address _account, uint256 _amount) external; 11 | ``` 12 | 13 | ### burn 14 | 15 | 16 | ```solidity 17 | function burn(address _account, uint256 _amount) external; 18 | ``` 19 | 20 | -------------------------------------------------------------------------------- /docs/src/src/interfaces/INodeOperatorManager.sol/interface.INodeOperatorManager.md: -------------------------------------------------------------------------------- 1 | # INodeOperatorManager 2 | [Git Source](https://github.com/GadzeFinance/dappContracts/blob/c722006f91e5a8b00322356d0c967de90bbae6e0/src/interfaces/INodeOperatorManager.sol) 3 | 4 | 5 | ## Functions 6 | ### registerNodeOperator 7 | 8 | 9 | ```solidity 10 | function registerNodeOperator(bytes32[] calldata _merkleProof, bytes memory ipfsHash, uint64 totalKeys) external; 11 | ``` 12 | 13 | ### fetchNextKeyIndex 14 | 15 | 16 | ```solidity 17 | function fetchNextKeyIndex(address _user) external returns (uint64); 18 | ``` 19 | 20 | ### getUserTotalKeys 21 | 22 | 23 | ```solidity 24 | function getUserTotalKeys(address _user) external view returns (uint64 totalKeys); 25 | ``` 26 | 27 | ### getNumKeysRemaining 28 | 29 | 30 | ```solidity 31 | function getNumKeysRemaining(address _user) external view returns (uint64 numKeysRemaining); 32 | ``` 33 | 34 | ### isWhitelisted 35 | 36 | 37 | ```solidity 38 | function isWhitelisted(address _user) external view returns (bool whitelisted); 39 | ``` 40 | 41 | ## Structs 42 | ### KeyData 43 | 44 | ```solidity 45 | struct KeyData { 46 | uint64 totalKeys; 47 | uint64 keysUsed; 48 | bytes ipfsHash; 49 | } 50 | ``` 51 | 52 | -------------------------------------------------------------------------------- /docs/src/src/interfaces/IProtocolRevenueManager.sol/interface.IProtocolRevenueManager.md: -------------------------------------------------------------------------------- 1 | # IProtocolRevenueManager 2 | [Git Source](https://github.com/GadzeFinance/dappContracts/blob/c722006f91e5a8b00322356d0c967de90bbae6e0/src/interfaces/IProtocolRevenueManager.sol) 3 | 4 | 5 | ## Functions 6 | ### globalRevenueIndex 7 | 8 | 9 | ```solidity 10 | function globalRevenueIndex() external view returns (uint256); 11 | ``` 12 | 13 | ### auctionFeeVestingPeriodForStakersInDays 14 | 15 | 16 | ```solidity 17 | function auctionFeeVestingPeriodForStakersInDays() external view returns (uint256); 18 | ``` 19 | 20 | ### addAuctionRevenue 21 | 22 | 23 | ```solidity 24 | function addAuctionRevenue(uint256 _validatorId) external payable; 25 | ``` 26 | 27 | ### distributeAuctionRevenue 28 | 29 | 30 | ```solidity 31 | function distributeAuctionRevenue(uint256 _validatorId) external returns (uint256); 32 | ``` 33 | 34 | ### setEtherFiNodesManagerAddress 35 | 36 | 37 | ```solidity 38 | function setEtherFiNodesManagerAddress(address _etherFiNodesManager) external; 39 | ``` 40 | 41 | ### getAccruedAuctionRevenueRewards 42 | 43 | 44 | ```solidity 45 | function getAccruedAuctionRevenueRewards(uint256 _validatorId) external returns (uint256); 46 | ``` 47 | 48 | ## Structs 49 | ### AuctionRevenueSplit 50 | 51 | ```solidity 52 | struct AuctionRevenueSplit { 53 | uint64 treasurySplit; 54 | uint64 nodeOperatorSplit; 55 | uint64 tnftHolderSplit; 56 | uint64 bnftHolderSplit; 57 | } 58 | ``` 59 | 60 | -------------------------------------------------------------------------------- /docs/src/src/interfaces/IStakingManager.sol/interface.IStakingManager.md: -------------------------------------------------------------------------------- 1 | # IStakingManager 2 | [Git Source](https://github.com/GadzeFinance/dappContracts/blob/c722006f91e5a8b00322356d0c967de90bbae6e0/src/interfaces/IStakingManager.sol) 3 | 4 | 5 | ## Functions 6 | ### cancelDeposit 7 | 8 | 9 | ```solidity 10 | function cancelDeposit(uint256 _validatorId) external; 11 | ``` 12 | 13 | ### registerValidator 14 | 15 | 16 | ```solidity 17 | function registerValidator(uint256 _validatorId, DepositData calldata _depositData) external; 18 | ``` 19 | 20 | ### fetchEtherFromContract 21 | 22 | 23 | ```solidity 24 | function fetchEtherFromContract(address _wallet) external; 25 | ``` 26 | 27 | ### bidIdToStaker 28 | 29 | 30 | ```solidity 31 | function bidIdToStaker(uint256 id) external view returns (address); 32 | ``` 33 | 34 | ### stakeAmount 35 | 36 | 37 | ```solidity 38 | function stakeAmount() external view returns (uint256); 39 | ``` 40 | 41 | ### setEtherFiNodesManagerAddress 42 | 43 | 44 | ```solidity 45 | function setEtherFiNodesManagerAddress(address _managerAddress) external; 46 | ``` 47 | 48 | ### batchDepositWithBidIds 49 | 50 | 51 | ```solidity 52 | function batchDepositWithBidIds(uint256[] calldata _candidateBidIds) external payable returns (uint256[] memory); 53 | ``` 54 | 55 | ### setProtocolRevenueManager 56 | 57 | 58 | ```solidity 59 | function setProtocolRevenueManager(address _protocolRevenueManager) external; 60 | ``` 61 | 62 | ## Structs 63 | ### DepositData 64 | 65 | ```solidity 66 | struct DepositData { 67 | bytes publicKey; 68 | bytes signature; 69 | bytes32 depositDataRoot; 70 | string ipfsHashForEncryptedValidatorKey; 71 | } 72 | ``` 73 | 74 | -------------------------------------------------------------------------------- /docs/src/src/interfaces/ITNFT.sol/interface.ITNFT.md: -------------------------------------------------------------------------------- 1 | # ITNFT 2 | [Git Source](https://github.com/GadzeFinance/dappContracts/blob/c722006f91e5a8b00322356d0c967de90bbae6e0/src/interfaces/ITNFT.sol) 3 | 4 | 5 | ## Functions 6 | ### mint 7 | 8 | 9 | ```solidity 10 | function mint(address _reciever, uint256 _validatorId) external; 11 | ``` 12 | 13 | -------------------------------------------------------------------------------- /docs/src/src/interfaces/ITreasury.sol/interface.ITreasury.md: -------------------------------------------------------------------------------- 1 | # ITreasury 2 | [Git Source](https://github.com/GadzeFinance/dappContracts/blob/c722006f91e5a8b00322356d0c967de90bbae6e0/src/interfaces/ITreasury.sol) 3 | 4 | 5 | ## Functions 6 | ### withdraw 7 | 8 | 9 | ```solidity 10 | function withdraw(uint256 _amount) external; 11 | ``` 12 | 13 | -------------------------------------------------------------------------------- /docs/src/src/interfaces/IWeth.sol/interface.IWETH.md: -------------------------------------------------------------------------------- 1 | # IWETH 2 | [Git Source](https://github.com/GadzeFinance/dappContracts/blob/c722006f91e5a8b00322356d0c967de90bbae6e0/src/interfaces/IWeth.sol) 3 | 4 | 5 | ## Functions 6 | ### deposit 7 | 8 | 9 | ```solidity 10 | function deposit() external payable; 11 | ``` 12 | 13 | ### transfer 14 | 15 | 16 | ```solidity 17 | function transfer(address to, uint256 value) external returns (bool); 18 | ``` 19 | 20 | ### withdraw 21 | 22 | 23 | ```solidity 24 | function withdraw(uint256) external; 25 | ``` 26 | 27 | -------------------------------------------------------------------------------- /docs/src/src/interfaces/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Contents 4 | - [IAuctionManager](IAuctionManager.sol/interface.IAuctionManager.md) 5 | - [IBNFT](IBNFT.sol/interface.IBNFT.md) 6 | - [IDepositContract](IDepositContract.sol/interface.IDepositContract.md) 7 | - [IEETH](IEETH.sol/interface.IEETH.md) 8 | - [IEtherFiNode](IEtherFiNode.sol/interface.IEtherFiNode.md) 9 | - [IEtherFiNodesManager](IEtherFiNodesManager.sol/interface.IEtherFiNodesManager.md) 10 | - [INodeOperatorManager](INodeOperatorManager.sol/interface.INodeOperatorManager.md) 11 | - [IProtocolRevenueManager](IProtocolRevenueManager.sol/interface.IProtocolRevenueManager.md) 12 | - [IStakingManager](IStakingManager.sol/interface.IStakingManager.md) 13 | - [ITNFT](ITNFT.sol/interface.ITNFT.md) 14 | - [ITreasury](ITreasury.sol/interface.ITreasury.md) 15 | - [IWETH](IWeth.sol/interface.IWETH.md) 16 | -------------------------------------------------------------------------------- /foundry.toml: -------------------------------------------------------------------------------- 1 | [profile.default] 2 | src = 'src' 3 | out = 'out' 4 | libs = ['lib'] 5 | fs_permissions = [{ access = "read-write", path = "./release"}, { access = "read", path = "./test" }, { access = "read-write", path = "./operations" }, { access = "read-write", path = "./deployment" }] 6 | gas_reports = ["*"] 7 | optimizer_runs = 1500 8 | extra_output = ["storageLayout"] 9 | bytecode_hash = 'none' 10 | solc-version = '0.8.27' 11 | 12 | [fuzz] 13 | max_shrink_iters = 100 14 | 15 | # See more config options https://github.com/foundry-rs/foundry/tree/master/config 16 | [rpc_endpoints] 17 | mainnet = "${MAINNET_RPC_URL}" 18 | goerli = "${GOERLI_RPC_URL}" 19 | 20 | 21 | 22 | [etherscan] 23 | mainnet = { key = "${ETHERSCAN_API_KEY}" } 24 | goerli = { key = "${ETHERSCAN_API_KEY}" } 25 | -------------------------------------------------------------------------------- /lib/Constants.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | library Constants { 5 | address internal constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; 6 | 7 | uint256 internal constant PRECISION = 1e18; 8 | uint256 internal constant PRECISION_SUB_ONE = PRECISION - 1; 9 | } 10 | -------------------------------------------------------------------------------- /operations/20241014_whitelist_RewardsCoordinator_processClaim.json: -------------------------------------------------------------------------------- 1 | { "version": "1.0", "chainId": "1", "meta": { "name": "Transactions Batch", "description": "", "txBuilderVersion": "1.16.5", "createdFromSafeAddress": "0xcdd57D11476c22d265722F68390b036f3DA48c21" }, "transactions": [ 2 | { 3 | "to": "0x9f26d4C958fD811A1F59B01B86Be7dFFc9d20761", 4 | "value": "0", 5 | "data": "0x01d5062a0000000000000000000000008b71140ad2e5d1e7018d2a7f8a288bd3cd38916f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f4800000000000000000000000000000000000000000000000000000000000000064c7f61eec3ccc861d000000000000000000000000000000000000000000000000000000000000000000000000000000007750d328b314effa365a0402ccfd489b80b0adda000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000" 6 | } 7 | , 8 | { 9 | "to": "0x9f26d4C958fD811A1F59B01B86Be7dFFc9d20761", 10 | "value": "0", 11 | "data": "0x134008d30000000000000000000000008b71140ad2e5d1e7018d2a7f8a288bd3cd38916f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064c7f61eec3ccc861d000000000000000000000000000000000000000000000000000000000000000000000000000000007750d328b314effa365a0402ccfd489b80b0adda000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000" 12 | } 13 | ] } 14 | -------------------------------------------------------------------------------- /operations/20241015_update_eEth_fee_recipient_treasury.json: -------------------------------------------------------------------------------- 1 | { "version": "1.0", "chainId": "1", "meta": { "name": "Transactions Batch", "description": "", "txBuilderVersion": "1.16.5", "createdFromSafeAddress": "0xcdd57D11476c22d265722F68390b036f3DA48c21" }, "transactions": [ 2 | { 3 | "to": "0x9f26d4C958fD811A1F59B01B86Be7dFFc9d20761", 4 | "value": "0", 5 | "data": "0x01d5062a000000000000000000000000308861a430be4cce5502d0a12724771fc6daf216000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f4800000000000000000000000000000000000000000000000000000000000000024f0f442600000000000000000000000000c83eae1fe72c390a02e426572854931eeff93ba00000000000000000000000000000000000000000000000000000000" 6 | } 7 | , 8 | { 9 | "to": "0x9f26d4C958fD811A1F59B01B86Be7dFFc9d20761", 10 | "value": "0", 11 | "data": "0x134008d3000000000000000000000000308861a430be4cce5502d0a12724771fc6daf216000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024f0f442600000000000000000000000000c83eae1fe72c390a02e426572854931eeff93ba00000000000000000000000000000000000000000000000000000000" 12 | } 13 | ] } 14 | -------------------------------------------------------------------------------- /operations/20241018_upgrade_liquifier.json: -------------------------------------------------------------------------------- 1 | { "version": "1.0", "chainId": "1", "meta": { "name": "Transactions Batch", "description": "", "txBuilderVersion": "1.16.5", "createdFromSafeAddress": "0xcdd57D11476c22d265722F68390b036f3DA48c21" }, "transactions": [ 2 | { 3 | "to": "0x9f26d4C958fD811A1F59B01B86Be7dFFc9d20761", 4 | "value": "0", 5 | "data": "0x01d5062a0000000000000000000000009ffdf407cde9a93c47611799da23924af3ef764f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f48000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000005769ff35545b0bbfa27cc97c9407c5ed9d39545500000000000000000000000000000000000000000000000000000000" 6 | } 7 | , 8 | { 9 | "to": "0x9f26d4C958fD811A1F59B01B86Be7dFFc9d20761", 10 | "value": "0", 11 | "data": "0x134008d30000000000000000000000009ffdf407cde9a93c47611799da23924af3ef764f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000005769ff35545b0bbfa27cc97c9407c5ed9d39545500000000000000000000000000000000000000000000000000000000" 12 | } 13 | ] } 14 | -------------------------------------------------------------------------------- /operations/20241025_update_lockbox_address_executeTransaction.json: -------------------------------------------------------------------------------- 1 | { 2 | "chainId": "1", 3 | "meta": { 4 | "txBuilderVersion": "1.16.5" 5 | }, 6 | "transactions": [ 7 | { 8 | "to": "0x9f26d4c958fd811a1f59b01b86be7dffc9d20761", 9 | "value": "0", 10 | "data": "0x134008d3000000000000000000000000d789870bea40d056a4d26055d0befcc8755da146000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000242d8c8039000000000000000000000000cd2eb13d6831d4602d80e5db9230a57596cdca6300000000000000000000000000000000000000000000000000000000" 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /operations/20241025_update_lockbox_address_scheduleTransaction.json: -------------------------------------------------------------------------------- 1 | { 2 | "chainId": "1", 3 | "meta": { 4 | "txBuilderVersion": "1.16.5" 5 | }, 6 | "transactions": [ 7 | { 8 | "to": "0x9f26d4c958fd811a1f59b01b86be7dffc9d20761", 9 | "value": "0", 10 | "data": "0x01d5062a000000000000000000000000d789870bea40d056a4d26055d0befcc8755da146000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f48000000000000000000000000000000000000000000000000000000000000000242d8c8039000000000000000000000000cd2eb13d6831d4602d80e5db9230a57596cdca6300000000000000000000000000000000000000000000000000000000" 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /operations/20241203_oft_adapter_upgrade_add_rate_limits/execute-oft-adapter-upgrade.json: -------------------------------------------------------------------------------- 1 | { 2 | "chainId": "1", 3 | "meta": { 4 | "txBuilderVersion": "1.16.5" 5 | }, 6 | "transactions": [ 7 | { 8 | "to": "0x9f26d4c958fd811a1f59b01b86be7dffc9d20761", 9 | "value": "0", 10 | "data": "0x134008d3000000000000000000000000a9e9bbf04f95688d7fd82036f83544630e463cac000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e49623609d000000000000000000000000cd2eb13d6831d4602d80e5db9230a57596cdca63000000000000000000000000a82cc578927058af14fd84d96a817dc85ac4f94600000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044485cc9550000000000000000000000002aca71020de61bb532008049e1bd41e451ae8adc0000000000000000000000002aca71020de61bb532008049e1bd41e451ae8adc0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /operations/20241203_oft_adapter_upgrade_add_rate_limits/schedule-oft-adapter-upgrade.json: -------------------------------------------------------------------------------- 1 | { 2 | "chainId": "1", 3 | "meta": { 4 | "txBuilderVersion": "1.16.5" 5 | }, 6 | "transactions": [ 7 | { 8 | "to": "0x9f26d4c958fd811a1f59b01b86be7dffc9d20761", 9 | "value": "0", 10 | "data": "0x01d5062a000000000000000000000000a9e9bbf04f95688d7fd82036f83544630e463cac000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f48000000000000000000000000000000000000000000000000000000000000000e49623609d000000000000000000000000cd2eb13d6831d4602d80e5db9230a57596cdca63000000000000000000000000a82cc578927058af14fd84d96a817dc85ac4f94600000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044485cc9550000000000000000000000002aca71020de61bb532008049e1bd41e451ae8adc0000000000000000000000002aca71020de61bb532008049e1bd41e451ae8adc0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /operations/20241212_unpause_liquifier.json: -------------------------------------------------------------------------------- 1 | { "version": "1.0", "chainId": "1", "meta": { "name": "Transactions Batch", "description": "", "txBuilderVersion": "1.16.5", "createdFromSafeAddress": "0xcdd57D11476c22d265722F68390b036f3DA48c21" }, "transactions": [ 2 | { 3 | "to": "0x9f26d4C958fD811A1F59B01B86Be7dFFc9d20761", 4 | "value": "0", 5 | "data": "0x01d5062a0000000000000000000000009ffdf407cde9a93c47611799da23924af3ef764f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000004feda79674e881e779f8b39b25ceba29bd494ea44b38ab30467ec7b98898516f000000000000000000000000000000000000000000000000000000000003f4800000000000000000000000000000000000000000000000000000000000000004bac1520300000000000000000000000000000000000000000000000000000000" 6 | } 7 | , 8 | { 9 | "to": "0x9f26d4C958fD811A1F59B01B86Be7dFFc9d20761", 10 | "value": "0", 11 | "data": "0x134008d30000000000000000000000009ffdf407cde9a93c47611799da23924af3ef764f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000004feda79674e881e779f8b39b25ceba29bd494ea44b38ab30467ec7b98898516f0000000000000000000000000000000000000000000000000000000000000004bac1520300000000000000000000000000000000000000000000000000000000" 12 | } 13 | ] } 14 | -------------------------------------------------------------------------------- /operations/20241212_upgrade_liquifier.json: -------------------------------------------------------------------------------- 1 | { "version": "1.0", "chainId": "1", "meta": { "name": "Transactions Batch", "description": "", "txBuilderVersion": "1.16.5", "createdFromSafeAddress": "0xcdd57D11476c22d265722F68390b036f3DA48c21" }, "transactions": [ 2 | { 3 | "to": "0x9f26d4C958fD811A1F59B01B86Be7dFFc9d20761", 4 | "value": "0", 5 | "data": "0x01d5062a0000000000000000000000009ffdf407cde9a93c47611799da23924af3ef764f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f48000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000a1a15fb15cbda9e6c480c5bca6e9aba9c5e2ff9500000000000000000000000000000000000000000000000000000000" 6 | } 7 | , 8 | { 9 | "to": "0x9f26d4C958fD811A1F59B01B86Be7dFFc9d20761", 10 | "value": "0", 11 | "data": "0x134008d30000000000000000000000009ffdf407cde9a93c47611799da23924af3ef764f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000a1a15fb15cbda9e6c480c5bca6e9aba9c5e2ff9500000000000000000000000000000000000000000000000000000000" 12 | } 13 | ] } 14 | -------------------------------------------------------------------------------- /operations/20241219_native_minting_scroll/L1NativeMintingSetConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "chainId": "1", 3 | "meta": { 4 | "txBuilderVersion": "1.16.5" 5 | }, 6 | "transactions": [ 7 | { 8 | "to": "0x1a44076050125825900e736c501f859c50fe728c", 9 | "value": "0", 10 | "data": "0x6dbd9f90000000000000000000000000d789870bea40d056a4d26055d0befcc8755da146000000000000000000000000c02ab410f0734efa3f14628780e6e695156024c200000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000076060000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000589dedbd617e0cbcb916a9223f4d1300c294236b000000000000000000000000a59ba433ac34d2927232918ef5b2eaafcf130ba50000000000000000000000000000000000000000000000000000000000000000" 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /operations/20250128_upgrade_instant_withdrawal_execute.json: -------------------------------------------------------------------------------- 1 | { 2 | "chainId": "1", 3 | "meta": { "txBuilderVersion": "1.16.5" }, 4 | "transactions": [ 5 | { 6 | "to": "0x9f26d4c958fd811a1f59b01b86be7dffc9d20761", 7 | "value": "0", 8 | "data": "0xe38335e500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000012cd17fdc855070e6b92a85ee62b7b5f78b031a423542fabd5d0ace52bdd8aea00000000000000000000000000000000000000000000000000000000000000020000000000000000000000007d5706f6ef3f89b3951e23e557cdfbc3239d4e2c000000000000000000000000308861a430be4cce5502d0a12724771fc6daf21600000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000c44f1ef28600000000000000000000000078f424c42f006b046b927d49b6d7abef74ca67ae00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000044f8a025b40000000000000000000000009af1298993dc1f397973c62a5d47a284cf76844d0000000000000000000000000000000000000000000000000000000000001388000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44f1ef286000000000000000000000000a05d566bac16e2fbcec4cff68e89119ee2a96ef900000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024984856a3000000000000000000000000d5fd46f4df70a63d60a8563cad0444fcc25dce7f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /operations/20250128_upgrade_instant_withdrawal_schedule.json: -------------------------------------------------------------------------------- 1 | { 2 | "chainId": "1", 3 | "meta": { "txBuilderVersion": "1.16.5" }, 4 | "transactions": [ 5 | { 6 | "to": "0x9f26d4c958fd811a1f59b01b86be7dffc9d20761", 7 | "value": "0", 8 | "data": "0x8f2a0bb000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000012cd17fdc855070e6b92a85ee62b7b5f78b031a423542fabd5d0ace52bdd8aea000000000000000000000000000000000000000000000000000000000003f48000000000000000000000000000000000000000000000000000000000000000020000000000000000000000007d5706f6ef3f89b3951e23e557cdfbc3239d4e2c000000000000000000000000308861a430be4cce5502d0a12724771fc6daf21600000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000c44f1ef28600000000000000000000000078f424c42f006b046b927d49b6d7abef74ca67ae00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000044f8a025b40000000000000000000000009af1298993dc1f397973c62a5d47a284cf76844d0000000000000000000000000000000000000000000000000000000000001388000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44f1ef286000000000000000000000000a05d566bac16e2fbcec4cff68e89119ee2a96ef900000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024984856a3000000000000000000000000d5fd46f4df70a63d60a8563cad0444fcc25dce7f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /operations/20250304_whitelist_DelegationManager_completeQueuedWithdrawals/execute.json: -------------------------------------------------------------------------------- 1 | { "version": "1.0", "chainId": "1", "meta": { "name": "Transactions Batch", "description": "", "txBuilderVersion": "1.16.5", "createdFromSafeAddress": "0xcdd57D11476c22d265722F68390b036f3DA48c21" }, "transactions": [ 2 | { 3 | "to": "0x9f26d4C958fD811A1F59B01B86Be7dFFc9d20761", 4 | "value": "0", 5 | "data": "0x134008d30000000000000000000000008b71140ad2e5d1e7018d2a7f8a288bd3cd38916f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000e0a14cf758b9c1e1bc8ace8d1e3909acbb55ae10ebe057eb2ebab11864a972fd0000000000000000000000000000000000000000000000000000000000000064c7f61eec334043960000000000000000000000000000000000000000000000000000000000000000000000000000000039053d51b77dc0d36036fc1fcc8cb819df8ef37a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000" 6 | } 7 | ] } 8 | -------------------------------------------------------------------------------- /operations/20250304_whitelist_DelegationManager_completeQueuedWithdrawals/schedule.json: -------------------------------------------------------------------------------- 1 | { "version": "1.0", "chainId": "1", "meta": { "name": "Transactions Batch", "description": "", "txBuilderVersion": "1.16.5", "createdFromSafeAddress": "0xcdd57D11476c22d265722F68390b036f3DA48c21" }, "transactions": [ 2 | { 3 | "to": "0x9f26d4C958fD811A1F59B01B86Be7dFFc9d20761", 4 | "value": "0", 5 | "data": "0x01d5062a0000000000000000000000008b71140ad2e5d1e7018d2a7f8a288bd3cd38916f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000e0a14cf758b9c1e1bc8ace8d1e3909acbb55ae10ebe057eb2ebab11864a972fd000000000000000000000000000000000000000000000000000000000003f4800000000000000000000000000000000000000000000000000000000000000064c7f61eec334043960000000000000000000000000000000000000000000000000000000000000000000000000000000039053d51b77dc0d36036fc1fcc8cb819df8ef37a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000" 6 | } 7 | ] } 8 | -------------------------------------------------------------------------------- /operations/20250413_upgrade_eigenlayer_slashing_execute.json: -------------------------------------------------------------------------------- 1 | {"chainId":"1","meta": { "txBuilderVersion": "1.16.5" }, "transactions": [{"to":"0x9f26d4c958fd811a1f59b01b86be7dffc9d20761","value":"0","data":"0xe38335e500000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000000df3986fdec1755c6f771d273187520fa55cec08a1cd010b8b3c9ed3763761db0000000000000000000000000000000000000000000000000000000000000000300000000000000000000000025e821b7197b146f7713c3b89b6a4d83516b912d0000000000000000000000008b71140ad2e5d1e7018d2a7f8a288bd3cd38916f0000000000000000000000001b7a4c3797236a1c37f8741c0be35c2c72736fff00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000002449370974000000000000000000000000c5f2764383f93259fba1d820b894b1de0d47937e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000644f1ef286000000000000000000000000e9ee6923d41cf5f964f11065436bd90d4577b5e4000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000644f1ef2860000000000000000000000000052f731a6bea541843385ffba408f52b74cb6240000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}]} -------------------------------------------------------------------------------- /operations/20250413_upgrade_eigenlayer_slashing_schedule.json: -------------------------------------------------------------------------------- 1 | {"chainId":"1","meta": { "txBuilderVersion": "1.16.5" }, "transactions": [{"to":"0x9f26d4c958fd811a1f59b01b86be7dffc9d20761","value":"0","data":"0x8f2a0bb000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000000df3986fdec1755c6f771d273187520fa55cec08a1cd010b8b3c9ed3763761db0000000000000000000000000000000000000000000000000000000000003f480000000000000000000000000000000000000000000000000000000000000000300000000000000000000000025e821b7197b146f7713c3b89b6a4d83516b912d0000000000000000000000008b71140ad2e5d1e7018d2a7f8a288bd3cd38916f0000000000000000000000001b7a4c3797236a1c37f8741c0be35c2c72736fff00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000002449370974000000000000000000000000c5f2764383f93259fba1d820b894b1de0d47937e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000644f1ef286000000000000000000000000e9ee6923d41cf5f964f11065436bd90d4577b5e4000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000644f1ef2860000000000000000000000000052f731a6bea541843385ffba408f52b74cb6240000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}]} -------------------------------------------------------------------------------- /operations/22047042_accept_role_registry_ownership_execute.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": "0x134008d300000000000000000000000062247d29b4b9becf4bb73e0c722cf6445cfc7ce9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000bd6d9e322298e0f92aa3165320fd6b939206883bdacb1d807c09161ab0cef9e000000000000000000000000000000000000000000000000000000000000000479ba509700000000000000000000000000000000000000000000000000000000", 3 | "to": "0x9f26d4C958fD811A1F59B01B86Be7dFFc9d20761", 4 | "value": 0 5 | } -------------------------------------------------------------------------------- /operations/22047042_accept_role_registry_ownership_schedule.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": "0x01d5062a00000000000000000000000062247d29b4b9becf4bb73e0c722cf6445cfc7ce9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000bd6d9e322298e0f92aa3165320fd6b939206883bdacb1d807c09161ab0cef9e000000000000000000000000000000000000000000000000000000000003f480000000000000000000000000000000000000000000000000000000000000000479ba509700000000000000000000000000000000000000000000000000000000", 3 | "to": "0x9f26d4C958fD811A1F59B01B86Be7dFFc9d20761", 4 | "value": 0 5 | } -------------------------------------------------------------------------------- /proposals/EFIP-1.md: -------------------------------------------------------------------------------- 1 | # [EFIP-1] Purpose and Guidelines 2 | 3 | **Author**: syko (seongyun@ether.fi) 4 | 5 | **Date**: 2024-06-24 6 | 7 | 8 | ## Summary 9 | 10 | EFIP-1 proposes the establishment of the ether.fi Improvement Proposal (EFIP) process. This document outlines the framework and guidelines for creating and submitting EFIPs. The purpose is to standardize the method for proposing new features, improvements, and processes within the ether.fi ecosystem, ensuring transparency and community involvement in decision-making. 11 | 12 | 13 | 14 | ## Motivation 15 | 16 | The introduction of the ether.fi Improvement Proposal (EFIP) process represents a proactive step towards improving the ether.fi ecosystem with a structured, transparent, and inclusive framework: 17 | 18 | 1. Provide a clear and consistent method for proposing changes. 19 | 2. Facilitate community discussion and input on proposed changes. 20 | 3. Create a historical archive of proposals and their outcomes. 21 | 4. Enhance the ability of contributors to track the progress and implementation of proposals. 22 | 23 | 24 | 25 | ## Proposal 26 | 27 | The proposal is on the EFIP Process and the template for EFIP document [EFIP-template](efip-template.md): 28 | 29 | 1. **Draft**: Authors draft an EFIP using the provided template, detailing the summary, motivation, and technical specifications of the proposal. 30 | 31 | 2. **Review**: The draft EFIP is submitted to the ether.fi community for review. Community members can provide feedback and suggest revisions. 32 | 33 | 3. **Approval**: After addressing feedback and making necessary revisions, the EFIP is submitted for approval. The approval process involves a formal review by ether.fi core developers. 34 | 35 | 4. **Implementation**: Once approved, the proposal is implemented by the relevant contributors. Implementation details and progress are tracked and communicated to the community. 36 | 37 | 5. **Retro**: After implementation, the EFIP is archived and its retro is followed to review the outcomes and discuss the future extensions or missing pitfalls. 38 | 39 | 40 | ## Copyright 41 | 42 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 43 | -------------------------------------------------------------------------------- /proposals/EFIP-10.md: -------------------------------------------------------------------------------- 1 | # [EFIP-10] Whitelisted Delegate calls for EtherFiNode/EigenPod 2 | 3 | 4 | **Author**: dave (dave@ether.fi), syko (seongyun@ether.fi) 5 | 6 | **Date**: 2024-07-22 7 | 8 | ## Summary 9 | 10 | This EFIP proposes the introduction of a whitelist mechanism on the delegate call into the EtherFiNode/EigenPod contracts. This change aims to enhance security by restricting call forwarding and function execution to a predefined list of delegates, ensuring that only authorized operations can be performed. 11 | 12 | ## Motivation 13 | 14 | Currently, we use the blacklisting to restrict blacklisted functions from being executed. However, the blacklisting approach is not robust and can be bypassed by malicious actors by upgrade. Introducing the whitelisting will mitigate these risks by ensuring only allowed operations can be executed. 15 | 16 | ## Proposal 17 | 18 | The proposal introduces changes to the EtherFiNode and EtherFiNodesManager contracts to implement the whitelist mechanism: 19 | 20 | 1. **Whitelist Management**: 21 | - Addition of functions to manage the whitelist for `eigenPodCall` and `externalCall` 22 | - Implementation of checks to ensure only whitelisted operations ca be performed. 23 | 24 | 2. **Call Forwarding Restrictions**: 25 | - Ensuring that only the whitelisted operations can be performed. 26 | 27 | 28 | ## References 29 | 30 | - [Pull Request #100](https://github.com/etherfi-protocol/smart-contracts/pull/100) 31 | - [Audit Review](./references/NM-0217-whitelisted-delegate-calls-for-efip-10.md) 32 | 33 | ## Copyright 34 | 35 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). -------------------------------------------------------------------------------- /proposals/EFIP-6.md: -------------------------------------------------------------------------------- 1 | # [EFIP-6] Fine-Grained Timelock 2 | 3 | 4 | **Author**: jtdev (jacob@ether.fi) 5 | 6 | **Date**: 2000-07-11 7 | 8 | ## Summary 9 | 10 | This proposal suggests implementing a fine-grained timelock with OpenZeppelin Access Control v5 system for HyperNative’s automated response to alerts. Specifically, it proposes reducing the timelock for unpausing smart contracts from 3 days to 15 minutes. This change aims to mitigate the impact of false-positive alerts and allow for more aggressive alert configurations to better protect the protocol. 11 | 12 | ## Motivation 13 | 14 | Currently, when HyperNative pauses our smart contracts (SCs) in response to alerts, it takes 3 days to unpause them. This long delay can be problematic, especially in the case of false-positive alerts. By reducing the unpause timelock to 15 minutes, we can decrease the cost of false-positive alerts and configure the alerts more aggressively 15 | 16 | ## Proposal 17 | 18 | To achieve this, we will deploy the OpenZeppelin Access Control v5 contract to manage all necessary functionality. This contract is very powerful with numerous features including fine-grained timelock functionality. 19 | 20 | The existing timelock will remain in place to handle the most critical actions, such as upgrading contracts. However, it can delegate other actions with varying degrees of locking. Specifically, we propose: 21 | 22 | 1. Deploy OpenZeppelin Access Control v5 23 | 2. Configure Access Control contract to have permission for unpausing smart contracts with a 15 minute timelock 24 | 3. Maintaining the 3-day timelock for other critical actions, such as contract upgrades. 25 | 26 | ## References 27 | 28 | - [Access Control - OpenZeppelin Docs](https://docs.openzeppelin.com/contracts/5.x/api/access#AccessManager) 29 | - [Access Control v5 - Code](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.1/contracts/access/manager/AccessManager.sol) 30 | 31 | ## Copyright 32 | 33 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 34 | 35 | -------------------------------------------------------------------------------- /proposals/EFIP-7.md: -------------------------------------------------------------------------------- 1 | # [EFIP-7] EIP-1271 Compatibility for EtherFiNode contract 2 | 3 | **Author**: syko (seongyun@ether.fi) 4 | 5 | **Date**: 2024-07-22 6 | 7 | ## Summary 8 | 9 | This EFIP proposes making the EtherFiNode contract compatible with EIP-1271, which defines a standard interface for smart contract signature validation. This change will allow EtherFiNode to validate signatures according to the EIP-1271 standard, improving interoperability with other smart contracts and applications. 10 | 11 | ## Motivation 12 | 13 | The current EtherFiNode contract lacks support for EIP-1271, limiting its ability to interact with other contracts and applications that require standardized signature validation. 14 | 15 | ## Proposal 16 | 17 | The proposal introduces changes to the EtherFiNode contract to implement the EIP-1271 standard. Key changes include: 18 | 19 | 1. **EIP-1271's `isValidSignature`**: 20 | ```solidity 21 | function isValidSignature(bytes32 _hash, bytes memory _signature) public view returns (bytes4 magicValue); 22 | ``` 23 | - This function checks if a given signature is valid for the provided data. 24 | 25 | 2. **Signature Validation Logic**: 26 | - The function verifies the signature using the stored key or predefined logic. 27 | - If the signature is valid, it returns `0x1626ba7e` (the magic value specified by EIP-1271). 28 | - If the signature is invalid, it returns `0xffffffff`. 29 | 30 | ## References 31 | 32 | - [Pull Request #97](https://github.com/etherfi-protocol/smart-contracts/pull/97) 33 | - [EIP-1271 Standard](https://eips.ethereum.org/EIPS/eip-1271) 34 | - [Audit review](./references/NM-0217-efip1271-for-etherfinode-contract.md) 35 | 36 | ## Copyright 37 | 38 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 39 | -------------------------------------------------------------------------------- /proposals/EFIP-8.md: -------------------------------------------------------------------------------- 1 | # [EFIP-8] Async Admin Task Execution for Validator Management 2 | 3 | 4 | **Author**: Vaibhav Valecha (vaibhav@ether.fi), syko (seongyun@ether.fi) 5 | 6 | **Date**: 2024-07-22 7 | 8 | ## Summary 9 | 10 | This EFIP proposes implementing asynchronous task execution for validator management admin tasks in the EtherFi protocol. This change will allow admin tasks to be queued and executed asynchronously, improving scalability. 11 | 12 | ## Motivation 13 | 14 | Currently, admin tasks are executed synchronously, which can lead to delays in validator management, especially during high-load periods. By introducing asynchronous task execution, we can ensure faster & prompt management. 15 | 16 | ## Proposal 17 | 18 | The proposal introduces changes to the EtherFiAdmin contract to enable asynchronous execution of admin tasks. Key features include: 19 | 20 | 1. **Task Types**: 21 | - Definition of various task types such as `ValidatorApproval`, `SendExitRequests`, `ProcessNodeExit`, and `MarkBeingSlashed`. 22 | 23 | 2. **Task Status Management**: 24 | - Introduction of a `TaskStatus` struct to track the status of each task. 25 | - Mapping to manage task statuses. 26 | 27 | 3. **Task Execution Functions**: 28 | - `executeValidatorManagementTask`: Executes specified admin tasks based on their type. 29 | - `invalidateValidatorManagementTask`: Invalidates tasks that are no longer needed. 30 | 31 | 4. **Event Emission**: 32 | - Emission of events such as `ValidatorManagementTaskCreated`, `ValidatorManagementTaskCompleted`, and `ValidatorManagementTaskInvalidated` to track task progress and status. 33 | 34 | 5. **Task Enqueuing**: 35 | - Functions to enqueue tasks for later execution, improving flexibility and responsiveness. 36 | 37 | ## References 38 | 39 | - [Pull Request #82](https://github.com/etherfi-protocol/smart-contracts/pull/82) 40 | 41 | ## Copyright 42 | 43 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 44 | -------------------------------------------------------------------------------- /proposals/EFIP-template.md: -------------------------------------------------------------------------------- 1 | # [EFIP-XXXX] Template for EFIPs 2 | 3 | Leave the numbering of EFIP as unassigned. The EFIP editor will assign it when it gets merged. 4 | We will assign them purely sequentially from the latest one. 5 | 6 | **Author**: Name (contact) 7 | 8 | **Date**: YYYY-MM-DD 9 | 10 | ## Summary 11 | 12 | Provide a summary of the issues being addressed and the proposed solution. Ensure this explanation is simplified and accessible to non-experts. 13 | 14 | 15 | ## Motivation 16 | 17 | Clearly explain the motivation behind this EFIP. Detail why the existing protocol specification is inadequate and how this proposal addresses those inadequacies. A well-justified motivation is critical for the acceptance of the EFIP. 18 | 19 | 20 | ## Proposal 21 | 22 | 23 | Outline the technical specifications of the proposal. This section should be comprehensive enough to facilitate implementation and should include any necessary diagrams. Ensure that the syntax and semantics of any new features are thoroughly described. 24 | 25 | 26 | ## References 27 | 28 | A list of relevant links like for this proposal e.g. 29 | - discussion 30 | - implementation 31 | - article 32 | 33 | ## Copyright 34 | 35 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 36 | 37 | -------------------------------------------------------------------------------- /proposals/README.md: -------------------------------------------------------------------------------- 1 | # ether.fi Improvement Proposal (EFIP) 2 | 3 | 4 | An EFIP informs the ether.fi community about new features or changes to ether.fi’s smart contracts or processes, providing clear specifications and rationale for the proposed changes. 5 | 6 | EFIPs aim to enhance transparency around ether.fi's planned features and upgrades. They serve as the primary method for proposing new features, soliciting community feedback on various issues, discussing design decisions, and maintaining a historical record. 7 | 8 | 9 | ## How to 10 | 11 | If you plan to add a new EFIP, follow this guide: 12 | 13 | 1. Fork this repository. 14 | 2. Check the framework and guidelines of EFIPs, see [EFIP-1](efip-1.md). 15 | 3. Write a new EFIP following the formatting as in the [EFIP-template](efip-template.md). 16 | 4. Submit a Pull Request (PR) to the `master` branch. -------------------------------------------------------------------------------- /proposals/references/Liquifier_ pricing of stETH via CurvePool & fixed rate fee.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Liquifier: pricing of stETH via CurvePool & fixed rate fee' 3 | 4 | --- 5 | 6 | # Liquifier: pricing of stETH via CurvePool & fixed rate fee 7 | 8 | **PR**: https://github.com/etherfi-protocol/smart-contracts/pull/188 9 | 10 | ## Summary 11 | 12 | This PR adds the option to price `stETH` via a `ETH/stETH` Curve pool. Additionally, it adds the option of applying a fixed rate fee in the `depositWithERC20(...)` function. 13 | 14 | --- 15 | 16 | ## Findings 17 | 18 | ### [Medium] Spot prices from Curve can be manipulated 19 | 20 | **File(s)**: [`Liquifier.sol`](https://github.com/etherfi-protocol/smart-contracts/blob/1f95dcd0677f7ffa387e70c2240981c478a701b2/src/Liquifier.sol#L404) 21 | 22 | **Description**: The use of `CurvePool` as quoter has the goal of `removing the ability to swap stEth/eETH 1:1 without slippage`. To get the price from the `CurvePool` the `get_dy(...)` function is used. 23 | 24 | ```solidity 25 | ... 26 | if (_token == address(lido)) { 27 | if (quoteStEthWithCurve) { 28 | return _min(_amount, ICurvePoolQuoter1(address(stEth_Eth_Pool)).get_dy(1, 0, _amount)); 29 | } else { 30 | return _amount; /// 1:1 from stETH to eETH 31 | } 32 | ... 33 | ``` 34 | 35 | The `get_dy(...)` function returns the result of swapping `amount` of tokens at the current state of the pool. The result of this function can be easily manipulated by swapping in the `CurvePool`. The returned value could be manipulated to still enforce the use of a `1:1` rate. 36 | 37 | **Recommendation(s)**: Consider using a different method to quote the `stEth` that is not easily manipulable. The use of other oracle solutions like `TWAPs` or `Chainlink Oracles` is recommended. 38 | 39 | **Status**: Unresolved 40 | 41 | **Update from the client**: -------------------------------------------------------------------------------- /proposals/references/NM-0217-efip1271-for-etherfinode-contract.md: -------------------------------------------------------------------------------- 1 | # EIP-1271-compatibility-for-the-EtherFiNode-contract 2 | 3 | **File(s)**: [EtherFiNode.sol](https://github.com/etherfi-protocol/smart-contracts/blob/8cdf270c1fe3f9680db97d425ba27e6acf87522f/src/EtherFiNode.sol#L796), [IEtherFiNodeManager.sol](https://github.com/etherfi-protocol/smart-contracts/blob/8cdf270c1fe3f9680db97d425ba27e6acf87522f/src/interfaces/IEtherFiNodesManager.sol#L51) 4 | 5 | ### Summary 6 | 7 | The reviewed PR introduces the `isValidSignature` function in the `EtherFiNode` contract that will make it compatible with `EIP-1271`. 8 | 9 | `EIP-1271` aims to introduce a standard signature validation method for smart contracts. The `IEtherFiNodesManager.sol` interface was also updated in order to be compatible with the new version of the `EtherFiNode` contract. 10 | 11 | 12 | ### Findings 13 | 14 | ### [Best Practice] No checks for error returned 15 | 16 | **File(s)**: [`src/EtherFiNode.sol`](https://github.com/etherfi-protocol/smart-contracts/blob/8cdf270c1fe3f9680db97d425ba27e6acf87522f/src/EtherFiNode.sol#L797) 17 | 18 | **Description**: The `isValidSignature(...)` method uses the `tryRecover(...)` function to recover the signer of the provided message and signature pair. This function returns two values: 19 | - The possible signer of the message; 20 | - A value indicating if there was any error during the recovery process. 21 | 22 | Currently, the second value is ignored. 23 | 24 | **Recommendation(s)**: Consider checking if there was an error during the recovery process and returning early the correct value if there was an error. 25 | -------------------------------------------------------------------------------- /proposals/references/NM-0217-extension-of-withdrawal-with-EL-m2.md: -------------------------------------------------------------------------------- 1 | # Extension of Withdrawal with EigenLayer M2 audit. 2 | 3 | **File(s)**: EtherFiNode.sol, EtherFiNodeManager.sol 4 | 5 | ## Context 6 | The current smart contract cannot handle the delayed withdrawal from the DelegationManager.undelegate. The purpose of the review is to identify and mitigate potential risks that may arise from the implementation of the hotfix on the EtherFiNodeManager, and EtherFiNode contracts. 7 | 8 | The current withdrawal flow assumes that a withdrawal from the eigenpod is initiated via the etherfiNodesManager.processNodeExit() and it is claimed via the etherfiNodesmanager.completeQueuedWithdrawals . 9 | 10 | The admin called delegationManager.undelegate on multiple validators. This had the effect of queuing a withdrawal for the entirety of the shares owned by the validator. Now since a withdrawal has already been queued, the existing pathway fails because it is unable to create a new withdrawal for the expected amount. 11 | 12 | The fix proposed by EtherFi's team uses the feature of EigenLayer where a user can claim their withdrawal as shares that they are able to redelegate. In this fix, they add the ability to claim the validators that are in this state, but only to claim them via the shares method. Once they run this for each of the affected validators, the normal exit flow will work again. 13 | 14 | ## Review conclusions 15 | After reviewing the updated code, we don't see any clear risk on the hotfix. The code seems to work as expected. -------------------------------------------------------------------------------- /release/abis/Treasury.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "receive", 4 | "stateMutability": "payable" 5 | }, 6 | { 7 | "type": "function", 8 | "name": "owner", 9 | "inputs": [], 10 | "outputs": [ 11 | { 12 | "name": "", 13 | "type": "address", 14 | "internalType": "address" 15 | } 16 | ], 17 | "stateMutability": "view" 18 | }, 19 | { 20 | "type": "function", 21 | "name": "renounceOwnership", 22 | "inputs": [], 23 | "outputs": [], 24 | "stateMutability": "nonpayable" 25 | }, 26 | { 27 | "type": "function", 28 | "name": "transferOwnership", 29 | "inputs": [ 30 | { 31 | "name": "newOwner", 32 | "type": "address", 33 | "internalType": "address" 34 | } 35 | ], 36 | "outputs": [], 37 | "stateMutability": "nonpayable" 38 | }, 39 | { 40 | "type": "function", 41 | "name": "withdraw", 42 | "inputs": [ 43 | { 44 | "name": "_amount", 45 | "type": "uint256", 46 | "internalType": "uint256" 47 | }, 48 | { 49 | "name": "_to", 50 | "type": "address", 51 | "internalType": "address" 52 | } 53 | ], 54 | "outputs": [], 55 | "stateMutability": "nonpayable" 56 | }, 57 | { 58 | "type": "event", 59 | "name": "OwnershipTransferred", 60 | "inputs": [ 61 | { 62 | "name": "previousOwner", 63 | "type": "address", 64 | "indexed": true, 65 | "internalType": "address" 66 | }, 67 | { 68 | "name": "newOwner", 69 | "type": "address", 70 | "indexed": true, 71 | "internalType": "address" 72 | } 73 | ], 74 | "anonymous": false 75 | } 76 | ] 77 | -------------------------------------------------------------------------------- /release/abis/UUPSProxy.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "constructor", 4 | "inputs": [ 5 | { 6 | "name": "_implementation", 7 | "type": "address", 8 | "internalType": "address" 9 | }, 10 | { 11 | "name": "_data", 12 | "type": "bytes", 13 | "internalType": "bytes" 14 | } 15 | ], 16 | "stateMutability": "nonpayable" 17 | }, 18 | { 19 | "type": "fallback", 20 | "stateMutability": "payable" 21 | }, 22 | { 23 | "type": "receive", 24 | "stateMutability": "payable" 25 | }, 26 | { 27 | "type": "event", 28 | "name": "AdminChanged", 29 | "inputs": [ 30 | { 31 | "name": "previousAdmin", 32 | "type": "address", 33 | "indexed": false, 34 | "internalType": "address" 35 | }, 36 | { 37 | "name": "newAdmin", 38 | "type": "address", 39 | "indexed": false, 40 | "internalType": "address" 41 | } 42 | ], 43 | "anonymous": false 44 | }, 45 | { 46 | "type": "event", 47 | "name": "BeaconUpgraded", 48 | "inputs": [ 49 | { 50 | "name": "beacon", 51 | "type": "address", 52 | "indexed": true, 53 | "internalType": "address" 54 | } 55 | ], 56 | "anonymous": false 57 | }, 58 | { 59 | "type": "event", 60 | "name": "Upgraded", 61 | "inputs": [ 62 | { 63 | "name": "implementation", 64 | "type": "address", 65 | "indexed": true, 66 | "internalType": "address" 67 | } 68 | ], 69 | "anonymous": false 70 | } 71 | ] 72 | -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/0.release: -------------------------------------------------------------------------------- 1 | Version: 0 2 | Treasury Contract Address: 0x3E7269e9D108D3Ed0B58b33C239d78181e98bA35 3 | Auction Contract Address: 0xa0d6d3361F28f59d63A076c7892d4d3C9CE1C4F6 4 | Deposit Contract Address: 0x9418106f99D4FE3922CE4348e4FdAC78e24169A3 5 | TNFT Contract Address: 0x7596289cE6Ec8442986C38Dc393c6d672Be69D0f 6 | BNFT Contract Address: 0x3b73b1CbA3A56da7eDc7b73f93fD38e5A5868648 -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/1.release: -------------------------------------------------------------------------------- 1 | 1 2 | Treasury: 0x5704eb63a3271778f77497669ace6fb60dddc3e5 3 | Node Operator Key Manager: 0xa4d622df827cacca5ab4575ccdbc7be01536ec80 4 | AuctionManager: 0xd737d34a168ebcf6a7dc0a1b4ff03fdea0714d72 5 | StakingManager: 0x19fdd9673da89cc813c4864e14c0167a9f84a14f 6 | TNFT: 0x64c3f6336dd2617b741cffe80c5ad5309be55630 7 | BNFT: 0x9b97cac575783cdb6cdaef39a77b0b54be3c1ad1 8 | EtherFi Node Manager: 0x08f7857937cdd73d4b9b08177f580e57eed4480a 9 | Protocol Revenue Manager: 0x17cc3e244d10c54b4d1747e417d534e2059d62a5 -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/10.release: -------------------------------------------------------------------------------- 1 | 10 2 | 0xe49a43683104384372fcfcf502072bd9af8ce320 3 | 0xf1f86298b5f3e573cea34f68f115412ff0a2358b 4 | 0xf18d053f69c5da7a5e150d763012e46d807037ca 5 | 0x47e29ccbb4c962c67e7bcb8406dcc5a137b4444b 6 | 0x9df663a2250a4144f7fb62d307ce43b117a53e55 7 | 0xc7d481be9f8c4d27f4ef45823e133d6eebd09cb8 8 | 0x8fed6cd6d782cc04ce6e554a6a947fa8dcc825d3 -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/11.release: -------------------------------------------------------------------------------- 1 | 11 2 | 0x256759405fc4b25e84e9327944a4d65cce307621 3 | 0x8907fc7f1aaba12e1debd78f889f990360b65ea4 4 | 0x9b91fbc828415d12254bbf0ba56d455e17df6d0c 5 | 0x850c7c8b7da3e1cf6780104160f2c90cc7f9f2fa 6 | 0x95f32134e79c35d792b44b7ced489b6e57848547 7 | 0xcf9a19b67b21eabc8a3b8a280695e81710833b52 8 | 0xdeffe20ad1f16639120d38351468ce245c08e4be -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/12.release: -------------------------------------------------------------------------------- 1 | 12 2 | 0x8f9cf88ace11b3b5eac6b3d9e01fe46bedf7a8f9 3 | 0xa5557d0c6f5b6fecbff0943b2051c4af1dceb3b6 4 | 0xd0b6a9308feba17c1555f399eab562603000f608 5 | 0x65bd0cd9fc318df36d49e24564d5bfc8f666f82c 6 | 0x6e32b5e73f0b74895824ce1018d2bd311d0f8abe 7 | 0x70eeb47787c1909b343f527ced94075586341ac6 8 | 0xb83c78347c1c310795d6d1efd2c0518f7e83de2c -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/13.release: -------------------------------------------------------------------------------- 1 | 13 2 | 0x98055a9977d20eb69e9a830391ca471bc13f6b0b 3 | 0xd255b9cdbf07939235aacc94be51200e5c0042d7 4 | 0xe5b29b43a748ad342998a0d992cefbc6e43d1a23 5 | 0x1b122569f7f6ef2025fd96be1f37fd70f8abf718 6 | 0x33005cb514641dc0104c1f0de70ed9240671d619 7 | 0xb935227532d933db5d5b3def8ed00c40244ae4f6 8 | 0x63d5d099f9ab9fd9590e955e6d49c623b16debba -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/14.release: -------------------------------------------------------------------------------- 1 | 14 2 | Treasury: 0x5fbdb2315678afecb367f032d93f642f64180aa3 3 | Node Operator Key Manager: 0xe7f1725e7734ce288f8367e1bb143e90bb3f0512 4 | AuctionManager: 0x9fe46736679d2d9a65f0992f2272de9f3c7fa6e0 5 | StakingManager: 0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9 6 | TNFT: 0xd8058efe0198ae9dd7d563e1b4938dcbc86a1f81 7 | BNFT: 0x6d544390eb535d61e196c87d6b9c80dcd8628acd 8 | Safe Manager: 0x0165878a594ca255338adfa4d48449f69242eb8f 9 | Protocol Revenue Manager: 0x5fc8d32690cc91d4c39d9d3abcbd16989f875707 -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/15.release: -------------------------------------------------------------------------------- 1 | 15 2 | Treasury: 0x2279b7a0a67db372996a5fab50d91eaa73d2ebe6 3 | Node Operator Key Manager: 0x8a791620dd6260079bf849dc5567adc3f2fdc318 4 | AuctionManager: 0x610178da211fef7d417bc0e6fed39f05609ad788 5 | StakingManager: 0xb7f8bc63bbcad18155201308c8f3540b07f84f5e 6 | TNFT: 0x8daf17a20c9dba35f005b6324f493785d239719d 7 | BNFT: 0x3ca8f9c04c7e3e1624ac2008f92f6f366a869444 8 | Safe Manager: 0x9a676e781a523b5d0c0e43731313a708cb607508 9 | Protocol Revenue Manager: 0x0dcd1bf9a1b36ce34237eeafef220932846bcd82 -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/16.release: -------------------------------------------------------------------------------- 1 | 16 2 | Treasury: 0x2e4ebe3e9bf604a5155ef8869fb7add4defc28ce 3 | Node Operator Key Manager: 0xccadcfe20d45e6e932b7a6ce6d71277c91ff9e4d 4 | AuctionManager: 0x4e8cedba4b5e1c263149341e360f233cbe413a7d 5 | StakingManager: 0x9030ef71f399c103539fee99a435d823d76cce85 6 | TNFT: 0xc7d2af3c235db2a21059d040424ab57b02e3696e 7 | BNFT: 0x8dcd70fb101651c07c90688d5a3f42263f22c835 8 | Safe Manager: 0xd564abc48c31c7024c1d29993e57faf5191965c3 9 | Protocol Revenue Manager: 0xfb4d65b073fea22befee2194a50231857bd5068e -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/17.release: -------------------------------------------------------------------------------- 1 | 17 2 | Treasury: 0xc8dac0d35f26fec2056d3d3be1686181e650a045 3 | Node Operator Key Manager: 0x1058918e92b7ecba885c635251bc74562258e691 4 | AuctionManager: 0xa330ff6cc6b4d3dab9ef9706dfa7b1a30a466250 5 | StakingManager: 0x338872416159b54263e85f3eebf49405d6a38fb4 6 | TNFT: 0x28cbf8c39f8f35aaea15d23aa0cd4dc176dad6e9 7 | BNFT: 0x1d54b96c605060c4269d9d550c0a82331e5d9880 8 | Safe Manager: 0x1f5dc22aad6812d7ebcc0a07b0e04c9e5c6c85bb 9 | Protocol Revenue Manager: 0x4f5c867e2d6e39b7e4b888e3cb4a700eb2c244b7 -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/18.release: -------------------------------------------------------------------------------- 1 | 18 2 | 3 | Treasury: 0x1726250f472e9a7addc6b62ecd77e9323ca3de8b 4 | Node Operator Key Manager: 0xc91a4b483e2db7cff46817dea7cfca5c70aa07e9 5 | AuctionManager: 0x1e54cc61d88e8c6e339e2e8567af2e36cb50aef7 6 | StakingManager: 0x77107d71f756f8a95931095aa47fd1963de7415a 7 | TNFT: 0xc3a4d14e33a2d3e4d759f51a92e6d54a509c29cb 8 | BNFT: 0x70b6c0dbc2528a46957f01c68fe56afdb3705fdc 9 | Safe Manager: 0xab4019cdda71c4f5db67dbb0c5d051812558d23a 10 | Protocol Revenue Manager: 0xb5fae0b66304b48c4b10a662b5dbb73dc6a73f76 11 | -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/19.release: -------------------------------------------------------------------------------- 1 | 19 2 | Treasury: 0xa0f1b005330343118a95f3b4361baa9674fdec54 3 | Node Operator Key Manager: 0x5a3d2ab870740dc87033cc84fa91aff7e1776326 4 | AuctionManager: 0x9e3f98361ad8439646bda0f4589537d885723dae 5 | StakingManager: 0x184dcc63cde8ace420e2a3b9f81466b059e5206d 6 | TNFT: 0x78b9065478126c85c598da7469850d1b7e8422e6 7 | BNFT: 0x477e237524bd3f12a931963d979690747280baf9 8 | Safe Manager: 0x75e1dac5368b053fdcf41b62e7233d44527eea74 9 | Protocol Revenue Manager: 0xa93cf0f0aeb8dcc5589df05f5acb784c521b77fc -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/2.release: -------------------------------------------------------------------------------- 1 | Version: 2 2 | Treasury Contract Address: 0xf1ddb032360d6eee968480fe2170ac5155599283 3 | Auction Contract Address: 0x11a5bf87221dfb8d0b3310b1c939f993c7fa2927 4 | Deposit Contract Address: 0x60300c81d5119dfb36d0158439452fe834b23a38 5 | TNFT Contract Address: 0xc367804a9fa0665bec02dcb9ac99aea2f5ffa2cf 6 | BNFT Contract Address: 0xf7f4b6699bbfb28ebba4616b24987ef5e7039c79 -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/20.release: -------------------------------------------------------------------------------- 1 | 20 2 | 3 | Treasury: 0xc5c48355a75936f93ef7f537501c4a79089e34bc 4 | Node Operator Key Manager: 0xbcfbbba3ff400c7cdec5863d112069d4bd80decf 5 | AuctionManager: 0x79d0c42e170a3c4cfac274986aeeaa7697019aae 6 | StakingManager: 0xe8143a7d05433607dfa2b78a9740a887bcd27572 7 | TNFT: 0xd47a8c912141f6b3fa5a37c5b85cf74738f08639 8 | BNFT: 0xa77fb689a930e4f01aaf9e9dcacbc30c0f23527d 9 | Safe Manager: 0xa7d2ec11dda8a07421595f36b48b92eb3a46d7a0 10 | Protocol Revenue Manager: 0x6d443d029e76c15991e3bf4049b680db0bc6254f 11 | -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/21.release: -------------------------------------------------------------------------------- 1 | 21 2 | 3 | Treasury: 0x182168b543b64653c5fa8e40d940fd167a66f257 4 | Node Operator Key Manager: 0xdc7f48cca60294db053cf78fc6717e3def27e9d7 5 | AuctionManager: 0x493b5e451ad0acf66dea0a0ea27ca01a99b82e8b 6 | StakingManager: 0x781fcea4c31164b57b1b3db41bea8ef2c719db01 7 | TNFT: 0xcee1475b9f2858672dfe83d39a58b83c9021c60c 8 | BNFT: 0x11ad9ecb409e72ae39d795101229f52a6b0b63d1 9 | Safe Manager: 0x5aefe189169e9f7688dd522c32526a62a55aba05 10 | Protocol Revenue Manager: 0x3f06a9ef0ff40552b627acbe8b0ccc595eea928a 11 | -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/22.release: -------------------------------------------------------------------------------- 1 | 22 2 | Treasury: 0x906b3fde2e5d5518ee8e179f5ce9de4241e8a995 3 | Node Operator Key Manager: 0x258493c7d312bab37fa0b8c10fb7c1004cb49c83 4 | AuctionManager: 0x71298e0eb4a35a438b184c1f62d2cb1387d4f352 5 | StakingManager: 0x15eaadd021dd83fc1bb7c620119839dbbbccb8e0 6 | EtherFi Node Manager: 0xcc4f0f32c3ef42dc72e07a7b28ddff7596fbd290 7 | Protocol Revenue Manager: 0xd07eab3f9be000c6b9cc0545d3e0a30e6d52bff0 8 | EtherFi Node: 0x25eaa382b1572e520bd27d29ce0e909c5b1dcb47 -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/23.release: -------------------------------------------------------------------------------- 1 | 23 2 | Treasury: 0xd81121b6b1d071ff38fbdc04e39d4931c6369979 3 | Node Operator Key Manager: 0x96e50520a89f9361e2e4087b4e23d1ce0d718cd9 4 | AuctionManager: 0x2932f47dbb50c5a9711f68f9b06b19a0719f24e7 5 | StakingManager: 0xb6b8a27b4d0dd1c48c6967999829a56e30ebb916 6 | EtherFi Node Manager: 0x0604b8c59597ab7be4b4c9c44b50ca895145394a 7 | Protocol Revenue Manager: 0x3b9b29ffee357715d7d9aad1068ee8c7d2b96e41 8 | TNFT: 0x8740911cbf14f05d39b544c82ac42087b548aa4a 9 | BNFT: 0xe6cd4f2d19e9adad0b4ccc107e2ac99f30267631 -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/24.release: -------------------------------------------------------------------------------- 1 | 24 2 | Treasury: 0x59e82b1d37c16db55a6938a23650527f2ecb1dea 3 | Node Operator Key Manager: 0x4913dcf8bd1daace1000128dd8cbd4ef2a43374e 4 | AuctionManager: 0x6369df77d3a4425bcc61bc1b9f1131796c731120 5 | StakingManager: 0xc85db6d096423f06c2f9fa8dca8507febc8483bc 6 | EtherFi Node Manager: 0x995d2cf1446e28a3919c10643cf74bced33581fb 7 | Protocol Revenue Manager: 0x560ecf0a58cd677c33f016e548565e1948a19901 8 | TNFT: 0x3d7658cbe1291c25c370789c14374d5e9774651e 9 | BNFT: 0x47121d9ae8989381fecf6b00ec8b7a13c00b66e6 -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/25.release: -------------------------------------------------------------------------------- 1 | 25 2 | Treasury: 0x8740c379d5760b3c846d0b1b97fb3491bfd0d65a 3 | Node Operator Key Manager: 0x70e340f26b25c181054d361e055e7438a250d360 4 | AuctionManager: 0x580d38111420e7cecd847a58fce461679e4bdf5c 5 | StakingManager: 0x7a2ae4d599aa8a0555f7ae6f62d8e0c5b3268b7f 6 | EtherFi Node Manager: 0x4cc5e869ee606a631b70402f03215065dc6f0465 7 | Protocol Revenue Manager: 0x0f7a5eed1d3007376ceedb233e8a407b9785cf9c 8 | TNFT: 0x7fd9d77fd38989f3ab58b72496219e18a164644b 9 | BNFT: 0x2b541568f89e0ba38228a3e6f24970aef1da22f7 -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/26.release: -------------------------------------------------------------------------------- 1 | 26 2 | Treasury: 0xef690b0eb1152671e0b37fa73dc442e2137e8d40 3 | Node Operator Key Manager: 0xecfb5804ad27011d02e13f00a327243f69ccb79c 4 | AuctionManager: 0x7f2c4a1bed68233962db3fc21cc7c23fd46664a8 5 | StakingManager: 0x66816e65c972c2491ae88552261e8e3cba3fed3a 6 | EtherFi Node Manager: 0xce5df0f4a4f041ab1f48d6d1b1f5159ca0361923 7 | Protocol Revenue Manager: 0x7a5cd61258ebb2343895e6e1c5c89ff7d87c1534 8 | TNFT: 0x51c0095a3ff0b58867574439ddb763e8646f7a74 9 | BNFT: 0x9700b2fe6bc8b40a745ce572b2d55dbf714a22db -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/27.release: -------------------------------------------------------------------------------- 1 | 27 2 | Treasury: 0x038a4d4cafdbb9cc8403bf680cd137f48b7c40eb 3 | Node Operator Key Manager: 0xcef13b96028e4aaea5889cd99b8740a4f48f5ea0 4 | AuctionManager: 0x7b8d2371f5786732de179df826164ac9aba7e24a 5 | StakingManager: 0x769930971bb03af58ed328eebaf3ecc19d5c8f9c 6 | EtherFi Node Manager: 0x232a8a24748b7b01b892d70de1530b57655f5e67 7 | Protocol Revenue Manager: 0x3d466eca1bb649400ed9a9eab2da8effaea2a6ff 8 | TNFT: 0x9b9535f3bc5f3fe1d525a0dc372ef4cc29d7a86d 9 | BNFT: 0xeb568b6821a5be7e8c87ab3e2e6e308cee0a9838 -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/28.release: -------------------------------------------------------------------------------- 1 | 28 2 | Treasury: 0xfdd53e1d7db04e2813eb6d7b14ba75f68c0ebfe9 3 | Node Operator Key Manager: 0xc8f81dc3d21e634bd81e0fbf73d8ef7052b1a0d7 4 | AuctionManager: 0xec4da3486a07aa0f3d701e9eb14f0bdbb33b1c7d 5 | StakingManager: 0xca2169f9ffc181c5ad5a8997c96067af193b2827 6 | EtherFi Node Manager: 0x604dc4b29afb5acda43b1162475dc824dee52f2a 7 | Protocol Revenue Manager: 0x1ff0799e0ea78e68c824fe34c54ed1045ba332e4 8 | TNFT: 0x93c797cabd7f6f80078aa74836c2773e72a1a5a9 9 | BNFT: 0x5bc03033b3b1eb4694310d1d21c1ea3fce8d272c -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/5.release: -------------------------------------------------------------------------------- 1 | Version: 5 2 | Treasury Contract Address: 0x47357dae93019893f16df9c5e5c6e72b8f26deca 3 | Auction Contract Address: 0x1ee3c28131b6a118ed3e8ff5ad010826feb91207 4 | Deposit Contract Address: 0x1928cc260fc41ef0b9fa1697eb617665d75df8e8 5 | TNFT Contract Address: 0x36a83f82d4a6378975643e949f3bdf3e12dd9e41 6 | BNFT Contract Address: 0x71f39c9fbde4dfd41cce50032c889b6c8e3d34d9 -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/6.release: -------------------------------------------------------------------------------- 1 | Version: 6 2 | Treasury Contract Address: 0xb8dd6be75602852ff915e35d2c10849e86b6b110 3 | Auction Contract Address: 0x41c813ed0f5b27e87cfdcf8eec232b8f0e77f8c1 4 | Deposit Contract Address: 0x58f92da2d825de0dc5e0534503a61dbbd80def62 5 | TNFT Contract Address: 0xaca7154cd422a979019bb954b754b606ef196fdb 6 | BNFT Contract Address: 0x77292076cbcdf1b3d21897fba4ce500833957529 -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/7.release: -------------------------------------------------------------------------------- 1 | Version: 7 2 | Treasury Contract Address: 0x66099ccbd5106459bfd4426f84e7c467d8e6793f 3 | Auction Contract Address: 0xc014795a11123ca0481c4add14be6655c5456c68 4 | Deposit Contract Address: 0x2fe9a640b30322015e09a5f970c6415f45f73165 5 | TNFT Contract Address: 0xef12b24503970b54d2365cf50bb1103a253fef0d 6 | BNFT Contract Address: 0x8b22a34f9f4e08524ae6e6f038357f91a0f19a1d -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/8.release: -------------------------------------------------------------------------------- 1 | Version: 8 2 | Treasury Contract Address: 0xb31d5eb956a5fb009a1a91b51c8d667ec0448511 3 | Auction Contract Address: 0xdd26e12133b49cd85f13c6cca163205321e6dac8 4 | Deposit Contract Address: 0x9a8e6ef48110c723d056abdddc843b799e438c1f 5 | TNFT Contract Address: 0x21963b19a84c5328df4e743df888dda635130d06 6 | BNFT Contract Address: 0xf23a94019fee4d6cba9aafb59d9c5b88598e5fa5 -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/9.release: -------------------------------------------------------------------------------- 1 | 9 2 | 0x3ac08a27e0bfdf69e22660a890db081f60d04031 3 | 0xf88a31a0cb09f1f8ca5e98855cdf083b64d0743b 4 | 0xc4f34d45bfb116274b3396519cefe9ac89e13ab3 5 | 0x81e235c5ab603a3ee226610521e34afd8e965a81 6 | 0x19eb262d21b486c15d218106426aaaa5d705543b 7 | 0x355c57f8e7b45151b20682fb551a8cca667bb25f 8 | 0x998e864faacbfbc7881773730e3abfda7cee1178 -------------------------------------------------------------------------------- /release/logs/EtherFiSuite/version.txt: -------------------------------------------------------------------------------- 1 | 28 -------------------------------------------------------------------------------- /release/logs/PhaseOne/1.release: -------------------------------------------------------------------------------- 1 | 1 2 | Treasury: 0x5d92931b60aca7e20d6bb941a3911caa8f183018 3 | Node Operator Key Manager: 0x5a9a4aceec1b52d24a6562e89bab4e497dec23e8 4 | AuctionManager: 0x3114a070c0e1b6d249470b2dd86977915a1805e6 5 | StakingManager: 0xec40f10cc2203c60f90f2938fe975d9cde9a42c8 6 | EtherFi Node Manager: 0xc5c53beb64fe5f9fd99a10577855aee8e0cc4cc0 7 | Protocol Revenue Manager: 0x58f30c50470d48d2ab3b994642e3187ac3d46d15 8 | Score Manager: 0x4d871425fdd689cf6f5f87806cdfd9ac228301a5 -------------------------------------------------------------------------------- /release/logs/PhaseOne/2.release: -------------------------------------------------------------------------------- 1 | 2 2 | Treasury: 0x02122142c37bfe9587eb2c265b24fb2e11e9d091 3 | Node Operator Key Manager: 0xc013bff2a04be559ac3fd4ee73569470ebb42390 4 | AuctionManager: 0x8447097be76d5a89c19ffacd698f53e4c3d09215 5 | StakingManager: 0x44f5759c47e052e5cf6495ce236ab0601f1f98ff 6 | EtherFi Node Manager: 0xb30c0a5edbf5e2d2dc14ff8d4d7e62f9991870f3 7 | Protocol Revenue Manager: 0xfabf47d0cf8808e4d4b65d286609410b63b25ab9 8 | Score Manager: 0xce6026dbd690c1e2ff875bf59f1aafdffefa3192 9 | -------------------------------------------------------------------------------- /release/logs/PhaseOne/3.release: -------------------------------------------------------------------------------- 1 | 3 2 | Treasury: 0x6329004e903b7f420245e7af3f355186f2432466 3 | Node Operator Key Manager: 0x5ba8e69895aa5b63508d4232444f060596c1e1e7 4 | AuctionManager: 0x00c452affee3a17d9cecc1bcd2b8d5c7635c4cb9 5 | StakingManager: 0x25e821b7197b146f7713c3b89b6a4d83516b912d 6 | EtherFi Node Manager: 0x8b71140ad2e5d1e7018d2a7f8a288bd3cd38916f 7 | Protocol Revenue Manager: 0xfe8a8fc74b2fdd3d745abfc4940dd858ba60696c 8 | Score Manager: 0x3786cc776c850c95763ee65f877191b4c97ab80c -------------------------------------------------------------------------------- /release/logs/PhaseOne/4.release: -------------------------------------------------------------------------------- 1 | 4 2 | Treasury: 0xd39d3a7a94a227e313fda9bdaee427204874d610 3 | Node Operator Key Manager: 0x2df30888991831dea992a9f33fad88bf34fb4304 4 | AuctionManager: 0xab5768448499250bda8a29f35a3ee47fad69eb3c 5 | StakingManager: 0x482f265d8d850fa6440e42b0b299c044caeb879a 6 | EtherFi Node Manager: 0xb914b281260222c6c118febd78d5dbf4fd419ffb 7 | Protocol Revenue Manager: 0xfafcc0041100a80fce3bd52825a36f73bf9fd93a 8 | Score Manager: 0xc54712b593e2038e98664ec81ec553d03bec94fe -------------------------------------------------------------------------------- /release/logs/PhaseOne/version.txt: -------------------------------------------------------------------------------- 1 | 4 2 | -------------------------------------------------------------------------------- /remappings.txt: -------------------------------------------------------------------------------- 1 | forge-std/=lib/forge-std/src/ 2 | @openzeppelin/=lib/openzeppelin-contracts/ 3 | @openzeppelin-upgradeable/=lib/openzeppelin-contracts-upgradeable/ 4 | @uniswap/=lib/ 5 | @eigenlayer/=lib/eigenlayer-contracts/src/ 6 | @layerzerolabs/lz-evm-oapp-v2/contracts/=lib/Etherfi-SyncPools/node_modules/@layerzerolabs/lz-evm-oapp-v2/contracts/ 7 | @layerzerolabs/lz-evm-protocol-v2/contracts/=lib/Etherfi-SyncPools/node_modules/@layerzerolabs/lz-evm-protocol-v2/contracts/ 8 | @layerzerolabs/lz-evm-messagelib-v2/contracts/=lib/Etherfi-SyncPools/node_modules/@layerzerolabs/lz-evm-messagelib-v2/contracts/ 9 | @layerzerolabs/lz-evm-oapp-v2/contracts-upgradeable/=lib/Etherfi-SyncPools/node_modules/layerzero-v2/oapp/contracts/ 10 | -------------------------------------------------------------------------------- /script/Create2Factory.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.0; 3 | 4 | import "@openzeppelin/contracts/utils/Create2.sol"; 5 | 6 | contract Create2Factory { 7 | event Deployed(address addr, address deployer, bytes32 bytecode_hash, bytes32 salt); 8 | 9 | function deploy(bytes memory code, bytes32 salt) external payable returns (address) { 10 | address addr = Create2.deploy(msg.value, salt, code); 11 | 12 | emit Deployed(addr, address(this), keccak256(code), salt); 13 | return addr; 14 | } 15 | } -------------------------------------------------------------------------------- /script/DeployEigenlayerSlashing.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | 6 | import "../src/EtherFiNode.sol"; 7 | import "../src/EtherFiNodesManager.sol"; 8 | import "../src/EtherFiRestaker.sol"; 9 | import "../src/helpers/AddressProvider.sol"; 10 | import "../src/UUPSProxy.sol"; 11 | import "@openzeppelin/contracts/utils/Strings.sol"; 12 | import "forge-std/console2.sol"; 13 | 14 | contract DeployEigenlayerSlashingScript is Script { 15 | using Strings for string; 16 | 17 | UUPSProxy public liquifierProxy; 18 | 19 | EtherFiNode public etherFiNodeImplementation; 20 | EtherFiNode public etherFiNodeInstance; 21 | EtherFiNodesManager public etherFiNodesManagerImplementation; 22 | EtherFiNodesManager public etherFiNodesManagerInstance; 23 | EtherFiRestaker public etherFiRestakerImplementation; 24 | EtherFiRestaker public etherFiRestakerInstance; 25 | 26 | AddressProvider public addressProvider; 27 | 28 | address rewardsCoordinator = 0x7750d328b314EfFa365A0402CcfD489B80B0adda; 29 | 30 | function run() external { 31 | 32 | vm.startBroadcast(); 33 | 34 | etherFiNodeImplementation = new EtherFiNode(); 35 | etherFiNodesManagerImplementation = new EtherFiNodesManager(); 36 | etherFiRestakerImplementation = new EtherFiRestaker(rewardsCoordinator); 37 | 38 | console2.log("etherFiNode Impl:", address(etherFiNodeImplementation)); 39 | console2.log("etherFiNodesManager Impl:", address(etherFiNodesManagerImplementation)); 40 | console2.log("etherFiRestaker Impl:", address(etherFiRestakerImplementation)); 41 | 42 | vm.stopBroadcast(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /script/Merkletree.js: -------------------------------------------------------------------------------- 1 | const { MerkleTree } = require("merkletreejs"); 2 | const keccak256 = require("keccak256"); 3 | const fs = require('fs'); 4 | const { ethers } = require("hardhat"); 5 | 6 | let walletAddresses = [ 7 | "0x1c5fffDbFDE331A10Ab1e32da8c4Dff210B43145", 8 | "0x2f2806e8b288428f23707A69faA60f52BC565c17", 9 | "0x5dfb8BC4830ccF60d469D546aEC36531c97B96b5", 10 | "0x4507cfB4B077d5DBdDd520c701E30173d5b59Fad", 11 | "0xCd5EBC2dD4Cb3dc52ac66CEEcc72c838B40A5931", 12 | "0x7631FCf7D45D821cB5FA688fADa7bbc76714B771", 13 | ] 14 | 15 | let leafNodes = walletAddresses.map(addr => keccak256(addr)); 16 | let merkletree = new MerkleTree(leafNodes, keccak256, {sortPairs: true}); 17 | let merkleRoot = merkletree.getRoot(); 18 | 19 | let buyerOne = leafNodes[0]; 20 | let buyerTwo = leafNodes[1]; 21 | let buyerThree = leafNodes[2]; 22 | let buyerFour = leafNodes[3]; 23 | let buyerFive = leafNodes[4]; 24 | let buyerSix = leafNodes[5]; 25 | 26 | let buyerOneMerkleProof = merkletree.getHexProof(buyerOne); 27 | let buyerTwoMerkleProof = merkletree.getHexProof(buyerTwo); 28 | let buyerThreeMerkleProof = merkletree.getHexProof(buyerThree); 29 | let buyerFourMerkleProof = merkletree.getHexProof(buyerFour); 30 | let buyerFiveMerkleProof = merkletree.getHexProof(buyerFive); 31 | let buyerSixMerkleProof = merkletree.getHexProof(buyerSix); 32 | 33 | merkleRoot = merkleRoot.toString("hex"); 34 | console.log(merkleRoot); 35 | console.log(buyerOneMerkleProof); 36 | console.log(buyerTwoMerkleProof); 37 | console.log(buyerThreeMerkleProof); 38 | console.log(buyerFourMerkleProof); 39 | console.log(buyerFiveMerkleProof); 40 | console.log(buyerSixMerkleProof); 41 | 42 | module.exports = { 43 | walletAddresses, 44 | leafNodes, 45 | merkletree, 46 | merkleRoot, 47 | buyerOneMerkleProof, 48 | buyerTwoMerkleProof, 49 | buyerThreeMerkleProof, 50 | buyerFourMerkleProof, 51 | buyerFiveMerkleProof, 52 | buyerSixMerkleProof, 53 | } -------------------------------------------------------------------------------- /script/contracts.json: -------------------------------------------------------------------------------- 1 | ["AddressProvider","RegulationsManager","LiquidityPool","EETH","WeETH","MembershipManager","MembershipNFT","NFTExchange","AuctionManager","StakingManager","EtherFiNodesManager","ProtocolRevenueManager","TNFT","BNFT","Treasury","NodeOperatorManager","EtherFiNode","EarlyAdopterPool","LoyaltyPointsMarketSafe"] -------------------------------------------------------------------------------- /script/deploys/BucketRateLimiter.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | 6 | import "../../src/BucketRateLimiter.sol"; 7 | import "../../src/UUPSProxy.sol"; 8 | 9 | interface IL2SyncPool { 10 | function setRateLimiter(address rateLimiter) external; 11 | } 12 | 13 | contract Deploy is Script { 14 | 15 | function run() external { 16 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 17 | address deployer = vm.addr(deployerPrivateKey); 18 | address l2syncpool; 19 | 20 | if (block.chainid == 59144) l2syncpool = 0x823106E745A62D0C2FC4d27644c62aDE946D9CCa; // LINEA 21 | else if (block.chainid == 81457) l2syncpool = 0x52c4221Cb805479954CDE5accfF8C4DcaF96623B; // BLAST 22 | else if (block.chainid == 34443) l2syncpool = 0x52c4221Cb805479954CDE5accfF8C4DcaF96623B; // MODE 23 | else if (block.chainid == 8453) l2syncpool = 0xc38e046dFDAdf15f7F56853674242888301208a5; // BASE 24 | else revert("Unsupported chain id"); 25 | 26 | vm.startBroadcast(deployerPrivateKey); 27 | 28 | BucketRateLimiter impl = new BucketRateLimiter(); 29 | UUPSProxy proxy = new UUPSProxy(address(impl), ""); 30 | BucketRateLimiter limiter = BucketRateLimiter(address(proxy)); 31 | limiter.initialize(); 32 | 33 | limiter.updateConsumer(l2syncpool); 34 | IL2SyncPool(l2syncpool).setRateLimiter(address(limiter)); 35 | 36 | vm.stopBroadcast(); 37 | 38 | // TEST 39 | 40 | vm.startPrank(deployer); 41 | limiter.setCapacity(0.0002 ether); 42 | limiter.setRefillRatePerSecond(0.0002 ether); 43 | vm.stopPrank(); 44 | 45 | vm.prank(l2syncpool); 46 | vm.expectRevert("BucketRateLimiter: rate limit exceeded"); 47 | limiter.updateRateLimit(address(0), address(0), 0.0001 ether, 0.0001 ether); 48 | 49 | vm.prank(l2syncpool); 50 | vm.warp(block.timestamp + 1); 51 | limiter.updateRateLimit(address(0), address(0), 0.0001 ether, 0.0001 ether); 52 | } 53 | 54 | } -------------------------------------------------------------------------------- /script/deploys/DeployBucketLimiter.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | 6 | import "src/BucketRateLimiter.sol"; 7 | 8 | contract Deploy is Script { 9 | 10 | function run() external { 11 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 12 | 13 | vm.startBroadcast(deployerPrivateKey); 14 | 15 | BucketRateLimiter limiter = new BucketRateLimiter(); 16 | 17 | vm.stopBroadcast(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /script/deploys/DeployCumulativeMerkleRewardsDistributor.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | 6 | import "src/CumulativeMerkleRewardsDistributor.sol"; 7 | import "src/UUPSProxy.sol"; 8 | import "../../src/helpers/AddressProvider.sol"; 9 | import "forge-std/console.sol"; 10 | 11 | /* Deploy Command 12 | * source .env && forge script ./script/deploys/DeployCumulativeMerkleRewardsDistributor.sol:DeployCumulativeMerkleRewardsDistributor --rpc-url MAINNET_RPC_URL --broadcast --etherscan-api-key $ETHERSCAN_API_KEY --verify --slow -vvvv 13 | */ 14 | 15 | contract DeployCumulativeMerkleRewardsDistributor is Script { 16 | 17 | AddressProvider public addressProvider; 18 | /////////////////////////////////////// 19 | address roleRegistryProxyAddress; 20 | ////////////////////////////////////// 21 | 22 | function run() external { 23 | 24 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 25 | 26 | vm.startBroadcast(); 27 | 28 | 29 | addressProvider = AddressProvider(addressProviderAddress); 30 | roleRegistryProxyAddress = addressProvider.getContractAddress("RoleRegistry"); 31 | address timelockAddress = addressProvider.getContractAddress("EtherFiTimelock"); 32 | console2.log("RoleRegistry address:", roleRegistryProxyAddress); 33 | 34 | bytes memory initializerData = abi.encodeWithSelector(CumulativeMerkleRewardsDistributor.initialize.selector); 35 | CumulativeMerkleRewardsDistributor cumulativeMerkleRewardsDistributorImplementation = new CumulativeMerkleRewardsDistributor(roleRegistryProxyAddress); 36 | UUPSProxy cumulativeMerkleRewardsDistributorProxy = new UUPSProxy(address(cumulativeMerkleRewardsDistributorImplementation), initializerData); 37 | CumulativeMerkleRewardsDistributor cumulativeMerkleInstance = CumulativeMerkleRewardsDistributor(address(cumulativeMerkleRewardsDistributorProxy)); 38 | //cumulativeMerkleInstance.grantRole(keccak256("CUMULATIVE_MERKLE_REWARDS_DISTRIBUTOR_ADMIN_ROLE"), msg.sender); 39 | cumulativeMerkleInstance.transferOwnership(address(timelockAddress)); 40 | 41 | vm.stopBroadcast(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /script/deploys/DeployEtherFiOperationParameters.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | 6 | import "@openzeppelin/contracts/utils/Strings.sol"; 7 | 8 | import "../../src/Liquifier.sol"; 9 | import "../../src/EtherFiRestaker.sol"; 10 | import "../../src/helpers/AddressProvider.sol"; 11 | import "../../src/UUPSProxy.sol"; 12 | import "../../src/helpers/EtherFiOperationParameters.sol"; 13 | 14 | 15 | contract Deploy is Script { 16 | using Strings for string; 17 | AddressProvider public addressProvider; 18 | 19 | function run() external { 20 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 21 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 22 | addressProvider = AddressProvider(addressProviderAddress); 23 | 24 | vm.startBroadcast(deployerPrivateKey); 25 | 26 | bool to_upgrade = true; 27 | 28 | if (to_upgrade) { 29 | EtherFiOperationParameters instance = EtherFiOperationParameters(0xD0Ff8996DB4bDB46870b7E833b7532f484fEad1A); 30 | EtherFiOperationParameters impl = new EtherFiOperationParameters(); 31 | instance.upgradeTo(address(impl)); 32 | } else { 33 | EtherFiOperationParameters impl = new EtherFiOperationParameters(); 34 | UUPSProxy proxy = new UUPSProxy(address(impl), ""); 35 | 36 | EtherFiOperationParameters instance = EtherFiOperationParameters(payable(proxy)); 37 | 38 | instance.updateTagAdmin("ORACLE", 0x566E58ac0F2c4BCaF6De63760C56cC3f825C48f5, true); 39 | instance.updateTagAdmin("EIGENPOD", 0x566E58ac0F2c4BCaF6De63760C56cC3f825C48f5, true); 40 | // instance.updateTagKeyValue("ORACLE", "WITHDRAWAL_TARGET_GAS_PRICE", "12.5"); // 12.5 gwei 41 | // instance.updateTagKeyValue("ORACLE", "TARGET_LIQUIDITY_IN_PERCENT_OF_TVL", "2.0"); // 2.0 % of TVL 42 | // instance.updateTagKeyValue("EIGENPOD", "PROOF_SUBMIT_TARGET_GAS_PRICE", "12.5"); // 12.5 gwei 43 | } 44 | 45 | vm.stopBroadcast(); 46 | } 47 | } -------------------------------------------------------------------------------- /script/deploys/DeployEtherFiRestaker.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | 6 | import "../../src/Liquifier.sol"; 7 | import "../../src/EtherFiRestaker.sol"; 8 | import "../../src/helpers/AddressProvider.sol"; 9 | import "../../src/UUPSProxy.sol"; 10 | import "@openzeppelin/contracts/utils/Strings.sol"; 11 | 12 | contract Deploy is Script { 13 | using Strings for string; 14 | 15 | UUPSProxy public liquifierProxy; 16 | 17 | Liquifier public liquifierInstance; 18 | 19 | AddressProvider public addressProvider; 20 | address eigenlayerRewardsCoordinator; 21 | 22 | address admin; 23 | 24 | function run() external { 25 | require(eigenlayerRewardsCoordinator != address(0), "must set rewardsCoordinator"); 26 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 27 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 28 | addressProvider = AddressProvider(addressProviderAddress); 29 | 30 | vm.startBroadcast(deployerPrivateKey); 31 | 32 | EtherFiRestaker restaker = EtherFiRestaker(payable(new UUPSProxy(payable(new EtherFiRestaker(eigenlayerRewardsCoordinator)), ""))); 33 | restaker.initialize( 34 | addressProvider.getContractAddress("LiquidityPool"), 35 | addressProvider.getContractAddress("Liquifier") 36 | ); 37 | 38 | new Liquifier(); 39 | 40 | // addressProvider.addContract(address(liquifierInstance), "Liquifier"); 41 | 42 | vm.stopBroadcast(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /script/deploys/DeployEtherFiRewardsRouter.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | 6 | import "src/EtherFiRewardsRouter.sol"; 7 | import "src/UUPSProxy.sol"; 8 | import "../../src/helpers/AddressProvider.sol"; 9 | import "forge-std/console.sol"; 10 | 11 | /* Deploy Command 12 | * source .env && forge script ./script/deploys/DeployEtherFiRewardsRouter.s.sol:DeployEtherFiRewardsRouter --rpc-url MAINNET_RPC_URL --broadcast --etherscan-api-key $ETHERSCAN_API_KEY --verify --slow -vvvv 13 | */ 14 | 15 | contract DeployEtherFiRewardsRouter is Script { 16 | 17 | AddressProvider public addressProvider; 18 | /////////////////////////////////////// 19 | address roleRegistryProxyAddress = address(0x1d3Af47C1607A2EF33033693A9989D1d1013BB50); //replace with deployed RoleRegistryProxy address 20 | address treasuryGnosisSafeAddress = address(0x0c83EAe1FE72c390A02E426572854931EefF93BA); 21 | address etherfiRouterAdmin = address(0xc13C06899a9BbEbB3E2b38dBe86e4Ea8852AFC9b); 22 | ////////////////////////////////////// 23 | 24 | function run() external { 25 | 26 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 27 | 28 | vm.startBroadcast(); 29 | 30 | RoleRegistry roleRegistryInstance = RoleRegistry(roleRegistryProxyAddress); 31 | roleRegistryInstance.grantRole(keccak256("ETHERFI_REWARDS_ROUTER_ADMIN_ROLE"), etherfiRouterAdmin); 32 | 33 | addressProvider = AddressProvider(addressProviderAddress); 34 | 35 | address liquidityPoolProxyAddress = addressProvider.getContractAddress("LiquidityPool"); 36 | bytes memory initializerData = abi.encodeWithSelector(EtherFiRewardsRouter.initialize.selector); 37 | EtherFiRewardsRouter etherFiRewardsRouterImplementation = new EtherFiRewardsRouter(liquidityPoolProxyAddress, treasuryGnosisSafeAddress, roleRegistryProxyAddress); 38 | UUPSProxy etherFiRewardsRouterProxy = new UUPSProxy(address(etherFiRewardsRouterImplementation), initializerData); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /script/deploys/DeployEtherFiViewer.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | 6 | import "src/helpers/EtherFiViewer.sol"; 7 | import "src/UUPSProxy.sol"; 8 | 9 | contract DeployEtherFiViewer is Script { 10 | 11 | function run() external { 12 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 13 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 14 | 15 | vm.startBroadcast(deployerPrivateKey); 16 | 17 | EtherFiViewer impl = new EtherFiViewer(); 18 | 19 | // UUPSProxy proxy = new UUPSProxy(address(impl), ""); 20 | // EtherFiViewer viewer = EtherFiViewer(address(proxy)); 21 | // viewer.initialize(addressProviderAddress); 22 | 23 | EtherFiViewer viewer = EtherFiViewer(address(0x2ecd155405cA52a5ca0e552981fF44A8252FAb81)); 24 | viewer.upgradeTo(address(impl)); 25 | vm.stopBroadcast(); 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /script/deploys/DeployEtherFiWithdrawalBuffer.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | 6 | import "@openzeppelin/contracts/utils/Strings.sol"; 7 | 8 | import "../../src/Liquifier.sol"; 9 | import "../../src/EtherFiRestaker.sol"; 10 | import "../../src/helpers/AddressProvider.sol"; 11 | import "../../src/UUPSProxy.sol"; 12 | import "../../src/EtherFiRedemptionManager.sol"; 13 | 14 | 15 | contract Deploy is Script { 16 | using Strings for string; 17 | AddressProvider public addressProvider; 18 | 19 | function run() external { 20 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 21 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 22 | addressProvider = AddressProvider(addressProviderAddress); 23 | 24 | vm.startBroadcast(deployerPrivateKey); 25 | 26 | EtherFiRedemptionManager impl = new EtherFiRedemptionManager( 27 | addressProvider.getContractAddress("LiquidityPool"), 28 | addressProvider.getContractAddress("EETH"), 29 | addressProvider.getContractAddress("WeETH"), 30 | 0x0c83EAe1FE72c390A02E426572854931EefF93BA, // protocol safe 31 | 0x1d3Af47C1607A2EF33033693A9989D1d1013BB50 // role registry 32 | ); 33 | UUPSProxy proxy = new UUPSProxy(payable(impl), ""); 34 | 35 | EtherFiRedemptionManager instance = EtherFiRedemptionManager(payable(proxy)); 36 | instance.initialize(10_00, 1_00, 1_00, 5 ether, 0.001 ether); 37 | 38 | vm.stopBroadcast(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /script/deploys/DeployImplementationContract.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.24; 3 | 4 | import "forge-std/Script.sol"; 5 | // import "../../src/eBtcRateProvider.sol"; 6 | // import "../../src/helpers/EtherFiViewer.sol"; 7 | import "../../src/EtherFiNodesManager.sol"; 8 | import "../../src/EtherFiNode.sol"; 9 | import "../../src/EtherFiAdmin.sol"; 10 | import "../../src/EtherFiOracle.sol"; 11 | import "../../src/LiquidityPool.sol"; 12 | import "../../src/Liquifier.sol"; 13 | 14 | import "../Create2Factory.sol"; 15 | 16 | 17 | contract Deploy is Script { 18 | bytes32 immutable salt = keccak256("ETHER_FI"); 19 | Create2Factory immutable factory = Create2Factory(0x6521991A0BC180a5df7F42b27F4eE8f3B192BA62); 20 | 21 | function run() external { 22 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 23 | vm.selectFork(vm.createFork(vm.envString("MAINNET_RPC_URL"))); 24 | 25 | vm.startBroadcast(deployerPrivateKey); 26 | bytes memory code = abi.encodePacked(type(Liquifier).creationCode); 27 | factory.deploy(code, salt); 28 | } 29 | } -------------------------------------------------------------------------------- /script/deploys/DeployLoyaltyPointsMarketSafe.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../../src/UUPSProxy.sol"; 6 | import "../../src/LoyaltyPointsMarketSafe.sol"; 7 | import "../../src/helpers/AddressProvider.sol"; 8 | 9 | contract DeployLoyaltyPointsMarketSafeScript is Script { 10 | 11 | LoyaltyPointsMarketSafe public lpaMarketSafe; 12 | AddressProvider public addressProvider; 13 | 14 | function run() external { 15 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 16 | 17 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 18 | 19 | addressProvider = AddressProvider(addressProviderAddress); 20 | 21 | vm.startBroadcast(deployerPrivateKey); 22 | 23 | lpaMarketSafe = new LoyaltyPointsMarketSafe(1500000000000); 24 | 25 | addressProvider.addContract(address(lpaMarketSafe), "LoyaltyPointsMarketSafeV2"); 26 | 27 | vm.stopBroadcast(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /script/deploys/DeployMultiCall.s.sol: -------------------------------------------------------------------------------- 1 | /** 2 | *Submitted for verification at Etherscan.io on 2019-06-10 3 | */ 4 | import "forge-std/Script.sol"; 5 | 6 | pragma solidity >=0.5.0; 7 | pragma experimental ABIEncoderV2; 8 | 9 | /// @title Multicall - Aggregate results from multiple read-only function calls 10 | /// @author Michael Elliot 11 | /// @author Joshua Levine 12 | /// @author Nick Johnson 13 | 14 | contract Multicall { 15 | struct Call { 16 | address target; 17 | bytes callData; 18 | } 19 | function aggregate(Call[] memory calls) public returns (uint256 blockNumber, bytes[] memory returnData) { 20 | blockNumber = block.number; 21 | returnData = new bytes[](calls.length); 22 | for(uint256 i = 0; i < calls.length; i++) { 23 | (bool success, bytes memory ret) = calls[i].target.call(calls[i].callData); 24 | require(success); 25 | returnData[i] = ret; 26 | } 27 | } 28 | // Helper functions 29 | function getEthBalance(address addr) public view returns (uint256 balance) { 30 | balance = addr.balance; 31 | } 32 | function getBlockHash(uint256 blockNumber) public view returns (bytes32 blockHash) { 33 | blockHash = blockhash(blockNumber); 34 | } 35 | function getLastBlockHash() public view returns (bytes32 blockHash) { 36 | blockHash = blockhash(block.number - 1); 37 | } 38 | function getCurrentBlockTimestamp() public view returns (uint256 timestamp) { 39 | timestamp = block.timestamp; 40 | } 41 | function getCurrentBlockDifficulty() public view returns (uint256 difficulty) { 42 | difficulty = block.difficulty; 43 | } 44 | function getCurrentBlockGasLimit() public view returns (uint256 gaslimit) { 45 | gaslimit = block.gaslimit; 46 | } 47 | function getCurrentBlockCoinbase() public view returns (address coinbase) { 48 | coinbase = block.coinbase; 49 | } 50 | } 51 | 52 | contract DeployMultiCall is Script { 53 | 54 | function run() external { 55 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 56 | vm.startBroadcast(deployerPrivateKey); 57 | 58 | Multicall multicall = new Multicall(); 59 | 60 | vm.stopBroadcast(); 61 | } 62 | } -------------------------------------------------------------------------------- /script/deploys/DeployRoleRegistry.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.24; 3 | 4 | import "forge-std/Script.sol"; 5 | 6 | import "src/RoleRegistry.sol"; 7 | import "src/UUPSProxy.sol"; 8 | import "../../src/helpers/AddressProvider.sol"; 9 | 10 | 11 | /* deploy command 12 | * source .env && forge script ./script/deploys/DeployRoleRegistry.s.sol:DeployRoleRegistry --rpc-url MAINNET_RPC_URL --broadcast --etherscan-api-key $ETHERSCAN_API_KEY --verify --slow -vvvv 13 | */ 14 | 15 | contract DeployRoleRegistry is Script { 16 | 17 | AddressProvider public addressProvider; 18 | /////////////////////////////////////// 19 | address superAdmin = address(0x8D5AAc5d3d5cda4c404fA7ee31B0822B648Bb150); //replace with actual super admin address 20 | ////////////////////////////////////// 21 | 22 | function run() external { 23 | vm.startBroadcast(); 24 | 25 | RoleRegistry roleRegistryImplementation = new RoleRegistry(); 26 | bytes memory initializerData = abi.encodeWithSelector(RoleRegistry.initialize.selector, superAdmin); 27 | UUPSProxy roleRegistryProxy = new UUPSProxy(address(roleRegistryImplementation), initializerData); 28 | 29 | vm.stopBroadcast(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /script/deploys/DeployTVLOracle.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../../src/UUPSProxy.sol"; 6 | import "../../src/TVLOracle.sol"; 7 | import "../../src/helpers/AddressProvider.sol"; 8 | 9 | contract DeployTVLOracleScript is Script { 10 | 11 | /*---- Storage variables ----*/ 12 | 13 | TVLOracle public tvlOracle; 14 | AddressProvider public addressProvider; 15 | 16 | function run() external { 17 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 18 | 19 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 20 | address tvlAggregatorAddress = vm.envAddress("TVL_AGGREGATOR_ADDRESS"); 21 | 22 | addressProvider = AddressProvider(addressProviderAddress); 23 | 24 | vm.startBroadcast(deployerPrivateKey); 25 | 26 | // Deploy contract 27 | tvlOracle = new TVLOracle(tvlAggregatorAddress); 28 | addressProvider.addContract(address(tvlOracle), "TVLOracle"); 29 | 30 | vm.stopBroadcast(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /script/deploys/EtherFiTimelock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../../src/helpers/AddressProvider.sol"; 6 | import "../../src/EtherFiTimelock.sol"; 7 | 8 | contract DeployLoyaltyPointsMarketSafeScript is Script { 9 | 10 | AddressProvider public addressProvider; 11 | 12 | function run() external { 13 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 14 | 15 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 16 | addressProvider = AddressProvider(addressProviderAddress); 17 | 18 | /* 19 | // minimum wait time for a timelock tx 20 | uint256 minWaitTime = 2 days; 21 | 22 | // who can propose transactions for the timelock 23 | // TODO: Fill out the addresses we want 24 | address[] memory proposers = new address[](2); 25 | proposers[0] = ; 26 | proposers[1] = admin; 27 | 28 | // who can execute transactions for the timelock 29 | // TODO: Fill out the addresses we want 30 | address[] memory executors = new address[](1); 31 | executors[0] = owner; 32 | 33 | vm.startBroadcast(deployerPrivateKey); 34 | 35 | // Last param is left blank as recommended by OZ documentation 36 | Timelock tl = new EtherFiTimelock(minWaitTime, proposers, executors, address(0x0)); 37 | 38 | addressProvider.addContract(address(tl), "Timelock"); 39 | */ 40 | 41 | vm.stopBroadcast(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /script/extractABI.sh: -------------------------------------------------------------------------------- 1 | # !/bin/bash 2 | # NOTE: THis script requires the jq utlity or be installed 3 | # for each contract in source folder, extract abi from artifact and create new json 4 | for contractPath in src/*.sol 5 | do 6 | # fileWithExtension="AuctionManager.sol" 7 | fileWithExtension=${contractPath##*/} 8 | # fileWithExtension="AuctionManager" 9 | filename=${fileWithExtension%.*} 10 | # if directory doesn't exist, then create it 11 | mkdir -p release/abis 12 | jq '.abi' out/${fileWithExtension}/${filename}.json > release/abis/${filename}.json 13 | done 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /script/generateTransactionBatch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | txns_dir="./release/logs/txns" 4 | 5 | # Extract the block number from the first transaction file name 6 | block_number=$(basename $(ls $txns_dir/*.json | head -1) | cut -d '.' -f 1) 7 | 8 | # output file located in the same directory as txns 9 | output_file="${block_number}.transactionBatch.json" 10 | 11 | # add the static meta data to the file 12 | echo '{ "version": "1.0", "chainId": "1", "meta": { "name": "Transactions Batch", "description": "", "txBuilderVersion": "1.16.5", "createdFromSafeAddress": "0xcdd57D11476c22d265722F68390b036f3DA48c21" }, "transactions": [' > $output_file 13 | 14 | # process transaction file 15 | first=true 16 | for file in ${txns_dir}/*.json; do 17 | echo "Processing" $file 18 | 19 | if [ "$first" = true ]; then 20 | first=false 21 | else 22 | echo ',' >> $output_file # add a comma between objects if not the last transaction in the array 23 | fi 24 | 25 | # extract relevant fields and format the transaction JSON 26 | jq '{ to: .to, value: (.value | tostring), data: .data }' $file >> $output_file 27 | 28 | # make sure the same file won't be used again 29 | rm $file 30 | done 31 | 32 | echo '] }' >> $output_file 33 | 34 | echo "JSON has been created at $output_file" 35 | -------------------------------------------------------------------------------- /script/specialized/DeployProxyForMock.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../../src/UUPSProxy.sol"; 6 | 7 | import "../../src/Liquifier.sol"; 8 | 9 | 10 | contract Deploy is Script { 11 | 12 | 13 | function run() external { 14 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 15 | 16 | vm.startBroadcast(deployerPrivateKey); 17 | 18 | address impl = address(new Liquifier()); 19 | // address impl = 0x61e2cA79cA3d90Fd1440976a6C9641431b3F296a; 20 | UUPSProxy proxy = new UUPSProxy(impl, ""); 21 | 22 | // Liquifier(payable(address(proxy))).initialize(); 23 | 24 | // mgr.upgradeEtherFiAvsOperator(address(new EtherFiAvsOperator())); 25 | // mgr.upgradeTo(mgr_impl); 26 | // mgr.initializeAvsDirectory(avsDirectory); 27 | 28 | // mgr.instantiateEtherFiAvsOperator(1); 29 | 30 | // EtherFiAvsOperatorsManager mgr = EtherFiAvsOperatorsManager(address(new UUPSProxy(address(new EtherFiAvsOperatorsManager()), ""))); 31 | // mgr.initialize(delegationManager, address(new EtherFiAvsOperator())); 32 | 33 | vm.stopBroadcast(); 34 | } 35 | } -------------------------------------------------------------------------------- /script/upgrade_v1.5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e # Exit immediately if any command fails 4 | 5 | network=$1 6 | 7 | targets=( 8 | upgrade-${network}-staking-manager 9 | upgrade-${network}-auction-manager 10 | upgrade-${network}-etherfi-node 11 | upgrade-${network}-bnft 12 | upgrade-${network}-tnft 13 | upgrade-${network}-eeth 14 | upgrade-${network}-etherfi_nodes_manager 15 | upgrade-${network}-liquidity-pool 16 | upgrade-${network}-membership-manager 17 | upgrade-${network}-membership-nft 18 | upgrade-${network}-weeth 19 | ) 20 | 21 | for target in "${targets[@]}"; do 22 | make "$target" 23 | done 24 | 25 | -------------------------------------------------------------------------------- /script/upgrades/AuctionManagerUpgradeScript.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../../src/AuctionManager.sol"; 6 | import "../../src/helpers/AddressProvider.sol"; 7 | 8 | contract AuctionManagerUpgrade is Script { 9 | 10 | AddressProvider public addressProvider; 11 | 12 | function run() external { 13 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 14 | 15 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 16 | addressProvider = AddressProvider(addressProviderAddress); 17 | 18 | address AuctionManagerProxyAddress = addressProvider.getContractAddress("AuctionManager"); 19 | address membershipManagerProxyAddress = addressProvider.getContractAddress("MembershipManager"); 20 | address etherFiAdminAddress = addressProvider.getContractAddress("EtherFiAdmin"); 21 | address nodeOperatorManagerAddress = addressProvider.getContractAddress("NodeOperatorManager"); 22 | 23 | vm.startBroadcast(deployerPrivateKey); 24 | 25 | AuctionManager AuctionManagerInstance = AuctionManager(AuctionManagerProxyAddress); 26 | AuctionManager AuctionManagerImplementation = new AuctionManager(); 27 | 28 | AuctionManagerInstance.upgradeTo(address(AuctionManagerImplementation)); 29 | AuctionManagerInstance.initializeOnUpgrade(membershipManagerProxyAddress, 0.15 ether, etherFiAdminAddress, nodeOperatorManagerAddress); 30 | 31 | require(AuctionManagerInstance.admins(etherFiAdminAddress), "EtherFiAdmin should be an admin"); 32 | 33 | vm.stopBroadcast(); 34 | } 35 | } -------------------------------------------------------------------------------- /script/upgrades/BNFTUpgradeScript.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../../src/BNFT.sol"; 6 | import "../../src/helpers/AddressProvider.sol"; 7 | 8 | contract BNFTUpgrade is Script { 9 | 10 | AddressProvider public addressProvider; 11 | 12 | function run() external { 13 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 14 | 15 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 16 | addressProvider = AddressProvider(addressProviderAddress); 17 | 18 | address BNFTProxyAddress = addressProvider.getContractAddress("BNFT"); 19 | 20 | vm.startBroadcast(deployerPrivateKey); 21 | 22 | BNFT BNFTInstance = BNFT(BNFTProxyAddress); 23 | BNFT BNFTV2Implementation = new BNFT(); 24 | 25 | BNFTInstance.upgradeTo(address(BNFTV2Implementation)); 26 | 27 | // phase 2 upgrade initialization 28 | address etherFiNodesManagerAddress = addressProvider.getContractAddress("EtherFiNodesManager"); 29 | assert(etherFiNodesManagerAddress != address(0)); 30 | BNFTInstance.initializeOnUpgrade(etherFiNodesManagerAddress); 31 | 32 | vm.stopBroadcast(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /script/upgrades/BucketRateLimiter.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | 6 | import "../../src/BucketRateLimiter.sol"; 7 | import "../../src/UUPSProxy.sol"; 8 | 9 | interface IL2SyncPool { 10 | function setRateLimiter(address rateLimiter) external; 11 | } 12 | 13 | contract Upgrade is Script { 14 | 15 | function run() external { 16 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 17 | address deployer = vm.addr(deployerPrivateKey); 18 | address limiter; 19 | 20 | if (block.chainid == 59144) limiter = 0x3A19866D5E0fAE0Ce19Adda617f9d2B9fD5a3975; // LINEA 21 | else if (block.chainid == 81457) limiter = 0x6f257089bF046a02751b60767871953F3899652e; // BLAST 22 | else if (block.chainid == 34443) limiter = 0x95F1138837F1158726003251B32ecd8732c76781; // MODE 23 | else revert("Unsupported chain id"); 24 | 25 | vm.startBroadcast(deployerPrivateKey); 26 | 27 | BucketRateLimiter impl = new BucketRateLimiter(); 28 | 29 | BucketRateLimiter(limiter).upgradeTo(address(impl)); 30 | 31 | vm.stopBroadcast(); 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /script/upgrades/EETHUpgradeScript.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../../src/EETH.sol"; 6 | import "../../src/helpers/AddressProvider.sol"; 7 | 8 | contract EETHUpgrade is Script { 9 | 10 | AddressProvider public addressProvider; 11 | 12 | function run() external { 13 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 14 | 15 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 16 | addressProvider = AddressProvider(addressProviderAddress); 17 | 18 | address EETHProxyAddress = addressProvider.getContractAddress("EETH"); 19 | 20 | vm.startBroadcast(deployerPrivateKey); 21 | 22 | EETH EETHInstance = EETH(EETHProxyAddress); 23 | EETH EETHV2Implementation = new EETH(); 24 | 25 | uint256 totalShares = EETHInstance.totalShares(); 26 | 27 | EETHInstance.upgradeTo(address(EETHV2Implementation)); 28 | 29 | require(totalShares == EETHInstance.totalShares(), "EETHUpgrade: totalShares mismatch"); 30 | 31 | vm.stopBroadcast(); 32 | } 33 | } -------------------------------------------------------------------------------- /script/upgrades/EtherFiAdminUpgradeScript.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../../src/EtherFiAdmin.sol"; 6 | import "../../src/helpers/AddressProvider.sol"; 7 | 8 | contract EtherFiAdminUpgrade is Script { 9 | 10 | AddressProvider public addressProvider; 11 | 12 | function run() external { 13 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 14 | 15 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 16 | addressProvider = AddressProvider(addressProviderAddress); 17 | 18 | address proxyAddress = addressProvider.getContractAddress("EtherFiAdmin"); 19 | 20 | vm.startBroadcast(deployerPrivateKey); 21 | 22 | EtherFiAdmin instance = EtherFiAdmin(proxyAddress); 23 | EtherFiAdmin v2Implementation = new EtherFiAdmin(); 24 | 25 | //instance.upgradeTo(address(v2Implementation)); 26 | 27 | vm.stopBroadcast(); 28 | } 29 | } -------------------------------------------------------------------------------- /script/upgrades/EtherFiNodeScript.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../../src/EtherFiNode.sol"; 6 | import "../../src/StakingManager.sol"; 7 | import "../../src/helpers/AddressProvider.sol"; 8 | 9 | contract EtherFiNodeUpgrade is Script { 10 | 11 | AddressProvider public addressProvider; 12 | 13 | function run() external { 14 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 15 | 16 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 17 | addressProvider = AddressProvider(addressProviderAddress); 18 | 19 | address stakingManagerProxyAddress = addressProvider.getContractAddress("StakingManager"); 20 | 21 | StakingManager stakingManager = StakingManager(stakingManagerProxyAddress); 22 | 23 | vm.startBroadcast(deployerPrivateKey); 24 | 25 | EtherFiNode etherFiNode = new EtherFiNode(); 26 | stakingManager.upgradeEtherFiNode(address(etherFiNode)); 27 | 28 | vm.stopBroadcast(); 29 | } 30 | } -------------------------------------------------------------------------------- /script/upgrades/EtherFiOracleUpgradeScript.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../../src/EtherFiOracle.sol"; 6 | import "../../src/helpers/AddressProvider.sol"; 7 | 8 | contract EtherFiOracleUpgrade is Script { 9 | 10 | AddressProvider public addressProvider; 11 | 12 | function run() external { 13 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 14 | 15 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 16 | addressProvider = AddressProvider(addressProviderAddress); 17 | 18 | address proxyAddress = addressProvider.getContractAddress("EtherFiOracle"); 19 | 20 | vm.startBroadcast(deployerPrivateKey); 21 | 22 | EtherFiOracle oracleInstance = EtherFiOracle(proxyAddress); 23 | EtherFiOracle v2Implementation = new EtherFiOracle(); 24 | 25 | //oracleInstance.upgradeTo(address(v2Implementation)); 26 | 27 | vm.stopBroadcast(); 28 | } 29 | } -------------------------------------------------------------------------------- /script/upgrades/MembershipNFTUpgradeScript.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../../src/MembershipNFT.sol"; 6 | import "../../src/helpers/AddressProvider.sol"; 7 | 8 | contract MembershipNFTUpgrade is Script { 9 | 10 | AddressProvider public addressProvider; 11 | 12 | function run() external { 13 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 14 | 15 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 16 | addressProvider = AddressProvider(addressProviderAddress); 17 | 18 | address membershipNFTProxy = addressProvider.getContractAddress("MembershipNFT"); 19 | address liquidityPool = addressProvider.getContractAddress("LiquidityPool"); 20 | 21 | require(membershipNFTProxy != address(0), "MembershipNFTUpgrade: membershipNFTProxy is zero address"); 22 | require(liquidityPool != address(0), "MembershipNFTUpgrade: liquidityPool is zero address"); 23 | 24 | vm.startBroadcast(deployerPrivateKey); 25 | 26 | MembershipNFT membershipNFTInstance = MembershipNFT(payable(membershipNFTProxy)); 27 | MembershipNFT membershipNFTV2Implementation = new MembershipNFT(); 28 | 29 | uint32 nextMintTokenId = membershipNFTInstance.nextMintTokenId(); 30 | uint32 maxTokenId = membershipNFTInstance.maxTokenId(); 31 | bytes32 eapMerkleRoot = membershipNFTInstance.eapMerkleRoot(); 32 | 33 | membershipNFTInstance.upgradeTo(address(membershipNFTV2Implementation)); 34 | membershipNFTInstance.initializeOnUpgrade(liquidityPool); 35 | 36 | require(membershipNFTInstance.nextMintTokenId() == nextMintTokenId, "MembershipNFTUpgrade: nextMintTokenId mismatch"); 37 | require(membershipNFTInstance.maxTokenId() == maxTokenId, "MembershipNFTUpgrade: maxTokenId mismatch"); 38 | require(membershipNFTInstance.eapMerkleRoot() == eapMerkleRoot, "MembershipNFTUpgrade: eapMerkleRoot mismatch"); 39 | 40 | vm.stopBroadcast(); 41 | } 42 | } -------------------------------------------------------------------------------- /script/upgrades/NFTExchangeUpgradeScript.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../../src/NFTExchange.sol"; 6 | import "../../src/helpers/AddressProvider.sol"; 7 | 8 | contract NFTExchangeUpgrade is Script { 9 | 10 | AddressProvider public addressProvider; 11 | 12 | function run() external { 13 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 14 | 15 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 16 | addressProvider = AddressProvider(addressProviderAddress); 17 | 18 | address NFTExchangeProxyAddress = addressProvider.getContractAddress("NFTExchange"); 19 | 20 | vm.startBroadcast(deployerPrivateKey); 21 | 22 | NFTExchange NFTExchangeInstance = NFTExchange(NFTExchangeProxyAddress); 23 | NFTExchange NFTExchangeV2Implementation = new NFTExchange(); 24 | 25 | // NFTExchangeInstance.upgradeTo(address(NFTExchangeV2Implementation)); 26 | 27 | vm.stopBroadcast(); 28 | } 29 | } -------------------------------------------------------------------------------- /script/upgrades/NodeOperatorManagerUpgradeScript.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../../src/NodeOperatorManager.sol"; 6 | import "../../src/helpers/AddressProvider.sol"; 7 | 8 | contract NodeOperatorManagerUpgrade is Script { 9 | 10 | AddressProvider public addressProvider; 11 | 12 | function run() external { 13 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 14 | 15 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 16 | addressProvider = AddressProvider(addressProviderAddress); 17 | 18 | address NodeOperatorManagerProxyAddress = addressProvider.getContractAddress("NodeOperatorManager"); 19 | 20 | vm.startBroadcast(deployerPrivateKey); 21 | 22 | NodeOperatorManager NodeOperatorManagerInstance = NodeOperatorManager(NodeOperatorManagerProxyAddress); 23 | NodeOperatorManager NodeOperatorManagerV2Implementation = new NodeOperatorManager(); 24 | 25 | NodeOperatorManagerInstance.upgradeTo(address(NodeOperatorManagerV2Implementation)); 26 | 27 | vm.stopBroadcast(); 28 | } 29 | } -------------------------------------------------------------------------------- /script/upgrades/ProtocolRevenueManagerUpgradeScript.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../../src/archive/ProtocolRevenueManager.sol"; 6 | import "../../src/helpers/AddressProvider.sol"; 7 | 8 | contract ProtocolRevenueManagerUpgrade is Script { 9 | 10 | AddressProvider public addressProvider; 11 | 12 | function run() external { 13 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 14 | 15 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 16 | addressProvider = AddressProvider(addressProviderAddress); 17 | 18 | address ProtocolRevenueManagerProxyAddress = addressProvider.getContractAddress("ProtocolRevenueManager"); 19 | 20 | vm.startBroadcast(deployerPrivateKey); 21 | 22 | ProtocolRevenueManager ProtocolRevenueManagerInstance = ProtocolRevenueManager(payable(ProtocolRevenueManagerProxyAddress)); 23 | ProtocolRevenueManager ProtocolRevenueManagerV2Implementation = new ProtocolRevenueManager(); 24 | 25 | ProtocolRevenueManagerInstance.upgradeTo(address(ProtocolRevenueManagerV2Implementation)); 26 | 27 | vm.stopBroadcast(); 28 | } 29 | } -------------------------------------------------------------------------------- /script/upgrades/RegulationsManagerUpgradeScript.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../../src/archive/RegulationsManager.sol"; 6 | import "../../src/helpers/AddressProvider.sol"; 7 | 8 | contract RegulationsManagerUpgrade is Script { 9 | 10 | AddressProvider public addressProvider; 11 | 12 | function run() external { 13 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 14 | 15 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 16 | addressProvider = AddressProvider(addressProviderAddress); 17 | 18 | address RegulationsManagerProxyAddress = addressProvider.getContractAddress("RegulationsManager"); 19 | 20 | vm.startBroadcast(deployerPrivateKey); 21 | 22 | RegulationsManager RegulationsManagerInstance = RegulationsManager(RegulationsManagerProxyAddress); 23 | RegulationsManager RegulationsManagerV2Implementation = new RegulationsManager(); 24 | 25 | RegulationsManagerInstance.upgradeTo(address(RegulationsManagerV2Implementation)); 26 | 27 | vm.stopBroadcast(); 28 | } 29 | } -------------------------------------------------------------------------------- /script/upgrades/StakingManagerUpgradeScript.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../../src/StakingManager.sol"; 6 | import "../../src/helpers/AddressProvider.sol"; 7 | 8 | contract StakingManagerUpgrade is Script { 9 | 10 | AddressProvider public addressProvider; 11 | 12 | function run() external { 13 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 14 | 15 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 16 | addressProvider = AddressProvider(addressProviderAddress); 17 | 18 | address stakingManagerProxyAddress = addressProvider.getContractAddress("StakingManager"); 19 | address etherFiAdminAddress = addressProvider.getContractAddress("EtherFiAdmin"); 20 | address nodeOperatorManagerAddress = addressProvider.getContractAddress("NodeOperatorManager"); 21 | 22 | require(stakingManagerProxyAddress != address(0), "StakingManager address not set"); 23 | require(etherFiAdminAddress != address(0), "EtherFiAdmin address not set"); 24 | require(nodeOperatorManagerAddress != address(0), "NodeOperatorManager address not set"); 25 | 26 | vm.startBroadcast(deployerPrivateKey); 27 | 28 | StakingManager stakingManagerInstance = StakingManager(stakingManagerProxyAddress); 29 | StakingManager stakingManagerV2Implementation = new StakingManager(); 30 | 31 | stakingManagerInstance.upgradeTo(address(stakingManagerV2Implementation)); 32 | stakingManagerInstance.initializeOnUpgrade(nodeOperatorManagerAddress, etherFiAdminAddress); 33 | 34 | require(stakingManagerInstance.admins(etherFiAdminAddress), "EtherFiAdmin should be an admin"); 35 | 36 | vm.stopBroadcast(); 37 | } 38 | } -------------------------------------------------------------------------------- /script/upgrades/TNFTUpgradeScript.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../../src/TNFT.sol"; 6 | import "../../src/helpers/AddressProvider.sol"; 7 | 8 | contract TNFTUpgrade is Script { 9 | 10 | AddressProvider public addressProvider; 11 | 12 | function run() external { 13 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 14 | 15 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 16 | addressProvider = AddressProvider(addressProviderAddress); 17 | 18 | address TNFTProxyAddress = addressProvider.getContractAddress("TNFT"); 19 | 20 | vm.startBroadcast(deployerPrivateKey); 21 | 22 | TNFT TNFTInstance = TNFT(TNFTProxyAddress); 23 | TNFT TNFTV2Implementation = new TNFT(); 24 | 25 | TNFTInstance.upgradeTo(address(TNFTV2Implementation)); 26 | 27 | // phase 2 upgrade initialization 28 | address etherFiNodesManagerAddress = addressProvider.getContractAddress("EtherFiNodesManager"); 29 | assert(etherFiNodesManagerAddress != address(0)); 30 | TNFTInstance.initializeOnUpgrade(etherFiNodesManagerAddress); 31 | 32 | vm.stopBroadcast(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /script/upgrades/WeETHUpgradeScript.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../../src/WeETH.sol"; 6 | import "../../src/helpers/AddressProvider.sol"; 7 | 8 | contract WeEthUpgrade is Script { 9 | 10 | AddressProvider public addressProvider; 11 | 12 | function run() external { 13 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 14 | 15 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 16 | addressProvider = AddressProvider(addressProviderAddress); 17 | 18 | address weEthProxyAddress = addressProvider.getContractAddress("WeETH"); 19 | 20 | vm.startBroadcast(deployerPrivateKey); 21 | 22 | WeETH weEthInstance = WeETH(weEthProxyAddress); 23 | WeETH weEthV2Implementation = new WeETH(); 24 | 25 | uint256 totalSupply = weEthInstance.totalSupply(); 26 | 27 | weEthInstance.upgradeTo(address(weEthV2Implementation)); 28 | 29 | require(totalSupply == weEthInstance.totalSupply(), "WeEthUpgrade: totalSupply mismatch"); 30 | 31 | vm.stopBroadcast(); 32 | } 33 | } -------------------------------------------------------------------------------- /script/upgrades/WithdrawRequestNFTUpgradeScript.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../../src/WithdrawRequestNFT.sol"; 6 | import "../../src/helpers/AddressProvider.sol"; 7 | 8 | contract WithdrawRequestNFTUpgrade is Script { 9 | 10 | AddressProvider public addressProvider; 11 | 12 | function run() external { 13 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 14 | 15 | address addressProviderAddress = vm.envAddress("CONTRACT_REGISTRY"); 16 | addressProvider = AddressProvider(addressProviderAddress); 17 | 18 | address proxyAddress = addressProvider.getContractAddress("WithdrawRequestNFT"); 19 | 20 | vm.startBroadcast(deployerPrivateKey); 21 | 22 | WithdrawRequestNFT oracleInstance = WithdrawRequestNFT(proxyAddress); 23 | WithdrawRequestNFT v2Implementation = new WithdrawRequestNFT(address(0)); 24 | 25 | oracleInstance.upgradeTo(address(v2Implementation)); 26 | 27 | vm.stopBroadcast(); 28 | } 29 | } -------------------------------------------------------------------------------- /src/EtherFiTimelock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | import "@openzeppelin/contracts/governance/TimelockController.sol"; 5 | 6 | contract EtherFiTimelock is TimelockController { 7 | 8 | constructor( 9 | uint256 minDelay, 10 | address[] memory proposers, 11 | address[] memory executors, 12 | address admin 13 | ) TimelockController(minDelay, proposers, executors, admin) {} 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/LoyaltyPointsMarketSafe.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | import "@openzeppelin/contracts/access/Ownable.sol"; 5 | 6 | contract LoyaltyPointsMarketSafe is Ownable { 7 | 8 | event PointsPurchased(address indexed buyer, uint256 indexed tokenId, uint256 amountWei, uint256 weiPerPoint); 9 | event BoostToTop(address indexed buyer, uint256 indexed tokenId, uint256 amountWei); 10 | 11 | uint256 public weiPerPoint; 12 | uint256 public boostPaymentAmount; 13 | 14 | error InvalidAmount(); 15 | 16 | constructor(uint256 _weiPerPoint) { 17 | weiPerPoint = _weiPerPoint; 18 | } 19 | 20 | function purchasePoints(uint256 tokenId) external payable { 21 | emit PointsPurchased(msg.sender, tokenId, msg.value, weiPerPoint); 22 | } 23 | 24 | function boostToTop(uint256 tokenId) external payable { 25 | if (msg.value != boostPaymentAmount) revert InvalidAmount(); 26 | emit BoostToTop(msg.sender, tokenId, msg.value); 27 | } 28 | 29 | //----------------------------------------------------------------------------- 30 | //------------------------------- Admin ------------------------------------- 31 | //----------------------------------------------------------------------------- 32 | 33 | function withdrawFunds(address payable _to) external onlyOwner { 34 | _to.transfer(address(this).balance); 35 | } 36 | 37 | function setWeiPerPoint(uint256 _weiPerPoint) external onlyOwner { 38 | weiPerPoint = _weiPerPoint; 39 | } 40 | 41 | function setBoostPaymentAmount(uint256 _boostPaymentAmount) external onlyOwner { 42 | boostPaymentAmount = _boostPaymentAmount; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/TVLOracle.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | import "@openzeppelin/contracts/access/Ownable.sol"; 5 | 6 | contract TVLOracle is Ownable { 7 | address public tvlAggregator; 8 | uint256 private _currentTvl; 9 | 10 | event TVLUpdated(uint256 _currentTvl); 11 | 12 | constructor(address _tvlAggregator) { 13 | require(_tvlAggregator != address(0), "No zero addresses"); 14 | tvlAggregator = _tvlAggregator; 15 | } 16 | 17 | /// @notice Sets TVL by aggregator 18 | /// @param _newTvl New TVL calculated by aggregator 19 | function setTvl(uint256 _newTvl) public { 20 | require( 21 | msg.sender == tvlAggregator, 22 | "Only TVL Aggregator can call this message" 23 | ); 24 | require(_newTvl > 0, "TVL shouldn't be 0"); 25 | 26 | _currentTvl = _newTvl; 27 | emit TVLUpdated(_newTvl); 28 | } 29 | 30 | /// @notice Gets TVL calculated by aggregator 31 | function getTvl() public view returns (uint256) { 32 | return _currentTvl; 33 | } 34 | 35 | /// @notice Sets the address of the TVL aggregator 36 | /// @param _tvlAggregator Address of new aggregator 37 | function setTVLAggregator(address _tvlAggregator) public onlyOwner { 38 | require(_tvlAggregator != address(0), "No zero addresses"); 39 | tvlAggregator = _tvlAggregator; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Treasury.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | import "@openzeppelin/contracts/access/Ownable.sol"; 5 | 6 | import "./interfaces/ITreasury.sol"; 7 | 8 | contract Treasury is ITreasury, Ownable { 9 | 10 | //-------------------------------------------------------------------------------------- 11 | //---------------------------- STATE-CHANGING FUNCTIONS ------------------------------ 12 | //-------------------------------------------------------------------------------------- 13 | 14 | /// @notice Function allows only the owner to withdraw all the funds in the contract 15 | function withdraw(uint256 _amount, address _to) external onlyOwner { 16 | require( 17 | _amount <= address(this).balance, 18 | "the balance is lower than the requested amount" 19 | ); 20 | require(_to != address(0), "null address is not allowed"); 21 | (bool sent, ) = payable(_to).call{value: _amount}(""); 22 | require(sent, "Failed to send Ether"); 23 | } 24 | 25 | //Allows ether to be sent to this contract 26 | receive() external payable {} 27 | } 28 | -------------------------------------------------------------------------------- /src/UUPSProxy.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; 5 | 6 | contract UUPSProxy is ERC1967Proxy { 7 | constructor( 8 | address _implementation, 9 | bytes memory _data 10 | ) ERC1967Proxy(_implementation, _data) {} 11 | } 12 | -------------------------------------------------------------------------------- /src/eigenlayer-interfaces/IAVSRegistrar.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity >=0.5.0; 3 | 4 | interface IAVSRegistrar { 5 | /** 6 | * @notice Called by the AllocationManager when an operator wants to register 7 | * for one or more operator sets. This method should revert if registration 8 | * is unsuccessful. 9 | * @param operator the registering operator 10 | * @param avs the AVS the operator is registering for. This should be the same as IAVSRegistrar.avs() 11 | * @param operatorSetIds the list of operator set ids being registered for 12 | * @param data arbitrary data the operator can provide as part of registration 13 | */ 14 | function registerOperator( 15 | address operator, 16 | address avs, 17 | uint32[] calldata operatorSetIds, 18 | bytes calldata data 19 | ) external; 20 | 21 | /** 22 | * @notice Called by the AllocationManager when an operator is deregistered from 23 | * one or more operator sets. If this method reverts, it is ignored. 24 | * @param operator the deregistering operator 25 | * @param avs the AVS the operator is deregistering from. This should be the same as IAVSRegistrar.avs() 26 | * @param operatorSetIds the list of operator set ids being deregistered from 27 | */ 28 | function deregisterOperator(address operator, address avs, uint32[] calldata operatorSetIds) external; 29 | 30 | /** 31 | * @notice Returns true if the AVS is supported by the registrar 32 | * @param avs the AVS to check 33 | * @return true if the AVS is supported, false otherwise 34 | */ 35 | function supportsAVS( 36 | address avs 37 | ) external view returns (bool); 38 | } 39 | -------------------------------------------------------------------------------- /src/eigenlayer-interfaces/IBeaconChainOracle.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity >=0.5.0; 3 | 4 | /** 5 | * @title Interface for the BeaconStateOracle contract. 6 | * @author Layr Labs, Inc. 7 | * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service 8 | */ 9 | interface IBeaconChainOracle { 10 | /// @notice The block number to state root mapping. 11 | function timestampToBlockRoot(uint256 timestamp) external view returns (bytes32); 12 | } 13 | -------------------------------------------------------------------------------- /src/eigenlayer-interfaces/IDelegationFaucet.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity >=0.5.0; 3 | 4 | import "src/eigenlayer-interfaces/IStrategyManager.sol"; 5 | import "src/eigenlayer-interfaces/IDelegationManager.sol"; 6 | 7 | import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; 8 | 9 | interface IDelegationFaucet { 10 | function mintDepositAndDelegate( 11 | address _operator, 12 | IDelegationManager.SignatureWithExpiry memory approverSignatureAndExpiry, 13 | bytes32 approverSalt, 14 | uint256 _depositAmount 15 | ) external; 16 | 17 | function getStaker(address operator) external returns (address); 18 | 19 | function depositIntoStrategy( 20 | address staker, 21 | IStrategy strategy, 22 | IERC20 token, 23 | uint256 amount 24 | ) external returns (bytes memory); 25 | 26 | function queueWithdrawal( 27 | address staker, 28 | IDelegationManager.QueuedWithdrawalParams[] calldata queuedWithdrawalParams 29 | ) external returns (bytes memory); 30 | 31 | function completeQueuedWithdrawal( 32 | address staker, 33 | IDelegationManager.Withdrawal calldata queuedWithdrawal, 34 | IERC20[] calldata tokens, 35 | uint256 middlewareTimesIndex, 36 | bool receiveAsTokens 37 | ) external returns (bytes memory); 38 | 39 | function transfer(address staker, address token, address to, uint256 amount) external returns (bytes memory); 40 | 41 | function callAddress(address to, bytes memory data) external payable returns (bytes memory); 42 | } 43 | -------------------------------------------------------------------------------- /src/eigenlayer-interfaces/IDelegationTerms.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity >=0.5.0; 3 | 4 | import "./IStrategy.sol"; 5 | 6 | /** 7 | * @title Abstract interface for a contract that helps structure the delegation relationship. 8 | * @author Layr Labs, Inc. 9 | * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service 10 | * @notice The gas budget provided to this contract in calls from EigenLayer contracts is limited. 11 | */ 12 | interface IDelegationTerms { 13 | function payForService(IERC20 token, uint256 amount) external payable; 14 | 15 | function onDelegationWithdrawn( 16 | address delegator, 17 | IStrategy[] memory stakerStrategyList, 18 | uint256[] memory stakerShares 19 | ) external returns(bytes memory); 20 | 21 | function onDelegationReceived( 22 | address delegator, 23 | IStrategy[] memory stakerStrategyList, 24 | uint256[] memory stakerShares 25 | ) external returns(bytes memory); 26 | } -------------------------------------------------------------------------------- /src/eigenlayer-interfaces/IEigen.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity >=0.5.0; 3 | 4 | import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; 5 | 6 | interface IEigen is IERC20 { 7 | /** 8 | * @notice This function allows the owner to set the allowedFrom status of an address 9 | * @param from the address whose allowedFrom status is being set 10 | * @param isAllowedFrom the new allowedFrom status 11 | */ 12 | function setAllowedFrom(address from, bool isAllowedFrom) external; 13 | 14 | /** 15 | * @notice This function allows the owner to set the allowedTo status of an address 16 | * @param to the address whose allowedTo status is being set 17 | * @param isAllowedTo the new allowedTo status 18 | */ 19 | function setAllowedTo(address to, bool isAllowedTo) external; 20 | 21 | /** 22 | * @notice Allows the owner to disable transfer restrictions 23 | */ 24 | function disableTransferRestrictions() external; 25 | 26 | /** 27 | * @notice This function allows minter to mint tokens 28 | */ 29 | function mint() external; 30 | 31 | /** 32 | * @notice This function allows bEIGEN holders to wrap their tokens into Eigen 33 | */ 34 | function wrap( 35 | uint256 amount 36 | ) external; 37 | 38 | /** 39 | * @notice This function allows Eigen holders to unwrap their tokens into bEIGEN 40 | */ 41 | function unwrap( 42 | uint256 amount 43 | ) external; 44 | 45 | /** 46 | * @dev Clock used for flagging checkpoints. Has been overridden to implement timestamp based 47 | * checkpoints (and voting). 48 | */ 49 | function clock() external view returns (uint48); 50 | 51 | /** 52 | * @dev Machine-readable description of the clock as specified in EIP-6372. 53 | * Has been overridden to inform callers that this contract uses timestamps instead of block numbers, to match `clock()` 54 | */ 55 | // solhint-disable-next-line func-name-mixedcase 56 | function CLOCK_MODE() external pure returns (string memory); 57 | } 58 | -------------------------------------------------------------------------------- /src/eigenlayer-interfaces/IPauserRegistry.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity >=0.5.0; 3 | 4 | /** 5 | * @title Interface for the `PauserRegistry` contract. 6 | * @author Layr Labs, Inc. 7 | * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service 8 | */ 9 | interface IPauserRegistry { 10 | error OnlyUnpauser(); 11 | error InputAddressZero(); 12 | 13 | event PauserStatusChanged(address pauser, bool canPause); 14 | 15 | event UnpauserChanged(address previousUnpauser, address newUnpauser); 16 | 17 | /// @notice Mapping of addresses to whether they hold the pauser role. 18 | function isPauser( 19 | address pauser 20 | ) external view returns (bool); 21 | 22 | /// @notice Unique address that holds the unpauser role. Capable of changing *both* the pauser and unpauser addresses. 23 | function unpauser() external view returns (address); 24 | } 25 | -------------------------------------------------------------------------------- /src/eigenlayer-interfaces/ISemVerMixin.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity ^0.8.0; 3 | 4 | /// @title ISemVerMixin 5 | /// @notice A mixin interface that provides semantic versioning functionality. 6 | /// @dev Follows SemVer 2.0.0 specification (https://semver.org/) 7 | interface ISemVerMixin { 8 | /// @notice Returns the semantic version string of the contract. 9 | /// @return The version string in SemVer format (e.g., "v1.1.1") 10 | function version() external view returns (string memory); 11 | } 12 | -------------------------------------------------------------------------------- /src/eigenlayer-interfaces/ISignatureUtils.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity >=0.5.0; 3 | 4 | /** 5 | * @title The interface for common signature utilities. 6 | * @author Layr Labs, Inc. 7 | * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service 8 | */ 9 | interface ISignatureUtils { 10 | // @notice Struct that bundles together a signature and an expiration time for the signature. Used primarily for stack management. 11 | struct SignatureWithExpiry { 12 | // the signature itself, formatted as a single bytes object 13 | bytes signature; 14 | // the expiration timestamp (UTC) of the signature 15 | uint256 expiry; 16 | } 17 | 18 | // @notice Struct that bundles together a signature, a salt for uniqueness, and an expiration time for the signature. Used primarily for stack management. 19 | struct SignatureWithSaltAndExpiry { 20 | // the signature itself, formatted as a single bytes object 21 | bytes signature; 22 | // the salt used to generate the signature 23 | bytes32 salt; 24 | // the expiration timestamp (UTC) of the signature 25 | uint256 expiry; 26 | } 27 | } -------------------------------------------------------------------------------- /src/eigenlayer-interfaces/ISignatureUtilsMixin.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity >=0.5.0; 3 | 4 | import "./ISemVerMixin.sol"; 5 | 6 | interface ISignatureUtilsMixinErrors { 7 | /// @notice Thrown when a signature is invalid. 8 | error InvalidSignature(); 9 | /// @notice Thrown when a signature has expired. 10 | error SignatureExpired(); 11 | } 12 | 13 | interface ISignatureUtilsMixinTypes { 14 | /// @notice Struct that bundles together a signature and an expiration time for the signature. 15 | /// @dev Used primarily for stack management. 16 | struct SignatureWithExpiry { 17 | // the signature itself, formatted as a single bytes object 18 | bytes signature; 19 | // the expiration timestamp (UTC) of the signature 20 | uint256 expiry; 21 | } 22 | 23 | /// @notice Struct that bundles together a signature, a salt for uniqueness, and an expiration time for the signature. 24 | /// @dev Used primarily for stack management. 25 | struct SignatureWithSaltAndExpiry { 26 | // the signature itself, formatted as a single bytes object 27 | bytes signature; 28 | // the salt used to generate the signature 29 | bytes32 salt; 30 | // the expiration timestamp (UTC) of the signature 31 | uint256 expiry; 32 | } 33 | } 34 | 35 | /** 36 | * @title The interface for common signature utilities. 37 | * @author Layr Labs, Inc. 38 | * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service 39 | */ 40 | interface ISignatureUtilsMixin is ISignatureUtilsMixinErrors, ISignatureUtilsMixinTypes, ISemVerMixin { 41 | /// @notice Computes the EIP-712 domain separator used for signature validation. 42 | /// @dev The domain separator is computed according to EIP-712 specification, using: 43 | /// - The hardcoded name "EigenLayer" 44 | /// - The contract's version string 45 | /// - The current chain ID 46 | /// - This contract's address 47 | /// @return The 32-byte domain separator hash used in EIP-712 structured data signing. 48 | /// @dev See https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator. 49 | function domainSeparator() external view returns (bytes32); 50 | } 51 | -------------------------------------------------------------------------------- /src/eigenlayer-interfaces/ISocketUpdater.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity ^0.8.12; 3 | 4 | /** 5 | * @title Interface for an `ISocketUpdater` where operators can update their sockets. 6 | * @author Layr Labs, Inc. 7 | */ 8 | interface ISocketUpdater { 9 | // EVENTS 10 | 11 | event OperatorSocketUpdate(bytes32 indexed operatorId, string socket); 12 | 13 | // FUNCTIONS 14 | 15 | /** 16 | * @notice Updates the socket of the msg.sender given they are a registered operator 17 | * @param socket is the new socket of the operator 18 | */ 19 | function updateSocket(string memory socket) external; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /src/eigenlayer-interfaces/ITimelock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BSD-3-Clause 2 | pragma solidity ^0.8.10; 3 | 4 | 5 | interface ITimelock { 6 | function queueTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) external returns (bytes32); 7 | 8 | function cancelTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) external ; 9 | 10 | function executeTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) external payable returns (bytes memory); 11 | 12 | function admin() external view returns (address); 13 | } 14 | -------------------------------------------------------------------------------- /src/eigenlayer-interfaces/IWhitelister.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity >=0.5.0; 3 | 4 | import "./IStrategyManager.sol"; 5 | import "./IStrategy.sol"; 6 | import "./IDelegationManager.sol"; 7 | // import "../../../script/whitelist/Staker.sol"; 8 | 9 | import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; 10 | import "@openzeppelin/contracts/access/Ownable.sol"; 11 | import "@openzeppelin/contracts/utils/Create2.sol"; 12 | 13 | interface IWhitelister { 14 | function whitelist(address operator) external; 15 | 16 | function getStaker(address operator) external returns (address); 17 | 18 | function depositIntoStrategy( 19 | address staker, 20 | IStrategy strategy, 21 | IERC20 token, 22 | uint256 amount 23 | ) external returns (bytes memory); 24 | 25 | function queueWithdrawal( 26 | address staker, 27 | IDelegationManager.QueuedWithdrawalParams[] calldata queuedWithdrawalParams 28 | ) external returns (bytes memory); 29 | 30 | function completeQueuedWithdrawal( 31 | address staker, 32 | IDelegationManager.Withdrawal calldata queuedWithdrawal, 33 | IERC20[] calldata tokens, 34 | uint256 middlewareTimesIndex, 35 | bool receiveAsTokens 36 | ) external returns (bytes memory); 37 | 38 | function transfer(address staker, address token, address to, uint256 amount) external returns (bytes memory); 39 | 40 | function callAddress(address to, bytes memory data) external payable returns (bytes memory); 41 | } 42 | -------------------------------------------------------------------------------- /src/eigenlayer-libraries/EIP1271SignatureUtils.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity ^0.8.12; 3 | 4 | import "@openzeppelin/contracts/interfaces/IERC1271.sol"; 5 | import "@openzeppelin/contracts/utils/Address.sol"; 6 | import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; 7 | 8 | /** 9 | * @title Library of utilities for making EIP1271-compliant signature checks. 10 | * @author Layr Labs, Inc. 11 | * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service 12 | */ 13 | library EIP1271SignatureUtils { 14 | // bytes4(keccak256("isValidSignature(bytes32,bytes)") 15 | bytes4 internal constant EIP1271_MAGICVALUE = 0x1626ba7e; 16 | 17 | /** 18 | * @notice Checks @param signature is a valid signature of @param digestHash from @param signer. 19 | * If the `signer` contains no code -- i.e. it is not (yet, at least) a contract address, then checks using standard ECDSA logic 20 | * Otherwise, passes on the signature to the signer to verify the signature and checks that it returns the `EIP1271_MAGICVALUE`. 21 | */ 22 | function checkSignature_EIP1271(address signer, bytes32 digestHash, bytes memory signature) internal view { 23 | /** 24 | * check validity of signature: 25 | * 1) if `signer` is an EOA, then `signature` must be a valid ECDSA signature from `signer`, 26 | * indicating their intention for this action 27 | * 2) if `signer` is a contract, then `signature` must will be checked according to EIP-1271 28 | */ 29 | if (Address.isContract(signer)) { 30 | require( 31 | IERC1271(signer).isValidSignature(digestHash, signature) == EIP1271_MAGICVALUE, 32 | "EIP1271SignatureUtils.checkSignature_EIP1271: ERC1271 signature verification failed" 33 | ); 34 | } else { 35 | require( 36 | ECDSA.recover(digestHash, signature) == signer, 37 | "EIP1271SignatureUtils.checkSignature_EIP1271: signature not from signer" 38 | ); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/eigenlayer-libraries/Endian.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity ^0.8.0; 3 | 4 | library Endian { 5 | /** 6 | * @notice Converts a little endian-formatted uint64 to a big endian-formatted uint64 7 | * @param lenum little endian-formatted uint64 input, provided as 'bytes32' type 8 | * @return n The big endian-formatted uint64 9 | * @dev Note that the input is formatted as a 'bytes32' type (i.e. 256 bits), but it is immediately truncated to a uint64 (i.e. 64 bits) 10 | * through a right-shift/shr operation. 11 | */ 12 | function fromLittleEndianUint64(bytes32 lenum) internal pure returns (uint64 n) { 13 | // the number needs to be stored in little-endian encoding (ie in bytes 0-8) 14 | n = uint64(uint256(lenum >> 192)); 15 | return 16 | (n >> 56) | 17 | ((0x00FF000000000000 & n) >> 40) | 18 | ((0x0000FF0000000000 & n) >> 24) | 19 | ((0x000000FF00000000 & n) >> 8) | 20 | ((0x00000000FF000000 & n) << 8) | 21 | ((0x0000000000FF0000 & n) << 24) | 22 | ((0x000000000000FF00 & n) << 40) | 23 | ((0x00000000000000FF & n) << 56); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/eigenlayer-libraries/OperatorSetLib.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity ^0.8.27; 3 | 4 | using OperatorSetLib for OperatorSet global; 5 | 6 | /** 7 | * @notice An operator set identified by the AVS address and an identifier 8 | * @param avs The address of the AVS this operator set belongs to 9 | * @param id The unique identifier for the operator set 10 | */ 11 | struct OperatorSet { 12 | address avs; 13 | uint32 id; 14 | } 15 | 16 | library OperatorSetLib { 17 | function key( 18 | OperatorSet memory os 19 | ) internal pure returns (bytes32) { 20 | return bytes32(abi.encodePacked(os.avs, uint96(os.id))); 21 | } 22 | 23 | function decode( 24 | bytes32 _key 25 | ) internal pure returns (OperatorSet memory) { 26 | /// forgefmt: disable-next-item 27 | return OperatorSet({ 28 | avs: address(uint160(uint256(_key) >> 96)), 29 | id: uint32(uint256(_key) & type(uint96).max) 30 | }); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/helpers/EtherFiOperationParameters.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | import "@openzeppelin-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol"; 5 | import "@openzeppelin-upgradeable/contracts/access/OwnableUpgradeable.sol"; 6 | 7 | contract EtherFiOperationParameters is UUPSUpgradeable, OwnableUpgradeable { 8 | mapping(string => mapping(address => bool)) public tagAdmins; 9 | mapping(string => mapping(string => string)) public tagKeyValues; 10 | 11 | event UpdatedAdmin(string tag, address admin, bool allowed); 12 | event UpdatedKeyValue(string tag, string key, string old_value, string new_value); 13 | 14 | /// @custom:oz-upgrades-unsafe-allow constructor 15 | constructor() { 16 | _disableInitializers(); 17 | } 18 | 19 | function initialize() external initializer { 20 | __Ownable_init(); 21 | __UUPSUpgradeable_init(); 22 | } 23 | 24 | function updateTagAdmin(string memory tag, address admin, bool allowed) external onlyOwner { 25 | tagAdmins[tag][admin] = allowed; 26 | 27 | emit UpdatedAdmin(tag, admin, allowed); 28 | } 29 | 30 | function updateTagKeyValue(string memory tag, string memory key, string memory value) external onlyAdmin(tag) { 31 | string memory old_value = tagKeyValues[tag][key]; 32 | tagKeyValues[tag][key] = value; 33 | 34 | emit UpdatedKeyValue(tag, key, old_value, value); 35 | } 36 | 37 | function _authorizeUpgrade(address newImplementation) internal override onlyOwner {} 38 | 39 | function getImplementation() external view returns (address) { 40 | return _getImplementation(); 41 | } 42 | 43 | modifier onlyAdmin(string memory tag) { 44 | require(tagAdmins[tag][msg.sender], "Only admin can call"); 45 | _; 46 | } 47 | } -------------------------------------------------------------------------------- /src/interfaces/IAuctionManager.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | interface IAuctionManager { 5 | struct Bid { 6 | uint256 amount; 7 | uint64 bidderPubKeyIndex; 8 | address bidderAddress; 9 | bool isActive; 10 | } 11 | 12 | function initialize(address _nodeOperatorManagerContract) external; 13 | 14 | function getBidOwner(uint256 _bidId) external view returns (address); 15 | 16 | function numberOfActiveBids() external view returns (uint256); 17 | 18 | function isBidActive(uint256 _bidId) external view returns (bool); 19 | 20 | function createBid( 21 | uint256 _bidSize, 22 | uint256 _bidAmount 23 | ) external payable returns (uint256[] memory); 24 | 25 | function cancelBidBatch(uint256[] calldata _bidIds) external; 26 | 27 | function cancelBid(uint256 _bidId) external; 28 | 29 | function reEnterAuction(uint256 _bidId) external; 30 | 31 | function updateSelectedBidInformation(uint256 _bidId) external; 32 | 33 | function processAuctionFeeTransfer(uint256 _validatorId) external; 34 | 35 | function setStakingManagerContractAddress( 36 | address _stakingManagerContractAddress 37 | ) external; 38 | 39 | function setAccumulatedRevenueThreshold(uint128 _newThreshold) external; 40 | 41 | function updateAdmin(address _address, bool _isAdmin) external; 42 | function pauseContract() external; 43 | function unPauseContract() external; 44 | 45 | function transferAccumulatedRevenue() external; 46 | } 47 | -------------------------------------------------------------------------------- /src/interfaces/IBNFT.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | import "@openzeppelin-upgradeable/contracts/token/ERC721/IERC721Upgradeable.sol"; 5 | 6 | interface IBNFT is IERC721Upgradeable { 7 | 8 | function burnFromWithdrawal(uint256 _validatorId) external; 9 | function initialize() external; 10 | function initializeOnUpgrade(address _etherFiNodesManagerAddress) external; 11 | function mint(address _receiver, uint256 _validatorId) external; 12 | function burnFromCancelBNftFlow(uint256 _validatorId) external; 13 | function upgradeTo(address _newImplementation) external; 14 | } 15 | -------------------------------------------------------------------------------- /src/interfaces/ICumulativeMerkleRewardsDistributor.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.24; 4 | 5 | // Allows anyone to claim a token if they exist in a merkle root. 6 | interface ICumulativeMerkleRewardsDistributor { 7 | 8 | event Claimed(address indexed token, address indexed account, uint256 amount); 9 | event PendingMerkleRootUpdated(address indexed token, bytes32 merkleRoot); 10 | event ClaimableMerkleRootUpdated(address indexed token, bytes32 oldMerkleRoot, bytes32 newMerkleRoot, uint256 rewardsCalculatedToBlock); 11 | event RecipientStatusUpdated(address user, bool isWhitelisted); 12 | event ClaimDelayUpdated(uint256 newClaimDelay); 13 | event Paused(address account); 14 | event UnPaused(address account); 15 | 16 | error IncorrectRole(); 17 | error InsufficentDelay(); 18 | error InvalidFinalizedBlock(); 19 | error InvalidProof(); 20 | error NonWhitelistedUser(); 21 | error MerkleRootWasUpdated(); 22 | error NothingToClaim(); 23 | error ContractPaused(); 24 | error ETHTransferFailed(); 25 | 26 | // Sets the merkle root of the merkle tree containing cumulative account balances available to claim. 27 | function setPendingMerkleRoot(address _token, bytes32 _merkleRoot) external; 28 | function finalizeMerkleRoot(address _token, uint256 _finalizedBlock) external; 29 | function pause() external; 30 | function unpause() external; 31 | // Claim the given amount of the token to the given address. Reverts if the inputs are invalid. 32 | function claim( 33 | address token, 34 | address account, 35 | uint256 cumulativeAmount, 36 | bytes32 expectedMerkleRoot, 37 | bytes32[] calldata merkleProof 38 | ) external; 39 | } -------------------------------------------------------------------------------- /src/interfaces/IDepositContract.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-only 2 | 3 | pragma solidity ^0.8.13; 4 | 5 | // This interface is designed to be compatible with the Vyper version. 6 | /// @notice This is the Ethereum 2.0 deposit contract interface. 7 | /// For more information see the Phase 0 specification under https://github.com/ethereum/eth2.0-specs 8 | /// https://github.com/ethereum/eth2.0-specs/blob/dev/solidity_deposit_contract/deposit_contract.sol 9 | interface IDepositContract { 10 | /// @notice A processed deposit event. 11 | event DepositEvent( 12 | bytes pubkey, 13 | bytes withdrawal_credentials, 14 | bytes amount, 15 | bytes signature, 16 | bytes index 17 | ); 18 | 19 | /// @notice Submit a Phase 0 DepositData object. 20 | /// @param pubkey A BLS12-381 public key. 21 | /// @param withdrawal_credentials Commitment to a public key for withdrawals. 22 | /// @param signature A BLS12-381 signature. 23 | /// @param deposit_data_root The SHA-256 hash of the SSZ-encoded DepositData object. 24 | /// Used as a protection against malformed input. 25 | function deposit( 26 | bytes calldata pubkey, 27 | bytes calldata withdrawal_credentials, 28 | bytes calldata signature, 29 | bytes32 deposit_data_root 30 | ) external payable; 31 | 32 | /// @notice Query the current deposit root hash. 33 | /// @return The deposit root hash. 34 | function get_deposit_root() external view returns (bytes32); 35 | 36 | /// @notice Query the current deposit count. 37 | /// @return The deposit count encoded as a little endian 64-bit number. 38 | function get_deposit_count() external view returns (bytes memory); 39 | } -------------------------------------------------------------------------------- /src/interfaces/IEtherFiAdmin.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | interface IEtherFiAdmin { 5 | function lastHandledReportRefSlot() external view returns (uint32); 6 | function lastHandledReportRefBlock() external view returns (uint32); 7 | function lastAdminExecutionBlock() external view returns (uint32); 8 | function numValidatorsToSpinUp() external view returns (uint32); 9 | } 10 | -------------------------------------------------------------------------------- /src/interfaces/INodeOperatorManager.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | import "../../src/LiquidityPool.sol"; 5 | 6 | interface INodeOperatorManager { 7 | struct KeyData { 8 | uint64 totalKeys; 9 | uint64 keysUsed; 10 | bytes ipfsHash; 11 | } 12 | 13 | function getUserTotalKeys( 14 | address _user 15 | ) external view returns (uint64 totalKeys); 16 | 17 | function getNumKeysRemaining( 18 | address _user 19 | ) external view returns (uint64 numKeysRemaining); 20 | 21 | function isWhitelisted( 22 | address _user 23 | ) external view returns (bool whitelisted); 24 | 25 | function registerNodeOperator( 26 | bytes memory ipfsHash, 27 | uint64 totalKeys 28 | ) external; 29 | 30 | function initializeOnUpgrade( 31 | address[] memory _operator, 32 | bytes[] memory _ipfsHash, 33 | uint64[] memory _totalKeys, 34 | uint64[] memory _keysUsed 35 | ) external; 36 | 37 | function batchUpdateOperatorsApprovedTags( 38 | address[] memory _users, 39 | LiquidityPool.SourceOfFunds[] memory _approvedTags, 40 | bool[] memory _approvals 41 | ) external; 42 | 43 | function fetchNextKeyIndex(address _user) external returns (uint64); 44 | 45 | function isEligibleToRunValidatorsForSourceOfFund(address _operator, LiquidityPool.SourceOfFunds _source) external view returns (bool approved); 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/interfaces/IPausableEF.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.21; 3 | 4 | interface IPausableEF { 5 | function pauseContract() external; 6 | function unPauseContract() external; 7 | } -------------------------------------------------------------------------------- /src/interfaces/IProtocolRevenueManager.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | interface IProtocolRevenueManager { 5 | struct AuctionRevenueSplit { 6 | uint64 treasurySplit; 7 | uint64 nodeOperatorSplit; 8 | uint64 tnftHolderSplit; 9 | uint64 bnftHolderSplit; 10 | } 11 | 12 | function setEtherFiNodesManagerAddress(address _etherFiNodesManager) external; 13 | function setAuctionManagerAddress(address _auctionManager) external; 14 | } 15 | -------------------------------------------------------------------------------- /src/interfaces/IRateLimiter.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | // Used by {L1,L2}SyncPool 5 | interface IRateLimiter { 6 | function updateRateLimit(address sender, address tokenIn, uint256 amountIn, uint256 amountOut) external; 7 | } -------------------------------------------------------------------------------- /src/interfaces/IRateProvider.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0-or-later 2 | // This program is free software: you can redistribute it and/or modify 3 | // it under the terms of the GNU General Public License as published by 4 | // the Free Software Foundation, either version 3 of the License, or 5 | // (at your option) any later version. 6 | 7 | // This program is distributed in the hope that it will be useful, 8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | // GNU General Public License for more details. 11 | 12 | // You should have received a copy of the GNU General Public License 13 | // along with this program. If not, see . 14 | 15 | pragma solidity ^0.8.0; 16 | 17 | interface IRateProvider { 18 | function getRate() external view returns (uint256); 19 | } -------------------------------------------------------------------------------- /src/interfaces/IRegulationsManager.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | interface IRegulationsManager { 5 | function initialize() external; 6 | 7 | function confirmEligibility(bytes32 hash) external; 8 | 9 | function removeFromWhitelist(address _user) external; 10 | 11 | function initializeNewWhitelist(bytes32 _newVersionHash) external; 12 | 13 | function isEligible(uint32 _whitelistVersion, address _user) external view returns (bool); 14 | 15 | function whitelistVersion() external view returns (uint32); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/interfaces/ITNFT.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | import "@openzeppelin-upgradeable/contracts/token/ERC721/IERC721Upgradeable.sol"; 5 | 6 | interface ITNFT is IERC721Upgradeable { 7 | 8 | function burnFromWithdrawal(uint256 _validatorId) external; 9 | function initialize() external; 10 | function initializeOnUpgrade(address _etherFiNodesManagerAddress) external; 11 | function mint(address _receiver, uint256 _validatorId) external; 12 | function burnFromCancelBNftFlow(uint256 _validatorId) external; 13 | function upgradeTo(address _newImplementation) external; 14 | } 15 | -------------------------------------------------------------------------------- /src/interfaces/ITVLOracle.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | interface ITVLOracle { 5 | 6 | function setTvl(uint256 _newTvl) external; 7 | function getTvl() external view returns (uint256 _currentTvl); 8 | function setTVLAggregator(address _tvlAggregator) external; 9 | 10 | } -------------------------------------------------------------------------------- /src/interfaces/ITreasury.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | interface ITreasury { 5 | function withdraw(uint256 _amount, address _to) external; 6 | } 7 | -------------------------------------------------------------------------------- /src/interfaces/IWETH.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.8.13; 2 | 3 | interface IWETH { 4 | function balanceOf(address owner) external view returns (uint); 5 | function allowance(address owner, address spender) external view returns (uint); 6 | 7 | function deposit() external payable; 8 | function withdraw(uint wad) external; 9 | 10 | function totalSupply() external view returns (uint); 11 | 12 | function approve(address guy, uint wad) external returns (bool); 13 | function transfer(address dst, uint wad) external returns (bool); 14 | function transferFrom(address src, address dst, uint wad) external returns (bool); 15 | } 16 | -------------------------------------------------------------------------------- /src/interfaces/IWeETH.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | import "@openzeppelin-upgradeable/contracts/token/ERC20/IERC20Upgradeable.sol"; 5 | import "./ILiquidityPool.sol"; 6 | import "./IeETH.sol"; 7 | 8 | interface IWeETH is IERC20Upgradeable { 9 | 10 | struct PermitInput { 11 | uint256 value; 12 | uint256 deadline; 13 | uint8 v; 14 | bytes32 r; 15 | bytes32 s; 16 | } 17 | 18 | // STATE VARIABLES 19 | function eETH() external view returns (IeETH); 20 | function liquidityPool() external view returns (ILiquidityPool); 21 | function whitelistedSpender(address spender) external view returns (bool); 22 | function blacklistedRecipient(address recipient) external view returns (bool); 23 | 24 | // STATE-CHANGING FUNCTIONS 25 | function initialize(address _liquidityPool, address _eETH) external; 26 | function wrap(uint256 _eETHAmount) external returns (uint256); 27 | function wrapWithPermit(uint256 _eETHAmount, ILiquidityPool.PermitInput calldata _permit) external returns (uint256); 28 | function unwrap(uint256 _weETHAmount) external returns (uint256); 29 | function permit( 30 | address owner, 31 | address spender, 32 | uint256 value, 33 | uint256 deadline, 34 | uint8 v, 35 | bytes32 r, 36 | bytes32 s 37 | ) external; 38 | 39 | function setWhitelistedSpender(address[] calldata _spenders, bool _isWhitelisted) external; 40 | function setBlacklistedRecipient(address[] calldata _recipients, bool _isBlacklisted) external; 41 | 42 | // GETTER FUNCTIONS 43 | function getWeETHByeETH(uint256 _eETHAmount) external view returns (uint256); 44 | function getEETHByWeETH(uint256 _weETHAmount) external view returns (uint256); 45 | function getRate() external view returns (uint256); 46 | function getImplementation() external view returns (address); 47 | } 48 | -------------------------------------------------------------------------------- /src/interfaces/IWithdrawRequestNFT.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | interface IWithdrawRequestNFT { 5 | struct WithdrawRequest { 6 | uint96 amountOfEEth; 7 | uint96 shareOfEEth; 8 | bool isValid; 9 | uint32 feeGwei; 10 | } 11 | 12 | function initialize(address _liquidityPoolAddress, address _eEthAddress, address _membershipManager) external; 13 | function requestWithdraw(uint96 amountOfEEth, uint96 shareOfEEth, address requester, uint256 fee) external payable returns (uint256); 14 | function claimWithdraw(uint256 requestId) external; 15 | 16 | function getRequest(uint256 requestId) external view returns (WithdrawRequest memory); 17 | function isFinalized(uint256 requestId) external view returns (bool); 18 | 19 | function invalidateRequest(uint256 requestId) external; 20 | function finalizeRequests(uint256 upperBound) external; 21 | } 22 | -------------------------------------------------------------------------------- /src/interfaces/IeETH.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | interface IeETH { 5 | 6 | struct PermitInput { 7 | uint256 value; 8 | uint256 deadline; 9 | uint8 v; 10 | bytes32 r; 11 | bytes32 s; 12 | } 13 | 14 | function name() external pure returns (string memory); 15 | function symbol() external pure returns (string memory); 16 | function decimals() external pure returns (uint8); 17 | function totalShares() external view returns (uint256); 18 | 19 | function shares(address _user) external view returns (uint256); 20 | function balanceOf(address _user) external view returns (uint256); 21 | 22 | function initialize(address _liquidityPool) external; 23 | function mintShares(address _user, uint256 _share) external; 24 | function burnShares(address _user, uint256 _share) external; 25 | function transferFrom(address _sender, address _recipient, uint256 _amount) external returns (bool); 26 | function transfer(address _recipient, uint256 _amount) external returns (bool); 27 | function approve(address _spender, uint256 _amount) external returns (bool); 28 | function increaseAllowance(address _spender, uint256 _increaseAmount) external returns (bool); 29 | function decreaseAllowance(address _spender, uint256 _decreaseAmount) external returns (bool); 30 | 31 | function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; 32 | } 33 | -------------------------------------------------------------------------------- /src/interfaces/IwstETH.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | import "@openzeppelin-upgradeable/contracts/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol"; 5 | import "@openzeppelin-upgradeable/contracts/token/ERC20/IERC20Upgradeable.sol"; 6 | 7 | interface IwstETH is IERC20PermitUpgradeable, IERC20Upgradeable { 8 | 9 | function wrap(uint256 _stETHAmount) external returns (uint256); 10 | function unwrap(uint256 _wstETHAmount) external returns (uint256); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/libraries/DepositRootGenerator.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | import "../MembershipManager.sol"; 5 | import "../LiquidityPool.sol"; 6 | 7 | library depositRootGenerator { 8 | uint constant GWEI = 1e9; 9 | 10 | function generateDepositRoot( 11 | bytes calldata pubkey, 12 | bytes calldata signature, 13 | bytes calldata withdrawal_credentials, 14 | uint256 _amountIn 15 | ) public pure returns (bytes32) { 16 | 17 | uint deposit_amount = _amountIn / GWEI; 18 | bytes memory amount = to_little_endian_64(uint64(deposit_amount)); 19 | 20 | bytes32 pubkey_root = sha256(abi.encodePacked(pubkey, bytes16(0))); 21 | bytes32 signature_root = sha256( 22 | abi.encodePacked( 23 | sha256(abi.encodePacked(signature[:64])), 24 | sha256(abi.encodePacked(signature[64:], bytes32(0))) 25 | ) 26 | ); 27 | return 28 | sha256( 29 | abi.encodePacked( 30 | sha256( 31 | abi.encodePacked(pubkey_root, withdrawal_credentials) 32 | ), 33 | sha256(abi.encodePacked(amount, bytes24(0), signature_root)) 34 | ) 35 | ); 36 | } 37 | 38 | function to_little_endian_64( 39 | uint64 value 40 | ) internal pure returns (bytes memory ret) { 41 | ret = new bytes(8); 42 | bytes8 bytesValue = bytes8(value); 43 | // Byteswapping during copying to bytes. 44 | ret[0] = bytesValue[7]; 45 | ret[1] = bytesValue[6]; 46 | ret[2] = bytesValue[5]; 47 | ret[3] = bytesValue[4]; 48 | ret[4] = bytesValue[3]; 49 | ret[5] = bytesValue[2]; 50 | ret[6] = bytesValue[1]; 51 | ret[7] = bytesValue[0]; 52 | } 53 | } -------------------------------------------------------------------------------- /test/EtherFiViewer.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import "forge-std/Test.sol"; 5 | import "forge-std/console.sol"; 6 | 7 | import "../src/helpers/EtherFiViewer.sol"; 8 | import "../src/UUPSProxy.sol"; 9 | 10 | contract EtherFiViewerTest is Test { 11 | 12 | EtherFiViewer public etherFiViewer; 13 | 14 | function setUp() public { 15 | vm.selectFork(vm.createFork(vm.envString("MAINNET_RPC_URL"))); 16 | etherFiViewer = EtherFiViewer(address(new UUPSProxy(address(new EtherFiViewer()), ""))); 17 | etherFiViewer.initialize(address(0x8487c5F8550E3C3e7734Fe7DCF77DB2B72E4A848)); 18 | } 19 | 20 | function test_EtherFiNodesManager() public { 21 | uint256[] memory validatorIds = new uint256[](2); 22 | validatorIds[0] = 25678; 23 | validatorIds[1] = 29208; 24 | 25 | address[] memory etherFiNodeAddresses = etherFiViewer.EtherFiNodesManager_etherFiNodeAddress(validatorIds); 26 | assertEq(etherFiNodeAddresses[0], 0x31db9021ec8E1065e1f55553c69e1B1ea9d20533); 27 | assertEq(etherFiNodeAddresses[1], 0xC3D3662A44c0d80080D3AF0eea752369c504724e); 28 | 29 | etherFiViewer.EtherFiNodesManager_splitBalanceInExecutionLayer(validatorIds); 30 | etherFiViewer.EtherFiNodesManager_withdrawableBalanceInExecutionLayer(validatorIds); 31 | } 32 | 33 | function test_EigenPodManager_podOwnerDepositShares() public { 34 | uint256[] memory validatorIds = new uint256[](2); 35 | validatorIds[0] = 25678; 36 | validatorIds[1] = 29208; 37 | 38 | etherFiViewer.EigenPodManager_podOwnerDepositShares(validatorIds); 39 | } 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /test/TestERC20.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.13; 3 | 4 | import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; 5 | 6 | contract TestERC20 is ERC20 { 7 | constructor(string memory _name, string memory _symbol) 8 | ERC20(_name, _symbol) 9 | {} 10 | 11 | function mint(address _to, uint256 _amount) public { 12 | _mint(_to, _amount); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/common/ArrayTestHelper.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.27; 3 | 4 | import "../../src/eigenlayer-interfaces/IDelegationManager.sol"; 5 | 6 | contract ArrayTestHelper { 7 | // Common types used throughout our and eigenlayers protocol 8 | function toArray_u256(uint256 val) public returns (uint256[] memory) { 9 | uint256[] memory vals = new uint256[](1); 10 | vals[0] = val; 11 | return vals; 12 | } 13 | function toArray_u256(uint32 val) public returns (uint256[] memory) { 14 | uint256[] memory vals = new uint256[](1); 15 | vals[0] = val; 16 | return vals; 17 | } 18 | function toArray_u32(uint32 val) public returns (uint32[] memory) { 19 | uint32[] memory vals = new uint32[](1); 20 | vals[0] = val; 21 | return vals; 22 | } 23 | function toArray_u40(uint40 val) public returns (uint40[] memory) { 24 | uint40[] memory vals = new uint40[](1); 25 | vals[0] = val; 26 | return vals; 27 | } 28 | function toArray(IDelegationManager.Withdrawal memory withdrawal) public returns (IDelegationManager.Withdrawal[] memory) { 29 | IDelegationManager.Withdrawal[] memory vals = new IDelegationManager.Withdrawal[](1); 30 | vals[0] = withdrawal; 31 | return vals; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /test/eigenlayer-mocks/BeaconChainOracleMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity ^0.8.12; 3 | 4 | import "../../src/eigenlayer-interfaces/IBeaconChainOracle.sol"; 5 | 6 | 7 | 8 | contract BeaconChainOracleMock is IBeaconChainOracle { 9 | 10 | bytes32 public mockBeaconChainStateRoot; 11 | 12 | function getOracleBlockRootAtTimestamp() external view returns(bytes32) { 13 | return mockBeaconChainStateRoot; 14 | } 15 | 16 | function setOracleBlockRootAtTimestamp(bytes32 beaconChainStateRoot) external { 17 | mockBeaconChainStateRoot = beaconChainStateRoot; 18 | } 19 | 20 | function timestampToBlockRoot(uint256 /*blockNumber*/) external view returns(bytes32) { 21 | return mockBeaconChainStateRoot; 22 | } 23 | 24 | function isOracleSigner(address /*_oracleSigner*/) external pure returns(bool) { 25 | return true; 26 | } 27 | 28 | function hasVoted(uint64 /*blockNumber*/, address /*oracleSigner*/) external pure returns(bool) { 29 | return true; 30 | } 31 | 32 | function stateRootVotes(uint64 /*blockNumber*/, bytes32 /*stateRoot*/) external pure returns(uint256) { 33 | return 0; 34 | } 35 | 36 | function totalOracleSigners() external pure returns(uint256) { 37 | return 0; 38 | } 39 | 40 | function threshold() external pure returns(uint256) { 41 | return 0; 42 | } 43 | 44 | function setThreshold(uint256 /*_threshold*/) external pure {} 45 | 46 | function addOracleSigners(address[] memory /*_oracleSigners*/) external pure {} 47 | 48 | function removeOracleSigners(address[] memory /*_oracleSigners*/) external pure {} 49 | 50 | function voteForBeaconChainStateRoot(uint64 /*blockNumber*/, bytes32 /*stateRoot*/) external pure {} 51 | 52 | function latestConfirmedOracleBlockNumber() external pure returns(uint64) {} 53 | } 54 | -------------------------------------------------------------------------------- /test/eigenlayer-mocks/ETHDepositMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity ^0.8.12; 3 | 4 | import "../../src/eigenlayer-interfaces/IETHPOSDeposit.sol"; 5 | 6 | 7 | contract ETHPOSDepositMock is IETHPOSDeposit { 8 | 9 | function deposit( 10 | bytes calldata pubkey, 11 | bytes calldata withdrawal_credentials, 12 | bytes calldata signature, 13 | bytes32 deposit_data_root 14 | ) external payable {} 15 | 16 | 17 | function get_deposit_root() external pure returns (bytes32) { 18 | bytes32 root; 19 | return root; 20 | } 21 | 22 | /// @notice Query the current deposit count. 23 | /// @return The deposit count encoded as a little endian 64-bit number. 24 | function get_deposit_count() external pure returns (bytes memory) { 25 | bytes memory root; 26 | return root; 27 | } 28 | 29 | 30 | } 31 | 32 | -------------------------------------------------------------------------------- /test/eigenlayer-utils/Operators.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity ^0.8.12; 3 | 4 | import "forge-std/Test.sol"; 5 | import "forge-std/Script.sol"; 6 | import "forge-std/StdJson.sol"; 7 | 8 | contract Operators is Test { 9 | string internal operatorConfigJson; 10 | 11 | constructor() { 12 | operatorConfigJson = vm.readFile("./src/test/test-data/operators.json"); 13 | } 14 | 15 | function operatorPrefix(uint256 index) public returns(string memory) { 16 | return string.concat(".operators[", string.concat(vm.toString(index), "].")); 17 | } 18 | 19 | function getNumOperators() public returns(uint256) { 20 | return stdJson.readUint(operatorConfigJson, ".numOperators"); 21 | } 22 | 23 | function getOperatorAddress(uint256 index) public returns(address) { 24 | return stdJson.readAddress(operatorConfigJson, string.concat(operatorPrefix(index), "Address")); 25 | } 26 | 27 | function getOperatorSecretKey(uint256 index) public returns(uint256) { 28 | return readUint(operatorConfigJson, index, "SecretKey"); 29 | } 30 | 31 | function readUint(string memory json, uint256 index, string memory key) public returns (uint256) { 32 | return stringToUint(stdJson.readString(json, string.concat(operatorPrefix(index), key))); 33 | } 34 | 35 | function stringToUint(string memory s) public pure returns (uint256) { 36 | bytes memory b = bytes(s); 37 | uint256 result = 0; 38 | for (uint256 i = 0; i < b.length; i++) { 39 | if (uint256(uint8(b[i])) >= 48 && uint256(uint8(b[i])) <= 57) { 40 | result = result * 10 + (uint256(uint8(b[i])) - 48); 41 | } 42 | } 43 | return result; 44 | } 45 | function setOperatorJsonFilePath(string memory filepath) public { 46 | operatorConfigJson = vm.readFile(filepath); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /test/eigenlayer-utils/Owners.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity ^0.8.12; 3 | 4 | import "forge-std/Test.sol"; 5 | import "forge-std/Script.sol"; 6 | import "forge-std/StdJson.sol"; 7 | 8 | contract Owners is Test { 9 | string internal ownersConfigJson; 10 | address[] addresses; 11 | 12 | constructor() { 13 | ownersConfigJson = vm.readFile("./src/test/test-data/owners.json"); 14 | } 15 | 16 | function ownerPrefix(uint256 index) public returns(string memory) { 17 | return string.concat(".owners[", string.concat(vm.toString(index), "].")); 18 | } 19 | 20 | function getNumOperators() public returns(uint256) { 21 | return stdJson.readUint(ownersConfigJson, ".numOwners"); 22 | } 23 | 24 | function getOwnerAddress(uint256 index) public returns(address) { 25 | return stdJson.readAddress(ownersConfigJson, string.concat(ownerPrefix(index), "Address")); 26 | } 27 | 28 | function getOwnerAddresses() public returns(address[] memory) { 29 | for (uint256 i = 0; i < getNumOperators(); i++) { 30 | addresses.push(getOwnerAddress(i)); 31 | } 32 | return addresses; 33 | } 34 | 35 | function getReputedOwnerAddresses() public returns(address[] memory) { 36 | resetOwnersConfigJson("reputedOwners.json"); 37 | for (uint256 i = 0; i < getNumOperators(); i++) { 38 | addresses.push(getOwnerAddress(i)); 39 | } 40 | return addresses; 41 | } 42 | 43 | function resetOwnersConfigJson(string memory newConfig) public { 44 | ownersConfigJson = vm.readFile(newConfig); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /test/eigenlayer-utils/SignatureCompaction.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity ^0.8.12; 3 | 4 | import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; 5 | 6 | //small library for dealing with efficiently-packed signatures, where parameters v,r,s are packed into vs and r (64 bytes instead of 65) 7 | library SignatureCompaction { 8 | bytes32 internal constant HALF_CURVE_ORDER = 0x7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0; 9 | 10 | function ecrecoverPacked(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { 11 | (address recovered, ECDSA.RecoverError err) = ECDSA.tryRecover(hash, r, vs); 12 | require(err == ECDSA.RecoverError.NoError, "error in ecrecoverPacked"); 13 | return recovered; 14 | } 15 | 16 | function packSignature(bytes32 r, bytes32 s, uint8 v) internal pure returns (bytes32, bytes32) { 17 | require(s <= HALF_CURVE_ORDER, "malleable signature, s too high"); 18 | //v parity is a single bit, encoded as either v = 27 or v = 28 -- in order to recover the bit we subtract 27 19 | bytes32 vs = bytes32(uint256(bytes32(uint256(v) - 27) << 255) | uint256(s)); 20 | return (r, vs); 21 | } 22 | 23 | //same as above, except doesn't take 'r' as argument since it is unneeded 24 | function packVS(bytes32 s, uint8 v) internal pure returns (bytes32) { 25 | require(s <= HALF_CURVE_ORDER, "malleable signature, s too high"); 26 | //v parity is a single bit, encoded as either v = 27 or v = 28 -- in order to recover the bit we subtract 27 27 | return bytes32(uint256(bytes32(uint256(v) - 27) << 255) | uint256(s)); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /test/eigenlayer-utils/test-data/owners.json: -------------------------------------------------------------------------------- 1 | { 2 | "numOwners": 10, 3 | "owners": [ 4 | { 5 | "Address": "0x364ea4241059a1880a289ccf6f3e730371e399c2" 6 | }, 7 | { 8 | "Address": "0x164dfa4241059a1880a289ccf6f3e730371e399c2" 9 | }, 10 | { 11 | "Address": "0x264ea4241059a1880a289ccf6f3e730371e399c4" 12 | }, 13 | { 14 | "Address": "0x464ea4241059a1880a289ccf6f3e730371e399c5" 15 | }, 16 | { 17 | "Address": "0x564ea4241059a1880a289ccf6f3e730371e399c6" 18 | }, 19 | { 20 | "Address": "0x864ea4241059a1880a289ccf6f3e730371e399c7" 21 | }, 22 | { 23 | "Address": "0x344ea4241059a1880a289ccf6f3e730371e399c8" 24 | }, 25 | { 26 | "Address": "0x304ea4241059a1880a289ccf6f3e730371e399c9" 27 | }, 28 | { 29 | "Address": "0x364ea4241059a1880a289ccf6f3e730371e399d4" 30 | }, 31 | { 32 | "Address": "0x364ea4241059a1880a289ccf6f3e730371e39955" 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /test/eigenlayer-utils/test-data/reputedOwners.json: -------------------------------------------------------------------------------- 1 | { 2 | "numOwners": 10, 3 | "owners": [ 4 | { 5 | "Address": "0x364ea4241059a1880a289ccf6f3e730371e399c2" 6 | }, 7 | { 8 | "Address": "0x164dfa4241059a1880a289ccf6f3e730371e399c2" 9 | }, 10 | { 11 | "Address": "0x264ea4241059a1880a289ccf6f3e730371e399c4" 12 | }, 13 | { 14 | "Address": "0x464ea4241059a1880a289ccf6f3e730371e399c5" 15 | }, 16 | { 17 | "Address": "0x564ea4241059a1880a289ccf6f3e730371e399c6" 18 | }, 19 | { 20 | "Address": "0x864ea4241059a1880a289ccf6f3e730371e399c7" 21 | }, 22 | { 23 | "Address": "0x344ea4241059a1880a289ccf6f3e730371e399c8" 24 | }, 25 | { 26 | "Address": "0x304ea4241059a1880a289ccf6f3e730371e399c9" 27 | }, 28 | { 29 | "Address": "0x364ea4241059a1880a289ccf6f3e730371e399d4" 30 | }, 31 | { 32 | "Address": "0x364ea4241059a1880a289ccf6f3e730371e39955" 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /test/mocks/MockEigenPod.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity ^0.8.9; 3 | 4 | import "forge-std/Test.sol"; 5 | import "../../test/mocks/MockEigenPodBase.sol"; 6 | 7 | contract MockEigenPod is MockEigenPodBase, Test { 8 | 9 | // OVERRIDES 10 | 11 | //************************************************************ 12 | // activeValidatorCount() 13 | //************************************************************ 14 | function activeValidatorCount() external override view returns (uint256) { return mock_activeValidatorCount; } 15 | uint256 public mock_activeValidatorCount; 16 | function mockSet_activeValidatorCount(uint256 count) public { mock_activeValidatorCount = count; } 17 | 18 | } 19 | 20 | -------------------------------------------------------------------------------- /test/mocks/MockEigenPodManager.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | pragma solidity ^0.8.27; 3 | 4 | import "../../test/mocks/MockEigenPodManagerBase.sol"; 5 | import "../../test/mocks/MockEigenPod.sol"; 6 | import "../../src/eigenlayer-interfaces/IEigenPodManager.sol"; 7 | import "../../test/mocks/MockStrategy.sol"; 8 | import "forge-std/console2.sol"; 9 | import "forge-std/Test.sol"; 10 | 11 | contract MockEigenPodManager is MockEigenPodManagerBase, Test { 12 | 13 | // Overrides 14 | 15 | function createPod() external override returns (address) { 16 | // use a mock pod that we can edit for testing 17 | return address(new MockEigenPod()); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: test 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - "master" 7 | - "staging" 8 | types: [opened, reopened, synchronize] 9 | 10 | env: 11 | FOUNDRY_PROFILE: ci 12 | 13 | jobs: 14 | check: 15 | strategy: 16 | fail-fast: true 17 | 18 | env: 19 | ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} 20 | RPC_API_KEY: ${{ secrets.RPC_API_KEY }} 21 | GOERLI_RPC_URL: ${{ secrets.GOERLI_RPC_URL }} 22 | 23 | name: Foundry project 24 | runs-on: ubuntu-latest 25 | steps: 26 | - uses: actions/checkout@v3 27 | with: 28 | submodules: recursive 29 | 30 | - name: Install Foundry 31 | uses: foundry-rs/foundry-toolchain@v1 32 | with: 33 | version: nightly 34 | 35 | - name: Run Forge build 36 | run: make build 37 | id: build 38 | 39 | - name: Run Forge tests 40 | run: make test 41 | id: test 42 | --------------------------------------------------------------------------------