Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
| Transaction Hash |
Method
|
Block
|
From
|
To
|
Amount
|
||||
|---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
To
|
Amount
|
||
|---|---|---|---|---|---|---|---|
| Get Shares Reque... | 1498581 | 88 days ago | 0 ETH | ||||
| Get Shares Reque... | 1498240 | 88 days ago | 0 ETH | ||||
| Get Shares Reque... | 1497895 | 88 days ago | 0 ETH | ||||
| Get Shares Reque... | 1497561 | 88 days ago | 0 ETH | ||||
| Get Shares Reque... | 1497222 | 88 days ago | 0 ETH | ||||
| Get Shares Reque... | 1496871 | 88 days ago | 0 ETH | ||||
| Get Shares Reque... | 1496528 | 88 days ago | 0 ETH | ||||
| Get Shares Reque... | 1496185 | 88 days ago | 0 ETH | ||||
| Get Shares Reque... | 1495843 | 88 days ago | 0 ETH | ||||
| Get Shares Reque... | 1495498 | 88 days ago | 0 ETH | ||||
| Get Shares Reque... | 1495148 | 88 days ago | 0 ETH | ||||
| Get Shares Reque... | 1494799 | 89 days ago | 0 ETH | ||||
| Get Shares Reque... | 1494454 | 89 days ago | 0 ETH | ||||
| Get Shares Reque... | 1494122 | 89 days ago | 0 ETH | ||||
| Get Shares Reque... | 1493773 | 89 days ago | 0 ETH | ||||
| Get Shares Reque... | 1493415 | 89 days ago | 0 ETH | ||||
| Get Shares Reque... | 1493066 | 89 days ago | 0 ETH | ||||
| Get Shares Reque... | 1492709 | 89 days ago | 0 ETH | ||||
| Get Shares Reque... | 1492369 | 89 days ago | 0 ETH | ||||
| Get Shares Reque... | 1492023 | 89 days ago | 0 ETH | ||||
| Get Shares Reque... | 1491682 | 89 days ago | 0 ETH | ||||
| Get Shares Reque... | 1491334 | 89 days ago | 0 ETH | ||||
| Get Shares Reque... | 1490982 | 89 days ago | 0 ETH | ||||
| Get Shares Reque... | 1490640 | 89 days ago | 0 ETH | ||||
| Get Shares Reque... | 1490292 | 89 days ago | 0 ETH |
Loading...
Loading
Loading...
Loading
Contract Name:
Burner
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
istanbul EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-FileCopyrightText: 2025 Lido <[email protected]> // SPDX-License-Identifier: GPL-3.0 /* See contracts/COMPILERS.md */ pragma solidity 0.8.9; import {IERC20} from "@openzeppelin/contracts-v4.4/token/ERC20/IERC20.sol"; import {IERC721} from "@openzeppelin/contracts-v4.4/token/ERC721/IERC721.sol"; import {SafeERC20} from "@openzeppelin/contracts-v4.4/token/ERC20/utils/SafeERC20.sol"; import {Math} from "@openzeppelin/contracts-v4.4/utils/math/Math.sol"; import {IBurner} from "contracts/common/interfaces/IBurner.sol"; import {ILidoLocator} from "contracts/common/interfaces/ILidoLocator.sol"; import {AccessControlEnumerable} from "./utils/access/AccessControlEnumerable.sol"; import {Versioned} from "./utils/Versioned.sol"; /** * @title Interface defining Lido contract */ interface ILido is IERC20 { /** * @notice Get stETH amount by the provided shares amount * @param _sharesAmount shares amount * @dev dual to `getSharesByPooledEth`. */ function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256); /** * @notice Get shares amount by the provided stETH amount * @param _pooledEthAmount stETH amount * @dev dual to `getPooledEthByShares`. */ function getSharesByPooledEth(uint256 _pooledEthAmount) external view returns (uint256); /** * @notice Get shares amount of the provided account * @param _account provided account address. */ function sharesOf(address _account) external view returns (uint256); /** * @notice Transfer `_sharesAmount` stETH shares from `_sender` to `_receiver` using allowance. */ function transferSharesFrom(address _sender, address _recipient, uint256 _sharesAmount) external returns (uint256); /** * @notice Burn shares from the account * @param _amount amount of shares to burn */ function burnShares(uint256 _amount) external; } /** * @notice A dedicated contract for stETH burning requests scheduling * * @dev Burning stETH means 'decrease total underlying shares amount to perform stETH positive token rebase' */ contract Burner is IBurner, AccessControlEnumerable, Versioned { using SafeERC20 for IERC20; error AppAuthFailed(); error MigrationNotAllowedOrAlreadyMigrated(); error DirectETHTransfer(); error ZeroRecoveryAmount(); error StETHRecoveryWrongFunc(); error ZeroBurnAmount(); error BurnAmountExceedsActual(uint256 requestedAmount, uint256 actualAmount); error ZeroAddress(string field); error OnlyLidoCanMigrate(); error NotInitialized(); // ----------------------------- // STORAGE STRUCTS // ----------------------------- /// @custom:storage-location erc7201:Burner struct Storage { uint256 coverSharesBurnRequested; uint256 nonCoverSharesBurnRequested; uint256 totalCoverSharesBurnt; uint256 totalNonCoverSharesBurnt; } /// @custom:storage-location erc7201:Burner:IsMigrationAllowed-v3Upgrade struct StorageV3Upgrade { bool isMigrationAllowed; } bytes32 public constant REQUEST_BURN_MY_STETH_ROLE = keccak256("REQUEST_BURN_MY_STETH_ROLE"); bytes32 public constant REQUEST_BURN_SHARES_ROLE = keccak256("REQUEST_BURN_SHARES_ROLE"); // keccak256(abi.encode(uint256(keccak256("Burner")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant STORAGE_LOCATION = 0xf01bebc885dbdcd6f86dfe57676112e525cafe0421724bf6b4a9ab1ee741de00; /// @dev After V3 Upgrade finished is no longer needed and should be removed // keccak256(abi.encode(uint256(keccak256("Burner.IsMigrationAllowed-v3Upgrade")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant STORAGE_V3_UPGRADE_LOCATION = 0xe26691b9ae4d2ff5628fc98afc2ccacdd3dd28e1ab2df809eb32ad4af2845800; ILidoLocator public immutable LOCATOR; ILido public immutable LIDO; /** * Emitted when a new stETH burning request is added by the `requestedBy` address. */ event StETHBurnRequested( bool indexed isCover, address indexed requestedBy, uint256 amountOfStETH, uint256 amountOfShares ); /** * Emitted when the stETH `amount` (corresponding to `amountOfShares` shares) burnt for the `isCover` reason. */ event StETHBurnt(bool indexed isCover, uint256 amountOfStETH, uint256 amountOfShares); /** * Emitted when the excessive stETH `amount` (corresponding to `amountOfShares` shares) recovered (i.e. transferred) * to the Lido treasure address by `requestedBy` sender. */ event ExcessStETHRecovered(address indexed requestedBy, uint256 amountOfStETH, uint256 amountOfShares); /** * Emitted when the ERC20 `token` recovered (i.e. transferred) * to the Lido treasure address by `requestedBy` sender. */ event ERC20Recovered(address indexed requestedBy, address indexed token, uint256 amount); /** * Emitted when the ERC721-compatible `token` (NFT) recovered (i.e. transferred) * to the Lido treasure address by `requestedBy` sender. */ event ERC721Recovered(address indexed requestedBy, address indexed token, uint256 tokenId); /** * Ctor * * @param _locator the Lido locator address * @param _stETH stETH token address */ constructor(address _locator, address _stETH) Versioned() { if (_locator == address(0)) revert ZeroAddress("_locator"); if (_stETH == address(0)) revert ZeroAddress("_stETH"); LOCATOR = ILidoLocator(_locator); LIDO = ILido(_stETH); } /** * @notice Initializes the contract by setting up roles and migration allowance. * @dev This function should be called only once during the contract deployment. * @param _admin The address to be granted the DEFAULT_ADMIN_ROLE. * @param _isMigrationAllowed whether migration is allowed initially. */ function initialize(address _admin, bool _isMigrationAllowed) external { if (_admin == address(0)) revert ZeroAddress("_admin"); _initializeContractVersionTo(1); _grantRole(DEFAULT_ADMIN_ROLE, _admin); _storageV3Upgrade().isMigrationAllowed = _isMigrationAllowed; } /** * @param _oldBurner The address of the old Burner contract * @dev Can be called only by Lido contract. Migrates state from the old Burner. Can be run only once. * Cannot be run if migration is disabled upon deployment. */ function migrate(address _oldBurner) external { if (msg.sender != address(LIDO)) revert OnlyLidoCanMigrate(); if (_oldBurner == address(0)) revert ZeroAddress("_oldBurner"); _checkContractVersion(1); if (!_storageV3Upgrade().isMigrationAllowed) revert MigrationNotAllowedOrAlreadyMigrated(); _storageV3Upgrade().isMigrationAllowed = false; IBurner oldBurner = IBurner(_oldBurner); Storage storage $ = _storage(); $.totalCoverSharesBurnt = oldBurner.getCoverSharesBurnt(); $.totalNonCoverSharesBurnt = oldBurner.getNonCoverSharesBurnt(); (uint256 coverShares, uint256 nonCoverShares) = oldBurner.getSharesRequestedToBurn(); $.coverSharesBurnRequested = coverShares; $.nonCoverSharesBurnRequested = nonCoverShares; } /** * @notice Returns whether migration is allowed. * @dev After V3 Upgrade finished is no longer needed and should be removed */ function isMigrationAllowed() external view returns (bool) { return _storageV3Upgrade().isMigrationAllowed; } /** * @notice BE CAREFUL, the provided stETH will be burnt permanently. * * Transfers `_stETHAmountToBurn` stETH tokens from the message sender and irreversibly locks these * on the burner contract address. Internally converts `_stETHAmountToBurn` amount into underlying * shares amount (`_stETHAmountToBurnAsShares`) and marks the converted amount for burning * by increasing the `coverSharesBurnRequested` counter. * * @param _stETHAmountToBurn stETH tokens to burn * */ function requestBurnMyStETHForCover(uint256 _stETHAmountToBurn) external onlyRole(REQUEST_BURN_MY_STETH_ROLE) { LIDO.transferFrom(msg.sender, address(this), _stETHAmountToBurn); uint256 sharesAmount = LIDO.getSharesByPooledEth(_stETHAmountToBurn); _requestBurn(sharesAmount, _stETHAmountToBurn, true /* _isCover */); } /** * @notice BE CAREFUL, the provided stETH will be burnt permanently. * * Transfers `_sharesAmountToBurn` stETH shares from `_from` and irreversibly locks these * on the burner contract address. Marks the shares amount for burning * by increasing the `coverSharesBurnRequested` counter. * * @param _from address to transfer shares from * @param _sharesAmountToBurn stETH shares to burn * */ function requestBurnSharesForCover( address _from, uint256 _sharesAmountToBurn ) external onlyRole(REQUEST_BURN_SHARES_ROLE) { uint256 stETHAmount = LIDO.transferSharesFrom(_from, address(this), _sharesAmountToBurn); _requestBurn(_sharesAmountToBurn, stETHAmount, true /* _isCover */); } /** * @notice BE CAREFUL, the provided stETH shares will be burnt permanently. * * Transfers `_sharesAmountToBurn` stETH shares from the message sender and irreversibly locks these * on the burner contract address. Marks the shares amount for burning * by increasing the `nonCoverSharesBurnRequested` counter. * * @param _sharesAmountToBurn stETH shares to burn * */ function requestBurnMyShares(uint256 _sharesAmountToBurn) external onlyRole(REQUEST_BURN_MY_STETH_ROLE) { uint256 stETHAmount = LIDO.transferSharesFrom(msg.sender, address(this), _sharesAmountToBurn); _requestBurn(_sharesAmountToBurn, stETHAmount, false /* _isCover */); } /** * @notice BE CAREFUL, the provided stETH will be burnt permanently. * @dev DEPRECATED, use `requestBurnMyShares` instead to prevent dust accumulation. * * Transfers `_stETHAmountToBurn` stETH tokens from the message sender and irreversibly locks these * on the burner contract address. Internally converts `_stETHAmountToBurn` amount into underlying * shares amount (`_stETHAmountToBurnAsShares`) and marks the converted amount for burning * by increasing the `nonCoverSharesBurnRequested` counter. * * @param _stETHAmountToBurn stETH tokens to burn * */ function requestBurnMyStETH(uint256 _stETHAmountToBurn) external onlyRole(REQUEST_BURN_MY_STETH_ROLE) { LIDO.transferFrom(msg.sender, address(this), _stETHAmountToBurn); uint256 sharesAmount = LIDO.getSharesByPooledEth(_stETHAmountToBurn); _requestBurn(sharesAmount, _stETHAmountToBurn, false /* _isCover */); } /** * @notice BE CAREFUL, the provided stETH will be burnt permanently. * * Transfers `_sharesAmountToBurn` stETH shares from `_from` and irreversibly locks these * on the burner contract address. Marks the shares amount for burning * by increasing the `nonCoverSharesBurnRequested` counter. * * @param _from address to transfer shares from * @param _sharesAmountToBurn stETH shares to burn * */ function requestBurnShares(address _from, uint256 _sharesAmountToBurn) external onlyRole(REQUEST_BURN_SHARES_ROLE) { uint256 stETHAmount = LIDO.transferSharesFrom(_from, address(this), _sharesAmountToBurn); _requestBurn(_sharesAmountToBurn, stETHAmount, false /* _isCover */); } /** * Transfers the excess stETH amount (e.g. belonging to the burner contract address * but not marked for burning) to the Lido treasury address set upon the * contract construction. */ function recoverExcessStETH() external { uint256 excessStETH = getExcessStETH(); if (excessStETH > 0) { uint256 excessSharesAmount = LIDO.getSharesByPooledEth(excessStETH); emit ExcessStETHRecovered(msg.sender, excessStETH, excessSharesAmount); LIDO.transfer(LOCATOR.treasury(), excessStETH); } } /** * Intentionally deny incoming ether */ receive() external payable { revert DirectETHTransfer(); } /** * Transfers a given `_amount` of an ERC20-token (defined by the `_token` contract address) * currently belonging to the burner contract address to the Lido treasury address. * * @param _token an ERC20-compatible token * @param _amount token amount */ function recoverERC20(address _token, uint256 _amount) external { if (_amount == 0) revert ZeroRecoveryAmount(); if (_token == address(LIDO)) revert StETHRecoveryWrongFunc(); IERC20(_token).safeTransfer(LOCATOR.treasury(), _amount); emit ERC20Recovered(msg.sender, _token, _amount); } /** * Transfers a given token_id of an ERC721-compatible NFT (defined by the token contract address) * currently belonging to the burner contract address to the Lido treasury address. * * @param _token an ERC721-compatible token * @param _tokenId minted token id */ function recoverERC721(address _token, uint256 _tokenId) external { if (_token == address(LIDO)) revert StETHRecoveryWrongFunc(); IERC721(_token).transferFrom(address(this), LOCATOR.treasury(), _tokenId); emit ERC721Recovered(msg.sender, _token, _tokenId); } /** * Commit cover/non-cover burning requests and logs cover/non-cover shares amount just burnt. * * NB: The real burn enactment to be invoked after the call (via internal Lido._burnShares()) * * Increments `totalCoverSharesBurnt` and `totalNonCoverSharesBurnt` counters. * Decrements `coverSharesBurnRequested` and `nonCoverSharesBurnRequested` counters. * Does nothing if zero amount passed. * * @param _sharesToBurn amount of shares to be burnt */ function commitSharesToBurn(uint256 _sharesToBurn) external virtual override { if (msg.sender != LOCATOR.accounting()) revert AppAuthFailed(); if (_sharesToBurn == 0) { return; } Storage storage $ = _storage(); uint256 memCoverSharesBurnRequested = $.coverSharesBurnRequested; uint256 memNonCoverSharesBurnRequested = $.nonCoverSharesBurnRequested; uint256 burnAmount = memCoverSharesBurnRequested + memNonCoverSharesBurnRequested; if (_sharesToBurn > burnAmount) { revert BurnAmountExceedsActual(_sharesToBurn, burnAmount); } uint256 sharesToBurnNow; if (memCoverSharesBurnRequested > 0) { uint256 sharesToBurnNowForCover = Math.min(_sharesToBurn, memCoverSharesBurnRequested); $.totalCoverSharesBurnt += sharesToBurnNowForCover; uint256 stETHToBurnNowForCover = LIDO.getPooledEthByShares(sharesToBurnNowForCover); emit StETHBurnt(true /* isCover */, stETHToBurnNowForCover, sharesToBurnNowForCover); $.coverSharesBurnRequested -= sharesToBurnNowForCover; sharesToBurnNow += sharesToBurnNowForCover; } if (memNonCoverSharesBurnRequested > 0 && sharesToBurnNow < _sharesToBurn) { uint256 sharesToBurnNowForNonCover = Math.min( _sharesToBurn - sharesToBurnNow, memNonCoverSharesBurnRequested ); $.totalNonCoverSharesBurnt += sharesToBurnNowForNonCover; uint256 stETHToBurnNowForNonCover = LIDO.getPooledEthByShares(sharesToBurnNowForNonCover); emit StETHBurnt(false /* isCover */, stETHToBurnNowForNonCover, sharesToBurnNowForNonCover); $.nonCoverSharesBurnRequested -= sharesToBurnNowForNonCover; sharesToBurnNow += sharesToBurnNowForNonCover; } LIDO.burnShares(_sharesToBurn); assert(sharesToBurnNow == _sharesToBurn); } /** * Returns the current amount of shares locked on the contract to be burnt. */ function getSharesRequestedToBurn() external view virtual override returns (uint256 coverShares, uint256 nonCoverShares) { Storage storage $ = _storage(); coverShares = $.coverSharesBurnRequested; nonCoverShares = $.nonCoverSharesBurnRequested; } /** * Returns the total cover shares ever burnt. */ function getCoverSharesBurnt() external view virtual override returns (uint256) { return _storage().totalCoverSharesBurnt; } /** * Returns the total non-cover shares ever burnt. */ function getNonCoverSharesBurnt() external view virtual override returns (uint256) { return _storage().totalNonCoverSharesBurnt; } /** * Returns the stETH amount belonging to the burner contract address but not marked for burning. */ function getExcessStETH() public view returns (uint256) { return LIDO.getPooledEthByShares(_getExcessStETHShares()); } function _getExcessStETHShares() internal view returns (uint256) { Storage storage $ = _storage(); uint256 sharesBurnRequested = ($.coverSharesBurnRequested + $.nonCoverSharesBurnRequested); uint256 totalShares = LIDO.sharesOf(address(this)); // sanity check, don't revert if (totalShares <= sharesBurnRequested) { return 0; } return totalShares - sharesBurnRequested; } function _requestBurn(uint256 _sharesAmount, uint256 _stETHAmount, bool _isCover) private { if (_sharesAmount == 0) revert ZeroBurnAmount(); emit StETHBurnRequested(_isCover, msg.sender, _stETHAmount, _sharesAmount); Storage storage $ = _storage(); if (_isCover) { $.coverSharesBurnRequested += _sharesAmount; } else { $.nonCoverSharesBurnRequested += _sharesAmount; } } function _storage() internal pure returns (Storage storage $) { assembly { $.slot := STORAGE_LOCATION } } function _storageV3Upgrade() internal pure returns (StorageV3Upgrade storage $) { assembly { $.slot := STORAGE_V3_UPGRADE_LOCATION } } }
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
/**
* @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
*/
interface IAccessControlEnumerable is IAccessControl {
/**
* @dev Returns one of the accounts that have `role`. `index` must be a
* value between 0 and {getRoleMemberCount}, non-inclusive.
*
* Role bearers are not sorted in any particular way, and their ordering may
* change at any point.
*
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
* you perform all queries on the same block. See the following
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
* for more information.
*/
function getRoleMember(bytes32 role, uint256 index) external view returns (address);
/**
* @dev Returns the number of accounts that have `role`. Can be used
* together with {getRoleMember} to enumerate all bearers of a role.
*/
function getRoleMemberCount(bytes32 role) external view returns (uint256);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) 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 `amount` 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 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)
pragma solidity ^0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @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: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a / b + (a % b == 0 ? 0 : 1);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)
pragma solidity ^0.8.0;
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
* and `uint256` (`UintSet`) are supported.
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping(bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
return true;
} else {
return false;
}
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) {
// Equivalent to contains(set, value)
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in
// the array, and then remove the last element (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
if (lastIndex != toDeleteIndex) {
bytes32 lastvalue = set._values[lastIndex];
// Move the last value to the index where the value to delete is
set._values[toDeleteIndex] = lastvalue;
// Update the index for the moved value
set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
}
// Delete the slot where the moved value was stored
set._values.pop();
// Delete the index for the deleted slot
delete set._indexes[value];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
return set._values[index];
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function _values(Set storage set) private view returns (bytes32[] memory) {
return set._values;
}
// Bytes32Set
struct Bytes32Set {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
return _values(set._inner);
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(AddressSet storage set) internal view returns (address[] memory) {
bytes32[] memory store = _values(set._inner);
address[] memory result;
assembly {
result := store
}
return result;
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(UintSet storage set) internal view returns (uint256[] memory) {
bytes32[] memory store = _values(set._inner);
uint256[] memory result;
assembly {
result := store
}
return result;
}
}/*
* SPDX-License-Identifier: MIT
*/
pragma solidity 0.8.9;
/**
* @notice Aragon Unstructured Storage library
*/
library UnstructuredStorage {
function getStorageBool(bytes32 position) internal view returns (bool data) {
assembly { data := sload(position) }
}
function getStorageAddress(bytes32 position) internal view returns (address data) {
assembly { data := sload(position) }
}
function getStorageBytes32(bytes32 position) internal view returns (bytes32 data) {
assembly { data := sload(position) }
}
function getStorageUint256(bytes32 position) internal view returns (uint256 data) {
assembly { data := sload(position) }
}
function setStorageBool(bytes32 position, bool data) internal {
assembly { sstore(position, data) }
}
function setStorageAddress(bytes32 position, address data) internal {
assembly { sstore(position, data) }
}
function setStorageBytes32(bytes32 position, bytes32 data) internal {
assembly { sstore(position, data) }
}
function setStorageUint256(bytes32 position, uint256 data) internal {
assembly { sstore(position, data) }
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol)
//
// A modified AccessControl contract using unstructured storage. Copied from tree:
// https://github.com/OpenZeppelin/openzeppelin-contracts/tree/6bd6b76/contracts/access
//
/* See contracts/COMPILERS.md */
pragma solidity 0.8.9;
import "@openzeppelin/contracts-v4.4/access/IAccessControl.sol";
import "@openzeppelin/contracts-v4.4/utils/Context.sol";
import "@openzeppelin/contracts-v4.4/utils/Strings.sol";
import "@openzeppelin/contracts-v4.4/utils/introspection/ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
/// @dev Storage slot: mapping(bytes32 => RoleData) _roles
bytes32 private constant ROLES_POSITION = keccak256("openzeppelin.AccessControl._roles");
function _storageRoles() private pure returns (mapping(bytes32 => RoleData) storage _roles) {
bytes32 position = ROLES_POSITION;
assembly { _roles.slot := position }
}
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*
* _Available since v4.1._
*/
modifier onlyRole(bytes32 role) {
_checkRole(role, _msgSender());
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view override returns (bool) {
return _storageRoles()[role].members[account];
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/
function _checkRole(bytes32 role, address account) internal view {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(uint160(account), 20),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
return _storageRoles()[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) public virtual override {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*
* NOTE: This function is deprecated in favor of {_grantRole}.
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_storageRoles()[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Grants `role` to `account`.
*
* Internal function without access restriction.
*/
function _grantRole(bytes32 role, address account) internal virtual {
if (!hasRole(role, account)) {
_storageRoles()[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
/**
* @dev Revokes `role` from `account`.
*
* Internal function without access restriction.
*/
function _revokeRole(bytes32 role, address account) internal virtual {
if (hasRole(role, account)) {
_storageRoles()[role].members[account] = false;
emit RoleRevoked(role, account, _msgSender());
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/AccessControlEnumerable.sol)
//
// A modified AccessControlEnumerable contract using unstructured storage. Copied from tree:
// https://github.com/OpenZeppelin/openzeppelin-contracts/tree/6bd6b76/contracts/access
//
/* See contracts/COMPILERS.md */
pragma solidity 0.8.9;
import "@openzeppelin/contracts-v4.4/access/IAccessControlEnumerable.sol";
import "@openzeppelin/contracts-v4.4/utils/structs/EnumerableSet.sol";
import "./AccessControl.sol";
/**
* @dev Extension of {AccessControl} that allows enumerating the members of each role.
*/
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
using EnumerableSet for EnumerableSet.AddressSet;
/// @dev Storage slot: mapping(bytes32 => EnumerableSet.AddressSet) _roleMembers
bytes32 private constant ROLE_MEMBERS_POSITION = keccak256("openzeppelin.AccessControlEnumerable._roleMembers");
function _storageRoleMembers() private pure returns (
mapping(bytes32 => EnumerableSet.AddressSet) storage _roleMembers
) {
bytes32 position = ROLE_MEMBERS_POSITION;
assembly { _roleMembers.slot := position }
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns one of the accounts that have `role`. `index` must be a
* value between 0 and {getRoleMemberCount}, non-inclusive.
*
* Role bearers are not sorted in any particular way, and their ordering may
* change at any point.
*
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
* you perform all queries on the same block. See the following
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
* for more information.
*/
function getRoleMember(bytes32 role, uint256 index) public view override returns (address) {
return _storageRoleMembers()[role].at(index);
}
/**
* @dev Returns the number of accounts that have `role`. Can be used
* together with {getRoleMember} to enumerate all bearers of a role.
*/
function getRoleMemberCount(bytes32 role) public view override returns (uint256) {
return _storageRoleMembers()[role].length();
}
/**
* @dev Overload {_grantRole} to track enumerable memberships
*/
function _grantRole(bytes32 role, address account) internal virtual override {
super._grantRole(role, account);
_storageRoleMembers()[role].add(account);
}
/**
* @dev Overload {_revokeRole} to track enumerable memberships
*/
function _revokeRole(bytes32 role, address account) internal virtual override {
super._revokeRole(role, account);
_storageRoleMembers()[role].remove(account);
}
}// SPDX-FileCopyrightText: 2022 Lido <[email protected]> // SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.9; import "../lib/UnstructuredStorage.sol"; contract Versioned { using UnstructuredStorage for bytes32; event ContractVersionSet(uint256 version); error NonZeroContractVersionOnInit(); error InvalidContractVersionIncrement(); error UnexpectedContractVersion(uint256 expected, uint256 received); /// @dev Storage slot: uint256 version /// Version of the initialized contract storage. /// The version stored in CONTRACT_VERSION_POSITION equals to: /// - 0 right after the deployment, before an initializer is invoked (and only at that moment); /// - N after calling initialize(), where N is the initially deployed contract version; /// - N after upgrading contract by calling finalizeUpgrade_vN(). bytes32 internal constant CONTRACT_VERSION_POSITION = keccak256("lido.Versioned.contractVersion"); uint256 internal constant PETRIFIED_VERSION_MARK = type(uint256).max; constructor() { // lock version in the implementation's storage to prevent initialization CONTRACT_VERSION_POSITION.setStorageUint256(PETRIFIED_VERSION_MARK); } /// @notice Returns the current contract version. function getContractVersion() public view returns (uint256) { return CONTRACT_VERSION_POSITION.getStorageUint256(); } function _checkContractVersion(uint256 version) internal view { uint256 expectedVersion = getContractVersion(); if (version != expectedVersion) { revert UnexpectedContractVersion(expectedVersion, version); } } /// @dev Sets the contract version to N. Should be called from the initialize() function. function _initializeContractVersionTo(uint256 version) internal { if (getContractVersion() != 0) revert NonZeroContractVersionOnInit(); _setContractVersion(version); } /// @dev Updates the contract version. Should be called from a finalizeUpgrade_vN() function. function _updateContractVersion(uint256 newVersion) internal { if (newVersion != getContractVersion() + 1) revert InvalidContractVersionIncrement(); _setContractVersion(newVersion); } function _setContractVersion(uint256 version) private { CONTRACT_VERSION_POSITION.setStorageUint256(version); emit ContractVersionSet(version); } }
// SPDX-FileCopyrightText: 2023 Lido <[email protected]> // SPDX-License-Identifier: GPL-3.0 // See contracts/COMPILERS.md // solhint-disable-next-line pragma solidity >=0.4.24 <0.9.0; interface IBurner { function REQUEST_BURN_MY_STETH_ROLE() external view returns (bytes32); function REQUEST_BURN_SHARES_ROLE() external view returns (bytes32); /** * Commit cover/non-cover burning requests and logs cover/non-cover shares amount just burnt. * * NB: The real burn enactment to be invoked after the call (via internal Lido._burnShares()) */ function commitSharesToBurn(uint256 _stETHSharesToBurn) external; /** * Request burn shares */ function requestBurnShares(address _from, uint256 _sharesAmount) external; function requestBurnMyShares(uint256 _sharesAmountToBurn) external; /** * Returns the current amount of shares locked on the contract to be burnt. */ function getSharesRequestedToBurn() external view returns (uint256 coverShares, uint256 nonCoverShares); /** * Returns the total cover shares ever burnt. */ function getCoverSharesBurnt() external view returns (uint256); /** * Returns the total non-cover shares ever burnt. */ function getNonCoverSharesBurnt() external view returns (uint256); }
// SPDX-FileCopyrightText: 2025 Lido <[email protected]> // SPDX-License-Identifier: GPL-3.0 // See contracts/COMPILERS.md // solhint-disable-next-line lido/fixed-compiler-version pragma solidity >=0.4.24 <0.9.0; interface ILidoLocator { function accountingOracle() external view returns(address); function depositSecurityModule() external view returns(address); function elRewardsVault() external view returns(address); function lido() external view returns(address); function oracleReportSanityChecker() external view returns(address); function burner() external view returns(address); function stakingRouter() external view returns(address); function treasury() external view returns(address); function validatorsExitBusOracle() external view returns(address); function withdrawalQueue() external view returns(address); function withdrawalVault() external view returns(address); function postTokenRebaseReceiver() external view returns(address); function oracleDaemonConfig() external view returns(address); function validatorExitDelayVerifier() external view returns (address); function triggerableWithdrawalsGateway() external view returns (address); function accounting() external view returns (address); function predepositGuarantee() external view returns (address); function wstETH() external view returns (address); function vaultHub() external view returns (address); function vaultFactory() external view returns (address); function lazyOracle() external view returns (address); function operatorGrid() external view returns (address); /// @notice Returns core Lido protocol component addresses in a single call /// @dev This function provides a gas-efficient way to fetch multiple component addresses in a single call function coreComponents() external view returns( address elRewardsVault, address oracleReportSanityChecker, address stakingRouter, address treasury, address withdrawalQueue, address withdrawalVault ); /// @notice Returns addresses of components involved in processing oracle reports in the Lido contract /// @dev This function provides a gas-efficient way to fetch multiple component addresses in a single call function oracleReportComponents() external view returns( address accountingOracle, address oracleReportSanityChecker, address burner, address withdrawalQueue, address postTokenRebaseReceiver, address stakingRouter, address vaultHub ); }
{
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "istanbul",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract ABI
API[{"inputs":[{"internalType":"address","name":"_locator","type":"address"},{"internalType":"address","name":"_stETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AppAuthFailed","type":"error"},{"inputs":[{"internalType":"uint256","name":"requestedAmount","type":"uint256"},{"internalType":"uint256","name":"actualAmount","type":"uint256"}],"name":"BurnAmountExceedsActual","type":"error"},{"inputs":[],"name":"DirectETHTransfer","type":"error"},{"inputs":[],"name":"InvalidContractVersionIncrement","type":"error"},{"inputs":[],"name":"MigrationNotAllowedOrAlreadyMigrated","type":"error"},{"inputs":[],"name":"NonZeroContractVersionOnInit","type":"error"},{"inputs":[],"name":"NotInitialized","type":"error"},{"inputs":[],"name":"OnlyLidoCanMigrate","type":"error"},{"inputs":[],"name":"StETHRecoveryWrongFunc","type":"error"},{"inputs":[{"internalType":"uint256","name":"expected","type":"uint256"},{"internalType":"uint256","name":"received","type":"uint256"}],"name":"UnexpectedContractVersion","type":"error"},{"inputs":[{"internalType":"string","name":"field","type":"string"}],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"ZeroBurnAmount","type":"error"},{"inputs":[],"name":"ZeroRecoveryAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"version","type":"uint256"}],"name":"ContractVersionSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"requestedBy","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"requestedBy","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"requestedBy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOfStETH","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOfShares","type":"uint256"}],"name":"ExcessStETHRecovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bool","name":"isCover","type":"bool"},{"indexed":true,"internalType":"address","name":"requestedBy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOfStETH","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOfShares","type":"uint256"}],"name":"StETHBurnRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bool","name":"isCover","type":"bool"},{"indexed":false,"internalType":"uint256","name":"amountOfStETH","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOfShares","type":"uint256"}],"name":"StETHBurnt","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LIDO","outputs":[{"internalType":"contract ILido","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCATOR","outputs":[{"internalType":"contract ILidoLocator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REQUEST_BURN_MY_STETH_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REQUEST_BURN_SHARES_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sharesToBurn","type":"uint256"}],"name":"commitSharesToBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getContractVersion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCoverSharesBurnt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getExcessStETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNonCoverSharesBurnt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSharesRequestedToBurn","outputs":[{"internalType":"uint256","name":"coverShares","type":"uint256"},{"internalType":"uint256","name":"nonCoverShares","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"},{"internalType":"bool","name":"_isMigrationAllowed","type":"bool"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isMigrationAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oldBurner","type":"address"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"recoverERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"recoverExcessStETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sharesAmountToBurn","type":"uint256"}],"name":"requestBurnMyShares","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stETHAmountToBurn","type":"uint256"}],"name":"requestBurnMyStETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stETHAmountToBurn","type":"uint256"}],"name":"requestBurnMyStETHForCover","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_sharesAmountToBurn","type":"uint256"}],"name":"requestBurnShares","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_sharesAmountToBurn","type":"uint256"}],"name":"requestBurnSharesForCover","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60c06040523480156200001157600080fd5b5060405162002b3838038062002b38833981016040819052620000349162000133565b620000706000197f4dd0f6662ba1d6b081f08b350f5e9a6a7b15cf586926ba66f753594928fa64a66200011260201b62001a5a1790919060201c565b6001600160a01b038216620000b85760405163eac0d38960e01b81526020600482015260086024820152672fb637b1b0ba37b960c11b60448201526064015b60405180910390fd5b6001600160a01b038116620000fa5760405163eac0d38960e01b81526020600482015260066024820152650bee6e88aa8960d31b6044820152606401620000af565b6001600160a01b039182166080521660a0526200016b565b9055565b80516001600160a01b03811681146200012e57600080fd5b919050565b600080604083850312156200014757600080fd5b620001528362000116565b9150620001626020840162000116565b90509250929050565b60805160a05161291462000224600039600081816104ce015281816106fe015281816107c001528181610a4101528181610b2501528181610bee01528181610c9301528181610ea101528181610fe8015281816110e80152818161116501528181611320015281816113d9015281816115ce0152818161185201528181611925015281816119ca0152611d4d015260008181610399015281816107ef01528181610d25015281816111c8015261142f01526129146000f3fe6080604052600436106101d15760003560e01c806385d0e5de116100f7578063b4c5075c11610095578063d03601f011610064578063d03601f0146105db578063d547741f1461060f578063ed694dfe1461062f578063ef5d201d1461064457600080fd5b8063b4c5075c14610545578063ca15c87314610567578063cdf1c38c14610587578063ce5494bb146105bb57600080fd5b80638b21f170116100d15780638b21f170146104bc5780639010d07c146104f057806391d1485414610510578063a217fddf1461053057600080fd5b806385d0e5de146104675780638980f11f146104875780638aa10435146104a757600080fd5b8063400ada751161016f5780635d0162681161013e5780635d016268146103d3578063636e6b66146103f35780637763bca614610413578063819d4cc61461044757600080fd5b8063400ada75146103275780634611492814610347578063512374511461036757806357a782891461038757600080fd5b80632f2ff15d116101ab5780632f2ff15d146102ab57806332b976f3146102cd57806336568abe146102e25780633a25823e1461030257600080fd5b806301ffc9a7146101f4578063248a9ca3146102295780632a369d1a1461025757600080fd5b366101ef576040516309fb455960e41b815260040160405180910390fd5b600080fd5b34801561020057600080fd5b5061021461020f3660046124b1565b610664565b60405190151581526020015b60405180910390f35b34801561023557600080fd5b506102496102443660046124db565b61068f565b604051908152602001610220565b34801561026357600080fd5b5060008051602061283f833981519152547ff01bebc885dbdcd6f86dfe57676112e525cafe0421724bf6b4a9ab1ee741de015460408051928352602083019190915201610220565b3480156102b757600080fd5b506102cb6102c6366004612509565b6106b1565b005b3480156102d957600080fd5b506102cb6106d3565b3480156102ee57600080fd5b506102cb6102fd366004612509565b610901565b34801561030e57600080fd5b5060008051602061285f8339815191525460ff16610214565b34801561033357600080fd5b506102cb610342366004612547565b610984565b34801561035357600080fd5b506102cb610362366004612575565b6109fc565b34801561037357600080fd5b506102cb610382366004612575565b610ae0565b34801561039357600080fd5b506103bb7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610220565b3480156103df57600080fd5b506102cb6103ee3660046124db565b610bbe565b3480156103ff57600080fd5b506102cb61040e3660046124db565b610d23565b34801561041f57600080fd5b507ff01bebc885dbdcd6f86dfe57676112e525cafe0421724bf6b4a9ab1ee741de0354610249565b34801561045357600080fd5b506102cb610462366004612575565b611163565b34801561047357600080fd5b506102cb6104823660046124db565b6112ed565b34801561049357600080fd5b506102cb6104a2366004612575565b6113b9565b3480156104b357600080fd5b5061024961150c565b3480156104c857600080fd5b506103bb7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104fc57600080fd5b506103bb61050b3660046125a1565b61153b565b34801561051c57600080fd5b5061021461052b366004612509565b611567565b34801561053c57600080fd5b50610249600081565b34801561055157600080fd5b506102496000805160206128bf83398151915281565b34801561057357600080fd5b506102496105823660046124db565b61159f565b34801561059357600080fd5b506102497f4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba881565b3480156105c757600080fd5b506102cb6105d63660046125c3565b6115c3565b3480156105e757600080fd5b507ff01bebc885dbdcd6f86dfe57676112e525cafe0421724bf6b4a9ab1ee741de0254610249565b34801561061b57600080fd5b506102cb61062a366004612509565b611831565b34801561063b57600080fd5b5061024961184e565b34801561065057600080fd5b506102cb61065f3660046124db565b6118f5565b60006001600160e01b03198216635a05180f60e01b1480610689575061068982611a5e565b92915050565b600090815260008051602061289f833981519152602052604090206001015490565b6106ba8261068f565b6106c48133611a93565b6106ce8383611af7565b505050565b60006106dd61184e565b905080156108fe57604051631920845160e01b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063192084519060240160206040518083038186803b15801561074857600080fd5b505afa15801561075c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078091906125e0565b604080518481526020810183905291925033917fea28a36ccbf8c2eba827a529927f2e445c651d9a04a393ea79d71ea29c508483910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166361d027b36040518163ffffffff1660e01b815260040160206040518083038186803b15801561084657600080fd5b505afa15801561085a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087e91906125f9565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101859052604401602060405180830381600087803b1580156108c657600080fd5b505af11580156108da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190612616565b50565b6001600160a01b03811633146109765760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6109808282611b26565b5050565b6001600160a01b0382166109c45760405163eac0d38960e01b81526020600482015260066024820152652fb0b236b4b760d11b604482015260640161096d565b6109ce6001611b55565b6109d9600083611af7565b8060008051602061285f833981519152805460ff19169115159190911790555050565b7f4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8610a278133611a93565b604051636d78045960e01b81526000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636d78045990610a7a90879030908890600401612633565b602060405180830381600087803b158015610a9457600080fd5b505af1158015610aa8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acc91906125e0565b9050610ada83826000611b84565b50505050565b7f4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8610b0b8133611a93565b604051636d78045960e01b81526000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636d78045990610b5e90879030908890600401612633565b602060405180830381600087803b158015610b7857600080fd5b505af1158015610b8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb091906125e0565b9050610ada83826001611b84565b6000805160206128bf833981519152610bd78133611a93565b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90610c2790339030908790600401612633565b602060405180830381600087803b158015610c4157600080fd5b505af1158015610c55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c799190612616565b50604051631920845160e01b8152600481018390526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063192084519060240160206040518083038186803b158015610cdd57600080fd5b505afa158015610cf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1591906125e0565b90506106ce81846000611b84565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639624e83e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d7c57600080fd5b505afa158015610d90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db491906125f9565b6001600160a01b0316336001600160a01b031614610de55760405163b83aef0b60e01b815260040160405180910390fd5b80610ded5750565b60008051602061283f83398151915280547ff01bebc885dbdcd6f86dfe57676112e525cafe0421724bf6b4a9ab1ee741de01546000610e2c828461266d565b905080851115610e595760405163feedbf2b60e01b8152600481018690526024810182905260440161096d565b60008315610f8b576000610e6d8786611c34565b905080866002016000828254610e83919061266d565b9091555050604051630f451f7160e31b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690637a28fb889060240160206040518083038186803b158015610eeb57600080fd5b505afa158015610eff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2391906125e0565b60408051828152602081018590529192506001917f8959e4c88e5192ecbc28d08be97f24786bf591eb1d1848ce23e17e1b2271e863910160405180910390a281876000016000828254610f769190612685565b90915550610f869050828461266d565b925050505b600083118015610f9a57508581105b156110d2576000610fb4610fae8389612685565b85611c34565b905080866003016000828254610fca919061266d565b9091555050604051630f451f7160e31b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690637a28fb889060240160206040518083038186803b15801561103257600080fd5b505afa158015611046573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106a91906125e0565b60408051828152602081018590529192506000917f8959e4c88e5192ecbc28d08be97f24786bf591eb1d1848ce23e17e1b2271e863910160405180910390a2818760010160008282546110bd9190612685565b909155506110cd9050828461266d565b925050505b60405163853c637d60e01b8152600481018790527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063853c637d90602401600060405180830381600087803b15801561113457600080fd5b505af1158015611148573d6000803e3d6000fd5b5050505085811461115b5761115b61269c565b505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156111b6576040516314bf019b60e31b815260040160405180910390fd5b816001600160a01b03166323b872dd307f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166361d027b36040518163ffffffff1660e01b815260040160206040518083038186803b15801561121f57600080fd5b505afa158015611233573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125791906125f9565b846040518463ffffffff1660e01b815260040161127693929190612633565b600060405180830381600087803b15801561129057600080fd5b505af11580156112a4573d6000803e3d6000fd5b50506040518381526001600160a01b03851692503391507f6a30e6784464f0d1f4158aa4cb65ae9239b0fa87c7f2c083ee6dde44ba97b5e6906020015b60405180910390a35050565b6000805160206128bf8339815191526113068133611a93565b604051636d78045960e01b81526000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636d7804599061135990339030908890600401612633565b602060405180830381600087803b15801561137357600080fd5b505af1158015611387573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ab91906125e0565b90506106ce83826000611b84565b806113d7576040516313a3092d60e31b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561142a576040516314bf019b60e31b815260040160405180910390fd5b6114cf7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166361d027b36040518163ffffffff1660e01b815260040160206040518083038186803b15801561148657600080fd5b505afa15801561149a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114be91906125f9565b6001600160a01b0384169083611c4a565b6040518181526001600160a01b0383169033907faca8fb252cde442184e5f10e0f2e6e4029e8cd7717cae63559079610702436aa906020016112e1565b60006115367f4dd0f6662ba1d6b081f08b350f5e9a6a7b15cf586926ba66f753594928fa64a65490565b905090565b600082815260008051602061287f833981519152602052604081206115609083611c9c565b9392505050565b600091825260008051602061289f833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600081815260008051602061287f8339815191526020526040812061068990611ca8565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461160c57604051630375042760e51b815260040160405180910390fd5b6001600160a01b0381166116505760405163eac0d38960e01b815260206004820152600a6024820152692fb7b632213ab93732b960b11b604482015260640161096d565b61165a6001611cb2565b60008051602061285f8339815191525460ff1661168a57604051630cd90b8d60e41b815260040160405180910390fd5b60008051602061285f833981519152805460ff1916905560408051630d03601f60e41b81529051829160008051602061283f833981519152916001600160a01b0384169163d03601f0916004808301926020929190829003018186803b1580156116f357600080fd5b505afa158015611707573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061172b91906125e0565b8160020181905550816001600160a01b0316637763bca66040518163ffffffff1660e01b815260040160206040518083038186803b15801561176c57600080fd5b505afa158015611780573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a491906125e0565b8160030181905550600080836001600160a01b0316632a369d1a6040518163ffffffff1660e01b8152600401604080518083038186803b1580156117e757600080fd5b505afa1580156117fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061181f91906126b2565b90845560019093019290925550505050565b61183a8261068f565b6118448133611a93565b6106ce8383611b26565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637a28fb88611887611ce8565b6040518263ffffffff1660e01b81526004016118a591815260200190565b60206040518083038186803b1580156118bd57600080fd5b505afa1580156118d1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061153691906125e0565b6000805160206128bf83398151915261190e8133611a93565b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd9061195e90339030908790600401612633565b602060405180830381600087803b15801561197857600080fd5b505af115801561198c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b09190612616565b50604051631920845160e01b8152600481018390526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063192084519060240160206040518083038186803b158015611a1457600080fd5b505afa158015611a28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a4c91906125e0565b90506106ce81846001611b84565b9055565b60006001600160e01b03198216637965db0b60e01b148061068957506301ffc9a760e01b6001600160e01b0319831614610689565b611a9d8282611567565b61098057611ab5816001600160a01b03166014611dec565b611ac0836020611dec565b604051602001611ad1929190612702565b60408051601f198184030181529082905262461bcd60e51b825261096d91600401612777565b611b018282611f88565b600082815260008051602061287f833981519152602052604090206106ce9082611ffe565b611b308282612013565b600082815260008051602061287f833981519152602052604090206106ce9082612087565b611b5d61150c565b15611b7b5760405163184e52a160e21b815260040160405180910390fd5b6108fe8161209c565b82611ba2576040516325ee753160e21b815260040160405180910390fd5b60408051838152602081018590523391831515917fd2282bfa24f3803076af0953f1ed987d0e45edacdc20d6dce52337b1c4588cdb910160405180910390a360008051602061283f8339815191528115611c155783816000016000828254611c0a919061266d565b90915550610ada9050565b83816001016000828254611c29919061266d565b909155505050505050565b6000818310611c435781611560565b5090919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526106ce9084906120fb565b600061156083836121cd565b6000610689825490565b6000611cbc61150c565b9050808214610980576040516303abe78360e21b8152600481018290526024810183905260440161096d565b7ff01bebc885dbdcd6f86dfe57676112e525cafe0421724bf6b4a9ab1ee741de015460008051602061283f83398151915280546000928391611d2a919061266d565b604051633d7ad0b760e21b81523060048201529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f5eb42dc9060240160206040518083038186803b158015611d8f57600080fd5b505afa158015611da3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc791906125e0565b9050818111611dda576000935050505090565b611de48282612685565b935050505090565b60606000611dfb8360026127aa565b611e0690600261266d565b67ffffffffffffffff811115611e1e57611e1e6127c9565b6040519080825280601f01601f191660200182016040528015611e48576020820181803683370190505b509050600360fc1b81600081518110611e6357611e636127df565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611e9257611e926127df565b60200101906001600160f81b031916908160001a9053506000611eb68460026127aa565b611ec190600161266d565b90505b6001811115611f39576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611ef557611ef56127df565b1a60f81b828281518110611f0b57611f0b6127df565b60200101906001600160f81b031916908160001a90535060049490941c93611f32816127f5565b9050611ec4565b5083156115605760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161096d565b611f928282611567565b61098057600082815260008051602061289f833981519152602090815260408083206001600160a01b0385168085529252808320805460ff1916600117905551339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6000611560836001600160a01b0384166121f7565b61201d8282611567565b1561098057600082815260008051602061289f833981519152602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611560836001600160a01b038416612246565b6120c57f4dd0f6662ba1d6b081f08b350f5e9a6a7b15cf586926ba66f753594928fa64a6829055565b6040518181527ffddcded6b4f4730c226821172046b48372d3cd963c159701ae1b7c3bcac541bb9060200160405180910390a150565b6000612150826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166123399092919063ffffffff16565b8051909150156106ce578080602001905181019061216e9190612616565b6106ce5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161096d565b60008260000182815481106121e4576121e46127df565b9060005260206000200154905092915050565b600081815260018301602052604081205461223e57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610689565b506000610689565b6000818152600183016020526040812054801561232f57600061226a600183612685565b855490915060009061227e90600190612685565b90508181146122e357600086600001828154811061229e5761229e6127df565b90600052602060002001549050808760000184815481106122c1576122c16127df565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806122f4576122f461280c565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610689565b6000915050610689565b60606123488484600085612350565b949350505050565b6060824710156123b15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161096d565b843b6123ff5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161096d565b600080866001600160a01b0316858760405161241b9190612822565b60006040518083038185875af1925050503d8060008114612458576040519150601f19603f3d011682016040523d82523d6000602084013e61245d565b606091505b509150915061246d828286612478565b979650505050505050565b60608315612487575081611560565b8251156124975782518084602001fd5b8160405162461bcd60e51b815260040161096d9190612777565b6000602082840312156124c357600080fd5b81356001600160e01b03198116811461156057600080fd5b6000602082840312156124ed57600080fd5b5035919050565b6001600160a01b03811681146108fe57600080fd5b6000806040838503121561251c57600080fd5b82359150602083013561252e816124f4565b809150509250929050565b80151581146108fe57600080fd5b6000806040838503121561255a57600080fd5b8235612565816124f4565b9150602083013561252e81612539565b6000806040838503121561258857600080fd5b8235612593816124f4565b946020939093013593505050565b600080604083850312156125b457600080fd5b50508035926020909101359150565b6000602082840312156125d557600080fd5b8135611560816124f4565b6000602082840312156125f257600080fd5b5051919050565b60006020828403121561260b57600080fd5b8151611560816124f4565b60006020828403121561262857600080fd5b815161156081612539565b6001600160a01b039384168152919092166020820152604081019190915260600190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561268057612680612657565b500190565b60008282101561269757612697612657565b500390565b634e487b7160e01b600052600160045260246000fd5b600080604083850312156126c557600080fd5b505080516020909101519092909150565b60005b838110156126f15781810151838201526020016126d9565b83811115610ada5750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161273a8160178501602088016126d6565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161276b8160288401602088016126d6565b01602801949350505050565b60208152600082518060208401526127968160408501602087016126d6565b601f01601f19169190910160400192915050565b60008160001904831182151516156127c4576127c4612657565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008161280457612804612657565b506000190190565b634e487b7160e01b600052603160045260246000fd5b600082516128348184602087016126d6565b919091019291505056fef01bebc885dbdcd6f86dfe57676112e525cafe0421724bf6b4a9ab1ee741de00e26691b9ae4d2ff5628fc98afc2ccacdd3dd28e1ab2df809eb32ad4af28458008f8c450dae5029cd48cd91dd9db65da48fb742893edfc7941250f6721d93cbbe9a627a5d4aa7c17f87ff26e3fe9a42c2b6c559e8b41a42282d0ecebb17c0e4d328186f938b759084eea36948ef1cd8b40ec8790a98d5f1a09b70879fe054e5cca2646970667358221220fe282041493f89c1e339b5075a9be7acf79c24cde3118497391f5d9bac42201764736f6c63430008090033000000000000000000000000d7c1b80fa86965b48cca3adccb08e1daea2919800000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba1
Deployed Bytecode
0x6080604052600436106101d15760003560e01c806385d0e5de116100f7578063b4c5075c11610095578063d03601f011610064578063d03601f0146105db578063d547741f1461060f578063ed694dfe1461062f578063ef5d201d1461064457600080fd5b8063b4c5075c14610545578063ca15c87314610567578063cdf1c38c14610587578063ce5494bb146105bb57600080fd5b80638b21f170116100d15780638b21f170146104bc5780639010d07c146104f057806391d1485414610510578063a217fddf1461053057600080fd5b806385d0e5de146104675780638980f11f146104875780638aa10435146104a757600080fd5b8063400ada751161016f5780635d0162681161013e5780635d016268146103d3578063636e6b66146103f35780637763bca614610413578063819d4cc61461044757600080fd5b8063400ada75146103275780634611492814610347578063512374511461036757806357a782891461038757600080fd5b80632f2ff15d116101ab5780632f2ff15d146102ab57806332b976f3146102cd57806336568abe146102e25780633a25823e1461030257600080fd5b806301ffc9a7146101f4578063248a9ca3146102295780632a369d1a1461025757600080fd5b366101ef576040516309fb455960e41b815260040160405180910390fd5b600080fd5b34801561020057600080fd5b5061021461020f3660046124b1565b610664565b60405190151581526020015b60405180910390f35b34801561023557600080fd5b506102496102443660046124db565b61068f565b604051908152602001610220565b34801561026357600080fd5b5060008051602061283f833981519152547ff01bebc885dbdcd6f86dfe57676112e525cafe0421724bf6b4a9ab1ee741de015460408051928352602083019190915201610220565b3480156102b757600080fd5b506102cb6102c6366004612509565b6106b1565b005b3480156102d957600080fd5b506102cb6106d3565b3480156102ee57600080fd5b506102cb6102fd366004612509565b610901565b34801561030e57600080fd5b5060008051602061285f8339815191525460ff16610214565b34801561033357600080fd5b506102cb610342366004612547565b610984565b34801561035357600080fd5b506102cb610362366004612575565b6109fc565b34801561037357600080fd5b506102cb610382366004612575565b610ae0565b34801561039357600080fd5b506103bb7f000000000000000000000000d7c1b80fa86965b48cca3adccb08e1daea29198081565b6040516001600160a01b039091168152602001610220565b3480156103df57600080fd5b506102cb6103ee3660046124db565b610bbe565b3480156103ff57600080fd5b506102cb61040e3660046124db565b610d23565b34801561041f57600080fd5b507ff01bebc885dbdcd6f86dfe57676112e525cafe0421724bf6b4a9ab1ee741de0354610249565b34801561045357600080fd5b506102cb610462366004612575565b611163565b34801561047357600080fd5b506102cb6104823660046124db565b6112ed565b34801561049357600080fd5b506102cb6104a2366004612575565b6113b9565b3480156104b357600080fd5b5061024961150c565b3480156104c857600080fd5b506103bb7f0000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba181565b3480156104fc57600080fd5b506103bb61050b3660046125a1565b61153b565b34801561051c57600080fd5b5061021461052b366004612509565b611567565b34801561053c57600080fd5b50610249600081565b34801561055157600080fd5b506102496000805160206128bf83398151915281565b34801561057357600080fd5b506102496105823660046124db565b61159f565b34801561059357600080fd5b506102497f4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba881565b3480156105c757600080fd5b506102cb6105d63660046125c3565b6115c3565b3480156105e757600080fd5b507ff01bebc885dbdcd6f86dfe57676112e525cafe0421724bf6b4a9ab1ee741de0254610249565b34801561061b57600080fd5b506102cb61062a366004612509565b611831565b34801561063b57600080fd5b5061024961184e565b34801561065057600080fd5b506102cb61065f3660046124db565b6118f5565b60006001600160e01b03198216635a05180f60e01b1480610689575061068982611a5e565b92915050565b600090815260008051602061289f833981519152602052604090206001015490565b6106ba8261068f565b6106c48133611a93565b6106ce8383611af7565b505050565b60006106dd61184e565b905080156108fe57604051631920845160e01b8152600481018290526000907f0000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba16001600160a01b03169063192084519060240160206040518083038186803b15801561074857600080fd5b505afa15801561075c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078091906125e0565b604080518481526020810183905291925033917fea28a36ccbf8c2eba827a529927f2e445c651d9a04a393ea79d71ea29c508483910160405180910390a27f0000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba16001600160a01b031663a9059cbb7f000000000000000000000000d7c1b80fa86965b48cca3adccb08e1daea2919806001600160a01b03166361d027b36040518163ffffffff1660e01b815260040160206040518083038186803b15801561084657600080fd5b505afa15801561085a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087e91906125f9565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101859052604401602060405180830381600087803b1580156108c657600080fd5b505af11580156108da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190612616565b50565b6001600160a01b03811633146109765760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6109808282611b26565b5050565b6001600160a01b0382166109c45760405163eac0d38960e01b81526020600482015260066024820152652fb0b236b4b760d11b604482015260640161096d565b6109ce6001611b55565b6109d9600083611af7565b8060008051602061285f833981519152805460ff19169115159190911790555050565b7f4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8610a278133611a93565b604051636d78045960e01b81526000906001600160a01b037f0000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba11690636d78045990610a7a90879030908890600401612633565b602060405180830381600087803b158015610a9457600080fd5b505af1158015610aa8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acc91906125e0565b9050610ada83826000611b84565b50505050565b7f4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8610b0b8133611a93565b604051636d78045960e01b81526000906001600160a01b037f0000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba11690636d78045990610b5e90879030908890600401612633565b602060405180830381600087803b158015610b7857600080fd5b505af1158015610b8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb091906125e0565b9050610ada83826001611b84565b6000805160206128bf833981519152610bd78133611a93565b6040516323b872dd60e01b81526001600160a01b037f0000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba116906323b872dd90610c2790339030908790600401612633565b602060405180830381600087803b158015610c4157600080fd5b505af1158015610c55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c799190612616565b50604051631920845160e01b8152600481018390526000907f0000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba16001600160a01b03169063192084519060240160206040518083038186803b158015610cdd57600080fd5b505afa158015610cf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1591906125e0565b90506106ce81846000611b84565b7f000000000000000000000000d7c1b80fa86965b48cca3adccb08e1daea2919806001600160a01b0316639624e83e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d7c57600080fd5b505afa158015610d90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db491906125f9565b6001600160a01b0316336001600160a01b031614610de55760405163b83aef0b60e01b815260040160405180910390fd5b80610ded5750565b60008051602061283f83398151915280547ff01bebc885dbdcd6f86dfe57676112e525cafe0421724bf6b4a9ab1ee741de01546000610e2c828461266d565b905080851115610e595760405163feedbf2b60e01b8152600481018690526024810182905260440161096d565b60008315610f8b576000610e6d8786611c34565b905080866002016000828254610e83919061266d565b9091555050604051630f451f7160e31b8152600481018290526000907f0000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba16001600160a01b031690637a28fb889060240160206040518083038186803b158015610eeb57600080fd5b505afa158015610eff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2391906125e0565b60408051828152602081018590529192506001917f8959e4c88e5192ecbc28d08be97f24786bf591eb1d1848ce23e17e1b2271e863910160405180910390a281876000016000828254610f769190612685565b90915550610f869050828461266d565b925050505b600083118015610f9a57508581105b156110d2576000610fb4610fae8389612685565b85611c34565b905080866003016000828254610fca919061266d565b9091555050604051630f451f7160e31b8152600481018290526000907f0000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba16001600160a01b031690637a28fb889060240160206040518083038186803b15801561103257600080fd5b505afa158015611046573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106a91906125e0565b60408051828152602081018590529192506000917f8959e4c88e5192ecbc28d08be97f24786bf591eb1d1848ce23e17e1b2271e863910160405180910390a2818760010160008282546110bd9190612685565b909155506110cd9050828461266d565b925050505b60405163853c637d60e01b8152600481018790527f0000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba16001600160a01b03169063853c637d90602401600060405180830381600087803b15801561113457600080fd5b505af1158015611148573d6000803e3d6000fd5b5050505085811461115b5761115b61269c565b505050505050565b7f0000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba16001600160a01b0316826001600160a01b031614156111b6576040516314bf019b60e31b815260040160405180910390fd5b816001600160a01b03166323b872dd307f000000000000000000000000d7c1b80fa86965b48cca3adccb08e1daea2919806001600160a01b03166361d027b36040518163ffffffff1660e01b815260040160206040518083038186803b15801561121f57600080fd5b505afa158015611233573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125791906125f9565b846040518463ffffffff1660e01b815260040161127693929190612633565b600060405180830381600087803b15801561129057600080fd5b505af11580156112a4573d6000803e3d6000fd5b50506040518381526001600160a01b03851692503391507f6a30e6784464f0d1f4158aa4cb65ae9239b0fa87c7f2c083ee6dde44ba97b5e6906020015b60405180910390a35050565b6000805160206128bf8339815191526113068133611a93565b604051636d78045960e01b81526000906001600160a01b037f0000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba11690636d7804599061135990339030908890600401612633565b602060405180830381600087803b15801561137357600080fd5b505af1158015611387573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ab91906125e0565b90506106ce83826000611b84565b806113d7576040516313a3092d60e31b815260040160405180910390fd5b7f0000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba16001600160a01b0316826001600160a01b0316141561142a576040516314bf019b60e31b815260040160405180910390fd5b6114cf7f000000000000000000000000d7c1b80fa86965b48cca3adccb08e1daea2919806001600160a01b03166361d027b36040518163ffffffff1660e01b815260040160206040518083038186803b15801561148657600080fd5b505afa15801561149a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114be91906125f9565b6001600160a01b0384169083611c4a565b6040518181526001600160a01b0383169033907faca8fb252cde442184e5f10e0f2e6e4029e8cd7717cae63559079610702436aa906020016112e1565b60006115367f4dd0f6662ba1d6b081f08b350f5e9a6a7b15cf586926ba66f753594928fa64a65490565b905090565b600082815260008051602061287f833981519152602052604081206115609083611c9c565b9392505050565b600091825260008051602061289f833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600081815260008051602061287f8339815191526020526040812061068990611ca8565b336001600160a01b037f0000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba1161461160c57604051630375042760e51b815260040160405180910390fd5b6001600160a01b0381166116505760405163eac0d38960e01b815260206004820152600a6024820152692fb7b632213ab93732b960b11b604482015260640161096d565b61165a6001611cb2565b60008051602061285f8339815191525460ff1661168a57604051630cd90b8d60e41b815260040160405180910390fd5b60008051602061285f833981519152805460ff1916905560408051630d03601f60e41b81529051829160008051602061283f833981519152916001600160a01b0384169163d03601f0916004808301926020929190829003018186803b1580156116f357600080fd5b505afa158015611707573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061172b91906125e0565b8160020181905550816001600160a01b0316637763bca66040518163ffffffff1660e01b815260040160206040518083038186803b15801561176c57600080fd5b505afa158015611780573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a491906125e0565b8160030181905550600080836001600160a01b0316632a369d1a6040518163ffffffff1660e01b8152600401604080518083038186803b1580156117e757600080fd5b505afa1580156117fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061181f91906126b2565b90845560019093019290925550505050565b61183a8261068f565b6118448133611a93565b6106ce8383611b26565b60007f0000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba16001600160a01b0316637a28fb88611887611ce8565b6040518263ffffffff1660e01b81526004016118a591815260200190565b60206040518083038186803b1580156118bd57600080fd5b505afa1580156118d1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061153691906125e0565b6000805160206128bf83398151915261190e8133611a93565b6040516323b872dd60e01b81526001600160a01b037f0000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba116906323b872dd9061195e90339030908790600401612633565b602060405180830381600087803b15801561197857600080fd5b505af115801561198c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b09190612616565b50604051631920845160e01b8152600481018390526000907f0000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba16001600160a01b03169063192084519060240160206040518083038186803b158015611a1457600080fd5b505afa158015611a28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a4c91906125e0565b90506106ce81846001611b84565b9055565b60006001600160e01b03198216637965db0b60e01b148061068957506301ffc9a760e01b6001600160e01b0319831614610689565b611a9d8282611567565b61098057611ab5816001600160a01b03166014611dec565b611ac0836020611dec565b604051602001611ad1929190612702565b60408051601f198184030181529082905262461bcd60e51b825261096d91600401612777565b611b018282611f88565b600082815260008051602061287f833981519152602052604090206106ce9082611ffe565b611b308282612013565b600082815260008051602061287f833981519152602052604090206106ce9082612087565b611b5d61150c565b15611b7b5760405163184e52a160e21b815260040160405180910390fd5b6108fe8161209c565b82611ba2576040516325ee753160e21b815260040160405180910390fd5b60408051838152602081018590523391831515917fd2282bfa24f3803076af0953f1ed987d0e45edacdc20d6dce52337b1c4588cdb910160405180910390a360008051602061283f8339815191528115611c155783816000016000828254611c0a919061266d565b90915550610ada9050565b83816001016000828254611c29919061266d565b909155505050505050565b6000818310611c435781611560565b5090919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526106ce9084906120fb565b600061156083836121cd565b6000610689825490565b6000611cbc61150c565b9050808214610980576040516303abe78360e21b8152600481018290526024810183905260440161096d565b7ff01bebc885dbdcd6f86dfe57676112e525cafe0421724bf6b4a9ab1ee741de015460008051602061283f83398151915280546000928391611d2a919061266d565b604051633d7ad0b760e21b81523060048201529091506000906001600160a01b037f0000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba1169063f5eb42dc9060240160206040518083038186803b158015611d8f57600080fd5b505afa158015611da3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc791906125e0565b9050818111611dda576000935050505090565b611de48282612685565b935050505090565b60606000611dfb8360026127aa565b611e0690600261266d565b67ffffffffffffffff811115611e1e57611e1e6127c9565b6040519080825280601f01601f191660200182016040528015611e48576020820181803683370190505b509050600360fc1b81600081518110611e6357611e636127df565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611e9257611e926127df565b60200101906001600160f81b031916908160001a9053506000611eb68460026127aa565b611ec190600161266d565b90505b6001811115611f39576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611ef557611ef56127df565b1a60f81b828281518110611f0b57611f0b6127df565b60200101906001600160f81b031916908160001a90535060049490941c93611f32816127f5565b9050611ec4565b5083156115605760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161096d565b611f928282611567565b61098057600082815260008051602061289f833981519152602090815260408083206001600160a01b0385168085529252808320805460ff1916600117905551339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6000611560836001600160a01b0384166121f7565b61201d8282611567565b1561098057600082815260008051602061289f833981519152602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611560836001600160a01b038416612246565b6120c57f4dd0f6662ba1d6b081f08b350f5e9a6a7b15cf586926ba66f753594928fa64a6829055565b6040518181527ffddcded6b4f4730c226821172046b48372d3cd963c159701ae1b7c3bcac541bb9060200160405180910390a150565b6000612150826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166123399092919063ffffffff16565b8051909150156106ce578080602001905181019061216e9190612616565b6106ce5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161096d565b60008260000182815481106121e4576121e46127df565b9060005260206000200154905092915050565b600081815260018301602052604081205461223e57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610689565b506000610689565b6000818152600183016020526040812054801561232f57600061226a600183612685565b855490915060009061227e90600190612685565b90508181146122e357600086600001828154811061229e5761229e6127df565b90600052602060002001549050808760000184815481106122c1576122c16127df565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806122f4576122f461280c565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610689565b6000915050610689565b60606123488484600085612350565b949350505050565b6060824710156123b15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161096d565b843b6123ff5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161096d565b600080866001600160a01b0316858760405161241b9190612822565b60006040518083038185875af1925050503d8060008114612458576040519150601f19603f3d011682016040523d82523d6000602084013e61245d565b606091505b509150915061246d828286612478565b979650505050505050565b60608315612487575081611560565b8251156124975782518084602001fd5b8160405162461bcd60e51b815260040161096d9190612777565b6000602082840312156124c357600080fd5b81356001600160e01b03198116811461156057600080fd5b6000602082840312156124ed57600080fd5b5035919050565b6001600160a01b03811681146108fe57600080fd5b6000806040838503121561251c57600080fd5b82359150602083013561252e816124f4565b809150509250929050565b80151581146108fe57600080fd5b6000806040838503121561255a57600080fd5b8235612565816124f4565b9150602083013561252e81612539565b6000806040838503121561258857600080fd5b8235612593816124f4565b946020939093013593505050565b600080604083850312156125b457600080fd5b50508035926020909101359150565b6000602082840312156125d557600080fd5b8135611560816124f4565b6000602082840312156125f257600080fd5b5051919050565b60006020828403121561260b57600080fd5b8151611560816124f4565b60006020828403121561262857600080fd5b815161156081612539565b6001600160a01b039384168152919092166020820152604081019190915260600190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561268057612680612657565b500190565b60008282101561269757612697612657565b500390565b634e487b7160e01b600052600160045260246000fd5b600080604083850312156126c557600080fd5b505080516020909101519092909150565b60005b838110156126f15781810151838201526020016126d9565b83811115610ada5750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161273a8160178501602088016126d6565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161276b8160288401602088016126d6565b01602801949350505050565b60208152600082518060208401526127968160408501602087016126d6565b601f01601f19169190910160400192915050565b60008160001904831182151516156127c4576127c4612657565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008161280457612804612657565b506000190190565b634e487b7160e01b600052603160045260246000fd5b600082516128348184602087016126d6565b919091019291505056fef01bebc885dbdcd6f86dfe57676112e525cafe0421724bf6b4a9ab1ee741de00e26691b9ae4d2ff5628fc98afc2ccacdd3dd28e1ab2df809eb32ad4af28458008f8c450dae5029cd48cd91dd9db65da48fb742893edfc7941250f6721d93cbbe9a627a5d4aa7c17f87ff26e3fe9a42c2b6c559e8b41a42282d0ecebb17c0e4d328186f938b759084eea36948ef1cd8b40ec8790a98d5f1a09b70879fe054e5cca2646970667358221220fe282041493f89c1e339b5075a9be7acf79c24cde3118497391f5d9bac42201764736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d7c1b80fa86965b48cca3adccb08e1daea2919800000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba1
-----Decoded View---------------
Arg [0] : _locator (address): 0xD7c1B80fA86965B48cCA3aDcCB08E1DAEa291980
Arg [1] : _stETH (address): 0x2C220A2a91602dd93bEAC7b3A1773cdADE369ba1
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000d7c1b80fa86965b48cca3adccb08e1daea291980
Arg [1] : 0000000000000000000000002c220a2a91602dd93beac7b3a1773cdade369ba1
Loading...
Loading
Loading...
Loading
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.