Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 25 from a total of 104 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Deposit Data... | 2852400 | 46 days ago | IN | 0 ETH | 0.00000287 | ||||
Set Deposit Data... | 2824018 | 50 days ago | IN | 0 ETH | 0.00000924 | ||||
Set Deposit Data... | 2779602 | 57 days ago | IN | 0 ETH | 0.00006447 | ||||
Set Deposit Data... | 2766515 | 59 days ago | IN | 0 ETH | 0.00008222 | ||||
Set Deposit Data... | 2765831 | 59 days ago | IN | 0 ETH | 0.00003474 | ||||
Set Deposit Data... | 2754041 | 61 days ago | IN | 0 ETH | 0.00000156 | ||||
Set Deposit Data... | 2740798 | 63 days ago | IN | 0 ETH | 0.00000378 | ||||
Set Deposit Data... | 2738981 | 63 days ago | IN | 0 ETH | 0.00000496 | ||||
Set Deposit Data... | 2738920 | 63 days ago | IN | 0 ETH | 0.00000372 | ||||
Set Deposit Data... | 2726650 | 65 days ago | IN | 0 ETH | 0.00001791 | ||||
Set Deposit Data... | 2717359 | 66 days ago | IN | 0 ETH | 0.00006264 | ||||
Set Deposit Data... | 2624267 | 80 days ago | IN | 0 ETH | 0.00000109 | ||||
Set Deposit Data... | 2578707 | 87 days ago | IN | 0 ETH | 0.00000005 | ||||
Set Deposit Data... | 2537733 | 93 days ago | IN | 0 ETH | 0.00009115 | ||||
Set Deposit Data... | 2537606 | 93 days ago | IN | 0 ETH | 0.00014386 | ||||
Set Deposit Data... | 2537250 | 93 days ago | IN | 0 ETH | 0.00013866 | ||||
Set Deposit Data... | 2532701 | 94 days ago | IN | 0 ETH | 0.00057597 | ||||
Set Deposit Data... | 2531012 | 94 days ago | IN | 0 ETH | 0.00035396 | ||||
Set Deposit Data... | 2499236 | 99 days ago | IN | 0 ETH | 0.00001005 | ||||
Set Deposit Data... | 2498574 | 99 days ago | IN | 0 ETH | 0.00005804 | ||||
Set Deposit Data... | 2498428 | 99 days ago | IN | 0 ETH | 0.00000123 | ||||
Set Deposit Data... | 2498304 | 99 days ago | IN | 0 ETH | 0.00000159 | ||||
Set Deposit Data... | 2498262 | 99 days ago | IN | 0 ETH | 0.00000174 | ||||
Set Deposit Data... | 2498152 | 99 days ago | IN | 0 ETH | 0.00000214 | ||||
Set Deposit Data... | 2492226 | 100 days ago | IN | 0 ETH | 0.00000404 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xDada5a8E...eb2659fCC The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
DepositDataRegistry
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
Yes with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.22; import {MerkleProof} from '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; import {IDepositDataRegistry} from '../interfaces/IDepositDataRegistry.sol'; import {IKeeperValidators} from '../interfaces/IKeeperValidators.sol'; import {IVaultAdmin} from '../interfaces/IVaultAdmin.sol'; import {IVaultValidators} from '../interfaces/IVaultValidators.sol'; import {IVaultVersion} from '../interfaces/IVaultVersion.sol'; import {IVaultsRegistry} from '../interfaces/IVaultsRegistry.sol'; import {IVaultState} from '../interfaces/IVaultState.sol'; import {IKeeperRewards} from '../interfaces/IKeeperRewards.sol'; import {Errors} from '../libraries/Errors.sol'; import {Multicall} from '../base/Multicall.sol'; /** * @title DepositDataRegistry * @author StakeWise * @notice Defines the functionality for the Vault's deposit data management */ contract DepositDataRegistry is Multicall, IDepositDataRegistry { IVaultsRegistry private immutable _vaultsRegistry; /// @inheritdoc IDepositDataRegistry mapping(address => uint256) public override depositDataIndexes; /// @inheritdoc IDepositDataRegistry mapping(address => bytes32) public override depositDataRoots; mapping(address => address) private _depositDataManagers; mapping(address => bool) private _migrated; /** * @dev Modifier to check if the caller is a valid vault * @param vault The address of the vault */ modifier onlyValidVault(address vault) { if (!_vaultsRegistry.vaults(vault) || IVaultVersion(vault).version() < 2) { revert Errors.InvalidVault(); } _; } /** * @dev Constructor * @param vaultsRegistry The address of the vaults registry contract */ constructor(address vaultsRegistry) { _vaultsRegistry = IVaultsRegistry(vaultsRegistry); } /// @inheritdoc IDepositDataRegistry function getDepositDataManager(address vault) public view override returns (address) { address depositDataManager = _depositDataManagers[vault]; return depositDataManager == address(0) ? IVaultAdmin(vault).admin() : depositDataManager; } /// @inheritdoc IDepositDataRegistry function setDepositDataManager( address vault, address depositDataManager ) external override onlyValidVault(vault) { // only vault admin can set deposit data manager if (msg.sender != IVaultAdmin(vault).admin()) revert Errors.AccessDenied(); // update deposit data manager _depositDataManagers[vault] = depositDataManager; emit DepositDataManagerUpdated(vault, depositDataManager); } /// @inheritdoc IDepositDataRegistry function setDepositDataRoot( address vault, bytes32 depositDataRoot ) external override onlyValidVault(vault) { if (msg.sender != getDepositDataManager(vault)) revert Errors.AccessDenied(); if (depositDataRoots[vault] == depositDataRoot) revert Errors.ValueNotChanged(); depositDataRoots[vault] = depositDataRoot; // reset validator index on every root update depositDataIndexes[vault] = 0; emit DepositDataRootUpdated(vault, depositDataRoot); } /// @inheritdoc IDepositDataRegistry function updateVaultState( address vault, IKeeperRewards.HarvestParams calldata harvestParams ) external override { IVaultState(vault).updateState(harvestParams); } /// @inheritdoc IDepositDataRegistry function registerValidator( address vault, IKeeperValidators.ApprovalParams calldata keeperParams, bytes32[] calldata proof ) external override onlyValidVault(vault) { // register validator IVaultValidators(vault).registerValidators(keeperParams, ''); // SLOAD to memory uint256 currentIndex = depositDataIndexes[vault]; bytes32 depositDataRoot = depositDataRoots[vault]; // check matches merkle root and next validator index if ( !MerkleProof.verifyCalldata( proof, depositDataRoot, keccak256(bytes.concat(keccak256(abi.encode(keeperParams.validators, currentIndex)))) ) ) { revert Errors.InvalidProof(); } // increment index for the next validator unchecked { // cannot realistically overflow depositDataIndexes[vault] = currentIndex + 1; } } /// @inheritdoc IDepositDataRegistry function registerValidators( address vault, IKeeperValidators.ApprovalParams calldata keeperParams, uint256[] calldata indexes, bool[] calldata proofFlags, bytes32[] calldata proof ) external override onlyValidVault(vault) { // register validator IVaultValidators(vault).registerValidators(keeperParams, ''); // SLOAD to memory uint256 currentIndex = depositDataIndexes[vault]; bytes32 depositDataRoot = depositDataRoots[vault]; // define leaves for multiproof uint256 validatorsCount = indexes.length; if (validatorsCount == 0) revert Errors.InvalidValidators(); bytes32[] memory leaves = new bytes32[](validatorsCount); // calculate validator length uint256 validatorLength = keeperParams.validators.length / validatorsCount; if (validatorLength == 0) revert Errors.InvalidValidators(); // calculate leaves { uint256 startIndex; uint256 endIndex; for (uint256 i = 0; i < validatorsCount; ) { endIndex += validatorLength; leaves[indexes[i]] = keccak256( bytes.concat( keccak256(abi.encode(keeperParams.validators[startIndex:endIndex], currentIndex)) ) ); startIndex = endIndex; unchecked { // cannot realistically overflow ++currentIndex; ++i; } } } // check matches merkle root and next validator index if (!MerkleProof.multiProofVerifyCalldata(proof, proofFlags, depositDataRoot, leaves)) { revert Errors.InvalidProof(); } // increment index for the next validator depositDataIndexes[vault] = currentIndex; } /// @inheritdoc IDepositDataRegistry function migrate( bytes32 depositDataRoot, uint256 validatorIndex, address depositDataManager ) external override onlyValidVault(msg.sender) { if (_migrated[msg.sender]) revert Errors.AccessDenied(); depositDataRoots[msg.sender] = depositDataRoot; depositDataIndexes[msg.sender] = validatorIndex; _depositDataManagers[msg.sender] = depositDataManager; // only allow migration once _migrated[msg.sender] = true; emit DepositDataMigrated(msg.sender, depositDataRoot, validatorIndex, depositDataManager); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.20; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822Proxiable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol) pragma solidity ^0.8.20; interface IERC5267 { /** * @dev MAY be emitted to signal that the domain could have changed. */ event EIP712DomainChanged(); /** * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 * signature. */ function eip712Domain() external view returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.20; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the Merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates Merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** *@dev The multiproof provided is not valid. */ error MerkleProofInvalidMultiproof(); /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} */ function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the Merkle tree. uint256 leavesLen = leaves.length; uint256 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. if (leavesLen + proofLen != totalHashes + 1) { revert MerkleProofInvalidMultiproof(); } // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { if (proofPos != proofLen) { revert MerkleProofInvalidMultiproof(); } unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the Merkle tree. uint256 leavesLen = leaves.length; uint256 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. if (leavesLen + proofLen != totalHashes + 1) { revert MerkleProofInvalidMultiproof(); } // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { if (proofPos != proofLen) { revert MerkleProofInvalidMultiproof(); } unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Sorts the pair (a, b) and hashes the result. */ function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } /** * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory. */ function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.22; import '../interfaces/IMulticall.sol'; /** * @title Multicall * @author Uniswap * @notice Adopted from https://github.com/Uniswap/v3-periphery/blob/1d69caf0d6c8cfeae9acd1f34ead30018d6e6400/contracts/base/Multicall.sol * @notice Enables calling multiple methods in a single call to the contract */ abstract contract Multicall is IMulticall { /// @inheritdoc IMulticall function multicall(bytes[] calldata data) external override returns (bytes[] memory results) { uint256 dataLength = data.length; results = new bytes[](dataLength); for (uint256 i = 0; i < dataLength; i++) { (bool success, bytes memory result) = address(this).delegatecall(data[i]); if (!success) { // Next 5 lines from https://ethereum.stackexchange.com/a/83577 if (result.length < 68) revert(); assembly { result := add(result, 0x04) } revert(abi.decode(result, (string))); } results[i] = result; } } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.22; import {IKeeperValidators} from './IKeeperValidators.sol'; import {IKeeperRewards} from './IKeeperRewards.sol'; import {IMulticall} from './IMulticall.sol'; /** * @title IDepositDataRegistry * @author StakeWise * @notice Defines the interface for DepositDataRegistry */ interface IDepositDataRegistry is IMulticall { /** * @notice Event emitted on deposit data manager update * @param vault The address of the vault * @param depositDataManager The address of the new deposit data manager */ event DepositDataManagerUpdated(address indexed vault, address depositDataManager); /** * @notice Event emitted on deposit data root update * @param vault The address of the vault * @param depositDataRoot The new deposit data Merkle tree root */ event DepositDataRootUpdated(address indexed vault, bytes32 depositDataRoot); /** * @notice Event emitted on deposit data migration * @param vault The address of the vault * @param depositDataRoot The deposit data root * @param validatorIndex The index of the next validator to be registered * @param depositDataManager The address of the deposit data manager */ event DepositDataMigrated( address indexed vault, bytes32 depositDataRoot, uint256 validatorIndex, address depositDataManager ); /** * @notice The vault deposit data index * @param vault The address of the vault * @return validatorIndex The index of the next validator to be registered */ function depositDataIndexes(address vault) external view returns (uint256 validatorIndex); /** * @notice The vault deposit data root * @param vault The address of the vault * @return depositDataRoot The deposit data root */ function depositDataRoots(address vault) external view returns (bytes32 depositDataRoot); /** * @notice The vault deposit data manager. Defaults to the vault admin if not set. * @param vault The address of the vault * @return depositDataManager The address of the deposit data manager */ function getDepositDataManager(address vault) external view returns (address); /** * @notice Function for setting the deposit data manager for the vault. Can only be called by the vault admin. * @param vault The address of the vault * @param depositDataManager The address of the new deposit data manager */ function setDepositDataManager(address vault, address depositDataManager) external; /** * @notice Function for setting the deposit data root for the vault. Can only be called by the deposit data manager. * @param vault The address of the vault * @param depositDataRoot The new deposit data Merkle tree root */ function setDepositDataRoot(address vault, bytes32 depositDataRoot) external; /** * @notice Updates the vault state. Can be used in multicall to update state and register validator(s). * @param vault The address of the vault * @param harvestParams The harvest params to use for updating the vault state */ function updateVaultState( address vault, IKeeperRewards.HarvestParams calldata harvestParams ) external; /** * @notice Function for registering single validator * @param vault The address of the vault * @param keeperParams The parameters for getting approval from Keeper oracles * @param proof The proof used to verify that the validator is part of the deposit data merkle tree */ function registerValidator( address vault, IKeeperValidators.ApprovalParams calldata keeperParams, bytes32[] calldata proof ) external; /** * @notice Function for registering multiple validators * @param vault The address of the vault * @param keeperParams The parameters for getting approval from Keeper oracles * @param indexes The indexes of the leaves for the merkle tree multi proof verification * @param proofFlags The multi proof flags for the merkle tree verification * @param proof The proof used for the merkle tree verification */ function registerValidators( address vault, IKeeperValidators.ApprovalParams calldata keeperParams, uint256[] calldata indexes, bool[] calldata proofFlags, bytes32[] calldata proof ) external; /** * @notice Function for migrating the deposit data of the Vault. Can only be called once by a vault during an upgrade. * @param depositDataRoot The current deposit data root * @param validatorIndex The current index of the next validator to be registered * @param depositDataManager The address of the deposit data manager */ function migrate( bytes32 depositDataRoot, uint256 validatorIndex, address depositDataManager ) external; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.22; import {IERC5267} from '@openzeppelin/contracts/interfaces/IERC5267.sol'; /** * @title IKeeperOracles * @author StakeWise * @notice Defines the interface for the KeeperOracles contract */ interface IKeeperOracles is IERC5267 { /** * @notice Event emitted on the oracle addition * @param oracle The address of the added oracle */ event OracleAdded(address indexed oracle); /** * @notice Event emitted on the oracle removal * @param oracle The address of the removed oracle */ event OracleRemoved(address indexed oracle); /** * @notice Event emitted on oracles config update * @param configIpfsHash The IPFS hash of the new config */ event ConfigUpdated(string configIpfsHash); /** * @notice Function for verifying whether oracle is registered or not * @param oracle The address of the oracle to check * @return `true` for the registered oracle, `false` otherwise */ function isOracle(address oracle) external view returns (bool); /** * @notice Total Oracles * @return The total number of oracles registered */ function totalOracles() external view returns (uint256); /** * @notice Function for adding oracle to the set * @param oracle The address of the oracle to add */ function addOracle(address oracle) external; /** * @notice Function for removing oracle from the set * @param oracle The address of the oracle to remove */ function removeOracle(address oracle) external; /** * @notice Function for updating the config IPFS hash * @param configIpfsHash The new config IPFS hash */ function updateConfig(string calldata configIpfsHash) external; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.22; import {IKeeperOracles} from './IKeeperOracles.sol'; /** * @title IKeeperRewards * @author StakeWise * @notice Defines the interface for the Keeper contract rewards */ interface IKeeperRewards is IKeeperOracles { /** * @notice Event emitted on rewards update * @param caller The address of the function caller * @param rewardsRoot The new rewards merkle tree root * @param avgRewardPerSecond The new average reward per second * @param updateTimestamp The update timestamp used for rewards calculation * @param nonce The nonce used for verifying signatures * @param rewardsIpfsHash The new rewards IPFS hash */ event RewardsUpdated( address indexed caller, bytes32 indexed rewardsRoot, uint256 avgRewardPerSecond, uint64 updateTimestamp, uint64 nonce, string rewardsIpfsHash ); /** * @notice Event emitted on Vault harvest * @param vault The address of the Vault * @param rewardsRoot The rewards merkle tree root * @param totalAssetsDelta The Vault total assets delta since last sync. Can be negative in case of penalty/slashing. * @param unlockedMevDelta The Vault execution reward that can be withdrawn from shared MEV escrow. Only used by shared MEV Vaults. */ event Harvested( address indexed vault, bytes32 indexed rewardsRoot, int256 totalAssetsDelta, uint256 unlockedMevDelta ); /** * @notice Event emitted on rewards min oracles number update * @param oracles The new minimum number of oracles required to update rewards */ event RewardsMinOraclesUpdated(uint256 oracles); /** * @notice A struct containing the last synced Vault's cumulative reward * @param assets The Vault cumulative reward earned since the start. Can be negative in case of penalty/slashing. * @param nonce The nonce of the last sync */ struct Reward { int192 assets; uint64 nonce; } /** * @notice A struct containing the last unlocked Vault's cumulative execution reward that can be withdrawn from shared MEV escrow. Only used by shared MEV Vaults. * @param assets The shared MEV Vault's cumulative execution reward that can be withdrawn * @param nonce The nonce of the last sync */ struct UnlockedMevReward { uint192 assets; uint64 nonce; } /** * @notice A struct containing parameters for rewards update * @param rewardsRoot The new rewards merkle root * @param avgRewardPerSecond The new average reward per second * @param updateTimestamp The update timestamp used for rewards calculation * @param rewardsIpfsHash The new IPFS hash with all the Vaults' rewards for the new root * @param signatures The concatenation of the Oracles' signatures */ struct RewardsUpdateParams { bytes32 rewardsRoot; uint256 avgRewardPerSecond; uint64 updateTimestamp; string rewardsIpfsHash; bytes signatures; } /** * @notice A struct containing parameters for harvesting rewards. Can only be called by Vault. * @param rewardsRoot The rewards merkle root * @param reward The Vault cumulative reward earned since the start. Can be negative in case of penalty/slashing. * @param unlockedMevReward The Vault cumulative execution reward that can be withdrawn from shared MEV escrow. Only used by shared MEV Vaults. * @param proof The proof to verify that Vault's reward is correct */ struct HarvestParams { bytes32 rewardsRoot; int160 reward; uint160 unlockedMevReward; bytes32[] proof; } /** * @notice Previous Rewards Root * @return The previous merkle tree root of the rewards accumulated by the Vaults */ function prevRewardsRoot() external view returns (bytes32); /** * @notice Rewards Root * @return The latest merkle tree root of the rewards accumulated by the Vaults */ function rewardsRoot() external view returns (bytes32); /** * @notice Rewards Nonce * @return The nonce used for updating rewards merkle tree root */ function rewardsNonce() external view returns (uint64); /** * @notice The last rewards update * @return The timestamp of the last rewards update */ function lastRewardsTimestamp() external view returns (uint64); /** * @notice The minimum number of oracles required to update rewards * @return The minimum number of oracles */ function rewardsMinOracles() external view returns (uint256); /** * @notice The rewards delay * @return The delay in seconds between rewards updates */ function rewardsDelay() external view returns (uint256); /** * @notice Get last synced Vault cumulative reward * @param vault The address of the Vault * @return assets The last synced reward assets * @return nonce The last synced reward nonce */ function rewards(address vault) external view returns (int192 assets, uint64 nonce); /** * @notice Get last unlocked shared MEV Vault cumulative reward * @param vault The address of the Vault * @return assets The last synced reward assets * @return nonce The last synced reward nonce */ function unlockedMevRewards(address vault) external view returns (uint192 assets, uint64 nonce); /** * @notice Checks whether Vault must be harvested * @param vault The address of the Vault * @return `true` if the Vault requires harvesting, `false` otherwise */ function isHarvestRequired(address vault) external view returns (bool); /** * @notice Checks whether the Vault can be harvested * @param vault The address of the Vault * @return `true` if Vault can be harvested, `false` otherwise */ function canHarvest(address vault) external view returns (bool); /** * @notice Checks whether rewards can be updated * @return `true` if rewards can be updated, `false` otherwise */ function canUpdateRewards() external view returns (bool); /** * @notice Checks whether the Vault has registered validators * @param vault The address of the Vault * @return `true` if Vault is collateralized, `false` otherwise */ function isCollateralized(address vault) external view returns (bool); /** * @notice Update rewards data * @param params The struct containing rewards update parameters */ function updateRewards(RewardsUpdateParams calldata params) external; /** * @notice Harvest rewards. Can be called only by Vault. * @param params The struct containing rewards harvesting parameters * @return totalAssetsDelta The total reward/penalty accumulated by the Vault since the last sync * @return unlockedMevDelta The Vault execution reward that can be withdrawn from shared MEV escrow. Only used by shared MEV Vaults. * @return harvested `true` when the rewards were harvested, `false` otherwise */ function harvest( HarvestParams calldata params ) external returns (int256 totalAssetsDelta, uint256 unlockedMevDelta, bool harvested); /** * @notice Set min number of oracles for confirming rewards update. Can only be called by the owner. * @param _rewardsMinOracles The new min number of oracles for confirming rewards update */ function setRewardsMinOracles(uint256 _rewardsMinOracles) external; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.22; import {IKeeperRewards} from './IKeeperRewards.sol'; import {IKeeperOracles} from './IKeeperOracles.sol'; /** * @title IKeeperValidators * @author StakeWise * @notice Defines the interface for the Keeper validators */ interface IKeeperValidators is IKeeperOracles, IKeeperRewards { /** * @notice Event emitted on validators approval * @param vault The address of the Vault * @param exitSignaturesIpfsHash The IPFS hash with the validators' exit signatures */ event ValidatorsApproval(address indexed vault, string exitSignaturesIpfsHash); /** * @notice Event emitted on exit signatures update * @param caller The address of the function caller * @param vault The address of the Vault * @param nonce The nonce used for verifying Oracles' signatures * @param exitSignaturesIpfsHash The IPFS hash with the validators' exit signatures */ event ExitSignaturesUpdated( address indexed caller, address indexed vault, uint256 nonce, string exitSignaturesIpfsHash ); /** * @notice Event emitted on validators min oracles number update * @param oracles The new minimum number of oracles required to approve validators */ event ValidatorsMinOraclesUpdated(uint256 oracles); /** * @notice Get nonce for the next vault exit signatures update * @param vault The address of the Vault to get the nonce for * @return The nonce of the Vault for updating signatures */ function exitSignaturesNonces(address vault) external view returns (uint256); /** * @notice Struct for approving registration of one or more validators * @param validatorsRegistryRoot The deposit data root used to verify that oracles approved validators * @param deadline The deadline for submitting the approval * @param validators The concatenation of the validators' public key, signature and deposit data root * @param signatures The concatenation of Oracles' signatures * @param exitSignaturesIpfsHash The IPFS hash with the validators' exit signatures */ struct ApprovalParams { bytes32 validatorsRegistryRoot; uint256 deadline; bytes validators; bytes signatures; string exitSignaturesIpfsHash; } /** * @notice The minimum number of oracles required to update validators * @return The minimum number of oracles */ function validatorsMinOracles() external view returns (uint256); /** * @notice Function for approving validators registration * @param params The parameters for approving validators registration */ function approveValidators(ApprovalParams calldata params) external; /** * @notice Function for updating exit signatures for every hard fork * @param vault The address of the Vault to update signatures for * @param deadline The deadline for submitting signatures update * @param exitSignaturesIpfsHash The IPFS hash with the validators' exit signatures * @param oraclesSignatures The concatenation of Oracles' signatures */ function updateExitSignatures( address vault, uint256 deadline, string calldata exitSignaturesIpfsHash, bytes calldata oraclesSignatures ) external; /** * @notice Function for updating validators min oracles number * @param _validatorsMinOracles The new minimum number of oracles required to approve validators */ function setValidatorsMinOracles(uint256 _validatorsMinOracles) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.22; /** * @title Multicall * @author Uniswap * @notice Adopted from https://github.com/Uniswap/v3-periphery/blob/1d69caf0d6c8cfeae9acd1f34ead30018d6e6400/contracts/base/Multicall.sol * @notice Enables calling multiple methods in a single call to the contract */ interface IMulticall { /** * @notice Call multiple functions in the current contract and return the data from all of them if they all succeed * @param data The encoded function data for each of the calls to make to this contract * @return results The results from each of the calls passed in via data */ function multicall(bytes[] calldata data) external returns (bytes[] memory results); }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.22; /** * @title IVaultState * @author StakeWise * @notice Defines the interface for the VaultAdmin contract */ interface IVaultAdmin { /** * @notice Event emitted on metadata ipfs hash update * @param caller The address of the function caller * @param metadataIpfsHash The new metadata IPFS hash */ event MetadataUpdated(address indexed caller, string metadataIpfsHash); /** * @notice The Vault admin * @return The address of the Vault admin */ function admin() external view returns (address); /** * @notice Function for updating the metadata IPFS hash. Can only be called by Vault admin. * @param metadataIpfsHash The new metadata IPFS hash */ function setMetadata(string calldata metadataIpfsHash) external; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.22; import {IVaultAdmin} from './IVaultAdmin.sol'; /** * @title IVaultFee * @author StakeWise * @notice Defines the interface for the VaultFee contract */ interface IVaultFee is IVaultAdmin { /** * @notice Event emitted on fee recipient update * @param caller The address of the function caller * @param feeRecipient The address of the new fee recipient */ event FeeRecipientUpdated(address indexed caller, address indexed feeRecipient); /** * @notice The Vault's fee recipient * @return The address of the Vault's fee recipient */ function feeRecipient() external view returns (address); /** * @notice The Vault's fee percent in BPS * @return The fee percent applied by the Vault on the rewards */ function feePercent() external view returns (uint16); /** * @notice Function for updating the fee recipient address. Can only be called by the admin. * @param _feeRecipient The address of the new fee recipient */ function setFeeRecipient(address _feeRecipient) external; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.22; /** * @title IVaultsRegistry * @author StakeWise * @notice Defines the interface for the VaultsRegistry */ interface IVaultsRegistry { /** * @notice Event emitted on a Vault addition * @param caller The address that has added the Vault * @param vault The address of the added Vault */ event VaultAdded(address indexed caller, address indexed vault); /** * @notice Event emitted on adding Vault implementation contract * @param impl The address of the new implementation contract */ event VaultImplAdded(address indexed impl); /** * @notice Event emitted on removing Vault implementation contract * @param impl The address of the removed implementation contract */ event VaultImplRemoved(address indexed impl); /** * @notice Event emitted on whitelisting the factory * @param factory The address of the whitelisted factory */ event FactoryAdded(address indexed factory); /** * @notice Event emitted on removing the factory from the whitelist * @param factory The address of the factory removed from the whitelist */ event FactoryRemoved(address indexed factory); /** * @notice Registered Vaults * @param vault The address of the vault to check whether it is registered * @return `true` for the registered Vault, `false` otherwise */ function vaults(address vault) external view returns (bool); /** * @notice Registered Vault implementations * @param impl The address of the vault implementation * @return `true` for the registered implementation, `false` otherwise */ function vaultImpls(address impl) external view returns (bool); /** * @notice Registered Factories * @param factory The address of the factory to check whether it is whitelisted * @return `true` for the whitelisted Factory, `false` otherwise */ function factories(address factory) external view returns (bool); /** * @notice Function for adding Vault to the registry. Can only be called by the whitelisted Factory. * @param vault The address of the Vault to add */ function addVault(address vault) external; /** * @notice Function for adding Vault implementation contract * @param newImpl The address of the new implementation contract */ function addVaultImpl(address newImpl) external; /** * @notice Function for removing Vault implementation contract * @param impl The address of the removed implementation contract */ function removeVaultImpl(address impl) external; /** * @notice Function for adding the factory to the whitelist * @param factory The address of the factory to add to the whitelist */ function addFactory(address factory) external; /** * @notice Function for removing the factory from the whitelist * @param factory The address of the factory to remove from the whitelist */ function removeFactory(address factory) external; /** * @notice Function for initializing the registry. Can only be called once during the deployment. * @param _owner The address of the owner of the contract */ function initialize(address _owner) external; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.22; import {IKeeperRewards} from './IKeeperRewards.sol'; import {IVaultFee} from './IVaultFee.sol'; /** * @title IVaultState * @author StakeWise * @notice Defines the interface for the VaultState contract */ interface IVaultState is IVaultFee { /** * @notice Event emitted on checkpoint creation (deprecated) * @param shares The number of burned shares * @param assets The amount of exited assets */ event CheckpointCreated(uint256 shares, uint256 assets); /** * @notice Event emitted on minting fee recipient shares * @param receiver The address of the fee recipient * @param shares The number of minted shares * @param assets The amount of minted assets */ event FeeSharesMinted(address receiver, uint256 shares, uint256 assets); /** * @notice Event emitted when exiting assets are penalized * @param penalty The total penalty amount */ event ExitingAssetsPenalized(uint256 penalty); /** * @notice Total assets in the Vault * @return The total amount of the underlying asset that is "managed" by Vault */ function totalAssets() external view returns (uint256); /** * @notice Function for retrieving total shares * @return The amount of shares in existence */ function totalShares() external view returns (uint256); /** * @notice The Vault's capacity * @return The amount after which the Vault stops accepting deposits */ function capacity() external view returns (uint256); /** * @notice Total assets available in the Vault. They can be staked or withdrawn. * @return The total amount of withdrawable assets */ function withdrawableAssets() external view returns (uint256); /** * @notice Queued Shares (deprecated) * @return The total number of shares queued for exit */ function queuedShares() external view returns (uint128); /** * @notice Total Exiting Assets * @return The total number of assets queued for exit */ function totalExitingAssets() external view returns (uint128); /** * @notice Returns the number of shares held by an account * @param account The account for which to look up the number of shares it has, i.e. its balance * @return The number of shares held by the account */ function getShares(address account) external view returns (uint256); /** * @notice Converts shares to assets * @param assets The amount of assets to convert to shares * @return shares The amount of shares that the Vault would exchange for the amount of assets provided */ function convertToShares(uint256 assets) external view returns (uint256 shares); /** * @notice Converts assets to shares * @param shares The amount of shares to convert to assets * @return assets The amount of assets that the Vault would exchange for the amount of shares provided */ function convertToAssets(uint256 shares) external view returns (uint256 assets); /** * @notice Check whether state update is required * @return `true` if state update is required, `false` otherwise */ function isStateUpdateRequired() external view returns (bool); /** * @notice Updates the total amount of assets in the Vault and its exit queue * @param harvestParams The parameters for harvesting Keeper rewards */ function updateState(IKeeperRewards.HarvestParams calldata harvestParams) external; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.22; import {IKeeperValidators} from './IKeeperValidators.sol'; import {IVaultAdmin} from './IVaultAdmin.sol'; import {IVaultState} from './IVaultState.sol'; /** * @title IVaultValidators * @author StakeWise * @notice Defines the interface for VaultValidators contract */ interface IVaultValidators is IVaultAdmin, IVaultState { /** * @notice Event emitted on validator registration * @param publicKey The public key of the validator that was registered */ event ValidatorRegistered(bytes publicKey); /** * @notice Event emitted on keys manager address update (deprecated) * @param caller The address of the function caller * @param keysManager The address of the new keys manager */ event KeysManagerUpdated(address indexed caller, address indexed keysManager); /** * @notice Event emitted on validators merkle tree root update (deprecated) * @param caller The address of the function caller * @param validatorsRoot The new validators merkle tree root */ event ValidatorsRootUpdated(address indexed caller, bytes32 indexed validatorsRoot); /** * @notice Event emitted on validators manager address update * @param caller The address of the function caller * @param validatorsManager The address of the new validators manager */ event ValidatorsManagerUpdated(address indexed caller, address indexed validatorsManager); /** * @notice The Vault validators manager address * @return The address that can register validators */ function validatorsManager() external view returns (address); /** * @notice Function for registering single or multiple validators * @param keeperParams The parameters for getting approval from Keeper oracles * @param validatorsManagerSignature The optional signature from the validators manager */ function registerValidators( IKeeperValidators.ApprovalParams calldata keeperParams, bytes calldata validatorsManagerSignature ) external; /** * @notice Function for updating the validators manager. Can only be called by the admin. Default is the DepositDataRegistry contract. * @param _validatorsManager The new validators manager address */ function setValidatorsManager(address _validatorsManager) external; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.22; import {IERC1822Proxiable} from '@openzeppelin/contracts/interfaces/draft-IERC1822.sol'; import {IVaultAdmin} from './IVaultAdmin.sol'; /** * @title IVaultVersion * @author StakeWise * @notice Defines the interface for VaultVersion contract */ interface IVaultVersion is IERC1822Proxiable, IVaultAdmin { /** * @notice Vault Unique Identifier * @return The unique identifier of the Vault */ function vaultId() external pure returns (bytes32); /** * @notice Version * @return The version of the Vault implementation contract */ function version() external pure returns (uint8); /** * @notice Implementation * @return The address of the Vault implementation contract */ function implementation() external view returns (address); }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.22; /** * @title Errors * @author StakeWise * @notice Contains all the custom errors */ library Errors { error AccessDenied(); error InvalidShares(); error InvalidAssets(); error ZeroAddress(); error InsufficientAssets(); error CapacityExceeded(); error InvalidCapacity(); error InvalidSecurityDeposit(); error InvalidFeeRecipient(); error InvalidFeePercent(); error NotHarvested(); error NotCollateralized(); error InvalidProof(); error LowLtv(); error RedemptionExceeded(); error InvalidPosition(); error InvalidLtv(); error InvalidHealthFactor(); error InvalidReceivedAssets(); error InvalidTokenMeta(); error UpgradeFailed(); error InvalidValidators(); error DeadlineExpired(); error PermitInvalidSigner(); error InvalidValidatorsRegistryRoot(); error InvalidVault(); error AlreadyAdded(); error AlreadyRemoved(); error InvalidOracles(); error NotEnoughSignatures(); error InvalidOracle(); error TooEarlyUpdate(); error InvalidAvgRewardPerSecond(); error InvalidRewardsRoot(); error HarvestFailed(); error LiquidationDisabled(); error InvalidLiqThresholdPercent(); error InvalidLiqBonusPercent(); error InvalidLtvPercent(); error InvalidCheckpointIndex(); error InvalidCheckpointValue(); error MaxOraclesExceeded(); error ExitRequestNotProcessed(); error ValueNotChanged(); error EigenInvalidWithdrawal(); error InvalidEigenQueuedWithdrawals(); error InvalidWithdrawalCredentials(); error EigenPodNotFound(); }
{ "viaIR": true, "optimizer": { "enabled": true, "runs": 200, "details": { "yul": true } }, "evmVersion": "shanghai", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"inputs":[{"internalType":"address","name":"vaultsRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessDenied","type":"error"},{"inputs":[],"name":"InvalidProof","type":"error"},{"inputs":[],"name":"InvalidValidators","type":"error"},{"inputs":[],"name":"InvalidVault","type":"error"},{"inputs":[],"name":"MerkleProofInvalidMultiproof","type":"error"},{"inputs":[],"name":"ValueNotChanged","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"address","name":"depositDataManager","type":"address"}],"name":"DepositDataManagerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"bytes32","name":"depositDataRoot","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"validatorIndex","type":"uint256"},{"indexed":false,"internalType":"address","name":"depositDataManager","type":"address"}],"name":"DepositDataMigrated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"bytes32","name":"depositDataRoot","type":"bytes32"}],"name":"DepositDataRootUpdated","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"depositDataIndexes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"depositDataRoots","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"}],"name":"getDepositDataManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"depositDataRoot","type":"bytes32"},{"internalType":"uint256","name":"validatorIndex","type":"uint256"},{"internalType":"address","name":"depositDataManager","type":"address"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"components":[{"internalType":"bytes32","name":"validatorsRegistryRoot","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"validators","type":"bytes"},{"internalType":"bytes","name":"signatures","type":"bytes"},{"internalType":"string","name":"exitSignaturesIpfsHash","type":"string"}],"internalType":"struct IKeeperValidators.ApprovalParams","name":"keeperParams","type":"tuple"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"registerValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"components":[{"internalType":"bytes32","name":"validatorsRegistryRoot","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"validators","type":"bytes"},{"internalType":"bytes","name":"signatures","type":"bytes"},{"internalType":"string","name":"exitSignaturesIpfsHash","type":"string"}],"internalType":"struct IKeeperValidators.ApprovalParams","name":"keeperParams","type":"tuple"},{"internalType":"uint256[]","name":"indexes","type":"uint256[]"},{"internalType":"bool[]","name":"proofFlags","type":"bool[]"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"registerValidators","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"depositDataManager","type":"address"}],"name":"setDepositDataManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"bytes32","name":"depositDataRoot","type":"bytes32"}],"name":"setDepositDataRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"components":[{"internalType":"bytes32","name":"rewardsRoot","type":"bytes32"},{"internalType":"int160","name":"reward","type":"int160"},{"internalType":"uint160","name":"unlockedMevReward","type":"uint160"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"internalType":"struct IKeeperRewards.HarvestParams","name":"harvestParams","type":"tuple"}],"name":"updateVaultState","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x60806040526004361015610011575f80fd5b5f3560e01c80630a5ff875146100b45780630fc14a3a146100af5780633ab7f631146100aa578063481a925e146100a557806356b7a439146100a057806376615a551461009b578063a03301c614610096578063ac9650d814610091578063d18a860b1461008c5763e4c325eb14610087575f80fd5b6108f4565b6108b9565b6107d1565b6105cd565b610491565b61038a565b610351565b61024a565b610102565b346100ed5760203660031901126100ed576004356100d1816100f1565b60018060a01b03165f525f60205260405f205460805260206080f35b5f80fd5b6001600160a01b038116036100ed57565b346100ed5760403660031901126100ed5760043561011f816100f1565b60243561012b816100f1565b604051632988bb9f60e21b81526001600160a01b0383811660048301529060209081816024817f000000000000000000000000aa773c035af95721c518ecd8250cadac0aab7ed087165afa908115610218575f9161021d575b50159182156101b1575b505061019f5761019d91610a32565b005b604051630681d31960e51b8152600490fd5b60405163054fd4d560e41b8152925081908390600490829088165afa80156102185760029260ff925f926101eb575b505016105f8061018e565b61020a9250803d10610211575b61020281836109b6565b810190610a04565b5f806101e0565b503d6101f8565b6109f9565b61023d9150823d8411610243575b61023581836109b6565b8101906109e1565b5f610184565b503d61022b565b346100ed576003196040368201126100ed5760043590610269826100f1565b6001600160401b03906024358281116100ed576080813603928301126100ed576001600160a01b0393841691823b156100ed5760405194631a7ff55360e01b8652602060048701528260040135602487015260248301358060130b8091036100ed57604487015260448301356102de816100f1565b166064860152606482013590602219018112156100ed5701906024600483013592019282116100ed578160051b360383136100ed57835f8161032e829682966080608485015260a4840191610b24565b03925af180156102185761033e57005b8061034b61019d9261099e565b80610b1a565b346100ed5760203660031901126100ed576020610378600435610373816100f1565b610b48565b6040516001600160a01b039091168152f35b346100ed5760403660031901126100ed576004356103a7816100f1565b604051632988bb9f60e21b81526001600160a01b0382811660048301529060209081816024817f000000000000000000000000aa773c035af95721c518ecd8250cadac0aab7ed087165afa908115610218575f91610474575b501591821561041d575b505061019f5761019d9060243590610bb1565b60405163054fd4d560e41b8152925081908390600490829087165afa80156102185760029260ff925f92610457575b505016105f8061040a565b61046d9250803d106102115761020281836109b6565b5f8061044c565b61048b9150823d84116102435761023581836109b6565b5f610400565b346100ed5760603660031901126100ed576044356104ae816100f1565b604051632988bb9f60e21b815233600482015260209081816024816001600160a01b037f000000000000000000000000aa773c035af95721c518ecd8250cadac0aab7ed0165afa908115610218575f91610572575b5015908115610521575b5061019f5761019d90602435600435610c5b565b60405163054fd4d560e41b815291508082600481335afa80156102185760029260ff925f92610555575b505016105f61050d565b61056b9250803d106102115761020281836109b6565b5f8061054b565b6105899150823d84116102435761023581836109b6565b5f610503565b908160a09103126100ed5790565b9181601f840112156100ed578235916001600160401b0383116100ed576020808501948460051b0101116100ed57565b346100ed5760603660031901126100ed57600480356105eb816100f1565b6001600160401b03906024358281116100ed5761060b903690850161058f565b916044359081116100ed57610623903690850161059d565b604051632988bb9f60e21b81526001600160a01b03808516878301908152929593949290919060209081908390819083010381867f000000000000000000000000aa773c035af95721c518ecd8250cadac0aab7ed0165afa80156102185788925f9161070b575b50159283156106b6575b5050506106a55761019d9450610e5a565b604051630681d31960e51b81528590fd5b819293506040519384809263054fd4d560e41b825287165afa80156102185760029260ff925f926106ee575b50501610855f80610694565b6107049250803d106102115761020281836109b6565b5f806106e2565b6107229150823d84116102435761023581836109b6565b5f61068a565b5f5b8381106107395750505f910152565b818101518382015260200161072a565b9060209161076281518092818552858086019101610728565b601f01601f1916010190565b6020808201906020835283518092526040830192602060408460051b8301019501935f915b8483106107a35750505050505090565b90919293949584806107c1600193603f198682030187528a51610749565b9801930193019194939290610793565b346100ed5760203660031901126100ed57600480356001600160401b0381116100ed5761080290369060040161059d565b9161080c83610f84565b925f5b8181106108285760405180610824878261076e565b0390f35b5f80610835838588610fe1565b60409391610847855180938193611001565b0390305af490610855611029565b911561087c57509060019161086a82886110d4565b5261087581876110d4565b500161080f565b848260448151106100ed576108a081836108b5930151602480918301019101611058565b925162461bcd60e51b815292839283016110b6565b0390fd5b346100ed5760203660031901126100ed576004356108d6816100f1565b60018060a01b03165f526001602052602060405f2054604051908152f35b346100ed5760a03660031901126100ed57600435610911816100f1565b6001600160401b03906024358281116100ed5761093290369060040161058f565b906044358381116100ed5761094b90369060040161059d565b906064358581116100ed5761096490369060040161059d565b9290916084359687116100ed5761098261019d97369060040161059d565b9690956110e8565b634e487b7160e01b5f52604160045260245ffd5b6001600160401b0381116109b157604052565b61098a565b90601f801991011681019081106001600160401b038211176109b157604052565b801515036100ed57565b908160209103126100ed57516109f6816109d7565b90565b6040513d5f823e3d90fd5b908160209103126100ed575160ff811681036100ed5790565b908160209103126100ed57516109f6816100f1565b6040516303e1469160e61b81526001600160a01b0382811693909291602081600481885afa80156102185784915f91610aeb575b50163303610ad9577f5d7cf6c32ebe6d6eea655168be85b90708d2df671da31c8b3bacd7a57fbe0cd992610acf82610ab060209560018060a01b03165f52600260205260405f2090565b80546001600160a01b0319166001600160a01b03909216919091179055565b60405191168152a2565b604051634ca8886760e01b8152600490fd5b610b0d915060203d602011610b13575b610b0581836109b6565b810190610a1d565b5f610a66565b503d610afb565b5f9103126100ed57565b81835290916001600160fb1b0383116100ed5760209260051b809284830137010190565b6001600160a01b039081165f8181526002602052604090205490911680610bac57506020600491604051928380926303e1469160e61b82525afa908115610218575f91610b93575090565b6109f6915060203d602011610b1357610b0581836109b6565b905090565b906001600160a01b0380610bc484610b48565b163303610ad957821691825f5260016020528160405f205414610c4957815f610c3f837fa7bb50a7533796ec350f1499a30e4e59de3af3c115268aa3a50b3a8bfa95bcc095610c2560209660018060a01b03165f52600160205260405f2090565b556001600160a01b03165f90815260208190526040902090565b55604051908152a2565b604051638c8728c760e01b8152600490fd5b91335f52600360205260409160ff835f205416610cf557335f90815260016020908152848220869055818152604080832084905560029091529020610ca1908390610ab0565b335f526003602052825f20600160ff198254161790558251938452602084015260018060a01b0316908201527f5c6c4893d7e35d8665c01f7a5a5199d6e5f7143f68917a769fb8030b9624626d60603392a2565b8251634ca8886760e01b8152600490fd5b9035601e19823603018112156100ed5701602081359101916001600160401b0382116100ed5781360383136100ed57565b908060209392818452848401375f828201840152601f01601f1916010190565b610dd36020926040835280356040840152838101356060840152610d92610d816040830183610d06565b60a0608087015260e0860191610d37565b610dc4610db9610da56060850185610d06565b603f19888603810160a08a01529491610d37565b926080810190610d06565b918584030160c0860152610d37565b90828183039101525f81520190565b903590601e19813603018212156100ed57018035906001600160401b0382116100ed576020019181360383136100ed57565b939291602091610e2c91604087526040870191610d37565b930152565b9060405191602083015260208252604082018281106001600160401b038211176109b157604052565b92916001600160a01b0384169190823b156100ed575f60405180946383d430d560e01b8252818381610e8f8860048301610d57565b03925af191821561021857610f2493610f2093610f5a575b506001600160a01b0386165f90815260208181526040808320546001909252909120909590610f1390610f0b908890610ee69054956040810190610de2565b610efd604094929451938492602084019687610e14565b03601f1981018352826109b6565b519020610e31565b6020815191012092611412565b1590565b610f48576001610f4591019160018060a01b03165f525f60205260405f2090565b55565b6040516309bde33960e01b8152600490fd5b8061034b610f679261099e565b5f610ea7565b6001600160401b0381116109b15760051b60200190565b90610f8e82610f6d565b610f9b60405191826109b6565b8281528092610fac601f1991610f6d565b01905f5b828110610fbc57505050565b806060602080938501015201610fb0565b634e487b7160e01b5f52603260045260245ffd5b90821015610ffc57610ff89160051b810190610de2565b9091565b610fcd565b908092918237015f815290565b6001600160401b0381116109b157601f01601f191660200190565b3d15611053573d9061103a8261100e565b9161104860405193846109b6565b82523d5f602084013e565b606090565b6020818303126100ed578051906001600160401b0382116100ed570181601f820112156100ed57805161108a8161100e565b9261109860405194856109b6565b818452602082840101116100ed576109f69160208085019101610728565b9060206109f6928181520190610749565b805115610ffc5760200190565b8051821015610ffc5760209160051b010190565b604051632988bb9f60e21b81526001600160a01b03828116600483015291989796959493929160209182816024817f000000000000000000000000aa773c035af95721c518ecd8250cadac0aab7ed086165afa908115610218575f916111ba575b5015918215611164575b505061019f576111629761128c565b565b809192508a60046040518095819363054fd4d560e41b8352165afa80156102185760029260ff925f9261119d575b505016105f80611153565b6111b39250803d106102115761020281836109b6565b5f80611192565b6111d19150833d85116102435761023581836109b6565b5f611149565b906111e182610f6d565b6111ee60405191826109b6565b82815280926111ff601f1991610f6d565b0190602036910137565b634e487b7160e01b5f52601160045260245ffd5b8115611227570490565b634e487b7160e01b5f52601260045260245ffd5b906001820180921161124957565b611209565b9190820180921161124957565b909392938483116100ed5784116100ed578101920390565b9015610ffc5790565b9190811015610ffc5760051b0190565b9096909591949293916001600160a01b038716803b156100ed576040516383d430d560e01b8152905f9082908183816112c88f60048301610d57565b03925af18015610218576113ff575b506001600160a01b0387165f90815260208181526040808320546001909252909120549098909686156113ed5761130d876111d7565b966113268161131f6040860186610de2565b905061121d565b9283156113ed5791905f925f945f955b838710611377575050505050505091611355939161135a969593611462565b141590565b610f48576001600160a01b03165f90815260208190526040902055565b956113d8819f93949596976113c46113aa611395866113d19461124e565b809b6113a460408b018b610de2565b9061125b565b9190604051610f0b81610efd8b6020978884019687610e14565b805191012092878961127c565b358d6110d4565b52859160018091019e01959493929194611336565b604051631c6c4cf360e31b8152600490fd5b8061034b61140c9261099e565b5f6112d7565b9192915f915b808310611426575050501490565b90919261144160019161143a86858761127c565b35906115c7565b93019190611418565b5f1981146112495760010190565b356109f6816109d7565b9293919091805193611474848661124e565b61147d8761123b565b036114bf5761148b866111d7565b945f8094885f965f5b8281106114f75750501591506114d1905057505050036114bf576114bb915f1901906110d4565b5190565b604051631a8a024960e11b8152600490fd5b9195509293501590506114e95750506114bb906110c7565b6114f39250611273565b3590565b8a868610156115aa57506115296115248261151b6115148961144a565b988c6110d4565b51955b8761127c565b611458565b1561158f578a8686101561156e575061155a6001929361155261154b8861144a565b978b6110d4565b515b906115c7565b611564828d6110d4565b5201908a91611494565b9261155a90611589846115836001969161144a565b966110d4565b51611554565b61155a6001929361143a6115a28c61144a565b9b8d8b61127c565b91611524826115c083611583611529959161144a565b519561151e565b818110156115db575f5260205260405f2090565b905f5260205260405f209056fea2646970667358221220bbea40880d0f25e537cabb6d06129fc78fc60de966d4aa57362545f5731779e064736f6c63430008160033
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.