Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 25 from a total of 212 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Add Factory | 2764612 | 63 days ago | IN | 0 ETH | 0.00002478 | ||||
Add Factory | 2764612 | 63 days ago | IN | 0 ETH | 0.00002478 | ||||
Add Factory | 2764609 | 63 days ago | IN | 0 ETH | 0.00002478 | ||||
Add Factory | 2764609 | 63 days ago | IN | 0 ETH | 0.00002478 | ||||
Add Factory | 2764607 | 63 days ago | IN | 0 ETH | 0.00002478 | ||||
Add Factory | 2764606 | 63 days ago | IN | 0 ETH | 0.00002478 | ||||
Remove Vault Imp... | 2600043 | 87 days ago | IN | 0 ETH | 0.0000093 | ||||
Remove Vault Imp... | 2600042 | 87 days ago | IN | 0 ETH | 0.0000093 | ||||
Remove Vault Imp... | 2600041 | 87 days ago | IN | 0 ETH | 0.0000093 | ||||
Remove Vault Imp... | 2600040 | 87 days ago | IN | 0 ETH | 0.00001023 | ||||
Remove Vault Imp... | 2600039 | 87 days ago | IN | 0 ETH | 0.0000093 | ||||
Remove Vault Imp... | 2600036 | 87 days ago | IN | 0 ETH | 0.0000093 | ||||
Add Vault Impl | 2600001 | 87 days ago | IN | 0 ETH | 0.00001847 | ||||
Add Vault Impl | 2600000 | 87 days ago | IN | 0 ETH | 0.00002216 | ||||
Add Factory | 2599999 | 87 days ago | IN | 0 ETH | 0.0000184 | ||||
Remove Factory | 2599998 | 87 days ago | IN | 0 ETH | 0.00001189 | ||||
Add Vault Impl | 2599997 | 87 days ago | IN | 0 ETH | 0.00001904 | ||||
Add Factory | 2599996 | 87 days ago | IN | 0 ETH | 0.00001897 | ||||
Remove Factory | 2599995 | 87 days ago | IN | 0 ETH | 0.00000961 | ||||
Add Vault Impl | 2599994 | 87 days ago | IN | 0 ETH | 0.00001904 | ||||
Add Factory | 2599993 | 87 days ago | IN | 0 ETH | 0.00001956 | ||||
Remove Factory | 2599992 | 87 days ago | IN | 0 ETH | 0.00000991 | ||||
Add Vault Impl | 2599991 | 87 days ago | IN | 0 ETH | 0.00001962 | ||||
Add Factory | 2599990 | 87 days ago | IN | 0 ETH | 0.00001956 | ||||
Remove Factory | 2599989 | 87 days ago | IN | 0 ETH | 0.00001053 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x68AC05e9...768888e63 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
VaultsRegistry
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 {Ownable2Step, Ownable} from '@openzeppelin/contracts/access/Ownable2Step.sol'; import {IVaultsRegistry} from '../interfaces/IVaultsRegistry.sol'; import {Errors} from '../libraries/Errors.sol'; /** * @title VaultsRegistry * @author StakeWise * @notice Defines the registry functionality that keeps track of Vaults, Factories and Vault upgrades */ contract VaultsRegistry is Ownable2Step, IVaultsRegistry { /// @inheritdoc IVaultsRegistry mapping(address => bool) public override vaults; /// @inheritdoc IVaultsRegistry mapping(address => bool) public override factories; /// @inheritdoc IVaultsRegistry mapping(address => bool) public override vaultImpls; bool private _initialized; /** * @dev Constructor */ constructor() Ownable(msg.sender) {} /// @inheritdoc IVaultsRegistry function addVault(address vault) external override { if (!factories[msg.sender] && msg.sender != owner()) revert Errors.AccessDenied(); vaults[vault] = true; emit VaultAdded(msg.sender, vault); } /// @inheritdoc IVaultsRegistry function addVaultImpl(address newImpl) external override onlyOwner { if (vaultImpls[newImpl]) revert Errors.AlreadyAdded(); vaultImpls[newImpl] = true; emit VaultImplAdded(newImpl); } /// @inheritdoc IVaultsRegistry function removeVaultImpl(address impl) external override onlyOwner { if (!vaultImpls[impl]) revert Errors.AlreadyRemoved(); vaultImpls[impl] = false; emit VaultImplRemoved(impl); } /// @inheritdoc IVaultsRegistry function addFactory(address factory) external override onlyOwner { if (factories[factory]) revert Errors.AlreadyAdded(); factories[factory] = true; emit FactoryAdded(factory); } /// @inheritdoc IVaultsRegistry function removeFactory(address factory) external override onlyOwner { if (!factories[factory]) revert Errors.AlreadyRemoved(); factories[factory] = false; emit FactoryRemoved(factory); } /// @inheritdoc IVaultsRegistry function initialize(address _owner) external override onlyOwner { if (_owner == address(0)) revert Errors.ZeroAddress(); if (_initialized) revert Errors.AccessDenied(); // transfer ownership _transferOwnership(_owner); _initialized = true; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol) pragma solidity ^0.8.20; import {Ownable} from "./Ownable.sol"; /** * @dev Contract module which provides access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is specified at deployment time in the constructor for `Ownable`. This * can later be changed with {transferOwnership} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2Step is Ownable { address private _pendingOwner; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); if (pendingOwner() != sender) { revert OwnableUnauthorizedAccount(sender); } _transferOwnership(sender); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// 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; /** * @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 Collateralized(); error InvalidProof(); error LowLtv(); error RedemptionExceeded(); error InvalidPosition(); error InvalidLtv(); error InvalidHealthFactor(); error InvalidReceivedAssets(); error InvalidTokenMeta(); error UpgradeFailed(); error InvalidValidator(); error InvalidValidators(); error WhitelistAlreadyUpdated(); 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 InvalidRedeemFromLtvPercent(); error InvalidLiqThresholdPercent(); error InvalidLiqBonusPercent(); error InvalidLtvPercent(); error InvalidCheckpointIndex(); error InvalidCheckpointValue(); error MaxOraclesExceeded(); error ClaimTooEarly(); }
{ "viaIR": true, "optimizer": { "enabled": true, "runs": 200, "details": { "yul": true } }, "evmVersion": "shanghai", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessDenied","type":"error"},{"inputs":[],"name":"AlreadyAdded","type":"error"},{"inputs":[],"name":"AlreadyRemoved","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"factory","type":"address"}],"name":"FactoryAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"factory","type":"address"}],"name":"FactoryRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"vault","type":"address"}],"name":"VaultAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"impl","type":"address"}],"name":"VaultImplAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"impl","type":"address"}],"name":"VaultImplRemoved","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"factory","type":"address"}],"name":"addFactory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"}],"name":"addVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImpl","type":"address"}],"name":"addVaultImpl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"factories","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"factory","type":"address"}],"name":"removeFactory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"impl","type":"address"}],"name":"removeVaultImpl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"vaultImpls","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"vaults","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Deployed Bytecode
0x608060409080825260049081361015610016575f80fd5b5f3560e01c908163256b5a02146105625750806329ce1ec5146104e3578063406913991461046a57806345da87c51461042b5780634b37c73f146103a0578063715018a61461033d57806379ba5097146102f75780638da5cb5b146102d0578063a622ee7c14610291578063aff7947d14610208578063c4d66de814610194578063e30c39781461016c578063f2fde38b146100fc5763fab52689146100ba575f80fd5b346100f85760203660031901126100f857356001600160a01b03811691908290036100f8576020915f526003825260ff815f20541690519015158152f35b5f80fd5b50346100f85760203660031901126100f857356001600160a01b03818116918290036100f85761012a6105ff565b816bffffffffffffffffffffffff60a01b60015416176001555f54167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227005f80a3005b82346100f8575f3660031901126100f85760015490516001600160a01b039091168152602090f35b5090346100f85760203660031901126100f8578135906001600160a01b0382168083036100f8576101c36105ff565b156101f95760ff600554166101ea576101db8261062a565b6005805460ff19166001179055005b51634ca8886760e01b81529050fd5b5163d92e233d60e01b81529050fd5b5090346100f85760203660031901126100f85781356001600160a01b03811692908390036100f8576102386105ff565b825f528060205260ff825f20541661028357825f526020525f20600160ff198254161790557f29d974dc346d2950b8cb7bab58520d858ea957de04277b5f52e7ebf831227e595f80a2005b905163f411c32760e01b8152fd5b50346100f85760203660031901126100f857356001600160a01b03811691908290036100f8576020915f526002825260ff815f20541690519015158152f35b82346100f8575f3660031901126100f8575f5490516001600160a01b039091168152602090f35b50346100f8575f3660031901126100f857600154336001600160a01b0390911603610327576103253361062a565b005b602491519063118cdaa760e01b82523390820152fd5b346100f8575f3660031901126100f8576103556105ff565b600180546001600160a01b03199081169091555f80549182168155906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b5090346100f85760203660031901126100f85781356001600160a01b03811692908390036100f8576103d06105ff565b825f52600360205260ff825f2054161561041d5750815f5260036020525f2060ff1981541690557fafa2737b2090fa39c66b7348625f0c03726240f724defbc6216d679506f944415f80a2005b90516355adf54760e11b8152fd5b5090346100f85760203660031901126100f85781356001600160a01b03811692908390036100f8576020925f52825260ff815f20541690519015158152f35b5090346100f85760203660031901126100f85781356001600160a01b03811692908390036100f85761049a6105ff565b825f528060205260ff825f2054161561041d57825f526020525f2060ff1981541690557f87cac3d6d1268423d34ea84fe630b72c1796e36258370974d6d66b3c7cc701925f80a2005b5090346100f85760203660031901126100f85781356001600160a01b03811692908390036100f8576105136105ff565b825f52600360205260ff825f2054166102835750815f5260036020525f20600160ff198254161790557f6fdc0147105e43e21da80a75b42d0fd464060d5e1a34b0cefbf0b4ccfc2e36a15f80a2005b8383346100f85760203660031901126100f85780356001600160a01b0381811694918590036100f857335f52600360205260ff845f2054161590816105f1575b506105e5575050815f5260026020525f20600160ff19825416179055337f2f0697414292d16e25e419060ebbb3a3318648280380829ca42af307b155393b5f80a3005b634ca8886760e01b8152fd5b90505f5416331415856105a2565b5f546001600160a01b0316330361061257565b60405163118cdaa760e01b8152336004820152602490fd5b6bffffffffffffffffffffffff60a01b9081600154166001555f5460018060a01b0380921680938216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a356fea2646970667358221220a40b7f473a95cd50c60002f2bac7a63568fa1f7e2f74c4b6689842d60bc8f6a964736f6c63430008160033
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.