Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 19419029 | 238 days ago | IN | 0 ETH | 0.24126615 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
SingleSidedReinsurancePool
Compiler Version
v0.8.23+commit.f704f362
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity =0.8.23; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; import "./interfaces/IMigration.sol"; import "./interfaces/IRiskPoolFactory.sol"; import "./interfaces/IRewarderFactory.sol"; import "./interfaces/ISingleSidedReinsurancePool.sol"; import "./interfaces/ISyntheticSSRPFactory.sol"; import "./interfaces/IRewarder.sol"; import "./interfaces/IRiskPool.sol"; import "./libraries/TransferHelper.sol"; contract SingleSidedReinsurancePool is ISingleSidedReinsurancePool, ReentrancyGuardUpgradeable, AccessControlUpgradeable, PausableUpgradeable { bytes32 public constant CLAIM_ASSESSOR_ROLE = keccak256("CLAIM_ASSESSOR_ROLE"); bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant BOT_ROLE = keccak256("BOT_ROLE"); uint256 public constant ACC_UNO_PRECISION = 1e18; address public migrateTo; address public syntheticSSRP; uint256 public lockTime; uint256 public stakingStartTime; address public rewarder; address public override riskPool; bool public killed; bool public emergencyWithdrawAllowed; struct PoolInfo { uint256 lastRewardBlock; uint256 accUnoPerShare; uint256 unoMultiplierPerBlock; } struct UserInfo { uint256 lastWithdrawTime; uint256 rewardDebt; uint256 amount; bool isNotRollOver; } mapping(address => UserInfo) public userInfo; mapping(bytes32 => mapping(address => uint256)) public roleLockTime; PoolInfo public poolInfo; event RiskPoolCreated(address indexed _SSRP, address indexed _pool); event StakedInPool(address indexed _staker, address indexed _pool, uint256 _amount); event LeftPool(address indexed _staker, address indexed _pool, uint256 _requestAmount); event LogUpdatePool(uint256 _lastRewardBlock, uint256 _lpSupply, uint256 _accUnoPerShare); event Harvest(address indexed _user, address indexed _receiver, uint256 _amount); event LogLeaveFromPendingSSRP(address indexed _user, uint256 _withdrawLpAmount, uint256 _withdrawUnoAmount); event PolicyClaim(address indexed _user, uint256 _claimAmount); event LogLpTransferInSSRP(address indexed _from, address indexed _to, uint256 _amount); event LogCreateRewarder(address indexed _SSRP, address indexed _rewarder, address _currency); event LogCreateSyntheticSSRP(address indexed _SSRP, address indexed _syntheticSSRP, address indexed _lpToken); event LogCancelWithdrawRequest(address indexed _user, uint256 _cancelAmount, uint256 _cancelAmountInUno); event LogMigrate(address indexed _user, address indexed _migrateTo, uint256 _migratedAmount); event LogSetRewardMultiplier(address indexed _SSIP, uint256 _rewardMultiplier); event LogSetRole(address indexed _SSIP, bytes32 _role, address indexed _account); event LogSetMigrateTo(address indexed _SSIP, address indexed _migrateTo); event LogSetMinLPCapital(address indexed _SSIP, uint256 _minLPCapital); event LogSetLockTime(address indexed _SSIP, uint256 _lockTime); event LogSetStakingStartTime(address indexed _SSIP, uint256 _startTime); event PoolAlived(address indexed _owner, bool _alive); event KillPool(address indexed _owner, bool _killed); event RollOverReward(address[] indexed _staker, address indexed _pool, uint256 _amount); event EmergencyWithdraw(address indexed user, uint256 amount); event EmergencyWithdrawToggled(address indexed user, bool EmergencyWithdraw); event LogUserUpdated(address indexed pool, address indexed user, uint256 amount); function initialize(address _multiSigWallet, address _claimAccessor) external initializer { require(_multiSigWallet != address(0), "UnoRe: zero multiSigWallet address"); stakingStartTime = block.timestamp + 3 days; lockTime = 10 days; __ReentrancyGuard_init(); __Pausable_init(); __AccessControl_init(); _grantRole(ADMIN_ROLE, _multiSigWallet); _grantRole(CLAIM_ASSESSOR_ROLE, _claimAccessor); _setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE); _setRoleAdmin(CLAIM_ASSESSOR_ROLE, ADMIN_ROLE); _setRoleAdmin(BOT_ROLE, ADMIN_ROLE); } modifier isStartTime() { require(block.timestamp >= stakingStartTime, "UnoRe: not available time"); _; } modifier roleLockTimePassed(bytes32 _role) { require(block.timestamp >= roleLockTime[_role][msg.sender], "UnoRe: roll lock time not passed"); _; } modifier isAlive() { require(!killed, "UnoRe: pool is killed"); _; } /** * @dev pause pool to restrict pool functionality, can only by called by admin role */ function pausePool() external onlyRole(ADMIN_ROLE) roleLockTimePassed(ADMIN_ROLE) { _pause(); } /** * @dev unpause pool, can only by called by admin role */ function unpausePool() external onlyRole(ADMIN_ROLE) roleLockTimePassed(ADMIN_ROLE) { _unpause(); } /** * @dev kill pool to restrict pool functionality, can only by called by admin role */ function killPool() external onlyRole(ADMIN_ROLE) roleLockTimePassed(ADMIN_ROLE) { killed = true; emit KillPool(msg.sender, true); } /** * @dev revive pool, can only by called by admin role */ function revivePool() external onlyRole(ADMIN_ROLE) roleLockTimePassed(ADMIN_ROLE) { killed = false; emit PoolAlived(msg.sender, false); } /** * @dev update reward muiltiplier, can only by called by admin role * @param _rewardMultiplier value to set */ function setRewardMultiplier(uint256 _rewardMultiplier) external onlyRole(ADMIN_ROLE) roleLockTimePassed(ADMIN_ROLE) { require(_rewardMultiplier > 0, "UnoRe: zero value"); poolInfo.unoMultiplierPerBlock = _rewardMultiplier; emit LogSetRewardMultiplier(address(this), _rewardMultiplier); } function setRole(bytes32 _role, address _account) external isAlive whenNotPaused onlyRole(ADMIN_ROLE) roleLockTimePassed(ADMIN_ROLE) { require(_account != address(0), "UnoRe: zero address"); _grantRole(_role, _account); roleLockTime[_role][_account] = block.timestamp + lockTime; emit LogSetRole(address(this), _role, _account); } /** * @dev set migrate address, can only by called by admin role * @param _migrateTo new migrate address */ function setMigrateTo(address _migrateTo) external onlyRole(ADMIN_ROLE) roleLockTimePassed(ADMIN_ROLE) { require(_migrateTo != address(0), "UnoRe: zero address"); migrateTo = _migrateTo; emit LogSetMigrateTo(address(this), _migrateTo); } /** * @dev update min lp capital, only admin role call this function */ function setMinLPCapital(uint256 _minLPCapital) external onlyRole(ADMIN_ROLE) roleLockTimePassed(ADMIN_ROLE) { require(_minLPCapital > 0, "UnoRe: not allow zero value"); IRiskPool(riskPool).setMinLPCapital(_minLPCapital); emit LogSetMinLPCapital(address(this), _minLPCapital); } /** * @dev lock time, only admin role call this function */ function setLockTime(uint256 _lockTime) external onlyRole(ADMIN_ROLE) roleLockTimePassed(ADMIN_ROLE) { require(_lockTime > 0, "UnoRe: not allow zero lock time"); lockTime = _lockTime; emit LogSetLockTime(address(this), _lockTime); } /** * @dev set staking start time, only admin role call this function */ function setStakingStartTime(uint256 _startTime) external onlyRole(ADMIN_ROLE) roleLockTimePassed(ADMIN_ROLE) { require(_startTime > 0, "UnoRe: not allow zero start time"); stakingStartTime = _startTime; emit LogSetStakingStartTime(address(this), _startTime); } /** * @dev toggle emergency withdraw bool to restrict or use this emergency withdraw, * only admin role call this function */ function toggleEmergencyWithdraw() external onlyRole(ADMIN_ROLE) roleLockTimePassed(ADMIN_ROLE) { emergencyWithdrawAllowed = !emergencyWithdrawAllowed; emit EmergencyWithdrawToggled(address(this), emergencyWithdrawAllowed); } /** * @dev create Risk pool with UNO from SSRP owner */ function createRiskPool( string calldata _name, string calldata _symbol, address _factory, address _currency, uint256 _rewardMultiplier ) external onlyRole(ADMIN_ROLE) roleLockTimePassed(ADMIN_ROLE) nonReentrant { require(riskPool == address(0), "UnoRe: risk pool created already"); require(_factory != address(0), "UnoRe: zero factory address"); require(_currency != address(0), "UnoRe: zero currency address"); riskPool = IRiskPoolFactory(_factory).newRiskPool(_name, _symbol, address(this), _currency); poolInfo.lastRewardBlock = block.number; poolInfo.accUnoPerShare = 0; poolInfo.unoMultiplierPerBlock = _rewardMultiplier; emit RiskPoolCreated(address(this), riskPool); } /** * @dev create rewarder with UNO token */ function createRewarder( address _operator, address _factory, address _currency ) external onlyRole(ADMIN_ROLE) roleLockTimePassed(ADMIN_ROLE) nonReentrant { require(_factory != address(0), "UnoRe: rewarder factory no exist"); require(_operator != address(0), "UnoRe: zero operator address"); require(_currency != address(0), "UnoRe: zero currency address"); rewarder = IRewarderFactory(_factory).newRewarder(_operator, _currency, address(this)); emit LogCreateRewarder(address(this), rewarder, _currency); } function createSyntheticSSRP( address _owner, address _factory ) external onlyRole(ADMIN_ROLE) roleLockTimePassed(ADMIN_ROLE) nonReentrant { require(_owner != address(0), "UnoRe: zero owner address"); require(_factory != address(0), "UnoRe:zero factory address"); require(riskPool != address(0), "UnoRe:zero LP token address"); syntheticSSRP = ISyntheticSSRPFactory(_factory).newSyntheticSSRP(_owner, riskPool); emit LogCreateSyntheticSSRP(address(this), syntheticSSRP, riskPool); } /** * @dev migrate user to new version */ function migrate() external nonReentrant whenNotPaused isAlive { require(migrateTo != address(0), "UnoRe: zero address"); _harvest(msg.sender); bool isUnLocked = block.timestamp - userInfo[msg.sender].lastWithdrawTime > lockTime; uint256 migratedAmount = IRiskPool(riskPool).migrateLP(msg.sender, migrateTo, isUnLocked); IMigration(migrateTo).onMigration(msg.sender, migratedAmount, ""); userInfo[msg.sender].amount = 0; userInfo[msg.sender].rewardDebt = 0; emit LogMigrate(msg.sender, migrateTo, migratedAmount); } /** * @dev return pending uno to claim of `_to` address */ function pendingUno(address _to) external view returns (uint256 pending) { uint256 tokenSupply = IERC20(riskPool).totalSupply(); uint256 accUnoPerShare = poolInfo.accUnoPerShare; if (block.number > poolInfo.lastRewardBlock && tokenSupply != 0) { uint256 blocks = block.number - uint256(poolInfo.lastRewardBlock); uint256 unoReward = blocks * poolInfo.unoMultiplierPerBlock; accUnoPerShare = accUnoPerShare + (unoReward * ACC_UNO_PRECISION) / tokenSupply; } uint256 userBalance = userInfo[_to].amount; pending = (userBalance * uint256(accUnoPerShare)) / ACC_UNO_PRECISION - userInfo[_to].rewardDebt; } /** * @dev update pool last reward and accumulated uno per share, * update every time when use enter, withdraw from pool */ function updatePool() public override { if (block.number > poolInfo.lastRewardBlock) { uint256 tokenSupply = IERC20(riskPool).totalSupply(); if (tokenSupply > 0) { uint256 blocks = block.number - uint256(poolInfo.lastRewardBlock); uint256 unoReward = blocks * poolInfo.unoMultiplierPerBlock; poolInfo.accUnoPerShare = poolInfo.accUnoPerShare + ((unoReward * ACC_UNO_PRECISION) / tokenSupply); } poolInfo.lastRewardBlock = block.number; emit LogUpdatePool(poolInfo.lastRewardBlock, tokenSupply, poolInfo.accUnoPerShare); } } /** * @dev stake user collateral, update user reward per block * @param _amount amount to deposit to pool */ function enterInPool(uint256 _amount) external override isStartTime whenNotPaused isAlive nonReentrant { _depositIn(_amount); _enterInPool(_amount, msg.sender); emit StakedInPool(msg.sender, riskPool, _amount); } /** * @dev WR will be in pending for 10 days at least */ function leaveFromPoolInPending(uint256 _amount) external override isStartTime whenNotPaused nonReentrant { _harvest(msg.sender); // Withdraw desired amount from pool uint256 amount = userInfo[msg.sender].amount; uint256 lpPriceUno = IRiskPool(riskPool).lpPriceUno(); (uint256 pendingAmount, , ) = IRiskPool(riskPool).getWithdrawRequest(msg.sender); require(amount - pendingAmount >= (_amount * 1e18) / lpPriceUno, "UnoRe: withdraw amount overflow"); IRiskPool(riskPool).leaveFromPoolInPending(msg.sender, _amount); userInfo[msg.sender].lastWithdrawTime = block.timestamp; emit LeftPool(msg.sender, riskPool, _amount); } /** * @dev user can submit claim again and receive his funds into his wallet after 10 days since last WR. */ function leaveFromPending(uint256 _amount) external override isStartTime whenNotPaused nonReentrant { require(block.timestamp - userInfo[msg.sender].lastWithdrawTime >= lockTime, "UnoRe: Locked time"); _harvest(msg.sender); uint256 amount = userInfo[msg.sender].amount; (uint256 withdrawAmount, uint256 withdrawAmountInUNO) = IRiskPool(riskPool).leaveFromPending(msg.sender, _amount); uint256 accumulatedUno = (amount * uint256(poolInfo.accUnoPerShare)) / ACC_UNO_PRECISION; userInfo[msg.sender].rewardDebt = accumulatedUno - ((withdrawAmount * uint256(poolInfo.accUnoPerShare)) / ACC_UNO_PRECISION); userInfo[msg.sender].amount = amount - withdrawAmount; emit LogLeaveFromPendingSSRP(msg.sender, withdrawAmount, withdrawAmountInUNO); } function lpTransfer(address _from, address _to, uint256 _amount) external override isAlive whenNotPaused nonReentrant { require(msg.sender == address(riskPool), "UnoRe: not allow others transfer"); if (_from != syntheticSSRP && _to != syntheticSSRP) { _harvest(_from); uint256 amount = userInfo[_from].amount; (uint256 pendingAmount, , ) = IRiskPool(riskPool).getWithdrawRequest(_from); require(amount - pendingAmount >= _amount, "UnoRe: balance overflow"); uint256 accumulatedUno = (amount * uint256(poolInfo.accUnoPerShare)) / ACC_UNO_PRECISION; userInfo[_from].rewardDebt = accumulatedUno - ((_amount * uint256(poolInfo.accUnoPerShare)) / ACC_UNO_PRECISION); userInfo[_from].amount = amount - _amount; userInfo[_to].rewardDebt = userInfo[_to].rewardDebt + ((_amount * uint256(poolInfo.accUnoPerShare)) / ACC_UNO_PRECISION); userInfo[_to].amount = userInfo[_to].amount + _amount; emit LogLpTransferInSSRP(_from, _to, _amount); } } /** * @dev withdraw user pending uno * @param _to user address */ function harvest(address _to) external override isStartTime isAlive whenNotPaused nonReentrant { _harvest(_to); } function _harvest(address _to) private { updatePool(); (uint256 _pendingUno, uint256 _amount) = _updateReward(_to); if (rewarder != address(0) && _pendingUno != 0) { IRewarder(rewarder).onReward(_to, _pendingUno, _amount); } emit Harvest(msg.sender, _to, _pendingUno); } /** * @dev user can toggle its roll over bool */ function toggleRollOver() external { userInfo[msg.sender].isNotRollOver = !userInfo[msg.sender].isNotRollOver; } /** * @dev user roll over its pending uno to stake */ function rollOverReward(address[] memory _to) external isStartTime isAlive whenNotPaused onlyRole(BOT_ROLE) nonReentrant { require(IRiskPool(riskPool).currency() == IRewarder(rewarder).currency(), "UnoRe: currency not matched"); updatePool(); uint256 _totalPendingUno; uint256 _accumulatedAmount; for (uint256 i; i < _to.length; i++) { require(!userInfo[_to[i]].isNotRollOver, "UnoRe: rollover is not set"); (uint256 _pendingUno, uint256 _amount) = _updateReward(_to[i]); _totalPendingUno += _pendingUno; _accumulatedAmount += _amount; _enterInPool(_pendingUno, _to[i]); } if (rewarder != address(0) && _totalPendingUno != 0 && _accumulatedAmount > 0) { IRewarder(rewarder).onReward(riskPool, _totalPendingUno, _accumulatedAmount); } emit RollOverReward(_to, riskPool, _totalPendingUno); } /** * @dev user can cancel its pending withdraw request */ function cancelWithdrawRequest() external nonReentrant isAlive whenNotPaused { (uint256 cancelAmount, uint256 cancelAmountInUno) = IRiskPool(riskPool).cancelWithdrawRequest(msg.sender); emit LogCancelWithdrawRequest(msg.sender, cancelAmount, cancelAmountInUno); } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw() public whenNotPaused nonReentrant { require(emergencyWithdrawAllowed, "Unore: emergencyWithdraw is not allowed"); UserInfo memory user = userInfo[msg.sender]; uint256 amount = user.amount; require(amount > 0, "Unore: Zero user amount"); delete userInfo[msg.sender]; IRiskPool(riskPool).emergencyWithdraw(msg.sender, amount); emit EmergencyWithdraw(msg.sender, amount); } /** * @dev claim policy to `_to`, can only be called by claim processor role */ function policyClaim( address _to, uint256 _amount ) external onlyRole(CLAIM_ASSESSOR_ROLE) roleLockTimePassed(CLAIM_ASSESSOR_ROLE) isStartTime whenNotPaused isAlive nonReentrant { require(_to != address(0), "UnoRe: zero address"); require(_amount > 0, "UnoRe: zero amount"); uint256 realClaimAmount = IRiskPool(riskPool).policyClaim(_to, _amount); emit PolicyClaim(_to, realClaimAmount); } function grantRole(bytes32 role, address account) public override whenNotPaused isAlive onlyRole(getRoleAdmin(role)) roleLockTimePassed(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev return user staked currency corresponding to current lp price of uno */ function getStakedAmountPerUser(address _to) external view returns (uint256 unoAmount, uint256 lpAmount) { lpAmount = userInfo[_to].amount; uint256 lpPriceUno = IRiskPool(riskPool).lpPriceUno(); unoAmount = (lpAmount * lpPriceUno) / 1e18; } /** * @dev get withdraw request amount in pending per user in UNO */ function getWithdrawRequestPerUser( address _user ) external view returns (uint256 pendingAmount, uint256 pendingAmountInUno, uint256 originUnoAmount, uint256 requestTime) { uint256 lpPriceUno = IRiskPool(riskPool).lpPriceUno(); (pendingAmount, requestTime, originUnoAmount) = IRiskPool(riskPool).getWithdrawRequest(_user); pendingAmountInUno = (pendingAmount * lpPriceUno) / 1e18; } /** * @dev get total withdraw request amount in pending for the risk pool in UNO */ function getTotalWithdrawPendingAmount() external view returns (uint256) { return IRiskPool(riskPool).getTotalWithdrawRequestAmount(); } function setUserDetails( address _user, uint256 _amount, uint256 _rewardDebt ) external onlyRole(ADMIN_ROLE) roleLockTimePassed(ADMIN_ROLE) { userInfo[_user].amount = _amount; userInfo[_user].rewardDebt = _rewardDebt; IRiskPool(riskPool).enter(_user, _amount); emit LogUserUpdated(address(this), _user, _amount); } function setLpPriceInRiskPool( uint256 _lpPriceUno ) external onlyRole(ADMIN_ROLE) roleLockTimePassed(ADMIN_ROLE) { IRiskPool(riskPool).setLpPriceUno(_lpPriceUno); } function setAccUnoPerShare( uint256 _accUnoPerShare, uint256 _lastRewardBlock ) external onlyRole(ADMIN_ROLE) roleLockTimePassed(ADMIN_ROLE) { poolInfo.accUnoPerShare = _accUnoPerShare; poolInfo.lastRewardBlock = _lastRewardBlock; } function _enterInPool(uint256 _amount, address _to) internal { require(_amount != 0, "UnoRe: ZERO Value"); updatePool(); uint256 lpPriceUno = IRiskPool(riskPool).lpPriceUno(); IRiskPool(riskPool).enter(_to, _amount); UserInfo memory _userInfo = userInfo[_to]; _userInfo.rewardDebt = _userInfo.rewardDebt + ((_amount * 1e18 * uint256(poolInfo.accUnoPerShare)) / lpPriceUno) / ACC_UNO_PRECISION; _userInfo.amount = _userInfo.amount + ((_amount * 1e18) / lpPriceUno); userInfo[_to] = _userInfo; } function _updateReward(address _to) internal returns (uint256, uint256) { uint256 requestTime; (, requestTime, ) = IRiskPool(riskPool).getWithdrawRequest(_to); if (requestTime > 0) { return (0,0); } uint256 amount = userInfo[_to].amount; uint256 accumulatedUno = (amount * uint256(poolInfo.accUnoPerShare)) / ACC_UNO_PRECISION; uint256 _pendingUno = accumulatedUno - userInfo[_to].rewardDebt; // Effects userInfo[_to].rewardDebt = accumulatedUno; return (_pendingUno, amount); } function _depositIn(uint256 _amount) internal { address token = IRiskPool(riskPool).currency(); TransferHelper.safeTransferFrom(token, msg.sender, riskPool, _amount); } function _revokeRole(bytes32 role, address account) internal override whenNotPaused isAlive roleLockTimePassed(getRoleAdmin(role)) returns (bool) { return super._revokeRole(role, account); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol) pragma solidity ^0.8.20; import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol"; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {ERC165Upgradeable} from "../utils/introspection/ERC165Upgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.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: * * ```solidity * 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}: * * ```solidity * 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. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControl, ERC165Upgradeable { struct RoleData { mapping(address account => bool) hasRole; bytes32 adminRole; } bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /// @custom:storage-location erc7201:openzeppelin.storage.AccessControl struct AccessControlStorage { mapping(bytes32 role => RoleData) _roles; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControl")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant AccessControlStorageLocation = 0x02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800; function _getAccessControlStorage() private pure returns (AccessControlStorage storage $) { assembly { $.slot := AccessControlStorageLocation } } /** * @dev Modifier that checks that an account has a specific role. Reverts * with an {AccessControlUnauthorizedAccount} error including the required role. */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } function __AccessControl_init() internal onlyInitializing { } function __AccessControl_init_unchained() internal onlyInitializing { } /** * @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 virtual returns (bool) { AccessControlStorage storage $ = _getAccessControlStorage(); return $._roles[role].hasRole[account]; } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()` * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier. */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account` * is missing `role`. */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert AccessControlUnauthorizedAccount(account, role); } } /** * @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 virtual returns (bytes32) { AccessControlStorage storage $ = _getAccessControlStorage(); return $._roles[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. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual 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. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual 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 `callerConfirmation`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { revert AccessControlBadConfirmation(); } _revokeRole(role, callerConfirmation); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { AccessControlStorage storage $ = _getAccessControlStorage(); bytes32 previousAdminRole = getRoleAdmin(role); $._roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual returns (bool) { AccessControlStorage storage $ = _getAccessControlStorage(); if (!hasRole(role, account)) { $._roles[role].hasRole[account] = true; emit RoleGranted(role, account, _msgSender()); return true; } else { return false; } } /** * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual returns (bool) { AccessControlStorage storage $ = _getAccessControlStorage(); if (hasRole(role, account)) { $._roles[role].hasRole[account] = false; emit RoleRevoked(role, account, _msgSender()); return true; } else { return false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._initialized = 1; if (isTopLevelCall) { $._initializing = true; } _; if (isTopLevelCall) { $._initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._initialized = version; $._initializing = true; _; $._initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Pausable struct PausableStorage { bool _paused; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Pausable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant PausableStorageLocation = 0xcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300; function _getPausableStorage() private pure returns (PausableStorage storage $) { assembly { $.slot := PausableStorageLocation } } /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); /** * @dev The operation failed because the contract is paused. */ error EnforcedPause(); /** * @dev The operation failed because the contract is not paused. */ error ExpectedPause(); /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { PausableStorage storage $ = _getPausableStorage(); $._paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { PausableStorage storage $ = _getPausableStorage(); return $._paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { if (paused()) { revert EnforcedPause(); } } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { if (!paused()) { revert ExpectedPause(); } } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { PausableStorage storage $ = _getPausableStorage(); $._paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { PausableStorage storage $ = _getPausableStorage(); $._paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant NOT_ENTERED = 1; uint256 private constant ENTERED = 2; /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard struct ReentrancyGuardStorage { uint256 _status; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00; function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) { assembly { $.slot := ReentrancyGuardStorageLocation } } /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); $._status = NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); // On the first call to nonReentrant, _status will be NOT_ENTERED if ($._status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail $._status = ENTERED; } function _nonReentrantAfter() private { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) $._status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); return $._status == ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {Initializable} from "../../proxy/utils/Initializable.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); * } * ``` */ abstract contract ERC165Upgradeable is Initializable, IERC165 { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol) pragma solidity ^0.8.20; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev The `account` is missing a role. */ error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); /** * @dev The caller of a function is not the expected one. * * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}. */ error AccessControlBadConfirmation(); /** * @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. */ 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 `callerConfirmation`. */ function renounceRole(bytes32 role, address callerConfirmation) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @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 pragma solidity =0.8.23; interface IMigration { function onMigration(address who_, uint256 amount_, bytes memory data_) external; }
// SPDX-License-Identifier: MIT pragma solidity =0.8.23; interface IRewarder { function currency() external view returns (address); function onReward(address to, uint256 unoAmount, uint256 accumulatedAmount) external payable returns (uint256); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity =0.8.23; interface IRewarderFactory { function newRewarder(address _operator, address _currency, address _pool) external returns (address); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity =0.8.23; interface IRiskPool { function enter(address _from, uint256 _amount) external; function leaveFromPoolInPending(address _to, uint256 _amount) external; function leaveFromPending(address _to, uint256 _amount) external returns (uint256, uint256); function cancelWithdrawRequest(address _to) external returns (uint256, uint256); function policyClaim(address _to, uint256 _amount) external returns (uint256 realClaimAmount); function migrateLP(address _to, address _migrateTo, bool _isUnLocked) external returns (uint256); function setMinLPCapital(uint256 _minLPCapital) external; function currency() external view returns (address); function getTotalWithdrawRequestAmount() external view returns (uint256); function getWithdrawRequest(address _to) external view returns (uint256, uint256, uint256); function lpPriceUno() external view returns (uint256); function emergencyWithdraw(address _to, uint256 _amount) external returns (bool); function setLpPriceUno(uint256 _lpPriceUno) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity =0.8.23; interface IRiskPoolFactory { function newRiskPool( string calldata _name, string calldata _symbol, address _pool, address _currency ) external returns (address); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity =0.8.23; interface ISingleSidedReinsurancePool { function updatePool() external; function enterInPool(uint256 _amount) external; function leaveFromPoolInPending(uint256 _amount) external; function leaveFromPending(uint256 _amount) external; function harvest(address _to) external; function lpTransfer(address _from, address _to, uint256 _amount) external; function riskPool() external view returns (address); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity =0.8.23; interface ISyntheticSSRPFactory { function newSyntheticSSRP(address _multiSigWallet, address _lpToken) external returns (address); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity =0.8.23; // from Uniswap TransferHelper library library TransferHelper { function safeApprove(address token, address to, uint256 value) internal { // bytes4(keccak256(bytes('approve(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), "TransferHelper::safeApprove: approve failed"); } function safeTransfer(address token, address to, uint256 value) internal { // bytes4(keccak256(bytes('transfer(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), "TransferHelper::safeTransfer: transfer failed"); } function safeTransferFrom(address token, address from, address to, uint256 value) internal { // bytes4(keccak256(bytes('transferFrom(address,address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), "TransferHelper::transferFrom: transferFrom failed"); } function safeTransferETH(address to, uint256 value) internal { (bool success, ) = to.call{value: value}(new bytes(0)); require(success, "TransferHelper::safeTransferETH: ETH transfer failed"); } }
{ "evmVersion": "paris", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bool","name":"EmergencyWithdraw","type":"bool"}],"name":"EmergencyWithdrawToggled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":true,"internalType":"address","name":"_receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Harvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":false,"internalType":"bool","name":"_killed","type":"bool"}],"name":"KillPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_staker","type":"address"},{"indexed":true,"internalType":"address","name":"_pool","type":"address"},{"indexed":false,"internalType":"uint256","name":"_requestAmount","type":"uint256"}],"name":"LeftPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_cancelAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_cancelAmountInUno","type":"uint256"}],"name":"LogCancelWithdrawRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_SSRP","type":"address"},{"indexed":true,"internalType":"address","name":"_rewarder","type":"address"},{"indexed":false,"internalType":"address","name":"_currency","type":"address"}],"name":"LogCreateRewarder","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_SSRP","type":"address"},{"indexed":true,"internalType":"address","name":"_syntheticSSRP","type":"address"},{"indexed":true,"internalType":"address","name":"_lpToken","type":"address"}],"name":"LogCreateSyntheticSSRP","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_withdrawLpAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_withdrawUnoAmount","type":"uint256"}],"name":"LogLeaveFromPendingSSRP","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"LogLpTransferInSSRP","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":true,"internalType":"address","name":"_migrateTo","type":"address"},{"indexed":false,"internalType":"uint256","name":"_migratedAmount","type":"uint256"}],"name":"LogMigrate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_SSIP","type":"address"},{"indexed":false,"internalType":"uint256","name":"_lockTime","type":"uint256"}],"name":"LogSetLockTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_SSIP","type":"address"},{"indexed":true,"internalType":"address","name":"_migrateTo","type":"address"}],"name":"LogSetMigrateTo","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_SSIP","type":"address"},{"indexed":false,"internalType":"uint256","name":"_minLPCapital","type":"uint256"}],"name":"LogSetMinLPCapital","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_SSIP","type":"address"},{"indexed":false,"internalType":"uint256","name":"_rewardMultiplier","type":"uint256"}],"name":"LogSetRewardMultiplier","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_SSIP","type":"address"},{"indexed":false,"internalType":"bytes32","name":"_role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"_account","type":"address"}],"name":"LogSetRole","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_SSIP","type":"address"},{"indexed":false,"internalType":"uint256","name":"_startTime","type":"uint256"}],"name":"LogSetStakingStartTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_lastRewardBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_lpSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_accUnoPerShare","type":"uint256"}],"name":"LogUpdatePool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LogUserUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_claimAmount","type":"uint256"}],"name":"PolicyClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":false,"internalType":"bool","name":"_alive","type":"bool"}],"name":"PoolAlived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_SSRP","type":"address"},{"indexed":true,"internalType":"address","name":"_pool","type":"address"}],"name":"RiskPoolCreated","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":"address[]","name":"_staker","type":"address[]"},{"indexed":true,"internalType":"address","name":"_pool","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"RollOverReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_staker","type":"address"},{"indexed":true,"internalType":"address","name":"_pool","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"StakedInPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ACC_UNO_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BOT_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CLAIM_ASSESSOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cancelWithdrawRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_currency","type":"address"}],"name":"createRewarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_currency","type":"address"},{"internalType":"uint256","name":"_rewardMultiplier","type":"uint256"}],"name":"createRiskPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_factory","type":"address"}],"name":"createSyntheticSSRP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdrawAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"enterInPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"getStakedAmountPerUser","outputs":[{"internalType":"uint256","name":"unoAmount","type":"uint256"},{"internalType":"uint256","name":"lpAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalWithdrawPendingAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getWithdrawRequestPerUser","outputs":[{"internalType":"uint256","name":"pendingAmount","type":"uint256"},{"internalType":"uint256","name":"pendingAmountInUno","type":"uint256"},{"internalType":"uint256","name":"originUnoAmount","type":"uint256"},{"internalType":"uint256","name":"requestTime","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":"address","name":"_to","type":"address"}],"name":"harvest","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":"_multiSigWallet","type":"address"},{"internalType":"address","name":"_claimAccessor","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"killPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"killed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"leaveFromPending","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"leaveFromPoolInPending","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"lpTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrateTo","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pausePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"pendingUno","outputs":[{"internalType":"uint256","name":"pending","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"policyClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"poolInfo","outputs":[{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accUnoPerShare","type":"uint256"},{"internalType":"uint256","name":"unoMultiplierPerBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revivePool","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":[],"name":"rewarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"riskPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"}],"name":"roleLockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_to","type":"address[]"}],"name":"rollOverReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_accUnoPerShare","type":"uint256"},{"internalType":"uint256","name":"_lastRewardBlock","type":"uint256"}],"name":"setAccUnoPerShare","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockTime","type":"uint256"}],"name":"setLockTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lpPriceUno","type":"uint256"}],"name":"setLpPriceInRiskPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_migrateTo","type":"address"}],"name":"setMigrateTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minLPCapital","type":"uint256"}],"name":"setMinLPCapital","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardMultiplier","type":"uint256"}],"name":"setRewardMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_role","type":"bytes32"},{"internalType":"address","name":"_account","type":"address"}],"name":"setRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTime","type":"uint256"}],"name":"setStakingStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_rewardDebt","type":"uint256"}],"name":"setUserDetails","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"syntheticSSRP","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleEmergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleRollOver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpausePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"lastWithdrawTime","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"isNotRollOver","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50614862806100206000396000f3fe608060405234801561001057600080fd5b50600436106103835760003560e01c80638ba04b17116101de578063ba6194571161010f578063dff87203116100ad578063e3161ddd1161007c578063e3161ddd1461080f578063e3824a3814610817578063f1daf24c1461082a578063fd91db961461083d57600080fd5b8063dff87203146107b6578063e08c5de1146107c9578063e0c8d9a5146107dc578063e19e71681461080757600080fd5b8063d547741f116100e9578063d547741f14610773578063d99fec7114610786578063db2e21bc1461079b578063dcc3e06e146107a357600080fd5b8063ba61945714610725578063c4d87fe21461074d578063c4e5dacf1461076057600080fd5b8063a217fddf1161017c578063aceda7f911610156578063aceda7f9146106c4578063ae04d45d146106d8578063af16d6e0146106eb578063b1503774146106fe57600080fd5b8063a217fddf146106ac578063a3bdd632146106b4578063aa09d5b7146106bc57600080fd5b80639336f406116101b85780639336f4061461064057806393b6b86c1461067357806398c6e760146106865780639cdf6c271461069957600080fd5b80638ba04b17146106125780638fd3ab801461062557806391d148541461062d57600080fd5b806336568abe116102b85780636abfd183116102565780637a39b8d8116102305780637a39b8d8146105c15780637da2a4a7146105c95780638395206c146105f057806389919b711461060357600080fd5b80636abfd18314610590578063736ec05c1461059957806375b238fc146105ac57600080fd5b80635a2f3d09116102925780635a2f3d09146105305780635c975abb1461055d5780635d90bad914610575578063677554151461058857600080fd5b806336568abe146104df578063485cc955146104f25780634c0323661461050557600080fd5b80630e9ae420116103255780631f3a0e41116102ff5780631f3a0e4114610492578063248a9ca3146104a65780632e4a0142146104b95780632f2ff15d146104cc57600080fd5b80630e9ae420146104125780630f4c3c4f146104255780631959a0021461043857600080fd5b80630bd075a1116103615780630bd075a1146103c25780630d668087146103d55780630e2be506146103ec5780630e5c011e146103ff57600080fd5b806301ffc9a714610388578063068cc514146103b0578063093cf18f146103ba575b600080fd5b61039b6103963660046140ed565b610850565b60405190151581526020015b60405180910390f35b6103b8610887565b005b6103b8610900565b6103b86103d036600461411e565b6109cc565b6103de60025481565b6040519081526020016103a7565b6103b86103fa366004614137565b610ab4565b6103b861040d36600461417e565b610b25565b6103b861042036600461419b565b610b95565b6103b861043336600461411e565b610ec1565b61047061044636600461417e565b60066020526000908152604090208054600182015460028301546003909301549192909160ff1684565b60408051948552602085019390935291830152151560608201526080016103a7565b60055461039b90600160a01b900460ff1681565b6103de6104b436600461411e565b610f88565b6103b86104c73660046141dc565b610faa565b6103b86104da366004614208565b6111b3565b6103b86104ed366004614208565b61124a565b6103b8610500366004614238565b61127d565b600154610518906001600160a01b031681565b6040516001600160a01b0390911681526020016103a7565b600854600954600a5461054292919083565b604080519384526020840192909252908201526060016103a7565b6000805160206147ed8339815191525460ff1661039b565b6103b861058336600461411e565b6114bc565b6103b86115a7565b6103de60035481565b6103b86105a736600461417e565b61164b565b6103de60008051602061480d83398151915281565b6103b8611722565b6103b8336000908152600660205260409020600301805460ff19811660ff90911615179055565b6103b86105fe36600461411e565b6117cc565b6103de670de0b6b3a764000081565b6103b86106203660046142af565b611a39565b6103b8611c8d565b61039b61063b366004614208565b611e81565b61065361064e36600461417e565b611eb9565b6040805194855260208501939093529183015260608201526080016103a7565b6103b861068136600461411e565b611fd7565b600054610518906001600160a01b031681565b6103b86106a7366004614238565b61211b565b6103de600081565b6103de61235b565b6103b86123ce565b60055461039b90600160a81b900460ff1681565b6103b86106e636600461411e565b61243a565b6103b86106f936600461434f565b612525565b6103de7f6d5c9827c1f410bbb61d3b2a0a34b6b30492d9a1fd38588edca7ec4562ab9c9b81565b61073861073336600461417e565b61276c565b604080519283526020830191909152016103a7565b6103b861075b36600461439a565b612818565b600554610518906001600160a01b031681565b6103b8610781366004614208565b612948565b6103de6000805160206147ad83398151915281565b6103b8612964565b600454610518906001600160a01b031681565b6103b86107c4366004614208565b612b53565b6103de6107d736600461417e565b612c8f565b6103de6107ea366004614208565b600760209081526000928352604080842090915290825290205481565b6103b8612dc9565b6103b8612eb3565b6103b861082536600461411e565b612fd3565b6103b861083836600461411e565b61308e565b6103b861084b3660046143e5565b613286565b60006001600160e01b03198216637965db0b60e01b148061088157506301ffc9a760e01b6001600160e01b03198316145b92915050565b60008051602061480d83398151915261089f81613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d833981519152904210156108f45760405162461bcd60e51b81526004016108eb906144aa565b60405180910390fd5b6108fc61367a565b5050565b60008051602061480d83398151915261091881613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d833981519152904210156109645760405162461bcd60e51b81526004016108eb906144aa565b6005805460ff600160a81b808304821615810260ff60a81b19909316929092179283905560405130937f4a1fbdd1e9ef46cfe9e097f622e1d79f51dcd6762c86122e6a8198c5394d6401936109c0939104161515815260200190565b60405180910390a25050565b60008051602061480d8339815191526109e481613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d83398151915290421015610a305760405162461bcd60e51b81526004016108eb906144aa565b60008311610a745760405162461bcd60e51b8152602060048201526011602482015270556e6f52653a207a65726f2076616c756560781b60448201526064016108eb565b600a83905560405183815230907fbd1dd13c6a5b4a28ebd27fdcb8fdd01aba6bbb9f67599306248f465bcdf9817f906020015b60405180910390a2505050565b60008051602061480d833981519152610acc81613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d83398151915290421015610b185760405162461bcd60e51b81526004016108eb906144aa565b5050600991909155600855565b600354421015610b475760405162461bcd60e51b81526004016108eb906144df565b600554600160a01b900460ff1615610b715760405162461bcd60e51b81526004016108eb90614516565b610b796136d4565b610b81613705565b610b8a8161374f565b610b9261384d565b50565b600554600160a01b900460ff1615610bbf5760405162461bcd60e51b81526004016108eb90614516565b610bc76136d4565b610bcf613705565b6005546001600160a01b03163314610c295760405162461bcd60e51b815260206004820181905260248201527f556e6f52653a206e6f7420616c6c6f77206f7468657273207472616e7366657260448201526064016108eb565b6001546001600160a01b03848116911614801590610c5557506001546001600160a01b03838116911614155b15610eb457610c638361374f565b6001600160a01b03838116600081815260066020526040808220600201546005549151631665744b60e11b81526004810194909452939192911690632ccae89690602401606060405180830381865afa158015610cc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce89190614545565b50509050828183610cf99190614589565b1015610d475760405162461bcd60e51b815260206004820152601760248201527f556e6f52653a2062616c616e6365206f766572666c6f7700000000000000000060448201526064016108eb565b600954600090670de0b6b3a764000090610d61908561459c565b610d6b91906145b3565b600954909150670de0b6b3a764000090610d85908661459c565b610d8f91906145b3565b610d999082614589565b6001600160a01b038716600090815260066020526040902060010155610dbf8484614589565b6001600160a01b038716600090815260066020526040902060020155600954670de0b6b3a764000090610df2908661459c565b610dfc91906145b3565b6001600160a01b038616600090815260066020526040902060010154610e2291906145d5565b6001600160a01b0386166000908152600660205260409020600181019190915560020154610e519085906145d5565b6001600160a01b0380871660008181526006602052604090819020600201939093559151908816907fe97af49bf17de46bed3f953a242569bed68114f89f39c1afe4012bba1c5963d490610ea89088815260200190565b60405180910390a35050505b610ebc61384d565b505050565b60008051602061480d833981519152610ed981613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d83398151915290421015610f255760405162461bcd60e51b81526004016108eb906144aa565b60055460405163f3212d2960e01b8152600481018590526001600160a01b039091169063f3212d2990602401600060405180830381600087803b158015610f6b57600080fd5b505af1158015610f7f573d6000803e3d6000fd5b50505050505050565b60009081526000805160206147cd833981519152602052604090206001015490565b6000805160206147ad833981519152610fc281613670565b3360009081527f07cf794796064a1dc9f93079878b258b7331026292fbb4d3f9a990077aff9e5d60205260409020546000805160206147ad833981519152904210156110205760405162461bcd60e51b81526004016108eb906144aa565b6003544210156110425760405162461bcd60e51b81526004016108eb906144df565b61104a6136d4565b600554600160a01b900460ff16156110745760405162461bcd60e51b81526004016108eb90614516565b61107c613705565b6001600160a01b0384166110a25760405162461bcd60e51b81526004016108eb906145e8565b600083116110e75760405162461bcd60e51b8152602060048201526012602482015271155b9bd4994e881e995c9bc8185b5bdd5b9d60721b60448201526064016108eb565b60055460405163172500a160e11b81526001600160a01b038681166004830152602482018690526000921690632e4a0142906044016020604051808303816000875af115801561113b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115f9190614615565b9050846001600160a01b03167f6420c9536b9a539410a930b1fd8d115dc296d8b71426dcc0ab64f2f736b7d59f8260405161119c91815260200190565b60405180910390a2506111ad61384d565b50505050565b6111bb6136d4565b600554600160a01b900460ff16156111e55760405162461bcd60e51b81526004016108eb90614516565b6111ee82610f88565b6111f781613670565b61120083610f88565b60008181526007602090815260408083203384529091529020544210156112395760405162461bcd60e51b81526004016108eb906144aa565b6112438484613873565b5050505050565b6001600160a01b03811633146112735760405163334bd91960e11b815260040160405180910390fd5b610ebc8282613918565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156112c35750825b905060008267ffffffffffffffff1660011480156112e05750303b155b9050811580156112ee575080155b1561130c5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561133657845460ff60401b1916600160401b1785555b6001600160a01b0387166113975760405162461bcd60e51b815260206004820152602260248201527f556e6f52653a207a65726f206d756c746953696757616c6c6574206164647265604482015261737360f01b60648201526084016108eb565b6113a4426203f4806145d5565b600355620d2f006002556113b66139a0565b6113be6139b0565b6113c66139c0565b6113de60008051602061480d83398151915288613873565b506113f76000805160206147ad83398151915287613873565b5061141060008051602061480d833981519152806139c8565b6114366000805160206147ad83398151915260008051602061480d8339815191526139c8565b61146e7f6d5c9827c1f410bbb61d3b2a0a34b6b30492d9a1fd38588edca7ec4562ab9c9b60008051602061480d8339815191526139c8565b8315610f7f57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050565b60008051602061480d8339815191526114d481613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d833981519152904210156115205760405162461bcd60e51b81526004016108eb906144aa565b600083116115705760405162461bcd60e51b815260206004820181905260248201527f556e6f52653a206e6f7420616c6c6f77207a65726f2073746172742074696d6560448201526064016108eb565b600383905560405183815230907fa8aa08cc14eef7b97ab4cd52f37082e23f7526bccc98cf91e6a1d412494b905190602001610aa7565b60008051602061480d8339815191526115bf81613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d8339815191529042101561160b5760405162461bcd60e51b81526004016108eb906144aa565b6005805460ff60a01b191690556040516000815233907f77337fcf1b48e6e024b256962b66c49de98c9f606b2cd9937cc0edbc7a0fb709906020016109c0565b60008051602061480d83398151915261166381613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d833981519152904210156116af5760405162461bcd60e51b81526004016108eb906144aa565b6001600160a01b0383166116d55760405162461bcd60e51b81526004016108eb906145e8565b600080546001600160a01b0319166001600160a01b0385169081178255604051909130917f877238238dbd7134e89b00809ea73fabb50da117ace807a6b31c733bbf55d3699190a3505050565b60008051602061480d83398151915261173a81613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d833981519152904210156117865760405162461bcd60e51b81526004016108eb906144aa565b6005805460ff60a01b1916600160a01b1790556040516001815233907f7c952f2e528aa25b4eaf8b6c07af29184b27ce591295e543ced0a27b167dc794906020016109c0565b6003544210156117ee5760405162461bcd60e51b81526004016108eb906144df565b6117f66136d4565b6117fe613705565b6118073361374f565b336000908152600660209081526040808320600201546005548251627a9fd960e91b815292519194936001600160a01b039091169263f53fb20092600480830193928290030181865afa158015611862573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118869190614615565b600554604051631665744b60e11b81523360048201529192506000916001600160a01b0390911690632ccae89690602401606060405180830381865afa1580156118d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f89190614545565b505090508184670de0b6b3a7640000611911919061459c565b61191b91906145b3565b6119258285614589565b10156119735760405162461bcd60e51b815260206004820152601f60248201527f556e6f52653a20776974686472617720616d6f756e74206f766572666c6f770060448201526064016108eb565b6005546040516323de6d9560e11b8152336004820152602481018690526001600160a01b03909116906347bcdb2a90604401600060405180830381600087803b1580156119bf57600080fd5b505af11580156119d3573d6000803e3d6000fd5b50503360008181526006602090815260409182902042905560055491518981526001600160a01b0390921694509192507f940a14c75c418e7230a2e65567722d2dda5a6713cf71b369bd0fa219fdc1ac5e910160405180910390a3505050610b9261384d565b60008051602061480d833981519152611a5181613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d83398151915290421015611a9d5760405162461bcd60e51b81526004016108eb906144aa565b611aa5613705565b6005546001600160a01b031615611afe5760405162461bcd60e51b815260206004820181905260248201527f556e6f52653a207269736b20706f6f6c206372656174656420616c726561647960448201526064016108eb565b6001600160a01b038516611b545760405162461bcd60e51b815260206004820152601b60248201527f556e6f52653a207a65726f20666163746f72792061646472657373000000000060448201526064016108eb565b6001600160a01b038416611baa5760405162461bcd60e51b815260206004820152601c60248201527f556e6f52653a207a65726f2063757272656e637920616464726573730000000060448201526064016108eb565b604051630d98e31f60e01b81526001600160a01b03861690630d98e31f90611be0908c908c908c908c9030908c90600401614657565b6020604051808303816000875af1158015611bff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c2391906146a5565b600580546001600160a01b0319166001600160a01b039290921691821790554360085560006009819055600a85905560405130917f184d7691bf4a73930a21086fa1bdf0ee3075421531a60730288325fd5838021791a3611c8261384d565b505050505050505050565b611c95613705565b611c9d6136d4565b600554600160a01b900460ff1615611cc75760405162461bcd60e51b81526004016108eb90614516565b6000546001600160a01b0316611cef5760405162461bcd60e51b81526004016108eb906145e8565b611cf83361374f565b60025433600090815260066020526040812054909190611d189042614589565b60055460008054604051633613302f60e01b81523360048201526001600160a01b0391821660248201529490931160448501819052945092911690633613302f906064016020604051808303816000875af1158015611d7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9f9190614615565b6000805460405163ed59344b60e01b8152336004820152602481018490526060604482015260648101929092529192506001600160a01b039091169063ed59344b90608401600060405180830381600087803b158015611dfe57600080fd5b505af1158015611e12573d6000803e3d6000fd5b505033600081815260066020908152604080832060028101849055600101839055915491518681526001600160a01b0390921694509192507ff0fee1f70845d356d6a3e0baa0944ce846437b6469ea89416dad2cd7067919a4910160405180910390a35050611e7f61384d565b565b60009182526000805160206147cd833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000806000806000600560009054906101000a90046001600160a01b03166001600160a01b031663f53fb2006040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f389190614615565b600554604051631665744b60e11b81526001600160a01b038981166004830152929350911690632ccae89690602401606060405180830381865afa158015611f84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa89190614545565b9196509093509150670de0b6b3a7640000611fc3828761459c565b611fcd91906145b3565b9350509193509193565b60008051602061480d833981519152611fef81613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d8339815191529042101561203b5760405162461bcd60e51b81526004016108eb906144aa565b6000831161208b5760405162461bcd60e51b815260206004820152601b60248201527f556e6f52653a206e6f7420616c6c6f77207a65726f2076616c7565000000000060448201526064016108eb565b6005546040516324edae1b60e21b8152600481018590526001600160a01b03909116906393b6b86c90602401600060405180830381600087803b1580156120d157600080fd5b505af11580156120e5573d6000803e3d6000fd5b50506040518581523092507f353ac2778fe09bc60cf3070bb11d548faf4037e4217a06977c16463087474aab9150602001610aa7565b60008051602061480d83398151915261213381613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d8339815191529042101561217f5760405162461bcd60e51b81526004016108eb906144aa565b612187613705565b6001600160a01b0384166121dd5760405162461bcd60e51b815260206004820152601960248201527f556e6f52653a207a65726f206f776e657220616464726573730000000000000060448201526064016108eb565b6001600160a01b0383166122335760405162461bcd60e51b815260206004820152601a60248201527f556e6f52653a7a65726f20666163746f7279206164647265737300000000000060448201526064016108eb565b6005546001600160a01b031661228b5760405162461bcd60e51b815260206004820152601b60248201527f556e6f52653a7a65726f204c5020746f6b656e2061646472657373000000000060448201526064016108eb565b6005546040516377b3d99760e01b81526001600160a01b0386811660048301529182166024820152908416906377b3d997906044016020604051808303816000875af11580156122df573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061230391906146a5565b600180546001600160a01b0319166001600160a01b0392831690811790915560055460405192169130907f3d2362862a7867eb0f64552c1fa638b6adf3907a7defe349eab238f6a0b2d83190600090a46111ad61384d565b6005546040805163e95aa8d360e01b815290516000926001600160a01b03169163e95aa8d39160048083019260209291908290030181865afa1580156123a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123c99190614615565b905090565b60008051602061480d8339815191526123e681613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d833981519152904210156124325760405162461bcd60e51b81526004016108eb906144aa565b6108fc613a2b565b60008051602061480d83398151915261245281613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d8339815191529042101561249e5760405162461bcd60e51b81526004016108eb906144aa565b600083116124ee5760405162461bcd60e51b815260206004820152601f60248201527f556e6f52653a206e6f7420616c6c6f77207a65726f206c6f636b2074696d650060448201526064016108eb565b600283905560405183815230907f2c2c43c64e937ae35257af782c222986dc5adb4f56dc0881594e79bf83658d8c90602001610aa7565b60008051602061480d83398151915261253d81613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d833981519152904210156125895760405162461bcd60e51b81526004016108eb906144aa565b612591613705565b6001600160a01b0384166125e75760405162461bcd60e51b815260206004820181905260248201527f556e6f52653a20726577617264657220666163746f7279206e6f20657869737460448201526064016108eb565b6001600160a01b03851661263d5760405162461bcd60e51b815260206004820152601c60248201527f556e6f52653a207a65726f206f70657261746f7220616464726573730000000060448201526064016108eb565b6001600160a01b0383166126935760405162461bcd60e51b815260206004820152601c60248201527f556e6f52653a207a65726f2063757272656e637920616464726573730000000060448201526064016108eb565b6040516369ee745160e01b81526001600160a01b03868116600483015284811660248301523060448301528516906369ee7451906064016020604051808303816000875af11580156126e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061270d91906146a5565b600480546001600160a01b0319166001600160a01b0392831690811790915560405191851682529030907f6c409a36847a0a3870deae25f656f4300d45957d2643fc27faab145e19cfcf1b9060200160405180910390a361124361384d565b6001600160a01b038082166000908152600660209081526040808320600201546005548251627a9fd960e91b81529251949591948694919092169263f53fb20092600480830193928290030181865afa1580156127cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127f19190614615565b9050670de0b6b3a7640000612806828461459c565b61281091906145b3565b925050915091565b60008051602061480d83398151915261283081613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d8339815191529042101561287c5760405162461bcd60e51b81526004016108eb906144aa565b6001600160a01b0385811660008181526006602052604090819020600281018890556001018690556005549051637e348b7d60e01b815260048101929092526024820187905290911690637e348b7d90604401600060405180830381600087803b1580156128e957600080fd5b505af11580156128fd573d6000803e3d6000fd5b50506040518681526001600160a01b03881692503091507f465dd1981de2fdd0163048712ba5bbf7ff0ff09e5f6bd26f566a19079909594a9060200160405180910390a35050505050565b61295182610f88565b61295a81613670565b6111ad8383613918565b61296c6136d4565b612974613705565b600554600160a81b900460ff166129dd5760405162461bcd60e51b815260206004820152602760248201527f556e6f72653a20656d657267656e63795769746864726177206973206e6f7420604482015266185b1b1bddd95960ca1b60648201526084016108eb565b3360009081526006602090815260409182902082516080810184528154815260018201549281019290925260028101549282018390526003015460ff16151560608201529080612a6f5760405162461bcd60e51b815260206004820152601760248201527f556e6f72653a205a65726f207573657220616d6f756e7400000000000000000060448201526064016108eb565b336000818152600660205260408082208281556001810183905560028101929092556003909101805460ff1916905560055490516395ccea6760e01b81526004810192909252602482018390526001600160a01b0316906395ccea67906044016020604051808303816000875af1158015612aee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b1291906146c2565b5060405181815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695906020015b60405180910390a25050611e7f61384d565b600554600160a01b900460ff1615612b7d5760405162461bcd60e51b81526004016108eb90614516565b612b856136d4565b60008051602061480d833981519152612b9d81613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d83398151915290421015612be95760405162461bcd60e51b81526004016108eb906144aa565b6001600160a01b038316612c0f5760405162461bcd60e51b81526004016108eb906145e8565b612c198484613873565b50600254612c2790426145d5565b60008581526007602090815260408083206001600160a01b038816808552925291829020929092555130907faa08bed1c8e2500452096c9af125a3944be2a139782a1853abaef7a74bd7dd5190612c819088815260200190565b60405180910390a350505050565b600080600560009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ce5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d099190614615565b6009546008549192509043118015612d2057508115155b15612d7657600854600090612d359043614589565b600a54909150600090612d48908361459c565b905083612d5d670de0b6b3a76400008361459c565b612d6791906145b3565b612d7190846145d5565b925050505b6001600160a01b03841660009081526006602052604090206002810154600190910154670de0b6b3a7640000612dac848461459c565b612db691906145b3565b612dc09190614589565b95945050505050565b612dd1613705565b600554600160a01b900460ff1615612dfb5760405162461bcd60e51b81526004016108eb90614516565b612e036136d4565b600554604051635d2cd2a760e01b815233600482015260009182916001600160a01b0390911690635d2cd2a79060240160408051808303816000875af1158015612e51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e7591906146e4565b604080518381526020810183905292945090925033917f09c6481cb228ea7f61ceb67c8e708038eb74bbb68cfcc54a9cfca199087ecfb79101612b41565b600854431115611e7f57600554604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015612f07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f2b9190614615565b90508015612f8857600854600090612f439043614589565b600a54909150600090612f56908361459c565b905082612f6b670de0b6b3a76400008361459c565b612f7591906145b3565b600954612f8291906145d5565b60095550505b43600881905560095460408051928352602083018490528201527f1f2d1a9fde053af46b5db3dc92a8aa8696e56a677998fdd1311b45be341f7853906060015b60405180910390a150565b600354421015612ff55760405162461bcd60e51b81526004016108eb906144df565b612ffd6136d4565b600554600160a01b900460ff16156130275760405162461bcd60e51b81526004016108eb90614516565b61302f613705565b61303881613a74565b6130428133613aff565b6005546040518281526001600160a01b039091169033907fd3dba7b5565b16b7749db7d1938410a636e3c7a6ea46ed8ce7e259e19f2f3b9f9060200160405180910390a3610b9261384d565b6003544210156130b05760405162461bcd60e51b81526004016108eb906144df565b6130b86136d4565b6130c0613705565b600254336000908152600660205260409020546130dd9042614589565b10156131205760405162461bcd60e51b8152602060048201526012602482015271556e6f52653a204c6f636b65642074696d6560701b60448201526064016108eb565b6131293361374f565b33600081815260066020526040808220600201546005549151636ce40c7960e01b81526004810194909452602484018590529282916001600160a01b031690636ce40c799060440160408051808303816000875af115801561318f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131b391906146e4565b915091506000670de0b6b3a7640000600860010154856131d3919061459c565b6131dd91906145b3565b600954909150670de0b6b3a7640000906131f7908561459c565b61320191906145b3565b61320b9082614589565b336000908152600660205260409020600101556132288385614589565b3360008181526006602090815260409182902060020193909355805186815292830185905290917f617c612e91653c86cd4538e3de94b98c8dd628b41e343380d1cf858f95c0674a910160405180910390a250505050610b9261384d565b6003544210156132a85760405162461bcd60e51b81526004016108eb906144df565b600554600160a01b900460ff16156132d25760405162461bcd60e51b81526004016108eb90614516565b6132da6136d4565b7f6d5c9827c1f410bbb61d3b2a0a34b6b30492d9a1fd38588edca7ec4562ab9c9b61330481613670565b61330c613705565b600480546040805163e5a6b10f60e01b815290516001600160a01b039092169263e5a6b10f9282820192602092908290030181865afa158015613353573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061337791906146a5565b6001600160a01b0316600560009054906101000a90046001600160a01b03166001600160a01b031663e5a6b10f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156133d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133f791906146a5565b6001600160a01b03161461344d5760405162461bcd60e51b815260206004820152601b60248201527f556e6f52653a2063757272656e6379206e6f74206d617463686564000000000060448201526064016108eb565b613455612eb3565b60008060005b8451811015613560576006600086838151811061347a5761347a614708565b6020908102919091018101516001600160a01b031682528101919091526040016000206003015460ff16156134f15760405162461bcd60e51b815260206004820152601a60248201527f556e6f52653a20726f6c6c6f766572206973206e6f742073657400000000000060448201526064016108eb565b60008061351687848151811061350957613509614708565b6020026020010151613d3a565b909250905061352582866145d5565b945061353181856145d5565b93506135568288858151811061354957613549614708565b6020026020010151613aff565b505060010161345b565b506004546001600160a01b03161580159061357a57508115155b80156135865750600081115b1561360f5760048054600554604051631963b13960e21b81526001600160a01b03918216938101939093526024830185905260448301849052169063658ec4e4906064016020604051808303816000875af11580156135e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061360d9190614615565b505b6005546040516001600160a01b039091169061362c90869061471e565b604051908190038120848252907f2b1ab5aad08854cca1e3b3cd94bbb4acc5cf06bd794383289c30ae264d03121d9060200160405180910390a350506108fc61384d565b610b928133613e58565b613682613e91565b6000805160206147ed833981519152805460ff191681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001612fc8565b6000805160206147ed8339815191525460ff1615611e7f5760405163d93c066560e01b815260040160405180910390fd5b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0080546001190161374957604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b613757612eb3565b60008061376383613d3a565b60045491935091506001600160a01b03161580159061378157508115155b156138085760048054604051631963b13960e21b81526001600160a01b0386811693820193909352602481018590526044810184905291169063658ec4e4906064016020604051808303816000875af11580156137e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138069190614615565b505b6040518281526001600160a01b0384169033907fa0306f61d3fafe13787b78e276cb6b644382854a66cb46daae14227d3ec267979060200160405180910390a3505050565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b60006000805160206147cd83398151915261388e8484611e81565b61390e576000848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556138c43390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610881565b6000915050610881565b60006139226136d4565b600554600160a01b900460ff161561394c5760405162461bcd60e51b81526004016108eb90614516565b61395583610f88565b600081815260076020908152604080832033845290915290205442101561398e5760405162461bcd60e51b81526004016108eb906144aa565b6139988484613ec1565b949350505050565b6139a8613f3d565b611e7f613f86565b6139b8613f3d565b611e7f613f8e565b611e7f613f3d565b6000805160206147cd83398151915260006139e284610f88565b600085815260208490526040808220600101869055519192508491839187917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a450505050565b613a336136d4565b6000805160206147ed833981519152805460ff191660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258336136bc565b6005546040805163e5a6b10f60e01b815290516000926001600160a01b03169163e5a6b10f9160048083019260209291908290030181865afa158015613abe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ae291906146a5565b6005549091506108fc90829033906001600160a01b031685613faf565b81600003613b435760405162461bcd60e51b8152602060048201526011602482015270556e6f52653a205a45524f2056616c756560781b60448201526064016108eb565b613b4b612eb3565b60055460408051627a9fd960e91b815290516000926001600160a01b03169163f53fb2009160048083019260209291908290030181865afa158015613b94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613bb89190614615565b600554604051637e348b7d60e01b81526001600160a01b03858116600483015260248201879052929350911690637e348b7d90604401600060405180830381600087803b158015613c0857600080fd5b505af1158015613c1c573d6000803e3d6000fd5b505050506001600160a01b03821660009081526006602090815260409182902082516080810184528154815260018201549281019290925260028101549282019290925260039091015460ff1615156060820152600954670de0b6b3a7640000908390613c89878461459c565b613c93919061459c565b613c9d91906145b3565b613ca791906145b3565b8160200151613cb691906145d5565b602082015281613cce85670de0b6b3a764000061459c565b613cd891906145b3565b8160400151613ce791906145d5565b60408281019182526001600160a01b039490941660009081526006602090815294902082518155938201516001850155516002840155606001516003909201805460ff1916921515929092179091555050565b600554604051631665744b60e11b81526001600160a01b0383811660048301526000928392839290911690632ccae89690602401606060405180830381865afa158015613d8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613daf9190614545565b509150508015613dc55750600093849350915050565b6001600160a01b038416600090815260066020526040812060020154600954909190670de0b6b3a764000090613dfb908461459c565b613e0591906145b3565b6001600160a01b03871660009081526006602052604081206001015491925090613e2f9083614589565b6001600160a01b0390971660009081526006602052604090206001019190915550939492505050565b613e628282611e81565b6108fc5760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016108eb565b6000805160206147ed8339815191525460ff16611e7f57604051638dfc202b60e01b815260040160405180910390fd5b60006000805160206147cd833981519152613edc8484611e81565b1561390e576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610881565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16611e7f57604051631afcd79f60e31b815260040160405180910390fd5b61384d613f3d565b613f96613f3d565b6000805160206147ed833981519152805460ff19169055565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691614013919061475d565b6000604051808303816000865af19150503d8060008114614050576040519150601f19603f3d011682016040523d82523d6000602084013e614055565b606091505b509150915081801561407f57508051158061407f57508080602001905181019061407f91906146c2565b6140e55760405162461bcd60e51b815260206004820152603160248201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472604482015270185b9cd9995c919c9bdb4819985a5b1959607a1b60648201526084016108eb565b505050505050565b6000602082840312156140ff57600080fd5b81356001600160e01b03198116811461411757600080fd5b9392505050565b60006020828403121561413057600080fd5b5035919050565b6000806040838503121561414a57600080fd5b50508035926020909101359150565b6001600160a01b0381168114610b9257600080fd5b803561417981614159565b919050565b60006020828403121561419057600080fd5b813561411781614159565b6000806000606084860312156141b057600080fd5b83356141bb81614159565b925060208401356141cb81614159565b929592945050506040919091013590565b600080604083850312156141ef57600080fd5b82356141fa81614159565b946020939093013593505050565b6000806040838503121561421b57600080fd5b82359150602083013561422d81614159565b809150509250929050565b6000806040838503121561424b57600080fd5b823561425681614159565b9150602083013561422d81614159565b60008083601f84011261427857600080fd5b50813567ffffffffffffffff81111561429057600080fd5b6020830191508360208285010111156142a857600080fd5b9250929050565b600080600080600080600060a0888a0312156142ca57600080fd5b873567ffffffffffffffff808211156142e257600080fd5b6142ee8b838c01614266565b909950975060208a013591508082111561430757600080fd5b506143148a828b01614266565b909650945050604088013561432881614159565b9250606088013561433881614159565b809250506080880135905092959891949750929550565b60008060006060848603121561436457600080fd5b833561436f81614159565b9250602084013561437f81614159565b9150604084013561438f81614159565b809150509250925092565b6000806000606084860312156143af57600080fd5b83356143ba81614159565b95602085013595506040909401359392505050565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156143f857600080fd5b823567ffffffffffffffff8082111561441057600080fd5b818501915085601f83011261442457600080fd5b813581811115614436576144366143cf565b8060051b604051601f19603f8301168101818110858211171561445b5761445b6143cf565b60405291825284820192508381018501918883111561447957600080fd5b938501935b8285101561449e5761448f8561416e565b8452938501939285019261447e565b98975050505050505050565b6020808252818101527f556e6f52653a20726f6c6c206c6f636b2074696d65206e6f7420706173736564604082015260600190565b60208082526019908201527f556e6f52653a206e6f7420617661696c61626c652074696d6500000000000000604082015260600190565b602080825260159082015274155b9bd4994e881c1bdbdb081a5cc81ada5b1b1959605a1b604082015260600190565b60008060006060848603121561455a57600080fd5b8351925060208401519150604084015190509250925092565b634e487b7160e01b600052601160045260246000fd5b8181038181111561088157610881614573565b808202811582820484141761088157610881614573565b6000826145d057634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561088157610881614573565b602080825260139082015272556e6f52653a207a65726f206164647265737360681b604082015260600190565b60006020828403121561462757600080fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60808152600061466b60808301888a61462e565b828103602084015261467e81878961462e565b6001600160a01b039586166040850152939094166060909201919091525095945050505050565b6000602082840312156146b757600080fd5b815161411781614159565b6000602082840312156146d457600080fd5b8151801515811461411757600080fd5b600080604083850312156146f757600080fd5b505080516020909101519092909150565b634e487b7160e01b600052603260045260246000fd5b815160009082906020808601845b838110156147515781516001600160a01b03168552938201939082019060010161472c565b50929695505050505050565b6000825160005b8181101561477e5760208186018101518583015201614764565b50600092019182525091905056fea70365933f78520ef41d6645ba61e509916296603327302d41466c063e8e2608a7fb00808094bb0669054259df045936913ac8f131613a7a6da2e81ac75d5f4802dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800cd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220492e067b4891904492cfd3b9e81ef1764a20a8505231f706eab73d6cdc36eea764736f6c63430008170033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103835760003560e01c80638ba04b17116101de578063ba6194571161010f578063dff87203116100ad578063e3161ddd1161007c578063e3161ddd1461080f578063e3824a3814610817578063f1daf24c1461082a578063fd91db961461083d57600080fd5b8063dff87203146107b6578063e08c5de1146107c9578063e0c8d9a5146107dc578063e19e71681461080757600080fd5b8063d547741f116100e9578063d547741f14610773578063d99fec7114610786578063db2e21bc1461079b578063dcc3e06e146107a357600080fd5b8063ba61945714610725578063c4d87fe21461074d578063c4e5dacf1461076057600080fd5b8063a217fddf1161017c578063aceda7f911610156578063aceda7f9146106c4578063ae04d45d146106d8578063af16d6e0146106eb578063b1503774146106fe57600080fd5b8063a217fddf146106ac578063a3bdd632146106b4578063aa09d5b7146106bc57600080fd5b80639336f406116101b85780639336f4061461064057806393b6b86c1461067357806398c6e760146106865780639cdf6c271461069957600080fd5b80638ba04b17146106125780638fd3ab801461062557806391d148541461062d57600080fd5b806336568abe116102b85780636abfd183116102565780637a39b8d8116102305780637a39b8d8146105c15780637da2a4a7146105c95780638395206c146105f057806389919b711461060357600080fd5b80636abfd18314610590578063736ec05c1461059957806375b238fc146105ac57600080fd5b80635a2f3d09116102925780635a2f3d09146105305780635c975abb1461055d5780635d90bad914610575578063677554151461058857600080fd5b806336568abe146104df578063485cc955146104f25780634c0323661461050557600080fd5b80630e9ae420116103255780631f3a0e41116102ff5780631f3a0e4114610492578063248a9ca3146104a65780632e4a0142146104b95780632f2ff15d146104cc57600080fd5b80630e9ae420146104125780630f4c3c4f146104255780631959a0021461043857600080fd5b80630bd075a1116103615780630bd075a1146103c25780630d668087146103d55780630e2be506146103ec5780630e5c011e146103ff57600080fd5b806301ffc9a714610388578063068cc514146103b0578063093cf18f146103ba575b600080fd5b61039b6103963660046140ed565b610850565b60405190151581526020015b60405180910390f35b6103b8610887565b005b6103b8610900565b6103b86103d036600461411e565b6109cc565b6103de60025481565b6040519081526020016103a7565b6103b86103fa366004614137565b610ab4565b6103b861040d36600461417e565b610b25565b6103b861042036600461419b565b610b95565b6103b861043336600461411e565b610ec1565b61047061044636600461417e565b60066020526000908152604090208054600182015460028301546003909301549192909160ff1684565b60408051948552602085019390935291830152151560608201526080016103a7565b60055461039b90600160a01b900460ff1681565b6103de6104b436600461411e565b610f88565b6103b86104c73660046141dc565b610faa565b6103b86104da366004614208565b6111b3565b6103b86104ed366004614208565b61124a565b6103b8610500366004614238565b61127d565b600154610518906001600160a01b031681565b6040516001600160a01b0390911681526020016103a7565b600854600954600a5461054292919083565b604080519384526020840192909252908201526060016103a7565b6000805160206147ed8339815191525460ff1661039b565b6103b861058336600461411e565b6114bc565b6103b86115a7565b6103de60035481565b6103b86105a736600461417e565b61164b565b6103de60008051602061480d83398151915281565b6103b8611722565b6103b8336000908152600660205260409020600301805460ff19811660ff90911615179055565b6103b86105fe36600461411e565b6117cc565b6103de670de0b6b3a764000081565b6103b86106203660046142af565b611a39565b6103b8611c8d565b61039b61063b366004614208565b611e81565b61065361064e36600461417e565b611eb9565b6040805194855260208501939093529183015260608201526080016103a7565b6103b861068136600461411e565b611fd7565b600054610518906001600160a01b031681565b6103b86106a7366004614238565b61211b565b6103de600081565b6103de61235b565b6103b86123ce565b60055461039b90600160a81b900460ff1681565b6103b86106e636600461411e565b61243a565b6103b86106f936600461434f565b612525565b6103de7f6d5c9827c1f410bbb61d3b2a0a34b6b30492d9a1fd38588edca7ec4562ab9c9b81565b61073861073336600461417e565b61276c565b604080519283526020830191909152016103a7565b6103b861075b36600461439a565b612818565b600554610518906001600160a01b031681565b6103b8610781366004614208565b612948565b6103de6000805160206147ad83398151915281565b6103b8612964565b600454610518906001600160a01b031681565b6103b86107c4366004614208565b612b53565b6103de6107d736600461417e565b612c8f565b6103de6107ea366004614208565b600760209081526000928352604080842090915290825290205481565b6103b8612dc9565b6103b8612eb3565b6103b861082536600461411e565b612fd3565b6103b861083836600461411e565b61308e565b6103b861084b3660046143e5565b613286565b60006001600160e01b03198216637965db0b60e01b148061088157506301ffc9a760e01b6001600160e01b03198316145b92915050565b60008051602061480d83398151915261089f81613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d833981519152904210156108f45760405162461bcd60e51b81526004016108eb906144aa565b60405180910390fd5b6108fc61367a565b5050565b60008051602061480d83398151915261091881613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d833981519152904210156109645760405162461bcd60e51b81526004016108eb906144aa565b6005805460ff600160a81b808304821615810260ff60a81b19909316929092179283905560405130937f4a1fbdd1e9ef46cfe9e097f622e1d79f51dcd6762c86122e6a8198c5394d6401936109c0939104161515815260200190565b60405180910390a25050565b60008051602061480d8339815191526109e481613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d83398151915290421015610a305760405162461bcd60e51b81526004016108eb906144aa565b60008311610a745760405162461bcd60e51b8152602060048201526011602482015270556e6f52653a207a65726f2076616c756560781b60448201526064016108eb565b600a83905560405183815230907fbd1dd13c6a5b4a28ebd27fdcb8fdd01aba6bbb9f67599306248f465bcdf9817f906020015b60405180910390a2505050565b60008051602061480d833981519152610acc81613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d83398151915290421015610b185760405162461bcd60e51b81526004016108eb906144aa565b5050600991909155600855565b600354421015610b475760405162461bcd60e51b81526004016108eb906144df565b600554600160a01b900460ff1615610b715760405162461bcd60e51b81526004016108eb90614516565b610b796136d4565b610b81613705565b610b8a8161374f565b610b9261384d565b50565b600554600160a01b900460ff1615610bbf5760405162461bcd60e51b81526004016108eb90614516565b610bc76136d4565b610bcf613705565b6005546001600160a01b03163314610c295760405162461bcd60e51b815260206004820181905260248201527f556e6f52653a206e6f7420616c6c6f77206f7468657273207472616e7366657260448201526064016108eb565b6001546001600160a01b03848116911614801590610c5557506001546001600160a01b03838116911614155b15610eb457610c638361374f565b6001600160a01b03838116600081815260066020526040808220600201546005549151631665744b60e11b81526004810194909452939192911690632ccae89690602401606060405180830381865afa158015610cc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce89190614545565b50509050828183610cf99190614589565b1015610d475760405162461bcd60e51b815260206004820152601760248201527f556e6f52653a2062616c616e6365206f766572666c6f7700000000000000000060448201526064016108eb565b600954600090670de0b6b3a764000090610d61908561459c565b610d6b91906145b3565b600954909150670de0b6b3a764000090610d85908661459c565b610d8f91906145b3565b610d999082614589565b6001600160a01b038716600090815260066020526040902060010155610dbf8484614589565b6001600160a01b038716600090815260066020526040902060020155600954670de0b6b3a764000090610df2908661459c565b610dfc91906145b3565b6001600160a01b038616600090815260066020526040902060010154610e2291906145d5565b6001600160a01b0386166000908152600660205260409020600181019190915560020154610e519085906145d5565b6001600160a01b0380871660008181526006602052604090819020600201939093559151908816907fe97af49bf17de46bed3f953a242569bed68114f89f39c1afe4012bba1c5963d490610ea89088815260200190565b60405180910390a35050505b610ebc61384d565b505050565b60008051602061480d833981519152610ed981613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d83398151915290421015610f255760405162461bcd60e51b81526004016108eb906144aa565b60055460405163f3212d2960e01b8152600481018590526001600160a01b039091169063f3212d2990602401600060405180830381600087803b158015610f6b57600080fd5b505af1158015610f7f573d6000803e3d6000fd5b50505050505050565b60009081526000805160206147cd833981519152602052604090206001015490565b6000805160206147ad833981519152610fc281613670565b3360009081527f07cf794796064a1dc9f93079878b258b7331026292fbb4d3f9a990077aff9e5d60205260409020546000805160206147ad833981519152904210156110205760405162461bcd60e51b81526004016108eb906144aa565b6003544210156110425760405162461bcd60e51b81526004016108eb906144df565b61104a6136d4565b600554600160a01b900460ff16156110745760405162461bcd60e51b81526004016108eb90614516565b61107c613705565b6001600160a01b0384166110a25760405162461bcd60e51b81526004016108eb906145e8565b600083116110e75760405162461bcd60e51b8152602060048201526012602482015271155b9bd4994e881e995c9bc8185b5bdd5b9d60721b60448201526064016108eb565b60055460405163172500a160e11b81526001600160a01b038681166004830152602482018690526000921690632e4a0142906044016020604051808303816000875af115801561113b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115f9190614615565b9050846001600160a01b03167f6420c9536b9a539410a930b1fd8d115dc296d8b71426dcc0ab64f2f736b7d59f8260405161119c91815260200190565b60405180910390a2506111ad61384d565b50505050565b6111bb6136d4565b600554600160a01b900460ff16156111e55760405162461bcd60e51b81526004016108eb90614516565b6111ee82610f88565b6111f781613670565b61120083610f88565b60008181526007602090815260408083203384529091529020544210156112395760405162461bcd60e51b81526004016108eb906144aa565b6112438484613873565b5050505050565b6001600160a01b03811633146112735760405163334bd91960e11b815260040160405180910390fd5b610ebc8282613918565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156112c35750825b905060008267ffffffffffffffff1660011480156112e05750303b155b9050811580156112ee575080155b1561130c5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561133657845460ff60401b1916600160401b1785555b6001600160a01b0387166113975760405162461bcd60e51b815260206004820152602260248201527f556e6f52653a207a65726f206d756c746953696757616c6c6574206164647265604482015261737360f01b60648201526084016108eb565b6113a4426203f4806145d5565b600355620d2f006002556113b66139a0565b6113be6139b0565b6113c66139c0565b6113de60008051602061480d83398151915288613873565b506113f76000805160206147ad83398151915287613873565b5061141060008051602061480d833981519152806139c8565b6114366000805160206147ad83398151915260008051602061480d8339815191526139c8565b61146e7f6d5c9827c1f410bbb61d3b2a0a34b6b30492d9a1fd38588edca7ec4562ab9c9b60008051602061480d8339815191526139c8565b8315610f7f57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050565b60008051602061480d8339815191526114d481613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d833981519152904210156115205760405162461bcd60e51b81526004016108eb906144aa565b600083116115705760405162461bcd60e51b815260206004820181905260248201527f556e6f52653a206e6f7420616c6c6f77207a65726f2073746172742074696d6560448201526064016108eb565b600383905560405183815230907fa8aa08cc14eef7b97ab4cd52f37082e23f7526bccc98cf91e6a1d412494b905190602001610aa7565b60008051602061480d8339815191526115bf81613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d8339815191529042101561160b5760405162461bcd60e51b81526004016108eb906144aa565b6005805460ff60a01b191690556040516000815233907f77337fcf1b48e6e024b256962b66c49de98c9f606b2cd9937cc0edbc7a0fb709906020016109c0565b60008051602061480d83398151915261166381613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d833981519152904210156116af5760405162461bcd60e51b81526004016108eb906144aa565b6001600160a01b0383166116d55760405162461bcd60e51b81526004016108eb906145e8565b600080546001600160a01b0319166001600160a01b0385169081178255604051909130917f877238238dbd7134e89b00809ea73fabb50da117ace807a6b31c733bbf55d3699190a3505050565b60008051602061480d83398151915261173a81613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d833981519152904210156117865760405162461bcd60e51b81526004016108eb906144aa565b6005805460ff60a01b1916600160a01b1790556040516001815233907f7c952f2e528aa25b4eaf8b6c07af29184b27ce591295e543ced0a27b167dc794906020016109c0565b6003544210156117ee5760405162461bcd60e51b81526004016108eb906144df565b6117f66136d4565b6117fe613705565b6118073361374f565b336000908152600660209081526040808320600201546005548251627a9fd960e91b815292519194936001600160a01b039091169263f53fb20092600480830193928290030181865afa158015611862573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118869190614615565b600554604051631665744b60e11b81523360048201529192506000916001600160a01b0390911690632ccae89690602401606060405180830381865afa1580156118d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f89190614545565b505090508184670de0b6b3a7640000611911919061459c565b61191b91906145b3565b6119258285614589565b10156119735760405162461bcd60e51b815260206004820152601f60248201527f556e6f52653a20776974686472617720616d6f756e74206f766572666c6f770060448201526064016108eb565b6005546040516323de6d9560e11b8152336004820152602481018690526001600160a01b03909116906347bcdb2a90604401600060405180830381600087803b1580156119bf57600080fd5b505af11580156119d3573d6000803e3d6000fd5b50503360008181526006602090815260409182902042905560055491518981526001600160a01b0390921694509192507f940a14c75c418e7230a2e65567722d2dda5a6713cf71b369bd0fa219fdc1ac5e910160405180910390a3505050610b9261384d565b60008051602061480d833981519152611a5181613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d83398151915290421015611a9d5760405162461bcd60e51b81526004016108eb906144aa565b611aa5613705565b6005546001600160a01b031615611afe5760405162461bcd60e51b815260206004820181905260248201527f556e6f52653a207269736b20706f6f6c206372656174656420616c726561647960448201526064016108eb565b6001600160a01b038516611b545760405162461bcd60e51b815260206004820152601b60248201527f556e6f52653a207a65726f20666163746f72792061646472657373000000000060448201526064016108eb565b6001600160a01b038416611baa5760405162461bcd60e51b815260206004820152601c60248201527f556e6f52653a207a65726f2063757272656e637920616464726573730000000060448201526064016108eb565b604051630d98e31f60e01b81526001600160a01b03861690630d98e31f90611be0908c908c908c908c9030908c90600401614657565b6020604051808303816000875af1158015611bff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c2391906146a5565b600580546001600160a01b0319166001600160a01b039290921691821790554360085560006009819055600a85905560405130917f184d7691bf4a73930a21086fa1bdf0ee3075421531a60730288325fd5838021791a3611c8261384d565b505050505050505050565b611c95613705565b611c9d6136d4565b600554600160a01b900460ff1615611cc75760405162461bcd60e51b81526004016108eb90614516565b6000546001600160a01b0316611cef5760405162461bcd60e51b81526004016108eb906145e8565b611cf83361374f565b60025433600090815260066020526040812054909190611d189042614589565b60055460008054604051633613302f60e01b81523360048201526001600160a01b0391821660248201529490931160448501819052945092911690633613302f906064016020604051808303816000875af1158015611d7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9f9190614615565b6000805460405163ed59344b60e01b8152336004820152602481018490526060604482015260648101929092529192506001600160a01b039091169063ed59344b90608401600060405180830381600087803b158015611dfe57600080fd5b505af1158015611e12573d6000803e3d6000fd5b505033600081815260066020908152604080832060028101849055600101839055915491518681526001600160a01b0390921694509192507ff0fee1f70845d356d6a3e0baa0944ce846437b6469ea89416dad2cd7067919a4910160405180910390a35050611e7f61384d565b565b60009182526000805160206147cd833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000806000806000600560009054906101000a90046001600160a01b03166001600160a01b031663f53fb2006040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f389190614615565b600554604051631665744b60e11b81526001600160a01b038981166004830152929350911690632ccae89690602401606060405180830381865afa158015611f84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa89190614545565b9196509093509150670de0b6b3a7640000611fc3828761459c565b611fcd91906145b3565b9350509193509193565b60008051602061480d833981519152611fef81613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d8339815191529042101561203b5760405162461bcd60e51b81526004016108eb906144aa565b6000831161208b5760405162461bcd60e51b815260206004820152601b60248201527f556e6f52653a206e6f7420616c6c6f77207a65726f2076616c7565000000000060448201526064016108eb565b6005546040516324edae1b60e21b8152600481018590526001600160a01b03909116906393b6b86c90602401600060405180830381600087803b1580156120d157600080fd5b505af11580156120e5573d6000803e3d6000fd5b50506040518581523092507f353ac2778fe09bc60cf3070bb11d548faf4037e4217a06977c16463087474aab9150602001610aa7565b60008051602061480d83398151915261213381613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d8339815191529042101561217f5760405162461bcd60e51b81526004016108eb906144aa565b612187613705565b6001600160a01b0384166121dd5760405162461bcd60e51b815260206004820152601960248201527f556e6f52653a207a65726f206f776e657220616464726573730000000000000060448201526064016108eb565b6001600160a01b0383166122335760405162461bcd60e51b815260206004820152601a60248201527f556e6f52653a7a65726f20666163746f7279206164647265737300000000000060448201526064016108eb565b6005546001600160a01b031661228b5760405162461bcd60e51b815260206004820152601b60248201527f556e6f52653a7a65726f204c5020746f6b656e2061646472657373000000000060448201526064016108eb565b6005546040516377b3d99760e01b81526001600160a01b0386811660048301529182166024820152908416906377b3d997906044016020604051808303816000875af11580156122df573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061230391906146a5565b600180546001600160a01b0319166001600160a01b0392831690811790915560055460405192169130907f3d2362862a7867eb0f64552c1fa638b6adf3907a7defe349eab238f6a0b2d83190600090a46111ad61384d565b6005546040805163e95aa8d360e01b815290516000926001600160a01b03169163e95aa8d39160048083019260209291908290030181865afa1580156123a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123c99190614615565b905090565b60008051602061480d8339815191526123e681613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d833981519152904210156124325760405162461bcd60e51b81526004016108eb906144aa565b6108fc613a2b565b60008051602061480d83398151915261245281613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d8339815191529042101561249e5760405162461bcd60e51b81526004016108eb906144aa565b600083116124ee5760405162461bcd60e51b815260206004820152601f60248201527f556e6f52653a206e6f7420616c6c6f77207a65726f206c6f636b2074696d650060448201526064016108eb565b600283905560405183815230907f2c2c43c64e937ae35257af782c222986dc5adb4f56dc0881594e79bf83658d8c90602001610aa7565b60008051602061480d83398151915261253d81613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d833981519152904210156125895760405162461bcd60e51b81526004016108eb906144aa565b612591613705565b6001600160a01b0384166125e75760405162461bcd60e51b815260206004820181905260248201527f556e6f52653a20726577617264657220666163746f7279206e6f20657869737460448201526064016108eb565b6001600160a01b03851661263d5760405162461bcd60e51b815260206004820152601c60248201527f556e6f52653a207a65726f206f70657261746f7220616464726573730000000060448201526064016108eb565b6001600160a01b0383166126935760405162461bcd60e51b815260206004820152601c60248201527f556e6f52653a207a65726f2063757272656e637920616464726573730000000060448201526064016108eb565b6040516369ee745160e01b81526001600160a01b03868116600483015284811660248301523060448301528516906369ee7451906064016020604051808303816000875af11580156126e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061270d91906146a5565b600480546001600160a01b0319166001600160a01b0392831690811790915560405191851682529030907f6c409a36847a0a3870deae25f656f4300d45957d2643fc27faab145e19cfcf1b9060200160405180910390a361124361384d565b6001600160a01b038082166000908152600660209081526040808320600201546005548251627a9fd960e91b81529251949591948694919092169263f53fb20092600480830193928290030181865afa1580156127cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127f19190614615565b9050670de0b6b3a7640000612806828461459c565b61281091906145b3565b925050915091565b60008051602061480d83398151915261283081613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d8339815191529042101561287c5760405162461bcd60e51b81526004016108eb906144aa565b6001600160a01b0385811660008181526006602052604090819020600281018890556001018690556005549051637e348b7d60e01b815260048101929092526024820187905290911690637e348b7d90604401600060405180830381600087803b1580156128e957600080fd5b505af11580156128fd573d6000803e3d6000fd5b50506040518681526001600160a01b03881692503091507f465dd1981de2fdd0163048712ba5bbf7ff0ff09e5f6bd26f566a19079909594a9060200160405180910390a35050505050565b61295182610f88565b61295a81613670565b6111ad8383613918565b61296c6136d4565b612974613705565b600554600160a81b900460ff166129dd5760405162461bcd60e51b815260206004820152602760248201527f556e6f72653a20656d657267656e63795769746864726177206973206e6f7420604482015266185b1b1bddd95960ca1b60648201526084016108eb565b3360009081526006602090815260409182902082516080810184528154815260018201549281019290925260028101549282018390526003015460ff16151560608201529080612a6f5760405162461bcd60e51b815260206004820152601760248201527f556e6f72653a205a65726f207573657220616d6f756e7400000000000000000060448201526064016108eb565b336000818152600660205260408082208281556001810183905560028101929092556003909101805460ff1916905560055490516395ccea6760e01b81526004810192909252602482018390526001600160a01b0316906395ccea67906044016020604051808303816000875af1158015612aee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b1291906146c2565b5060405181815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695906020015b60405180910390a25050611e7f61384d565b600554600160a01b900460ff1615612b7d5760405162461bcd60e51b81526004016108eb90614516565b612b856136d4565b60008051602061480d833981519152612b9d81613670565b33600090815260008051602061478d833981519152602052604090205460008051602061480d83398151915290421015612be95760405162461bcd60e51b81526004016108eb906144aa565b6001600160a01b038316612c0f5760405162461bcd60e51b81526004016108eb906145e8565b612c198484613873565b50600254612c2790426145d5565b60008581526007602090815260408083206001600160a01b038816808552925291829020929092555130907faa08bed1c8e2500452096c9af125a3944be2a139782a1853abaef7a74bd7dd5190612c819088815260200190565b60405180910390a350505050565b600080600560009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ce5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d099190614615565b6009546008549192509043118015612d2057508115155b15612d7657600854600090612d359043614589565b600a54909150600090612d48908361459c565b905083612d5d670de0b6b3a76400008361459c565b612d6791906145b3565b612d7190846145d5565b925050505b6001600160a01b03841660009081526006602052604090206002810154600190910154670de0b6b3a7640000612dac848461459c565b612db691906145b3565b612dc09190614589565b95945050505050565b612dd1613705565b600554600160a01b900460ff1615612dfb5760405162461bcd60e51b81526004016108eb90614516565b612e036136d4565b600554604051635d2cd2a760e01b815233600482015260009182916001600160a01b0390911690635d2cd2a79060240160408051808303816000875af1158015612e51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e7591906146e4565b604080518381526020810183905292945090925033917f09c6481cb228ea7f61ceb67c8e708038eb74bbb68cfcc54a9cfca199087ecfb79101612b41565b600854431115611e7f57600554604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015612f07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f2b9190614615565b90508015612f8857600854600090612f439043614589565b600a54909150600090612f56908361459c565b905082612f6b670de0b6b3a76400008361459c565b612f7591906145b3565b600954612f8291906145d5565b60095550505b43600881905560095460408051928352602083018490528201527f1f2d1a9fde053af46b5db3dc92a8aa8696e56a677998fdd1311b45be341f7853906060015b60405180910390a150565b600354421015612ff55760405162461bcd60e51b81526004016108eb906144df565b612ffd6136d4565b600554600160a01b900460ff16156130275760405162461bcd60e51b81526004016108eb90614516565b61302f613705565b61303881613a74565b6130428133613aff565b6005546040518281526001600160a01b039091169033907fd3dba7b5565b16b7749db7d1938410a636e3c7a6ea46ed8ce7e259e19f2f3b9f9060200160405180910390a3610b9261384d565b6003544210156130b05760405162461bcd60e51b81526004016108eb906144df565b6130b86136d4565b6130c0613705565b600254336000908152600660205260409020546130dd9042614589565b10156131205760405162461bcd60e51b8152602060048201526012602482015271556e6f52653a204c6f636b65642074696d6560701b60448201526064016108eb565b6131293361374f565b33600081815260066020526040808220600201546005549151636ce40c7960e01b81526004810194909452602484018590529282916001600160a01b031690636ce40c799060440160408051808303816000875af115801561318f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131b391906146e4565b915091506000670de0b6b3a7640000600860010154856131d3919061459c565b6131dd91906145b3565b600954909150670de0b6b3a7640000906131f7908561459c565b61320191906145b3565b61320b9082614589565b336000908152600660205260409020600101556132288385614589565b3360008181526006602090815260409182902060020193909355805186815292830185905290917f617c612e91653c86cd4538e3de94b98c8dd628b41e343380d1cf858f95c0674a910160405180910390a250505050610b9261384d565b6003544210156132a85760405162461bcd60e51b81526004016108eb906144df565b600554600160a01b900460ff16156132d25760405162461bcd60e51b81526004016108eb90614516565b6132da6136d4565b7f6d5c9827c1f410bbb61d3b2a0a34b6b30492d9a1fd38588edca7ec4562ab9c9b61330481613670565b61330c613705565b600480546040805163e5a6b10f60e01b815290516001600160a01b039092169263e5a6b10f9282820192602092908290030181865afa158015613353573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061337791906146a5565b6001600160a01b0316600560009054906101000a90046001600160a01b03166001600160a01b031663e5a6b10f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156133d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133f791906146a5565b6001600160a01b03161461344d5760405162461bcd60e51b815260206004820152601b60248201527f556e6f52653a2063757272656e6379206e6f74206d617463686564000000000060448201526064016108eb565b613455612eb3565b60008060005b8451811015613560576006600086838151811061347a5761347a614708565b6020908102919091018101516001600160a01b031682528101919091526040016000206003015460ff16156134f15760405162461bcd60e51b815260206004820152601a60248201527f556e6f52653a20726f6c6c6f766572206973206e6f742073657400000000000060448201526064016108eb565b60008061351687848151811061350957613509614708565b6020026020010151613d3a565b909250905061352582866145d5565b945061353181856145d5565b93506135568288858151811061354957613549614708565b6020026020010151613aff565b505060010161345b565b506004546001600160a01b03161580159061357a57508115155b80156135865750600081115b1561360f5760048054600554604051631963b13960e21b81526001600160a01b03918216938101939093526024830185905260448301849052169063658ec4e4906064016020604051808303816000875af11580156135e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061360d9190614615565b505b6005546040516001600160a01b039091169061362c90869061471e565b604051908190038120848252907f2b1ab5aad08854cca1e3b3cd94bbb4acc5cf06bd794383289c30ae264d03121d9060200160405180910390a350506108fc61384d565b610b928133613e58565b613682613e91565b6000805160206147ed833981519152805460ff191681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001612fc8565b6000805160206147ed8339815191525460ff1615611e7f5760405163d93c066560e01b815260040160405180910390fd5b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0080546001190161374957604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b613757612eb3565b60008061376383613d3a565b60045491935091506001600160a01b03161580159061378157508115155b156138085760048054604051631963b13960e21b81526001600160a01b0386811693820193909352602481018590526044810184905291169063658ec4e4906064016020604051808303816000875af11580156137e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138069190614615565b505b6040518281526001600160a01b0384169033907fa0306f61d3fafe13787b78e276cb6b644382854a66cb46daae14227d3ec267979060200160405180910390a3505050565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b60006000805160206147cd83398151915261388e8484611e81565b61390e576000848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556138c43390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610881565b6000915050610881565b60006139226136d4565b600554600160a01b900460ff161561394c5760405162461bcd60e51b81526004016108eb90614516565b61395583610f88565b600081815260076020908152604080832033845290915290205442101561398e5760405162461bcd60e51b81526004016108eb906144aa565b6139988484613ec1565b949350505050565b6139a8613f3d565b611e7f613f86565b6139b8613f3d565b611e7f613f8e565b611e7f613f3d565b6000805160206147cd83398151915260006139e284610f88565b600085815260208490526040808220600101869055519192508491839187917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a450505050565b613a336136d4565b6000805160206147ed833981519152805460ff191660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258336136bc565b6005546040805163e5a6b10f60e01b815290516000926001600160a01b03169163e5a6b10f9160048083019260209291908290030181865afa158015613abe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ae291906146a5565b6005549091506108fc90829033906001600160a01b031685613faf565b81600003613b435760405162461bcd60e51b8152602060048201526011602482015270556e6f52653a205a45524f2056616c756560781b60448201526064016108eb565b613b4b612eb3565b60055460408051627a9fd960e91b815290516000926001600160a01b03169163f53fb2009160048083019260209291908290030181865afa158015613b94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613bb89190614615565b600554604051637e348b7d60e01b81526001600160a01b03858116600483015260248201879052929350911690637e348b7d90604401600060405180830381600087803b158015613c0857600080fd5b505af1158015613c1c573d6000803e3d6000fd5b505050506001600160a01b03821660009081526006602090815260409182902082516080810184528154815260018201549281019290925260028101549282019290925260039091015460ff1615156060820152600954670de0b6b3a7640000908390613c89878461459c565b613c93919061459c565b613c9d91906145b3565b613ca791906145b3565b8160200151613cb691906145d5565b602082015281613cce85670de0b6b3a764000061459c565b613cd891906145b3565b8160400151613ce791906145d5565b60408281019182526001600160a01b039490941660009081526006602090815294902082518155938201516001850155516002840155606001516003909201805460ff1916921515929092179091555050565b600554604051631665744b60e11b81526001600160a01b0383811660048301526000928392839290911690632ccae89690602401606060405180830381865afa158015613d8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613daf9190614545565b509150508015613dc55750600093849350915050565b6001600160a01b038416600090815260066020526040812060020154600954909190670de0b6b3a764000090613dfb908461459c565b613e0591906145b3565b6001600160a01b03871660009081526006602052604081206001015491925090613e2f9083614589565b6001600160a01b0390971660009081526006602052604090206001019190915550939492505050565b613e628282611e81565b6108fc5760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016108eb565b6000805160206147ed8339815191525460ff16611e7f57604051638dfc202b60e01b815260040160405180910390fd5b60006000805160206147cd833981519152613edc8484611e81565b1561390e576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610881565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16611e7f57604051631afcd79f60e31b815260040160405180910390fd5b61384d613f3d565b613f96613f3d565b6000805160206147ed833981519152805460ff19169055565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691614013919061475d565b6000604051808303816000865af19150503d8060008114614050576040519150601f19603f3d011682016040523d82523d6000602084013e614055565b606091505b509150915081801561407f57508051158061407f57508080602001905181019061407f91906146c2565b6140e55760405162461bcd60e51b815260206004820152603160248201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472604482015270185b9cd9995c919c9bdb4819985a5b1959607a1b60648201526084016108eb565b505050505050565b6000602082840312156140ff57600080fd5b81356001600160e01b03198116811461411757600080fd5b9392505050565b60006020828403121561413057600080fd5b5035919050565b6000806040838503121561414a57600080fd5b50508035926020909101359150565b6001600160a01b0381168114610b9257600080fd5b803561417981614159565b919050565b60006020828403121561419057600080fd5b813561411781614159565b6000806000606084860312156141b057600080fd5b83356141bb81614159565b925060208401356141cb81614159565b929592945050506040919091013590565b600080604083850312156141ef57600080fd5b82356141fa81614159565b946020939093013593505050565b6000806040838503121561421b57600080fd5b82359150602083013561422d81614159565b809150509250929050565b6000806040838503121561424b57600080fd5b823561425681614159565b9150602083013561422d81614159565b60008083601f84011261427857600080fd5b50813567ffffffffffffffff81111561429057600080fd5b6020830191508360208285010111156142a857600080fd5b9250929050565b600080600080600080600060a0888a0312156142ca57600080fd5b873567ffffffffffffffff808211156142e257600080fd5b6142ee8b838c01614266565b909950975060208a013591508082111561430757600080fd5b506143148a828b01614266565b909650945050604088013561432881614159565b9250606088013561433881614159565b809250506080880135905092959891949750929550565b60008060006060848603121561436457600080fd5b833561436f81614159565b9250602084013561437f81614159565b9150604084013561438f81614159565b809150509250925092565b6000806000606084860312156143af57600080fd5b83356143ba81614159565b95602085013595506040909401359392505050565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156143f857600080fd5b823567ffffffffffffffff8082111561441057600080fd5b818501915085601f83011261442457600080fd5b813581811115614436576144366143cf565b8060051b604051601f19603f8301168101818110858211171561445b5761445b6143cf565b60405291825284820192508381018501918883111561447957600080fd5b938501935b8285101561449e5761448f8561416e565b8452938501939285019261447e565b98975050505050505050565b6020808252818101527f556e6f52653a20726f6c6c206c6f636b2074696d65206e6f7420706173736564604082015260600190565b60208082526019908201527f556e6f52653a206e6f7420617661696c61626c652074696d6500000000000000604082015260600190565b602080825260159082015274155b9bd4994e881c1bdbdb081a5cc81ada5b1b1959605a1b604082015260600190565b60008060006060848603121561455a57600080fd5b8351925060208401519150604084015190509250925092565b634e487b7160e01b600052601160045260246000fd5b8181038181111561088157610881614573565b808202811582820484141761088157610881614573565b6000826145d057634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561088157610881614573565b602080825260139082015272556e6f52653a207a65726f206164647265737360681b604082015260600190565b60006020828403121561462757600080fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60808152600061466b60808301888a61462e565b828103602084015261467e81878961462e565b6001600160a01b039586166040850152939094166060909201919091525095945050505050565b6000602082840312156146b757600080fd5b815161411781614159565b6000602082840312156146d457600080fd5b8151801515811461411757600080fd5b600080604083850312156146f757600080fd5b505080516020909101519092909150565b634e487b7160e01b600052603260045260246000fd5b815160009082906020808601845b838110156147515781516001600160a01b03168552938201939082019060010161472c565b50929695505050505050565b6000825160005b8181101561477e5760208186018101518583015201614764565b50600092019182525091905056fea70365933f78520ef41d6645ba61e509916296603327302d41466c063e8e2608a7fb00808094bb0669054259df045936913ac8f131613a7a6da2e81ac75d5f4802dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800cd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220492e067b4891904492cfd3b9e81ef1764a20a8505231f706eab73d6cdc36eea764736f6c63430008170033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.