Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
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.
Contract Source Code Verified (Exact Match)
Contract Name:
PooledDepositsVault
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 200 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BSD 3-Clause License pragma solidity ^0.8.24; import {IynETH} from "src/interfaces/IynETH.sol"; import "lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol"; import "lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol"; /// @title Pooled Deposits Vault /// @notice This contract allows users to deposit ETH into a pooled vault, which can then be converted into ynETH shares. // Once the ynETH token is launched. This allows depositors pre-release access to the YieldNest deposits. /// ETH deposits are enabled until the Owner defines the address of the ynETH token. // Once ynETH is set to a non-zero address, deposits can be finalized, and no new ETH deposits are allowed. contract PooledDepositsVault is Initializable, OwnableUpgradeable { error DepositMustBeGreaterThanZero(); error YnETHIsSet(); error YnETHNotSet(); error AlreadySetAsYnETH(); event DepositReceived(address indexed depositor, uint256 amount, uint256 totalAmount); event DepositFinalized(address indexed depositor, uint256 totalAmount, uint256 ynETHAmount); event YnETHSet(address indexed previousValue, address indexed newValue); mapping(address => uint256) public balances; IynETH public ynETH; constructor() { _disableInitializers(); } /// @notice Initializes the contract with the initial owner. /// @param _initialOwner The address of the initial owner. function initialize(address _initialOwner) external initializer { __Ownable_init(_initialOwner); } /// @notice Sets the YnETH contract address. /// @param _ynETH The address of the YnETH contract. function setYnETH(IynETH _ynETH) external onlyOwner { if (address(_ynETH) == address(ynETH)) revert AlreadySetAsYnETH(); emit YnETHSet(address(ynETH), address(_ynETH)); ynETH = _ynETH; } /// @notice Allows users to deposit ETH into the contract. /// @dev Emits a DepositReceived event upon success. function deposit() public payable { if (address(ynETH) != address(0)) revert YnETHIsSet(); if (msg.value == 0) revert DepositMustBeGreaterThanZero(); balances[msg.sender] += msg.value; emit DepositReceived(msg.sender, msg.value, balances[msg.sender]); } /// @notice Finalizes deposits by converting deposited ETH into ynETH shares for each depositor. /// @param _depositors An array of addresses of depositors whose deposits are to be finalized. /// @dev Emits a DepositFinalized event for each depositor. function finalizeDeposits(address[] calldata _depositors) external { if (address(ynETH) == address(0)) revert YnETHNotSet(); for (uint256 i = 0; i < _depositors.length; i++) { address depositor = _depositors[i]; uint256 depositAmountPerDepositor = balances[depositor]; if (depositAmountPerDepositor == 0) { continue; } balances[depositor] = 0; uint256 shares = ynETH.depositETH{value: depositAmountPerDepositor}(depositor); emit DepositFinalized(depositor, depositAmountPerDepositor, shares); } } /// @notice Allows the contract to receive ETH directly and triggers the deposit function. receive() external payable { deposit(); } }
// SPDX-License-Identifier: BSD 3-Clause License pragma solidity ^0.8.24; import {IERC20} from "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import {IERC20Permit} from "lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol"; interface IynETH is IERC20 { function withdrawETH(uint256 ethAmount) external; function processWithdrawnETH() external payable; function receiveRewards() external payable; function pauseDeposits() external; function unpauseDeposits() external; /// @notice Allows depositing ETH into the contract in exchange for shares. /// @param receiver The address to receive the minted shares. /// @return shares The amount of shares minted for the deposited ETH. function depositETH(address receiver) external payable returns (uint256 shares); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._initialized = 1; if (isTopLevelCall) { $._initializing = true; } _; if (isTopLevelCall) { $._initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._initialized = version; $._initializing = true; _; $._initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Ownable struct OwnableStorage { address _owner; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300; function _getOwnableStorage() private pure returns (OwnableStorage storage $) { assembly { $.slot := OwnableStorageLocation } } /** * @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. */ function __Ownable_init(address initialOwner) internal onlyInitializing { __Ownable_init_unchained(initialOwner); } function __Ownable_init_unchained(address initialOwner) internal onlyInitializing { 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) { OwnableStorage storage $ = _getOwnableStorage(); 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 { OwnableStorage storage $ = _getOwnableStorage(); address oldOwner = $._owner; $._owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
{ "remappings": [ "@openzeppelin-upgrades/=lib/eigenlayer-contracts/lib/openzeppelin-contracts-upgradeable/", "@openzeppelin/=lib/openzeppelin-contracts/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "ds-test/=lib/forge-std/lib/ds-test/src/", "eigenlayer-contracts/=lib/eigenlayer-contracts/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "safe-smart-account/=lib/safe-smart-account/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "cancun", "viaIR": false, "libraries": {} }
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadySetAsYnETH","type":"error"},{"inputs":[],"name":"DepositMustBeGreaterThanZero","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","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":"YnETHIsSet","type":"error"},{"inputs":[],"name":"YnETHNotSet","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"depositor","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ynETHAmount","type":"uint256"}],"name":"DepositFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"depositor","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"DepositReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","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":"previousValue","type":"address"},{"indexed":true,"internalType":"address","name":"newValue","type":"address"}],"name":"YnETHSet","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_depositors","type":"address[]"}],"name":"finalizeDeposits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_initialOwner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IynETH","name":"_ynETH","type":"address"}],"name":"setYnETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ynETH","outputs":[{"internalType":"contract IynETH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561000f575f80fd5b5061001861001d565b6100cf565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161561006d5760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146100cc5780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b61083f806100dc5f395ff3fe608060405260043610610087575f3560e01c80639872ab84116100575780639872ab841461015b578063c4d66de81461017a578063d0e30db014610199578063e95cf23b146101a1578063f2fde38b146101c0575f80fd5b806327e235e31461009a578063715018a6146100d85780638a149aa2146100ec5780638da5cb5b1461010b575f80fd5b36610096576100946101df565b005b5f80fd5b3480156100a5575f80fd5b506100c56100b4366004610728565b5f6020819052908152604090205481565b6040519081526020015b60405180910390f35b3480156100e3575f80fd5b50610094610293565b3480156100f7575f80fd5b50610094610106366004610728565b6102a6565b348015610116575f80fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03165b6040516001600160a01b0390911681526020016100cf565b348015610166575f80fd5b50600154610143906001600160a01b031681565b348015610185575f80fd5b50610094610194366004610728565b610338565b6100946101df565b3480156101ac575f80fd5b506100946101bb36600461074a565b610446565b3480156101cb575f80fd5b506100946101da366004610728565b6105a5565b6001546001600160a01b03161561020957604051633ec9a62d60e11b815260040160405180910390fd5b345f03610229576040516320da5c7760e21b815260040160405180910390fd5b335f90815260208190526040812080543492906102479084906107b9565b9091555050335f8181526020818152604091829020548251348152918201527f7aa1a8eb998c779420645fc14513bf058edb347d95c2fc2e6845bdc22f888631910160405180910390a2565b61029b6105e7565b6102a45f610642565b565b6102ae6105e7565b6001546001600160a01b03908116908216036102dd5760405163efbca3c360e01b815260040160405180910390fd5b6001546040516001600160a01b038084169216907fdc50feae3b7d8edc76cf84218301716d4005cd377e886d9abda7185d02c50f5f905f90a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f8115801561037d5750825b90505f8267ffffffffffffffff1660011480156103995750303b155b9050811580156103a7575080155b156103c55760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156103ef57845460ff60401b1916600160401b1785555b6103f8866106b2565b831561043e57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050565b6001546001600160a01b031661046f57604051633de784ff60e21b815260040160405180910390fd5b5f5b818110156105a0575f83838381811061048c5761048c6107de565b90506020020160208101906104a19190610728565b6001600160a01b0381165f908152602081905260408120549192508190036104ca575050610598565b6001600160a01b038281165f818152602081905260408082208290556001549051631696d40360e11b8152600481019390935290921690632d2da80690849060240160206040518083038185885af1158015610528573d5f803e3d5ffd5b50505050506040513d601f19601f8201168201806040525081019061054d91906107f2565b60408051848152602081018390529192506001600160a01b038516917fe71b504f2da589f965e35af45fe26f526978ef331fac58260c9465c233e6a37d910160405180910390a25050505b600101610471565b505050565b6105ad6105e7565b6001600160a01b0381166105db57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6105e481610642565b50565b336106197f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b0316146102a45760405163118cdaa760e01b81523360048201526024016105d2565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b6106ba6106c3565b6105e48161070c565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166102a457604051631afcd79f60e31b815260040160405180910390fd5b6105ad6106c3565b6001600160a01b03811681146105e4575f80fd5b5f60208284031215610738575f80fd5b813561074381610714565b9392505050565b5f806020838503121561075b575f80fd5b823567ffffffffffffffff80821115610772575f80fd5b818501915085601f830112610785575f80fd5b813581811115610793575f80fd5b8660208260051b85010111156107a7575f80fd5b60209290920196919550909350505050565b808201808211156107d857634e487b7160e01b5f52601160045260245ffd5b92915050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610802575f80fd5b505191905056fea264697066735822122025bcbcc7a6263633385c2ba1f67fa191f97b389177b03df1919c328c7344b43164736f6c63430008180033
Deployed Bytecode
0x608060405260043610610087575f3560e01c80639872ab84116100575780639872ab841461015b578063c4d66de81461017a578063d0e30db014610199578063e95cf23b146101a1578063f2fde38b146101c0575f80fd5b806327e235e31461009a578063715018a6146100d85780638a149aa2146100ec5780638da5cb5b1461010b575f80fd5b36610096576100946101df565b005b5f80fd5b3480156100a5575f80fd5b506100c56100b4366004610728565b5f6020819052908152604090205481565b6040519081526020015b60405180910390f35b3480156100e3575f80fd5b50610094610293565b3480156100f7575f80fd5b50610094610106366004610728565b6102a6565b348015610116575f80fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03165b6040516001600160a01b0390911681526020016100cf565b348015610166575f80fd5b50600154610143906001600160a01b031681565b348015610185575f80fd5b50610094610194366004610728565b610338565b6100946101df565b3480156101ac575f80fd5b506100946101bb36600461074a565b610446565b3480156101cb575f80fd5b506100946101da366004610728565b6105a5565b6001546001600160a01b03161561020957604051633ec9a62d60e11b815260040160405180910390fd5b345f03610229576040516320da5c7760e21b815260040160405180910390fd5b335f90815260208190526040812080543492906102479084906107b9565b9091555050335f8181526020818152604091829020548251348152918201527f7aa1a8eb998c779420645fc14513bf058edb347d95c2fc2e6845bdc22f888631910160405180910390a2565b61029b6105e7565b6102a45f610642565b565b6102ae6105e7565b6001546001600160a01b03908116908216036102dd5760405163efbca3c360e01b815260040160405180910390fd5b6001546040516001600160a01b038084169216907fdc50feae3b7d8edc76cf84218301716d4005cd377e886d9abda7185d02c50f5f905f90a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f8115801561037d5750825b90505f8267ffffffffffffffff1660011480156103995750303b155b9050811580156103a7575080155b156103c55760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156103ef57845460ff60401b1916600160401b1785555b6103f8866106b2565b831561043e57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050565b6001546001600160a01b031661046f57604051633de784ff60e21b815260040160405180910390fd5b5f5b818110156105a0575f83838381811061048c5761048c6107de565b90506020020160208101906104a19190610728565b6001600160a01b0381165f908152602081905260408120549192508190036104ca575050610598565b6001600160a01b038281165f818152602081905260408082208290556001549051631696d40360e11b8152600481019390935290921690632d2da80690849060240160206040518083038185885af1158015610528573d5f803e3d5ffd5b50505050506040513d601f19601f8201168201806040525081019061054d91906107f2565b60408051848152602081018390529192506001600160a01b038516917fe71b504f2da589f965e35af45fe26f526978ef331fac58260c9465c233e6a37d910160405180910390a25050505b600101610471565b505050565b6105ad6105e7565b6001600160a01b0381166105db57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6105e481610642565b50565b336106197f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b0316146102a45760405163118cdaa760e01b81523360048201526024016105d2565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b6106ba6106c3565b6105e48161070c565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166102a457604051631afcd79f60e31b815260040160405180910390fd5b6105ad6106c3565b6001600160a01b03811681146105e4575f80fd5b5f60208284031215610738575f80fd5b813561074381610714565b9392505050565b5f806020838503121561075b575f80fd5b823567ffffffffffffffff80821115610772575f80fd5b818501915085601f830112610785575f80fd5b813581811115610793575f80fd5b8660208260051b85010111156107a7575f80fd5b60209290920196919550909350505050565b808201808211156107d857634e487b7160e01b5f52601160045260245ffd5b92915050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610802575f80fd5b505191905056fea264697066735822122025bcbcc7a6263633385c2ba1f67fa191f97b389177b03df1919c328c7344b43164736f6c63430008180033
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.