Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 2 internal transactions
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
0x60806040 | 15327018 | 983 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 15327018 | 983 days ago | Contract Creation | 0 ETH |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
StakeAirdropFactory
Compiler Version
v0.8.14+commit.80d49f37
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IStakeAirdropFactory} from "../src/interfaces/IStakeAirdropFactory.sol"; import {AirdropAccessControl} from "../src/utils/AirdropAccessControl.sol"; import {StakeAirdrop} from "src/StakeAirdrop.sol"; import {StakeAirdropProxy} from "src/StakeAirdropProxy.sol"; /** * @title FireCat's StakeAirdropFactory contract * @notice main: addressOf, createCycle * @author FireCat Finance */ contract StakeAirdropFactory is IStakeAirdropFactory, AirdropAccessControl{ StakeAirdropProxy proxy; StakeAirdrop stakeAirdrop; event SetProxyAdmin(address proxyAdmin_); event Reset(uint256 cycleId_, address stakeAirdrop_); event CreateCycle(uint256 cycleId_, address owner_, address cycleAddress); string public name; uint256 public cycleId; address public proxyAdmin; mapping(uint256 => address) public _stakeAirdrop; function initialize(string memory name_) initializer public { name = name_; _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); } /// @inheritdoc IStakeAirdropFactory function totalCycle() public view returns (uint256) { return cycleId; } /// @inheritdoc IStakeAirdropFactory function addressOf(uint256 _cycleId) public view returns (address) { return _stakeAirdrop[_cycleId]; } /// @inheritdoc IStakeAirdropFactory function setProxyAdmin(address proxyAdmin_) external onlyRole(DATA_ADMIN) { proxyAdmin = proxyAdmin_; emit SetProxyAdmin(proxyAdmin_); } /// @inheritdoc IStakeAirdropFactory function reset(uint256 cycleId_, address stakeAirdrop_) external onlyRole(DATA_ADMIN) { require(cycleId_ <= cycleId, "FTY:E02"); _stakeAirdrop[cycleId_] = stakeAirdrop_; emit Reset(cycleId_, stakeAirdrop_); } /// @inheritdoc IStakeAirdropFactory function createCycle( address airdropToken_, address stakeToken_ ) external onlyRole(DATA_ADMIN) returns(address) { require(airdropToken_ != address(0), "FTY:E00"); require(stakeToken_ != address(0), "FTY:E01"); stakeAirdrop = new StakeAirdrop(); proxy = new StakeAirdropProxy(address(stakeAirdrop), proxyAdmin, ''); cycleId += 1; _stakeAirdrop[cycleId] = address(proxy); StakeAirdrop(address(proxy)).initialize(msg.sender, cycleId, airdropToken_, stakeToken_); emit CreateCycle(cycleId, msg.sender, address(proxy)); return address(proxy); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; /** * @notice IStakeAirdropFactory */ interface IStakeAirdropFactory { /** * @notice the number of cycles, current cycleId. * @return cycles. */ function totalCycle() external view returns (uint256); /** * @notice the address of the cycle. * @param cycleId_ uint256 * @return address of the cycle. */ function addressOf(uint256 cycleId_) external view returns (address); /** * @notice set proxy admin. * @param proxyAdmin_ address */ function setProxyAdmin(address proxyAdmin_) external; /** * @notice reset the cycleAddress. * @param cycleId_ uint256 * @param stakeAirdrop_ address */ function reset(uint256 cycleId_, address stakeAirdrop_) external; /** * @notice create a new cycle. * @param airdropToken_ address * @param stakeToken_ address * @return address of the cycle proxy. */ function createCycle(address airdropToken_, address stakeToken_ ) external returns(address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "openzeppelin-contracts-upgradeable/contracts/access/AccessControlUpgradeable.sol"; abstract contract AirdropAccessControl is AccessControlUpgradeable { // market administrator bytes32 public constant MARKET_ADMIN = bytes32(keccak256(abi.encodePacked("Market_Admin"))); // data administrator bytes32 public constant DATA_ADMIN = bytes32(keccak256(abi.encodePacked("Data_Admin"))); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import "openzeppelin-contracts/contracts/utils/math/SafeMath.sol"; import {AirdropAccessControl} from "../src/utils/AirdropAccessControl.sol"; import {FireCatTransfer} from "../src/utils/FireCatTransfer.sol"; import {IStakeAirdrop} from "../src/interfaces/IStakeAirdrop.sol"; /** * @title FireCat's StakeAirdrop contract * @notice main: stake, claim, topUP * @author FireCat Finance */ contract StakeAirdrop is IStakeAirdrop, FireCatTransfer, AirdropAccessControl { using SafeMath for uint256; event SetStakeOn(bool isStakeOn_); event SetClaimOn(bool isClaimOn_); event SetImportOn(bool isImportOn_); event SetTopUpAmount(uint256 topUpAmount_); event SetCycleTime(uint256 startAt_, uint256 expiredAt_); event SetReleaseConfig(uint256[] releaseTimePeriod_, uint256[] releaseNumFactor_); event TopUp(address user_, uint256 amount_, uint256 totalSupplyNew_); event Staked(address user_, uint256 actualAddAmount_, uint256 totalStakedNew_); event Claimed(address user_, uint256 actualSubAmount_, uint256 totalClaimedNew_); event ExportStaked(uint256 startIndex_, uint256 endIndex_); /** * @dev switch on/off the stake function. */ bool public isStakeOn = false; /** * @dev switch on/off the claim function. */ bool public isClaimOn = false; /** * @dev switch on/off the importStaked function. */ bool public isImportOn = false; address public airdropToken; address public stakeToken; uint256 public cycleId; /** * @dev the start timestamp of the stake. */ uint256 private _startAt; /** * @dev the expired timestamp of the stake. */ uint256 private _expiredAt; /** * @dev the release time period, such as: [1660000000, 1660000010, 1660000020] */ uint256[] private _releaseTimePeriod; /** * @dev the release num factor, such as: [30, 30, 40] */ uint256[] private _releaseNumFactor; /** * @dev the total airdrop amount which is alread exists in the contract. */ uint256 private _totalSupply; /** * @dev the total staked amount which is alread exists in the contract. */ uint256 private _totalStaked; /** * @dev the total claimed amount which is already transfer from this contract. */ uint256 private _totalClaimed; /** * @dev the airdrop amount which is shoule be transfer to this contract. */ uint256 private _topUpAmount; /** * @dev the number of user. */ uint256 private _totalUser; /** * @dev the array of user */ address[] private _totalUserArray; /** * @dev the label of user who has staked. */ mapping(address => bool) _isMarked; /** * @dev the staked amount of user. */ mapping(address => uint256) private _staked; /** * @dev the claimed amount of user. */ mapping(address => uint256) private _claimed; function initialize(address admin, uint256 cycleId_, address airdropToken_, address stakeToken_) initializer public { cycleId = cycleId_; airdropToken = airdropToken_; stakeToken = stakeToken_; __AccessControl_init(); __ReentrancyGuard_init(); _setupRole(DEFAULT_ADMIN_ROLE, admin); } modifier modifyLocked() { require(_totalClaimed == 0, "ARD:E07"); _; } modifier beforeStake() { require(isStakeOn, "ARD:E05"); _; } modifier beforeClaim() { require(isClaimOn, "ARD:E05"); _; } /// @inheritdoc IStakeAirdrop function cycle() public view returns (uint256, uint256) { return (_startAt, _expiredAt); } /// @inheritdoc IStakeAirdrop function releaseTimePeriod() public view returns (uint256[] memory) { return _releaseTimePeriod; } /// @inheritdoc IStakeAirdrop function releaseNumFactor() public view returns (uint256[] memory) { return _releaseNumFactor; } /// @inheritdoc IStakeAirdrop function totalSupply() public view returns (uint256) { return _totalSupply; } /// @inheritdoc IStakeAirdrop function topUpAmount() public view returns (uint256) { return _topUpAmount; } /// @inheritdoc IStakeAirdrop function totalStaked() public view returns (uint256) { return _totalStaked; } /// @inheritdoc IStakeAirdrop function totalClaimed() public view returns (uint256) { return _totalClaimed; } /// @inheritdoc IStakeAirdrop function totalUser() public view returns (uint256) { return _totalUser; } /// @inheritdoc IStakeAirdrop function stakedOf(address user_) public view returns (uint256) { return _staked[user_]; } /// @inheritdoc IStakeAirdrop function claimedOf(address user_) public view returns (uint256) { return _claimed[user_]; } /// @inheritdoc IStakeAirdrop function exportStaked(uint256 startIndex, uint256 endIndex) public view returns(address[] memory, uint256[] memory) { uint256 arrayLen = endIndex + 1; address[] memory userArray = new address[](arrayLen); uint256[] memory userStaked = new uint256[](arrayLen); for (uint256 i = startIndex; i < arrayLen; i++) { uint256 index = i - startIndex; address user = _totalUserArray[i]; userArray[index] = user; userStaked[index] = _staked[user]; } return (userArray, userStaked); } /// @inheritdoc IStakeAirdrop function reviewOf(address user_) public view returns (uint256, uint256, uint256) { // totalClaim = _totalSupply * userStaked / totalStaked; uint256 totalClaim = _totalSupply.mul(_staked[user_]).div(_totalStaked); // _claimFactor = _releaseNumFactor[0] + _releaseNumFactor[1] + _releaseNumFactor[n] + ...; uint256 _claimFactor = _selectSumFactor(); // _maxFakeClaim = totalClaim * _claimFactor / 100; uint256 _maxFakeClaim = totalClaim.mul(_claimFactor).div(100); // _availableClaim = _maxFakeClaim - user_claimed; uint256 availableClaim = _maxFakeClaim.sub(_claimed[user_]); // lockedClaim = totalClaim - _maxFakeClaim; uint256 lockedClaim = totalClaim.sub(_maxFakeClaim); require(totalClaim <= _totalSupply, "ADR:E08"); require(availableClaim + _claimed[user_] <= _maxFakeClaim, "ADR:E09"); require(lockedClaim + _maxFakeClaim <= totalClaim, "ARD:E10"); return (availableClaim, lockedClaim, totalClaim); } /** * @notice record user address when user stake the token. * @param user_ address */ function _markUser(address user_) internal { if (!_isMarked[user_]) { _isMarked[user_] = true; _totalUserArray.push(user_); _totalUser += 1; } } /** * @notice calculate the sum of releaseNumFactor when timestamp is bigger than last release timePeriod. * @return claimFactor */ function _selectSumFactor() internal view returns (uint256) { uint256 claimFactor = 0; for (uint256 i = 0; i < _releaseTimePeriod.length; i++) { if (block.timestamp > _releaseTimePeriod[i]) { // _releaseNumFactor[0] + _releaseNumFactor[1] + _releaseNumFactor[n] + ...; claimFactor += _releaseNumFactor[i]; } } return claimFactor; } /** * @notice calculate the sum of totalStaked. * @return totalStaked */ function _updateTotalStaked() internal returns (uint256) { uint256 totalStakedNew = 0; for (uint256 i = 0; i < _totalUserArray.length; i++) { totalStakedNew += _staked[_totalUserArray[i]]; } _totalStaked = totalStakedNew; return _totalStaked; } /// @inheritdoc IStakeAirdrop function setStakeOn(bool isStakeOn_) external onlyRole(DATA_ADMIN) { isStakeOn = isStakeOn_; emit SetStakeOn(isStakeOn_); } /// @inheritdoc IStakeAirdrop function setClaimOn(bool isClaimOn_) external onlyRole(DATA_ADMIN) { isClaimOn = isClaimOn_; emit SetClaimOn(isClaimOn_); } /// @inheritdoc IStakeAirdrop function setImportOn(bool isImportOn_) external onlyRole(DATA_ADMIN) { isImportOn = isImportOn_; emit SetImportOn(isImportOn_); } /// @inheritdoc IStakeAirdrop function setTopUpAmount(uint256 topUpAmount_) external modifyLocked onlyRole(DATA_ADMIN) { _topUpAmount = topUpAmount_; emit SetTopUpAmount(topUpAmount_); } /// @inheritdoc IStakeAirdrop function setCycleTime(uint256 startAt_, uint256 expiredAt_) external modifyLocked onlyRole(DATA_ADMIN) { require(startAt_ > block.timestamp && expiredAt_ > startAt_, "ARD:E11"); _startAt = startAt_; _expiredAt = expiredAt_; emit SetCycleTime(startAt_, expiredAt_); } /// @inheritdoc IStakeAirdrop function setReleaseConfig(uint256[] memory releaseTimePeriod_, uint256[] memory releaseNumFactor_) external modifyLocked onlyRole(DATA_ADMIN) { require(releaseTimePeriod_.length > 0, "ARD:E12"); require(releaseTimePeriod_.length == releaseNumFactor_.length, "ARD:E06"); require(releaseTimePeriod_[0] > _expiredAt, "ARD:E13"); uint256 arrayLen = releaseTimePeriod_.length; uint256 releaseNumTotal = 0; for (uint256 i = 0; i < arrayLen; i++) { if (i + 1 < arrayLen) { require(releaseTimePeriod_[i] < releaseTimePeriod_[i + 1], "ARD:E14"); } releaseNumTotal += releaseNumFactor_[i]; } require(releaseNumTotal == 100, "ARD:E15"); _releaseTimePeriod = releaseTimePeriod_; _releaseNumFactor = releaseNumFactor_; emit SetReleaseConfig(releaseTimePeriod_, releaseNumFactor_); } /// @inheritdoc IStakeAirdrop function importStaked(address[] memory userArray_, uint256[] memory userStaked_) external modifyLocked onlyRole(DATA_ADMIN) returns (uint256) { require(isImportOn, "ARD:E05"); require(userArray_.length == userStaked_.length, "ARD:E06"); for (uint256 i = 0; i < userArray_.length; i++) { address uesr = userArray_[i]; uint256 userStaked = userStaked_[i]; _staked[uesr] = userStaked; _markUser(uesr); } isImportOn = false; return _updateTotalStaked(); } /// @inheritdoc IStakeAirdrop function withdrawRemaining(address token, uint256 amount) external nonReentrant onlyRole(DATA_ADMIN) returns (uint256) { require(!isClaimOn, "ARD:E16"); return withdraw(token, amount); } /// @inheritdoc IStakeAirdrop function topUp(uint256 addAmount) external modifyLocked onlyRole(DATA_ADMIN) returns (uint256) { require(IERC20(airdropToken).balanceOf(msg.sender) >= addAmount, "ARD:E02"); require(addAmount == _topUpAmount, "ARD:E04"); uint256 actualAddAmount = doTransferIn(airdropToken, msg.sender, addAmount); // totalReservesNew + actualAddAmount uint256 totalSupplyNew = _totalSupply.add(actualAddAmount); /* Revert on overflow */ require(totalSupplyNew > _totalSupply, "ARD:E03"); _totalSupply = totalSupplyNew; emit TopUp(msg.sender, actualAddAmount, totalSupplyNew); return actualAddAmount; } /// @inheritdoc IStakeAirdrop function stake(uint256 amount) external beforeStake nonReentrant returns (uint256) { require(block.timestamp > _startAt && block.timestamp < _expiredAt, "ARD:E01"); require(IERC20(stakeToken).balanceOf(msg.sender) >= amount, "ARD:E02"); uint256 actualAddAmount = doTransferIn(stakeToken, msg.sender, amount); uint256 totalStakedNew = _totalStaked.add(actualAddAmount); require(totalStakedNew > _totalStaked, "ARD:E03"); _totalStaked = totalStakedNew; _staked[msg.sender] = _staked[msg.sender].add(actualAddAmount); _markUser(msg.sender); emit Staked(msg.sender, actualAddAmount, totalStakedNew); return actualAddAmount; } /// @inheritdoc IStakeAirdrop function claim() external beforeClaim nonReentrant returns (uint256) { (uint256 availableClaim, uint256 lockedClaim, uint256 totalClaim) = reviewOf(msg.sender); require(availableClaim > 0, "ARD:E00"); IERC20(airdropToken).approve(msg.sender, availableClaim); uint256 actualClaimedAmount = doTransferOut(airdropToken, msg.sender, availableClaim); _claimed[msg.sender] = _claimed[msg.sender].add(actualClaimedAmount); _totalClaimed = _totalClaimed.add(actualClaimedAmount); emit Claimed(msg.sender, actualClaimedAmount, _totalClaimed); return actualClaimedAmount; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.10; import "openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; contract StakeAirdropProxy is TransparentUpgradeableProxy { constructor(address _logic,address _admin,bytes memory _data) TransparentUpgradeableProxy(_logic, _admin, _data){} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; import "../utils/ContextUpgradeable.sol"; import "../utils/StringsUpgradeable.sol"; import "../utils/introspection/ERC165Upgradeable.sol"; import "../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: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable { function __AccessControl_init() internal onlyInitializing { } function __AccessControl_init_unchained() internal onlyInitializing { } struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", StringsUpgradeable.toHexString(account), " is missing role ", StringsUpgradeable.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { 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 override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @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 amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import "openzeppelin-contracts-upgradeable/contracts/security/ReentrancyGuardUpgradeable.sol"; contract FireCatTransfer is ReentrancyGuardUpgradeable { event Withdraw(address sender_, address token_, uint256 amount_); /** * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee. * @param token_ address. * @param from_ address. * @param amount_ uint. * @return transfer_num. */ function doTransferIn(address token_, address from_, uint amount_) internal returns (uint) { uint balanceBefore = IERC20(token_).balanceOf(address(this)); IERC20(token_).transferFrom(from_, address(this), amount_); bool success; assembly { switch returndatasize() case 0 { // This is a non-standard ERC-20 success := not(0) // set success to true } case 32 { // This is a compliant ERC-20 returndatacopy(0, 0, 32) success := mload(0) // Set `success = returndata` of external call } default { // This is an excessively non-compliant ERC-20, revert. revert(0, 0) } } require(success, "TOKEN_TRANSFER_IN_FAILED"); uint balanceAfter = IERC20(token_).balanceOf(address(this)); require(balanceAfter >= balanceBefore, "TOKEN_TRANSFER_IN_OVERFLOW"); return balanceAfter - balanceBefore; // underflow already checked above, just subtract } /** * @dev Performs a transfer out, ideally returning an explanatory error code upon failure tather than reverting. * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract. * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions. * @param token_ address. * @param to_ address. * @param amount_ uint. * @return transfer_num. */ function doTransferOut(address token_, address to_, uint256 amount_) internal returns (uint) { uint balanceBefore = IERC20(token_).balanceOf(address(this)); IERC20(token_).transfer(to_, amount_); bool success; assembly { switch returndatasize() case 0 { // This is a non-standard ERC-20 success := not(0) // set success to true } case 32 { // This is a compliant ERC-20 returndatacopy(0, 0, 32) success := mload(0) // Set `success = returndata` of external call } default { // This is an excessively non-compliant ERC-20, revert. revert(0, 0) } } require(success, "TOKEN_TRANSFER_IN_FAILED"); uint balanceAfter = IERC20(token_).balanceOf(address(this)); require(balanceAfter <= balanceBefore, "TOKEN_TRANSFER_IN_OVERFLOW"); return balanceBefore - balanceAfter; // underflow already checked above, just subtract } /** * @notice The interface of IERC20 token withdrawn. * @dev Call doTransferOut, transfer token to owner. * @param token address. * @param amount uint256. * @return actualSubAmount. */ function withdraw(address token, uint256 amount) internal returns (uint) { require(token != address(0), "TOKEN_CANT_BE_ZERO"); require(IERC20(token).balanceOf(address(this)) >= amount, "NOT_ENOUGH_TOKEN"); IERC20(token).approve(msg.sender, amount); uint256 actualSubAmount = doTransferOut(token, msg.sender, amount); emit Withdraw(msg.sender, token, actualSubAmount); return actualSubAmount; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; /** * @notice IStakeAirdrop */ interface IStakeAirdrop { /** * @notice the stake time period * @return startAt, expiredAt */ function cycle() external view returns (uint256, uint256); /** * @notice the release time period * @return releaseTimePeriod */ function releaseTimePeriod() external view returns (uint256[] memory); /** * @notice the release num factor * @return releaseNumFactor */ function releaseNumFactor() external view returns (uint256[] memory); /** * @notice the stake token * @return stakeToken */ function stakeToken() external view returns (address); /** * @notice the airdrop token * @return airdropToken */ function airdropToken() external view returns (address); /** * @notice the airdrop amount, topUp amonut must be equal this value. * @return airdropAmount */ function topUpAmount() external view returns (uint256); /** * @notice the airdrop amount, after topUp(), this value will be equal to topUpAmount. * @return totalSupply */ function totalSupply() external view returns (uint256); /** * @notice the total staked amount. * @return totalStaked */ function totalStaked() external view returns (uint256); /** * @notice the total claimed amount. * @return totalClaimed */ function totalClaimed() external view returns (uint256); /** * @notice the amout of user who has staked. * @dev when user staked, this value will be add 1. * @return totalUser */ function totalUser() external view returns (uint256); /** * @notice the staked amount of user. * @param user_ address * @return stakedAmount */ function stakedOf(address user_) external view returns (uint256); /** * @notice the claimed amount of user. * @param user_ address * @return claimedAmount */ function claimedOf(address user_) external view returns (uint256); /** * @notice export staked user, staked amount * @dev start index of array, end index of array. * @param startIndex uint256 * @param endIndex uint256 * @return stakedUser, stakedAmount */ function exportStaked(uint256 startIndex, uint256 endIndex) external view returns(address[] memory, uint256[] memory); /** * @notice check the aridrop of user. * @param user_ address * @return availableClaim, lockedClaim, totalClaim */ function reviewOf(address user_) external view returns (uint256, uint256, uint256); /** * @notice the stake switch, default is false * @param isStakeOn_ bool */ function setStakeOn(bool isStakeOn_) external; /** * @notice the claim switch, default is false * @param isClaimOn_ bool */ function setClaimOn(bool isClaimOn_) external; /** * @notice the import staked switch, default is false * @param isImportOn_ bool */ function setImportOn(bool isImportOn_) external; /** * @notice set the airdrop amount * @param topUpAmount_ uint256 */ function setTopUpAmount(uint256 topUpAmount_) external; /** * @notice set the stake time period * @param startAt_ uint256 * @param expiredAt_ uint256 */ function setCycleTime(uint256 startAt_, uint256 expiredAt_) external; /** * @notice set the release time period, release num factor * @param releaseTimePeriod_ uint256[] * @param releaseNumFactor_ uint256[] */ function setReleaseConfig(uint256[] memory releaseTimePeriod_, uint256[] memory releaseNumFactor_) external; /** * @notice import staked user, staked amonut. * @param userArray_ address[] * @param userStaked_ uint256[] * @return result */ function importStaked(address[] memory userArray_, uint256[] memory userStaked_) external returns (uint256); /** * @notice The interface of IERC20 withdrawn. * @dev Trasfer token to admin. * @param token address. * @param amount uint256. * @return actualSubAmount. */ function withdrawRemaining(address token, uint256 amount) external returns (uint256); /** * @notice topUp the airdrop amount. * @param addAmount uint256 * @return actualTopUpAmount */ function topUp(uint256 addAmount) external returns (uint256); /** * @notice the interface of stake. * @param amount_ uint256 * @return actualStakedAmount */ function stake(uint256 amount_) external returns (uint256); /** * @notice the interface of claim. * @return actualClaimedAmount */ function claim() external returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol) pragma solidity ^0.8.0; import "../ERC1967/ERC1967Proxy.sol"; /** * @dev This contract implements a proxy that is upgradeable by an admin. * * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector * clashing], which can potentially be used in an attack, this contract uses the * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two * things that go hand in hand: * * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if * that call matches one of the admin functions exposed by the proxy itself. * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the * implementation. If the admin tries to call a function on the implementation it will fail with an error that says * "admin cannot fallback to proxy target". * * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due * to sudden errors when trying to call a function from the proxy implementation. * * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy. */ contract TransparentUpgradeableProxy is ERC1967Proxy { /** * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}. */ constructor( address _logic, address admin_, bytes memory _data ) payable ERC1967Proxy(_logic, _data) { _changeAdmin(admin_); } /** * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin. */ modifier ifAdmin() { if (msg.sender == _getAdmin()) { _; } else { _fallback(); } } /** * @dev Returns the current admin. * * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. * * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103` */ function admin() external ifAdmin returns (address admin_) { admin_ = _getAdmin(); } /** * @dev Returns the current implementation. * * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. * * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc` */ function implementation() external ifAdmin returns (address implementation_) { implementation_ = _implementation(); } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. * * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}. */ function changeAdmin(address newAdmin) external virtual ifAdmin { _changeAdmin(newAdmin); } /** * @dev Upgrade the implementation of the proxy. * * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeToAndCall(newImplementation, bytes(""), false); } /** * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the * proxied contract. * * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}. */ function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin { _upgradeToAndCall(newImplementation, data, true); } /** * @dev Returns the current admin. */ function _admin() internal view virtual returns (address) { return _getAdmin(); } /** * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}. */ function _beforeFallback() internal virtual override { require(msg.sender != _getAdmin(), "TransparentUpgradeableProxy: admin cannot fallback to proxy target"); super._beforeFallback(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControlUpgradeable { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../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; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../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); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @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] * ``` * 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 Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 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. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _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. * * `initializer` is equivalent to `reinitializer(1)`, so 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. * * 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. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _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() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @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. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import "../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; uint256 private _status; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _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 { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol) pragma solidity ^0.8.0; import "../Proxy.sol"; import "./ERC1967Upgrade.sol"; /** * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an * implementation address that can be changed. This address is stored in storage in the location specified by * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the * implementation behind the proxy. */ contract ERC1967Proxy is Proxy, ERC1967Upgrade { /** * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`. * * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded * function call, and allows initializing the storage of the proxy like a Solidity constructor. */ constructor(address _logic, bytes memory _data) payable { _upgradeToAndCall(_logic, _data, false); } /** * @dev Returns the current implementation address. */ function _implementation() internal view virtual override returns (address impl) { return ERC1967Upgrade._getImplementation(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol) pragma solidity ^0.8.0; /** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a * different contract through the {_delegate} function. * * The success and return data of the delegated call will be returned back to the caller of the proxy. */ abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function * and {_fallback} should delegate. */ function _implementation() internal view virtual returns (address); /** * @dev Delegates the current call to the address returned by `_implementation()`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _fallback() internal virtual { _beforeFallback(); _delegate(_implementation()); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other * function in the contract matches the call data. */ fallback() external payable virtual { _fallback(); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data * is empty. */ receive() external payable virtual { _fallback(); } /** * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback` * call, or as part of the Solidity `fallback` or `receive` functions. * * If overridden should call `super._beforeFallback()`. */ function _beforeFallback() internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeacon.sol"; import "../../interfaces/draft-IERC1822.sol"; import "../../utils/Address.sol"; import "../../utils/StorageSlot.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ * * @custom:oz-upgrades-unsafe-allow delegatecall */ abstract contract ERC1967Upgrade { // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall( address newImplementation, bytes memory data, bool forceCall ) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { Address.functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallUUPS( address newImplementation, bytes memory data, bool forceCall ) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) { require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); } catch { revert("ERC1967Upgrade: new implementation is not UUPS"); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlot.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlot.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( Address.isContract(IBeacon(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall( address newBeacon, bytes memory data, bool forceCall ) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeacon { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822Proxiable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } }
{ "remappings": [ "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "script/=script/", "solmate/=lib/solmate/src/", "src/=src/", "test/=test/", "src/=src/", "test/=test/", "script/=script/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"cycleId_","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner_","type":"address"},{"indexed":false,"internalType":"address","name":"cycleAddress","type":"address"}],"name":"CreateCycle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"cycleId_","type":"uint256"},{"indexed":false,"internalType":"address","name":"stakeAirdrop_","type":"address"}],"name":"Reset","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":false,"internalType":"address","name":"proxyAdmin_","type":"address"}],"name":"SetProxyAdmin","type":"event"},{"inputs":[],"name":"DATA_ADMIN","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":"MARKET_ADMIN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_stakeAirdrop","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cycleId","type":"uint256"}],"name":"addressOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"airdropToken_","type":"address"},{"internalType":"address","name":"stakeToken_","type":"address"}],"name":"createCycle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cycleId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name_","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxyAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"cycleId_","type":"uint256"},{"internalType":"address","name":"stakeAirdrop_","type":"address"}],"name":"reset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"proxyAdmin_","type":"address"}],"name":"setProxyAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalCycle","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50614cbc806100206000396000f3fe60806040523480156200001157600080fd5b5060043610620001395760003560e01c806362e0accb11620000bb578063aa9e370d116200007a578063aa9e370d14620002ac578063c08c511314620002b6578063d547741f14620002cd578063f3e7cddb14620002e4578063f62d1888146200031057600080fd5b806362e0accb146200026f57806391d148541462000279578063a217fddf1462000290578063a314fb161462000299578063a403642814620002a357600080fd5b8063248a9ca31162000108578063248a9ca314620001df5780632f2ff15d146200021457806336568abe146200022d5780633e47158c146200024457806347c02661146200025857600080fd5b806301ffc9a7146200013e57806306fdde03146200016a57806311a800bc14620001835780631e1f010214620001c8575b600080fd5b620001556200014f36600462000e9c565b62000327565b60405190151581526020015b60405180910390f35b620001746200035f565b60405162000161919062000efb565b620001af6200019436600462000f30565b6000908152609c60205260409020546001600160a01b031690565b6040516001600160a01b03909116815260200162000161565b620001af620001d936600462000f67565b620003f5565b62000205620001f036600462000f30565b60009081526065602052604090206001015490565b60405190815260200162000161565b6200022b6200022536600462000f9f565b6200069f565b005b6200022b6200023e36600462000f9f565b620006cd565b609b54620001af906001600160a01b031681565b6200022b6200026936600462000fc5565b6200074f565b62000205609a5481565b620001556200028a36600462000f9f565b620007df565b62000205600081565b620002056200080a565b609a5462000205565b620002056200083f565b6200022b620002c736600462000f9f565b6200085e565b6200022b620002de36600462000f9f565b6200093d565b620001af620002f536600462000f30565b609c602052600090815260409020546001600160a01b031681565b6200022b6200032136600462000ff9565b62000966565b60006001600160e01b03198216637965db0b60e01b14806200035957506301ffc9a760e01b6001600160e01b03198316145b92915050565b609980546200036e90620010b4565b80601f01602080910402602001604051908101604052809291908181526020018280546200039c90620010b4565b8015620003ed5780601f10620003c157610100808354040283529160200191620003ed565b820191906000526020600020905b815481529060010190602001808311620003cf57829003601f168201915b505050505081565b604051692230ba30afa0b236b4b760b11b6020820152600090602a0160405160208183030381529060405280519060200120620004328162000a93565b6001600160a01b038416620004785760405162461bcd60e51b815260206004820152600760248201526604654593a4530360cc1b60448201526064015b60405180910390fd5b6001600160a01b038316620004ba5760405162461bcd60e51b81526020600482015260076024820152664654593a45303160c81b60448201526064016200046f565b604051620004c89062000dda565b604051809103906000f080158015620004e5573d6000803e3d6000fd5b50609880546001600160a01b0319166001600160a01b03928316908117909155609b54604051919216906200051a9062000de8565b6001600160a01b03928316815291166020820152606060408201819052600090820152608001604051809103906000f0801580156200055d573d6000803e3d6000fd5b50609760006101000a8154816001600160a01b0302191690836001600160a01b031602179055506001609a600082825462000599919062001106565b909155505060978054609a80546000908152609c60205260409081902080546001600160a01b0319166001600160a01b039485161790559254905492516306b0729b60e31b8152336004820152602481019390935286821660448401528582166064840152169063358394d890608401600060405180830381600087803b1580156200062457600080fd5b505af115801562000639573d6000803e3d6000fd5b5050609a54609754604080519283523360208401526001600160a01b0390911682820152517f8cac58606a8fb398486d1787508c7b44042b0d5c1ef08137b479151b04629c5c9350908190036060019150a150506097546001600160a01b031692915050565b600082815260656020526040902060010154620006bc8162000a93565b620006c8838362000aa2565b505050565b6001600160a01b03811633146200073f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016200046f565b6200074b828262000b2c565b5050565b604051692230ba30afa0b236b4b760b11b6020820152602a0160405160208183030381529060405280519060200120620007898162000a93565b609b80546001600160a01b0319166001600160a01b0384169081179091556040519081527f80955c780c43a8aff65e82c05d5b0584cfbdaf1f52d174bdf87f795aa5ddbbcd906020015b60405180910390a15050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6040516b26b0b935b2ba2fa0b236b4b760a11b6020820152602c015b6040516020818303038152906040528051906020012081565b604051692230ba30afa0b236b4b760b11b6020820152602a0162000826565b604051692230ba30afa0b236b4b760b11b6020820152602a0160405160208183030381529060405280519060200120620008988162000a93565b609a54831115620008d65760405162461bcd60e51b8152602060048201526007602482015266232a2c9d22981960c91b60448201526064016200046f565b6000838152609c602090815260409182902080546001600160a01b0319166001600160a01b0386169081179091558251868152918201527f6cb5042a1eb85d6774bcb8544ad743eaffd492e13601ca85099c605766546375910160405180910390a1505050565b6000828152606560205260409020600101546200095a8162000a93565b620006c8838362000b2c565b600054610100900460ff1615808015620009875750600054600160ff909116105b80620009a35750303b158015620009a3575060005460ff166001145b62000a085760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016200046f565b6000805460ff19166001179055801562000a2c576000805461ff0019166101001790555b815162000a4190609990602085019062000df6565b5062000a4f60003362000b96565b80156200074b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001620007d3565b62000a9f813362000ba2565b50565b62000aae8282620007df565b6200074b5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905562000ae83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b62000b388282620007df565b156200074b5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6200074b828262000aa2565b62000bae8282620007df565b6200074b5762000bbe8162000c06565b62000bcb83602062000c19565b60405160200162000bde92919062001121565b60408051601f198184030181529082905262461bcd60e51b82526200046f9160040162000efb565b6060620003596001600160a01b03831660145b6060600062000c2a8360026200119a565b62000c3790600262001106565b67ffffffffffffffff81111562000c525762000c5262000fe3565b6040519080825280601f01601f19166020018201604052801562000c7d576020820181803683370190505b509050600360fc1b8160008151811062000c9b5762000c9b620011bc565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062000ccd5762000ccd620011bc565b60200101906001600160f81b031916908160001a905350600062000cf38460026200119a565b62000d0090600162001106565b90505b600181111562000d82576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062000d385762000d38620011bc565b1a60f81b82828151811062000d515762000d51620011bc565b60200101906001600160f81b031916908160001a90535060049490941c9362000d7a81620011d2565b905062000d03565b50831562000dd35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016200046f565b9392505050565b612c2480620011ed83390190565b610e768062003e1183390190565b82805462000e0490620010b4565b90600052602060002090601f01602090048101928262000e28576000855562000e73565b82601f1062000e4357805160ff191683800117855562000e73565b8280016001018555821562000e73579182015b8281111562000e7357825182559160200191906001019062000e56565b5062000e8192915062000e85565b5090565b5b8082111562000e81576000815560010162000e86565b60006020828403121562000eaf57600080fd5b81356001600160e01b03198116811462000dd357600080fd5b60005b8381101562000ee557818101518382015260200162000ecb565b8381111562000ef5576000848401525b50505050565b602081526000825180602084015262000f1c81604085016020870162000ec8565b601f01601f19169190910160400192915050565b60006020828403121562000f4357600080fd5b5035919050565b80356001600160a01b038116811462000f6257600080fd5b919050565b6000806040838503121562000f7b57600080fd5b62000f868362000f4a565b915062000f966020840162000f4a565b90509250929050565b6000806040838503121562000fb357600080fd5b8235915062000f966020840162000f4a565b60006020828403121562000fd857600080fd5b62000dd38262000f4a565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156200100c57600080fd5b813567ffffffffffffffff808211156200102557600080fd5b818401915084601f8301126200103a57600080fd5b8135818111156200104f576200104f62000fe3565b604051601f8201601f19908116603f011681019083821181831017156200107a576200107a62000fe3565b816040528281528760208487010111156200109457600080fd5b826020860160208301376000928101602001929092525095945050505050565b600181811c90821680620010c957607f821691505b602082108103620010ea57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156200111c576200111c620010f0565b500190565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516200115b81601785016020880162000ec8565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516200118e81602884016020880162000ec8565b01602801949350505050565b6000816000190483118215151615620011b757620011b7620010f0565b500290565b634e487b7160e01b600052603260045260246000fd5b600081620011e457620011e4620010f0565b50600019019056fe608060405260c9805462ffffff1916905534801561001c57600080fd5b50612bf88061002c6000396000f3fe608060405234801561001057600080fd5b506004361061023d5760003560e01c806362e0accb1161013b578063baa3f7ee116100b8578063dd592a321161007c578063dd592a3214610514578063e1604b701461051c578063f3c8378814610524578063f88345ec14610537578063fcbfd5971461054a57600080fd5b8063baa3f7ee1461048f578063ca908f12146104b8578063cbb36355146104e6578063d547741f146104f9578063d54ad2a11461050c57600080fd5b8063a48f197d116100ff578063a48f197d14610425578063a694fc3a14610438578063aa9e370d1461044b578063ae082a5214610453578063af500ba31461046657600080fd5b806362e0accb146103f1578063817b1cd2146103fa57806391d1485414610402578063a217fddf14610415578063a314fb161461041d57600080fd5b8063395ac56a116101c95780634e71d92d1161018d5780634e71d92d1461038757806350017f3e1461038f57806351ed6a30146103a257806353122d13146103b55780636190c9d5146103d657600080fd5b8063395ac56a146103155780633c89c9061461031d57806342c41713146103305780634ca07a80146103425780634d06068a1461035557600080fd5b80632f2ff15d116102105780632f2ff15d146102b2578063358394d8146102c757806336568abe146102da57806338336b35146102ed5780633881d12c1461030057600080fd5b806301ffc9a71461024257806318160ddd1461026a5780632398c2db1461027c578063248a9ca31461028f575b600080fd5b610255610250366004612521565b610557565b60405190151581526020015b60405180910390f35b60d0545b604051908152602001610261565b61026e61028a366004612638565b61058e565b61026e61029d3660046126f8565b60009081526097602052604090206001015490565b6102c56102c0366004612711565b6106f9565b005b6102c56102d536600461273d565b610723565b6102c56102e8366004612711565b610894565b61026e6102fb36600461278a565b610912565b6103086109a2565b60405161026191906127ef565b6103086109fa565b60c9546102559062010000900460ff1681565b60c95461025590610100900460ff1681565b6102c5610350366004612802565b610a50565b60c95461036f90630100000090046001600160a01b031681565b6040516001600160a01b039091168152602001610261565b61026e610b2a565b61026e61039d3660046126f8565b610cd7565b60ca5461036f906001600160a01b031681565b6103c86103c3366004612802565b610ed4565b604051610261929190612824565b60cc5460cd5460408051928352602083019190915201610261565b61026e60cb5481565b60d15461026e565b610255610410366004612711565b61105a565b61026e600081565b61026e611085565b6102c5610433366004612892565b6110ba565b61026e6104463660046126f8565b611131565b61026e611347565b6102c56104613660046126f8565b611356565b61026e6104743660046128af565b6001600160a01b0316600090815260d7602052604090205490565b61026e61049d3660046128af565b6001600160a01b0316600090815260d8602052604090205490565b6104cb6104c63660046128af565b6113d9565b60408051938452602084019290925290820152606001610261565b6102c56104f4366004612892565b611568565b6102c5610507366004612711565b6115e1565b60d25461026e565b60d35461026e565b60d45461026e565b6102c56105323660046128ca565b611606565b6102c5610545366004612892565b611881565b60c9546102559060ff1681565b60006001600160e01b03198216637965db0b60e01b148061058857506301ffc9a760e01b6001600160e01b03198316145b92915050565b600060d2546000146105bb5760405162461bcd60e51b81526004016105b290612917565b60405180910390fd5b6040516020016105ca90612938565b604051602081830303815290604052805190602001206105e9816118f8565b60c95462010000900460ff166106115760405162461bcd60e51b81526004016105b29061294e565b825184511461064c5760405162461bcd60e51b815260206004820152600760248201526620a9221d22981b60c91b60448201526064016105b2565b60005b84518110156106dc57600085828151811061066c5761066c61296f565b60200260200101519050600085838151811061068a5761068a61296f565b602002602001015190508060d76000846001600160a01b03166001600160a01b03168152602001908152602001600020819055506106c782611905565b505080806106d49061299b565b91505061064f565b5060c9805462ff0000191690556106f16119a5565b949350505050565b600082815260976020526040902060010154610714816118f8565b61071e8383611a19565b505050565b600054610100900460ff16158080156107435750600054600160ff909116105b8061075d5750303b15801561075d575060005460ff166001145b6107c05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105b2565b6000805460ff1916600117905580156107e3576000805461ff0019166101001790555b60cb84905560c980546301000000600160b81b03191663010000006001600160a01b03868116919091029190911790915560ca80546001600160a01b031916918416919091179055610833611a9f565b61083b611ac8565b610846600086611af7565b801561088d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b5050505050565b6001600160a01b03811633146109045760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016105b2565b61090e8282611b01565b5050565b600061091c611b68565b60405160200161092b90612938565b6040516020818303038152906040528051906020012061094a816118f8565b60c954610100900460ff161561098c5760405162461bcd60e51b815260206004820152600760248201526620a9221d22989b60c91b60448201526064016105b2565b6109968484611bc1565b91505061058860018055565b606060ce8054806020026020016040519081016040528092919081815260200182805480156109f057602002820191906000526020600020905b8154815260200190600101908083116109dc575b5050505050905090565b606060cf8054806020026020016040519081016040528092919081815260200182805480156109f057602002820191906000526020600020908154815260200190600101908083116109dc575050505050905090565b60d25415610a705760405162461bcd60e51b81526004016105b290612917565b604051602001610a7f90612938565b60405160208183030381529060405280519060200120610a9e816118f8565b4283118015610aac57508282115b610ae25760405162461bcd60e51b81526020600482015260076024820152664152443a45313160c81b60448201526064016105b2565b60cc83905560cd82905560408051848152602081018490527f8ee5ec369f059f74fb314ae7101986db82a3c2dcf1f60ec5a917bfbc749ffcb9910160405180910390a1505050565b60c954600090610100900460ff16610b545760405162461bcd60e51b81526004016105b29061294e565b610b5c611b68565b6000806000610b6a336113d9565b92509250925060008311610baa5760405162461bcd60e51b815260206004820152600760248201526604152443a4530360cc1b60448201526064016105b2565b60c95460405163095ea7b360e01b81523360048201526024810185905263010000009091046001600160a01b03169063095ea7b3906044016020604051808303816000875af1158015610c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2591906129b4565b5060c954600090610c4790630100000090046001600160a01b03163386611d91565b33600090815260d86020526040902054909150610c649082611fbd565b33600090815260d8602052604090205560d254610c819082611fbd565b60d2819055604080513381526020810184905280820192909252517f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a9181900360600190a19350505050610cd460018055565b90565b600060d254600014610cfb5760405162461bcd60e51b81526004016105b290612917565b604051602001610d0a90612938565b60405160208183030381529060405280519060200120610d29816118f8565b60c9546040516370a0823160e01b81523360048201528491630100000090046001600160a01b0316906370a0823190602401602060405180830381865afa158015610d78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9c91906129d1565b1015610dd45760405162461bcd60e51b815260206004820152600760248201526620a9221d22981960c91b60448201526064016105b2565b60d3548314610e0f5760405162461bcd60e51b81526020600482015260076024820152661054910e914c0d60ca1b60448201526064016105b2565b60c954600090610e3090630100000090046001600160a01b03163386611fd0565b90506000610e498260d054611fbd90919063ffffffff16565b905060d0548111610e865760405162461bcd60e51b81526020600482015260076024820152664152443a45303360c81b60448201526064016105b2565b60d081905560408051338152602081018490529081018290527ff0f5a6096b2a43fc10bc314148e9ac3851fd8455384682f3c3cd9d2f0bc71b179060600160405180910390a1509392505050565b6060806000610ee48460016129ea565b905060008167ffffffffffffffff811115610f0157610f0161254b565b604051908082528060200260200182016040528015610f2a578160200160208202803683370190505b50905060008267ffffffffffffffff811115610f4857610f4861254b565b604051908082528060200260200182016040528015610f71578160200160208202803683370190505b509050865b8381101561104d576000610f8a8983612a02565b9050600060d58381548110610fa157610fa161296f565b9060005260206000200160009054906101000a90046001600160a01b0316905080858381518110610fd457610fd461296f565b60200260200101906001600160a01b031690816001600160a01b03168152505060d76000826001600160a01b03166001600160a01b031681526020019081526020016000205484838151811061102c5761102c61296f565b602002602001018181525050505080806110459061299b565b915050610f76565b5090969095509350505050565b60009182526097602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6040516b26b0b935b2ba2fa0b236b4b760a11b6020820152602c015b6040516020818303038152906040528051906020012081565b6040516020016110c990612938565b604051602081830303815290604052805190602001206110e8816118f8565b60c9805460ff19168315159081179091556040519081527f8aba9b102bc9c95c6c94e2c387aaeb41d36fb86b715fe962cad88473d5085b80906020015b60405180910390a15050565b60c95460009060ff166111565760405162461bcd60e51b81526004016105b29061294e565b61115e611b68565b60cc5442118015611170575060cd5442105b6111a65760405162461bcd60e51b81526020600482015260076024820152664152443a45303160c81b60448201526064016105b2565b60ca546040516370a0823160e01b815233600482015283916001600160a01b0316906370a0823190602401602060405180830381865afa1580156111ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121291906129d1565b101561124a5760405162461bcd60e51b815260206004820152600760248201526620a9221d22981960c91b60448201526064016105b2565b60ca54600090611264906001600160a01b03163385611fd0565b9050600061127d8260d154611fbd90919063ffffffff16565b905060d15481116112ba5760405162461bcd60e51b81526020600482015260076024820152664152443a45303360c81b60448201526064016105b2565b60d181905533600090815260d760205260409020546112d99083611fbd565b33600081815260d760205260409020919091556112f590611905565b60408051338152602081018490529081018290527f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee909060600160405180910390a150905061134260018055565b919050565b6040516020016110a190612938565b60d254156113765760405162461bcd60e51b81526004016105b290612917565b60405160200161138590612938565b604051602081830303815290604052805190602001206113a4816118f8565b60d38290556040518281527f5f625396e100b5ad333f4e7b9a2019f5554aa896eeec5f9b0ce1ff1528e813df90602001611125565b60008060008061142560d15461141f60d76000896001600160a01b03166001600160a01b031681526020019081526020016000205460d0546121f790919063ffffffff16565b90612203565b9050600061143161220f565b90506000611444606461141f85856121f7565b6001600160a01b038816600090815260d860205260408120549192509061146c908390612287565b9050600061147a8584612287565b905060d0548511156114b85760405162461bcd60e51b815260206004820152600760248201526608288a4748a60760cb1b60448201526064016105b2565b6001600160a01b038916600090815260d8602052604090205483906114dd90846129ea565b11156115155760405162461bcd60e51b81526020600482015260076024820152664144523a45303960c81b60448201526064016105b2565b8461152084836129ea565b11156115585760405162461bcd60e51b815260206004820152600760248201526604152443a4531360cc1b60448201526064016105b2565b9098909750929550919350505050565b60405160200161157790612938565b60405160208183030381529060405280519060200120611596816118f8565b60c98054831515620100000262ff0000199091161790556040517fb158a1372f9389e1234b875050b317b523496353f06b68398fed7c05585055299061112590841515815260200190565b6000828152609760205260409020600101546115fc816118f8565b61071e8383611b01565b60d254156116265760405162461bcd60e51b81526004016105b290612917565b60405160200161163590612938565b60405160208183030381529060405280519060200120611654816118f8565b600083511161168f5760405162461bcd60e51b815260206004820152600760248201526620a9221d22989960c91b60448201526064016105b2565b81518351146116ca5760405162461bcd60e51b815260206004820152600760248201526620a9221d22981b60c91b60448201526064016105b2565b60cd54836000815181106116e0576116e061296f565b60200260200101511161171f5760405162461bcd60e51b81526020600482015260076024820152664152443a45313360c81b60448201526064016105b2565b82516000805b828110156117ed57826117398260016129ea565b10156117b4578561174b8260016129ea565b8151811061175b5761175b61296f565b60200260200101518682815181106117755761177561296f565b6020026020010151106117b45760405162461bcd60e51b81526020600482015260076024820152661054910e914c4d60ca1b60448201526064016105b2565b8481815181106117c6576117c661296f565b6020026020010151826117d991906129ea565b9150806117e58161299b565b915050611725565b50806064146118285760405162461bcd60e51b81526020600482015260076024820152664152443a45313560c81b60448201526064016105b2565b845161183b9060ce9060208801906124c1565b50835161184f9060cf9060208701906124c1565b507f3c443786c59894f234c14d4270e10778744ac1052d061e731816577d7b4b516b8585604051610884929190612a19565b60405160200161189090612938565b604051602081830303815290604052805190602001206118af816118f8565b60c980548315156101000261ff00199091161790556040517fc57dd726c38e22ae392710b0736d2701e2d7d72dd4f6206bb2aed20d8acf9a029061112590841515815260200190565b6119028133612293565b50565b6001600160a01b038116600090815260d6602052604090205460ff16611902576001600160a01b038116600081815260d660205260408120805460ff1916600190811790915560d5805480830182559083527f51858de9989bf7441865ebdadbf7382c8838edbf830f5d86a9a51ac773676dd60180546001600160a01b03191690931790925560d4805490919061199d9084906129ea565b909155505050565b600080805b60d554811015611a0e5760d7600060d583815481106119cb576119cb61296f565b60009182526020808320909101546001600160a01b031683528201929092526040019020546119fa90836129ea565b915080611a068161299b565b9150506119aa565b5060d1819055919050565b611a23828261105a565b61090e5760008281526097602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611a5b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600054610100900460ff16611ac65760405162461bcd60e51b81526004016105b290612a47565b565b600054610100900460ff16611aef5760405162461bcd60e51b81526004016105b290612a47565b611ac66122ec565b61090e8282611a19565b611b0b828261105a565b1561090e5760008281526097602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600260015403611bba5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105b2565b6002600155565b60006001600160a01b038316611c0e5760405162461bcd60e51b8152602060048201526012602482015271544f4b454e5f43414e545f42455f5a45524f60701b60448201526064016105b2565b6040516370a0823160e01b815230600482015282906001600160a01b038516906370a0823190602401602060405180830381865afa158015611c54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7891906129d1565b1015611cb95760405162461bcd60e51b815260206004820152601060248201526f2727aa2fa2a727aaa3a42faa27a5a2a760811b60448201526064016105b2565b60405163095ea7b360e01b8152336004820152602481018390526001600160a01b0384169063095ea7b3906044016020604051808303816000875af1158015611d06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d2a91906129b4565b506000611d38843385611d91565b604080513381526001600160a01b03871660208201529081018290529091507f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb9060600160405180910390a19392505050565b60018055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038616906370a0823190602401602060405180830381865afa158015611dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dfe91906129d1565b60405163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529192509086169063a9059cbb906044016020604051808303816000875af1158015611e51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e7591906129b4565b5060003d8015611e8c5760208114611e9657600080fd5b6000199150611ea2565b60206000803e60005191505b5080611eeb5760405162461bcd60e51b81526020600482015260186024820152771513d2d15397d514905394d1915497d25397d1905253115160421b60448201526064016105b2565b6040516370a0823160e01b81523060048201526000906001600160a01b038816906370a0823190602401602060405180830381865afa158015611f32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5691906129d1565b905082811115611fa85760405162461bcd60e51b815260206004820152601a60248201527f544f4b454e5f5452414e534645525f494e5f4f564552464c4f5700000000000060448201526064016105b2565b611fb28184612a02565b979650505050505050565b6000611fc982846129ea565b9392505050565b6040516370a0823160e01b815230600482015260009081906001600160a01b038616906370a0823190602401602060405180830381865afa158015612019573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203d91906129d1565b6040516323b872dd60e01b81526001600160a01b03868116600483015230602483015260448201869052919250908616906323b872dd906064016020604051808303816000875af1158015612096573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ba91906129b4565b5060003d80156120d157602081146120db57600080fd5b60001991506120e7565b60206000803e60005191505b50806121305760405162461bcd60e51b81526020600482015260186024820152771513d2d15397d514905394d1915497d25397d1905253115160421b60448201526064016105b2565b6040516370a0823160e01b81523060048201526000906001600160a01b038816906370a0823190602401602060405180830381865afa158015612177573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061219b91906129d1565b9050828110156121ed5760405162461bcd60e51b815260206004820152601a60248201527f544f4b454e5f5452414e534645525f494e5f4f564552464c4f5700000000000060448201526064016105b2565b611fb28382612a02565b6000611fc98284612a92565b6000611fc98284612ab1565b600080805b60ce548110156122815760ce81815481106122315761223161296f565b906000526020600020015442111561226f5760cf81815481106122565761225661296f565b90600052602060002001548261226c91906129ea565b91505b806122798161299b565b915050612214565b50919050565b6000611fc98284612a02565b61229d828261105a565b61090e576122aa81612313565b6122b5836020612325565b6040516020016122c6929190612b03565b60408051601f198184030181529082905262461bcd60e51b82526105b291600401612b78565b600054610100900460ff16611d8b5760405162461bcd60e51b81526004016105b290612a47565b60606105886001600160a01b03831660145b60606000612334836002612a92565b61233f9060026129ea565b67ffffffffffffffff8111156123575761235761254b565b6040519080825280601f01601f191660200182016040528015612381576020820181803683370190505b509050600360fc1b8160008151811061239c5761239c61296f565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106123cb576123cb61296f565b60200101906001600160f81b031916908160001a90535060006123ef846002612a92565b6123fa9060016129ea565b90505b6001811115612472576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061242e5761242e61296f565b1a60f81b8282815181106124445761244461296f565b60200101906001600160f81b031916908160001a90535060049490941c9361246b81612bab565b90506123fd565b508315611fc95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105b2565b8280548282559060005260206000209081019282156124fc579160200282015b828111156124fc5782518255916020019190600101906124e1565b5061250892915061250c565b5090565b5b80821115612508576000815560010161250d565b60006020828403121561253357600080fd5b81356001600160e01b031981168114611fc957600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561258a5761258a61254b565b604052919050565b600067ffffffffffffffff8211156125ac576125ac61254b565b5060051b60200190565b80356001600160a01b038116811461134257600080fd5b600082601f8301126125de57600080fd5b813560206125f36125ee83612592565b612561565b82815260059290921b8401810191818101908684111561261257600080fd5b8286015b8481101561262d5780358352918301918301612616565b509695505050505050565b6000806040838503121561264b57600080fd5b823567ffffffffffffffff8082111561266357600080fd5b818501915085601f83011261267757600080fd5b813560206126876125ee83612592565b82815260059290921b840181019181810190898411156126a657600080fd5b948201945b838610156126cb576126bc866125b6565b825294820194908201906126ab565b965050860135925050808211156126e157600080fd5b506126ee858286016125cd565b9150509250929050565b60006020828403121561270a57600080fd5b5035919050565b6000806040838503121561272457600080fd5b82359150612734602084016125b6565b90509250929050565b6000806000806080858703121561275357600080fd5b61275c856125b6565b935060208501359250612771604086016125b6565b915061277f606086016125b6565b905092959194509250565b6000806040838503121561279d57600080fd5b6127a6836125b6565b946020939093013593505050565b600081518084526020808501945080840160005b838110156127e4578151875295820195908201906001016127c8565b509495945050505050565b602081526000611fc960208301846127b4565b6000806040838503121561281557600080fd5b50508035926020909101359150565b604080825283519082018190526000906020906060840190828701845b828110156128665781516001600160a01b031684529284019290840190600101612841565b5050508381038285015261287a81866127b4565b9695505050505050565b801515811461190257600080fd5b6000602082840312156128a457600080fd5b8135611fc981612884565b6000602082840312156128c157600080fd5b611fc9826125b6565b600080604083850312156128dd57600080fd5b823567ffffffffffffffff808211156128f557600080fd5b612901868387016125cd565b935060208501359150808211156126e157600080fd5b6020808252600790820152664152443a45303760c81b604082015260600190565b692230ba30afa0b236b4b760b11b8152600a0190565b6020808252600790820152664152443a45303560c81b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016129ad576129ad612985565b5060010190565b6000602082840312156129c657600080fd5b8151611fc981612884565b6000602082840312156129e357600080fd5b5051919050565b600082198211156129fd576129fd612985565b500190565b600082821015612a1457612a14612985565b500390565b604081526000612a2c60408301856127b4565b8281036020840152612a3e81856127b4565b95945050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000816000190483118215151615612aac57612aac612985565b500290565b600082612ace57634e487b7160e01b600052601260045260246000fd5b500490565b60005b83811015612aee578181015183820152602001612ad6565b83811115612afd576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612b3b816017850160208801612ad3565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612b6c816028840160208801612ad3565b01602801949350505050565b6020815260008251806020840152612b97816040850160208701612ad3565b601f01601f19169190910160400192915050565b600081612bba57612bba612985565b50600019019056fea264697066735822122051b25e25a9430f903acfa2ed097476a419197f728dd9186ca121f23e0300cd8364736f6c634300080e003360806040523480156200001157600080fd5b5060405162000e7638038062000e768339810160408190526200003491620004b4565b8282828281620000478282600062000061565b50620000559050826200009e565b505050505050620005e7565b6200006c83620000f9565b6000825111806200007a5750805b1562000099576200009783836200013b60201b6200022e1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c96200016a565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f681620001a3565b50565b620001048162000258565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000163838360405180606001604052806027815260200162000e4f602791396200030c565b9392505050565b60006200019460008051602062000e2f83398151915260001b6200038b60201b620001ea1760201c565b546001600160a01b0316919050565b6001600160a01b0381166200020e5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b806200023760008051602062000e2f83398151915260001b6200038b60201b620001ea1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6200026e816200038e60201b6200025a1760201c565b620002d25760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840162000205565b80620002377f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6200038b60201b620001ea1760201c565b6060600080856001600160a01b0316856040516200032b919062000594565b600060405180830381855af49150503d806000811462000368576040519150601f19603f3d011682016040523d82523d6000602084013e6200036d565b606091505b50909250905062000381868383876200039d565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200041157825160000362000409576001600160a01b0385163b620004095760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000205565b50816200041d565b6200041d838362000425565b949350505050565b815115620004365781518083602001fd5b8060405162461bcd60e51b8152600401620002059190620005b2565b80516001600160a01b03811681146200046a57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004a257818101518382015260200162000488565b83811115620000975750506000910152565b600080600060608486031215620004ca57600080fd5b620004d58462000452565b9250620004e56020850162000452565b60408501519092506001600160401b03808211156200050357600080fd5b818601915086601f8301126200051857600080fd5b8151818111156200052d576200052d6200046f565b604051601f8201601f19908116603f011681019083821181831017156200055857620005586200046f565b816040528281528960208487010111156200057257600080fd5b6200058583602083016020880162000485565b80955050505050509250925092565b60008251620005a881846020870162000485565b9190910192915050565b6020815260008251806020840152620005d381604085016020870162000485565b601f01601f19169190910160400192915050565b61083880620005f76000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106c2565b610118565b61005b6100933660046106dd565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106c2565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b6101166101116102fe565b610308565b565b61012061032c565b6001600160a01b0316330361014d5761014a8160405180602001604052806000815250600061035f565b50565b61014a6100fe565b61015d61032c565b6001600160a01b031633036101b4576101af8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061035f915050565b505050565b6101af6100fe565b60006101c661032c565b6001600160a01b031633036101e2576101dd6102fe565b905090565b6101ea6100fe565b90565b6101f561032c565b6001600160a01b0316330361014d5761014a8161038a565b600061021761032c565b6001600160a01b031633036101e2576101dd61032c565b606061025383836040518060600160405280602781526020016107dc602791396103de565b9392505050565b6001600160a01b03163b151590565b61027161032c565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd610456565b3660008037600080366000845af43d6000803e808015610327573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6103688361047e565b6000825111806103755750805b156101af57610384838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b361032c565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a816104be565b6060600080856001600160a01b0316856040516103fb919061078c565b600060405180830381855af49150503d8060008114610436576040519150601f19603f3d011682016040523d82523d6000602084013e61043b565b606091505b509150915061044c86838387610567565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610350565b610487816105e8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105235760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f5565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156105d65782516000036105cf576001600160a01b0385163b6105cf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102f5565b50816105e0565b6105e0838361067c565b949350505050565b6001600160a01b0381163b6106555760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102f5565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610546565b81511561068c5781518083602001fd5b8060405162461bcd60e51b81526004016102f591906107a8565b80356001600160a01b03811681146106bd57600080fd5b919050565b6000602082840312156106d457600080fd5b610253826106a6565b6000806000604084860312156106f257600080fd5b6106fb846106a6565b9250602084013567ffffffffffffffff8082111561071857600080fd5b818601915086601f83011261072c57600080fd5b81358181111561073b57600080fd5b87602082850101111561074d57600080fd5b6020830194508093505050509250925092565b60005b8381101561077b578181015183820152602001610763565b838111156103845750506000910152565b6000825161079e818460208701610760565b9190910192915050565b60208152600082518060208401526107c7816040850160208701610760565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201205da26020dadc8fdbbeef9a84bb0ec78efee7ef251a67eb02565a36f8ee09a64736f6c634300080e0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122088118ce132e35932d498a173255204842e4ef52e56335fa9125b8881c92f4ea464736f6c634300080e0033
Deployed Bytecode
0x60806040523480156200001157600080fd5b5060043610620001395760003560e01c806362e0accb11620000bb578063aa9e370d116200007a578063aa9e370d14620002ac578063c08c511314620002b6578063d547741f14620002cd578063f3e7cddb14620002e4578063f62d1888146200031057600080fd5b806362e0accb146200026f57806391d148541462000279578063a217fddf1462000290578063a314fb161462000299578063a403642814620002a357600080fd5b8063248a9ca31162000108578063248a9ca314620001df5780632f2ff15d146200021457806336568abe146200022d5780633e47158c146200024457806347c02661146200025857600080fd5b806301ffc9a7146200013e57806306fdde03146200016a57806311a800bc14620001835780631e1f010214620001c8575b600080fd5b620001556200014f36600462000e9c565b62000327565b60405190151581526020015b60405180910390f35b620001746200035f565b60405162000161919062000efb565b620001af6200019436600462000f30565b6000908152609c60205260409020546001600160a01b031690565b6040516001600160a01b03909116815260200162000161565b620001af620001d936600462000f67565b620003f5565b62000205620001f036600462000f30565b60009081526065602052604090206001015490565b60405190815260200162000161565b6200022b6200022536600462000f9f565b6200069f565b005b6200022b6200023e36600462000f9f565b620006cd565b609b54620001af906001600160a01b031681565b6200022b6200026936600462000fc5565b6200074f565b62000205609a5481565b620001556200028a36600462000f9f565b620007df565b62000205600081565b620002056200080a565b609a5462000205565b620002056200083f565b6200022b620002c736600462000f9f565b6200085e565b6200022b620002de36600462000f9f565b6200093d565b620001af620002f536600462000f30565b609c602052600090815260409020546001600160a01b031681565b6200022b6200032136600462000ff9565b62000966565b60006001600160e01b03198216637965db0b60e01b14806200035957506301ffc9a760e01b6001600160e01b03198316145b92915050565b609980546200036e90620010b4565b80601f01602080910402602001604051908101604052809291908181526020018280546200039c90620010b4565b8015620003ed5780601f10620003c157610100808354040283529160200191620003ed565b820191906000526020600020905b815481529060010190602001808311620003cf57829003601f168201915b505050505081565b604051692230ba30afa0b236b4b760b11b6020820152600090602a0160405160208183030381529060405280519060200120620004328162000a93565b6001600160a01b038416620004785760405162461bcd60e51b815260206004820152600760248201526604654593a4530360cc1b60448201526064015b60405180910390fd5b6001600160a01b038316620004ba5760405162461bcd60e51b81526020600482015260076024820152664654593a45303160c81b60448201526064016200046f565b604051620004c89062000dda565b604051809103906000f080158015620004e5573d6000803e3d6000fd5b50609880546001600160a01b0319166001600160a01b03928316908117909155609b54604051919216906200051a9062000de8565b6001600160a01b03928316815291166020820152606060408201819052600090820152608001604051809103906000f0801580156200055d573d6000803e3d6000fd5b50609760006101000a8154816001600160a01b0302191690836001600160a01b031602179055506001609a600082825462000599919062001106565b909155505060978054609a80546000908152609c60205260409081902080546001600160a01b0319166001600160a01b039485161790559254905492516306b0729b60e31b8152336004820152602481019390935286821660448401528582166064840152169063358394d890608401600060405180830381600087803b1580156200062457600080fd5b505af115801562000639573d6000803e3d6000fd5b5050609a54609754604080519283523360208401526001600160a01b0390911682820152517f8cac58606a8fb398486d1787508c7b44042b0d5c1ef08137b479151b04629c5c9350908190036060019150a150506097546001600160a01b031692915050565b600082815260656020526040902060010154620006bc8162000a93565b620006c8838362000aa2565b505050565b6001600160a01b03811633146200073f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016200046f565b6200074b828262000b2c565b5050565b604051692230ba30afa0b236b4b760b11b6020820152602a0160405160208183030381529060405280519060200120620007898162000a93565b609b80546001600160a01b0319166001600160a01b0384169081179091556040519081527f80955c780c43a8aff65e82c05d5b0584cfbdaf1f52d174bdf87f795aa5ddbbcd906020015b60405180910390a15050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6040516b26b0b935b2ba2fa0b236b4b760a11b6020820152602c015b6040516020818303038152906040528051906020012081565b604051692230ba30afa0b236b4b760b11b6020820152602a0162000826565b604051692230ba30afa0b236b4b760b11b6020820152602a0160405160208183030381529060405280519060200120620008988162000a93565b609a54831115620008d65760405162461bcd60e51b8152602060048201526007602482015266232a2c9d22981960c91b60448201526064016200046f565b6000838152609c602090815260409182902080546001600160a01b0319166001600160a01b0386169081179091558251868152918201527f6cb5042a1eb85d6774bcb8544ad743eaffd492e13601ca85099c605766546375910160405180910390a1505050565b6000828152606560205260409020600101546200095a8162000a93565b620006c8838362000b2c565b600054610100900460ff1615808015620009875750600054600160ff909116105b80620009a35750303b158015620009a3575060005460ff166001145b62000a085760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016200046f565b6000805460ff19166001179055801562000a2c576000805461ff0019166101001790555b815162000a4190609990602085019062000df6565b5062000a4f60003362000b96565b80156200074b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001620007d3565b62000a9f813362000ba2565b50565b62000aae8282620007df565b6200074b5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905562000ae83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b62000b388282620007df565b156200074b5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6200074b828262000aa2565b62000bae8282620007df565b6200074b5762000bbe8162000c06565b62000bcb83602062000c19565b60405160200162000bde92919062001121565b60408051601f198184030181529082905262461bcd60e51b82526200046f9160040162000efb565b6060620003596001600160a01b03831660145b6060600062000c2a8360026200119a565b62000c3790600262001106565b67ffffffffffffffff81111562000c525762000c5262000fe3565b6040519080825280601f01601f19166020018201604052801562000c7d576020820181803683370190505b509050600360fc1b8160008151811062000c9b5762000c9b620011bc565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062000ccd5762000ccd620011bc565b60200101906001600160f81b031916908160001a905350600062000cf38460026200119a565b62000d0090600162001106565b90505b600181111562000d82576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062000d385762000d38620011bc565b1a60f81b82828151811062000d515762000d51620011bc565b60200101906001600160f81b031916908160001a90535060049490941c9362000d7a81620011d2565b905062000d03565b50831562000dd35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016200046f565b9392505050565b612c2480620011ed83390190565b610e768062003e1183390190565b82805462000e0490620010b4565b90600052602060002090601f01602090048101928262000e28576000855562000e73565b82601f1062000e4357805160ff191683800117855562000e73565b8280016001018555821562000e73579182015b8281111562000e7357825182559160200191906001019062000e56565b5062000e8192915062000e85565b5090565b5b8082111562000e81576000815560010162000e86565b60006020828403121562000eaf57600080fd5b81356001600160e01b03198116811462000dd357600080fd5b60005b8381101562000ee557818101518382015260200162000ecb565b8381111562000ef5576000848401525b50505050565b602081526000825180602084015262000f1c81604085016020870162000ec8565b601f01601f19169190910160400192915050565b60006020828403121562000f4357600080fd5b5035919050565b80356001600160a01b038116811462000f6257600080fd5b919050565b6000806040838503121562000f7b57600080fd5b62000f868362000f4a565b915062000f966020840162000f4a565b90509250929050565b6000806040838503121562000fb357600080fd5b8235915062000f966020840162000f4a565b60006020828403121562000fd857600080fd5b62000dd38262000f4a565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156200100c57600080fd5b813567ffffffffffffffff808211156200102557600080fd5b818401915084601f8301126200103a57600080fd5b8135818111156200104f576200104f62000fe3565b604051601f8201601f19908116603f011681019083821181831017156200107a576200107a62000fe3565b816040528281528760208487010111156200109457600080fd5b826020860160208301376000928101602001929092525095945050505050565b600181811c90821680620010c957607f821691505b602082108103620010ea57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156200111c576200111c620010f0565b500190565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516200115b81601785016020880162000ec8565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516200118e81602884016020880162000ec8565b01602801949350505050565b6000816000190483118215151615620011b757620011b7620010f0565b500290565b634e487b7160e01b600052603260045260246000fd5b600081620011e457620011e4620010f0565b50600019019056fe608060405260c9805462ffffff1916905534801561001c57600080fd5b50612bf88061002c6000396000f3fe608060405234801561001057600080fd5b506004361061023d5760003560e01c806362e0accb1161013b578063baa3f7ee116100b8578063dd592a321161007c578063dd592a3214610514578063e1604b701461051c578063f3c8378814610524578063f88345ec14610537578063fcbfd5971461054a57600080fd5b8063baa3f7ee1461048f578063ca908f12146104b8578063cbb36355146104e6578063d547741f146104f9578063d54ad2a11461050c57600080fd5b8063a48f197d116100ff578063a48f197d14610425578063a694fc3a14610438578063aa9e370d1461044b578063ae082a5214610453578063af500ba31461046657600080fd5b806362e0accb146103f1578063817b1cd2146103fa57806391d1485414610402578063a217fddf14610415578063a314fb161461041d57600080fd5b8063395ac56a116101c95780634e71d92d1161018d5780634e71d92d1461038757806350017f3e1461038f57806351ed6a30146103a257806353122d13146103b55780636190c9d5146103d657600080fd5b8063395ac56a146103155780633c89c9061461031d57806342c41713146103305780634ca07a80146103425780634d06068a1461035557600080fd5b80632f2ff15d116102105780632f2ff15d146102b2578063358394d8146102c757806336568abe146102da57806338336b35146102ed5780633881d12c1461030057600080fd5b806301ffc9a71461024257806318160ddd1461026a5780632398c2db1461027c578063248a9ca31461028f575b600080fd5b610255610250366004612521565b610557565b60405190151581526020015b60405180910390f35b60d0545b604051908152602001610261565b61026e61028a366004612638565b61058e565b61026e61029d3660046126f8565b60009081526097602052604090206001015490565b6102c56102c0366004612711565b6106f9565b005b6102c56102d536600461273d565b610723565b6102c56102e8366004612711565b610894565b61026e6102fb36600461278a565b610912565b6103086109a2565b60405161026191906127ef565b6103086109fa565b60c9546102559062010000900460ff1681565b60c95461025590610100900460ff1681565b6102c5610350366004612802565b610a50565b60c95461036f90630100000090046001600160a01b031681565b6040516001600160a01b039091168152602001610261565b61026e610b2a565b61026e61039d3660046126f8565b610cd7565b60ca5461036f906001600160a01b031681565b6103c86103c3366004612802565b610ed4565b604051610261929190612824565b60cc5460cd5460408051928352602083019190915201610261565b61026e60cb5481565b60d15461026e565b610255610410366004612711565b61105a565b61026e600081565b61026e611085565b6102c5610433366004612892565b6110ba565b61026e6104463660046126f8565b611131565b61026e611347565b6102c56104613660046126f8565b611356565b61026e6104743660046128af565b6001600160a01b0316600090815260d7602052604090205490565b61026e61049d3660046128af565b6001600160a01b0316600090815260d8602052604090205490565b6104cb6104c63660046128af565b6113d9565b60408051938452602084019290925290820152606001610261565b6102c56104f4366004612892565b611568565b6102c5610507366004612711565b6115e1565b60d25461026e565b60d35461026e565b60d45461026e565b6102c56105323660046128ca565b611606565b6102c5610545366004612892565b611881565b60c9546102559060ff1681565b60006001600160e01b03198216637965db0b60e01b148061058857506301ffc9a760e01b6001600160e01b03198316145b92915050565b600060d2546000146105bb5760405162461bcd60e51b81526004016105b290612917565b60405180910390fd5b6040516020016105ca90612938565b604051602081830303815290604052805190602001206105e9816118f8565b60c95462010000900460ff166106115760405162461bcd60e51b81526004016105b29061294e565b825184511461064c5760405162461bcd60e51b815260206004820152600760248201526620a9221d22981b60c91b60448201526064016105b2565b60005b84518110156106dc57600085828151811061066c5761066c61296f565b60200260200101519050600085838151811061068a5761068a61296f565b602002602001015190508060d76000846001600160a01b03166001600160a01b03168152602001908152602001600020819055506106c782611905565b505080806106d49061299b565b91505061064f565b5060c9805462ff0000191690556106f16119a5565b949350505050565b600082815260976020526040902060010154610714816118f8565b61071e8383611a19565b505050565b600054610100900460ff16158080156107435750600054600160ff909116105b8061075d5750303b15801561075d575060005460ff166001145b6107c05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105b2565b6000805460ff1916600117905580156107e3576000805461ff0019166101001790555b60cb84905560c980546301000000600160b81b03191663010000006001600160a01b03868116919091029190911790915560ca80546001600160a01b031916918416919091179055610833611a9f565b61083b611ac8565b610846600086611af7565b801561088d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b5050505050565b6001600160a01b03811633146109045760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016105b2565b61090e8282611b01565b5050565b600061091c611b68565b60405160200161092b90612938565b6040516020818303038152906040528051906020012061094a816118f8565b60c954610100900460ff161561098c5760405162461bcd60e51b815260206004820152600760248201526620a9221d22989b60c91b60448201526064016105b2565b6109968484611bc1565b91505061058860018055565b606060ce8054806020026020016040519081016040528092919081815260200182805480156109f057602002820191906000526020600020905b8154815260200190600101908083116109dc575b5050505050905090565b606060cf8054806020026020016040519081016040528092919081815260200182805480156109f057602002820191906000526020600020908154815260200190600101908083116109dc575050505050905090565b60d25415610a705760405162461bcd60e51b81526004016105b290612917565b604051602001610a7f90612938565b60405160208183030381529060405280519060200120610a9e816118f8565b4283118015610aac57508282115b610ae25760405162461bcd60e51b81526020600482015260076024820152664152443a45313160c81b60448201526064016105b2565b60cc83905560cd82905560408051848152602081018490527f8ee5ec369f059f74fb314ae7101986db82a3c2dcf1f60ec5a917bfbc749ffcb9910160405180910390a1505050565b60c954600090610100900460ff16610b545760405162461bcd60e51b81526004016105b29061294e565b610b5c611b68565b6000806000610b6a336113d9565b92509250925060008311610baa5760405162461bcd60e51b815260206004820152600760248201526604152443a4530360cc1b60448201526064016105b2565b60c95460405163095ea7b360e01b81523360048201526024810185905263010000009091046001600160a01b03169063095ea7b3906044016020604051808303816000875af1158015610c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2591906129b4565b5060c954600090610c4790630100000090046001600160a01b03163386611d91565b33600090815260d86020526040902054909150610c649082611fbd565b33600090815260d8602052604090205560d254610c819082611fbd565b60d2819055604080513381526020810184905280820192909252517f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a9181900360600190a19350505050610cd460018055565b90565b600060d254600014610cfb5760405162461bcd60e51b81526004016105b290612917565b604051602001610d0a90612938565b60405160208183030381529060405280519060200120610d29816118f8565b60c9546040516370a0823160e01b81523360048201528491630100000090046001600160a01b0316906370a0823190602401602060405180830381865afa158015610d78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9c91906129d1565b1015610dd45760405162461bcd60e51b815260206004820152600760248201526620a9221d22981960c91b60448201526064016105b2565b60d3548314610e0f5760405162461bcd60e51b81526020600482015260076024820152661054910e914c0d60ca1b60448201526064016105b2565b60c954600090610e3090630100000090046001600160a01b03163386611fd0565b90506000610e498260d054611fbd90919063ffffffff16565b905060d0548111610e865760405162461bcd60e51b81526020600482015260076024820152664152443a45303360c81b60448201526064016105b2565b60d081905560408051338152602081018490529081018290527ff0f5a6096b2a43fc10bc314148e9ac3851fd8455384682f3c3cd9d2f0bc71b179060600160405180910390a1509392505050565b6060806000610ee48460016129ea565b905060008167ffffffffffffffff811115610f0157610f0161254b565b604051908082528060200260200182016040528015610f2a578160200160208202803683370190505b50905060008267ffffffffffffffff811115610f4857610f4861254b565b604051908082528060200260200182016040528015610f71578160200160208202803683370190505b509050865b8381101561104d576000610f8a8983612a02565b9050600060d58381548110610fa157610fa161296f565b9060005260206000200160009054906101000a90046001600160a01b0316905080858381518110610fd457610fd461296f565b60200260200101906001600160a01b031690816001600160a01b03168152505060d76000826001600160a01b03166001600160a01b031681526020019081526020016000205484838151811061102c5761102c61296f565b602002602001018181525050505080806110459061299b565b915050610f76565b5090969095509350505050565b60009182526097602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6040516b26b0b935b2ba2fa0b236b4b760a11b6020820152602c015b6040516020818303038152906040528051906020012081565b6040516020016110c990612938565b604051602081830303815290604052805190602001206110e8816118f8565b60c9805460ff19168315159081179091556040519081527f8aba9b102bc9c95c6c94e2c387aaeb41d36fb86b715fe962cad88473d5085b80906020015b60405180910390a15050565b60c95460009060ff166111565760405162461bcd60e51b81526004016105b29061294e565b61115e611b68565b60cc5442118015611170575060cd5442105b6111a65760405162461bcd60e51b81526020600482015260076024820152664152443a45303160c81b60448201526064016105b2565b60ca546040516370a0823160e01b815233600482015283916001600160a01b0316906370a0823190602401602060405180830381865afa1580156111ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121291906129d1565b101561124a5760405162461bcd60e51b815260206004820152600760248201526620a9221d22981960c91b60448201526064016105b2565b60ca54600090611264906001600160a01b03163385611fd0565b9050600061127d8260d154611fbd90919063ffffffff16565b905060d15481116112ba5760405162461bcd60e51b81526020600482015260076024820152664152443a45303360c81b60448201526064016105b2565b60d181905533600090815260d760205260409020546112d99083611fbd565b33600081815260d760205260409020919091556112f590611905565b60408051338152602081018490529081018290527f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee909060600160405180910390a150905061134260018055565b919050565b6040516020016110a190612938565b60d254156113765760405162461bcd60e51b81526004016105b290612917565b60405160200161138590612938565b604051602081830303815290604052805190602001206113a4816118f8565b60d38290556040518281527f5f625396e100b5ad333f4e7b9a2019f5554aa896eeec5f9b0ce1ff1528e813df90602001611125565b60008060008061142560d15461141f60d76000896001600160a01b03166001600160a01b031681526020019081526020016000205460d0546121f790919063ffffffff16565b90612203565b9050600061143161220f565b90506000611444606461141f85856121f7565b6001600160a01b038816600090815260d860205260408120549192509061146c908390612287565b9050600061147a8584612287565b905060d0548511156114b85760405162461bcd60e51b815260206004820152600760248201526608288a4748a60760cb1b60448201526064016105b2565b6001600160a01b038916600090815260d8602052604090205483906114dd90846129ea565b11156115155760405162461bcd60e51b81526020600482015260076024820152664144523a45303960c81b60448201526064016105b2565b8461152084836129ea565b11156115585760405162461bcd60e51b815260206004820152600760248201526604152443a4531360cc1b60448201526064016105b2565b9098909750929550919350505050565b60405160200161157790612938565b60405160208183030381529060405280519060200120611596816118f8565b60c98054831515620100000262ff0000199091161790556040517fb158a1372f9389e1234b875050b317b523496353f06b68398fed7c05585055299061112590841515815260200190565b6000828152609760205260409020600101546115fc816118f8565b61071e8383611b01565b60d254156116265760405162461bcd60e51b81526004016105b290612917565b60405160200161163590612938565b60405160208183030381529060405280519060200120611654816118f8565b600083511161168f5760405162461bcd60e51b815260206004820152600760248201526620a9221d22989960c91b60448201526064016105b2565b81518351146116ca5760405162461bcd60e51b815260206004820152600760248201526620a9221d22981b60c91b60448201526064016105b2565b60cd54836000815181106116e0576116e061296f565b60200260200101511161171f5760405162461bcd60e51b81526020600482015260076024820152664152443a45313360c81b60448201526064016105b2565b82516000805b828110156117ed57826117398260016129ea565b10156117b4578561174b8260016129ea565b8151811061175b5761175b61296f565b60200260200101518682815181106117755761177561296f565b6020026020010151106117b45760405162461bcd60e51b81526020600482015260076024820152661054910e914c4d60ca1b60448201526064016105b2565b8481815181106117c6576117c661296f565b6020026020010151826117d991906129ea565b9150806117e58161299b565b915050611725565b50806064146118285760405162461bcd60e51b81526020600482015260076024820152664152443a45313560c81b60448201526064016105b2565b845161183b9060ce9060208801906124c1565b50835161184f9060cf9060208701906124c1565b507f3c443786c59894f234c14d4270e10778744ac1052d061e731816577d7b4b516b8585604051610884929190612a19565b60405160200161189090612938565b604051602081830303815290604052805190602001206118af816118f8565b60c980548315156101000261ff00199091161790556040517fc57dd726c38e22ae392710b0736d2701e2d7d72dd4f6206bb2aed20d8acf9a029061112590841515815260200190565b6119028133612293565b50565b6001600160a01b038116600090815260d6602052604090205460ff16611902576001600160a01b038116600081815260d660205260408120805460ff1916600190811790915560d5805480830182559083527f51858de9989bf7441865ebdadbf7382c8838edbf830f5d86a9a51ac773676dd60180546001600160a01b03191690931790925560d4805490919061199d9084906129ea565b909155505050565b600080805b60d554811015611a0e5760d7600060d583815481106119cb576119cb61296f565b60009182526020808320909101546001600160a01b031683528201929092526040019020546119fa90836129ea565b915080611a068161299b565b9150506119aa565b5060d1819055919050565b611a23828261105a565b61090e5760008281526097602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611a5b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600054610100900460ff16611ac65760405162461bcd60e51b81526004016105b290612a47565b565b600054610100900460ff16611aef5760405162461bcd60e51b81526004016105b290612a47565b611ac66122ec565b61090e8282611a19565b611b0b828261105a565b1561090e5760008281526097602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600260015403611bba5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105b2565b6002600155565b60006001600160a01b038316611c0e5760405162461bcd60e51b8152602060048201526012602482015271544f4b454e5f43414e545f42455f5a45524f60701b60448201526064016105b2565b6040516370a0823160e01b815230600482015282906001600160a01b038516906370a0823190602401602060405180830381865afa158015611c54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7891906129d1565b1015611cb95760405162461bcd60e51b815260206004820152601060248201526f2727aa2fa2a727aaa3a42faa27a5a2a760811b60448201526064016105b2565b60405163095ea7b360e01b8152336004820152602481018390526001600160a01b0384169063095ea7b3906044016020604051808303816000875af1158015611d06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d2a91906129b4565b506000611d38843385611d91565b604080513381526001600160a01b03871660208201529081018290529091507f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb9060600160405180910390a19392505050565b60018055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038616906370a0823190602401602060405180830381865afa158015611dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dfe91906129d1565b60405163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529192509086169063a9059cbb906044016020604051808303816000875af1158015611e51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e7591906129b4565b5060003d8015611e8c5760208114611e9657600080fd5b6000199150611ea2565b60206000803e60005191505b5080611eeb5760405162461bcd60e51b81526020600482015260186024820152771513d2d15397d514905394d1915497d25397d1905253115160421b60448201526064016105b2565b6040516370a0823160e01b81523060048201526000906001600160a01b038816906370a0823190602401602060405180830381865afa158015611f32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5691906129d1565b905082811115611fa85760405162461bcd60e51b815260206004820152601a60248201527f544f4b454e5f5452414e534645525f494e5f4f564552464c4f5700000000000060448201526064016105b2565b611fb28184612a02565b979650505050505050565b6000611fc982846129ea565b9392505050565b6040516370a0823160e01b815230600482015260009081906001600160a01b038616906370a0823190602401602060405180830381865afa158015612019573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203d91906129d1565b6040516323b872dd60e01b81526001600160a01b03868116600483015230602483015260448201869052919250908616906323b872dd906064016020604051808303816000875af1158015612096573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ba91906129b4565b5060003d80156120d157602081146120db57600080fd5b60001991506120e7565b60206000803e60005191505b50806121305760405162461bcd60e51b81526020600482015260186024820152771513d2d15397d514905394d1915497d25397d1905253115160421b60448201526064016105b2565b6040516370a0823160e01b81523060048201526000906001600160a01b038816906370a0823190602401602060405180830381865afa158015612177573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061219b91906129d1565b9050828110156121ed5760405162461bcd60e51b815260206004820152601a60248201527f544f4b454e5f5452414e534645525f494e5f4f564552464c4f5700000000000060448201526064016105b2565b611fb28382612a02565b6000611fc98284612a92565b6000611fc98284612ab1565b600080805b60ce548110156122815760ce81815481106122315761223161296f565b906000526020600020015442111561226f5760cf81815481106122565761225661296f565b90600052602060002001548261226c91906129ea565b91505b806122798161299b565b915050612214565b50919050565b6000611fc98284612a02565b61229d828261105a565b61090e576122aa81612313565b6122b5836020612325565b6040516020016122c6929190612b03565b60408051601f198184030181529082905262461bcd60e51b82526105b291600401612b78565b600054610100900460ff16611d8b5760405162461bcd60e51b81526004016105b290612a47565b60606105886001600160a01b03831660145b60606000612334836002612a92565b61233f9060026129ea565b67ffffffffffffffff8111156123575761235761254b565b6040519080825280601f01601f191660200182016040528015612381576020820181803683370190505b509050600360fc1b8160008151811061239c5761239c61296f565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106123cb576123cb61296f565b60200101906001600160f81b031916908160001a90535060006123ef846002612a92565b6123fa9060016129ea565b90505b6001811115612472576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061242e5761242e61296f565b1a60f81b8282815181106124445761244461296f565b60200101906001600160f81b031916908160001a90535060049490941c9361246b81612bab565b90506123fd565b508315611fc95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105b2565b8280548282559060005260206000209081019282156124fc579160200282015b828111156124fc5782518255916020019190600101906124e1565b5061250892915061250c565b5090565b5b80821115612508576000815560010161250d565b60006020828403121561253357600080fd5b81356001600160e01b031981168114611fc957600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561258a5761258a61254b565b604052919050565b600067ffffffffffffffff8211156125ac576125ac61254b565b5060051b60200190565b80356001600160a01b038116811461134257600080fd5b600082601f8301126125de57600080fd5b813560206125f36125ee83612592565b612561565b82815260059290921b8401810191818101908684111561261257600080fd5b8286015b8481101561262d5780358352918301918301612616565b509695505050505050565b6000806040838503121561264b57600080fd5b823567ffffffffffffffff8082111561266357600080fd5b818501915085601f83011261267757600080fd5b813560206126876125ee83612592565b82815260059290921b840181019181810190898411156126a657600080fd5b948201945b838610156126cb576126bc866125b6565b825294820194908201906126ab565b965050860135925050808211156126e157600080fd5b506126ee858286016125cd565b9150509250929050565b60006020828403121561270a57600080fd5b5035919050565b6000806040838503121561272457600080fd5b82359150612734602084016125b6565b90509250929050565b6000806000806080858703121561275357600080fd5b61275c856125b6565b935060208501359250612771604086016125b6565b915061277f606086016125b6565b905092959194509250565b6000806040838503121561279d57600080fd5b6127a6836125b6565b946020939093013593505050565b600081518084526020808501945080840160005b838110156127e4578151875295820195908201906001016127c8565b509495945050505050565b602081526000611fc960208301846127b4565b6000806040838503121561281557600080fd5b50508035926020909101359150565b604080825283519082018190526000906020906060840190828701845b828110156128665781516001600160a01b031684529284019290840190600101612841565b5050508381038285015261287a81866127b4565b9695505050505050565b801515811461190257600080fd5b6000602082840312156128a457600080fd5b8135611fc981612884565b6000602082840312156128c157600080fd5b611fc9826125b6565b600080604083850312156128dd57600080fd5b823567ffffffffffffffff808211156128f557600080fd5b612901868387016125cd565b935060208501359150808211156126e157600080fd5b6020808252600790820152664152443a45303760c81b604082015260600190565b692230ba30afa0b236b4b760b11b8152600a0190565b6020808252600790820152664152443a45303560c81b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016129ad576129ad612985565b5060010190565b6000602082840312156129c657600080fd5b8151611fc981612884565b6000602082840312156129e357600080fd5b5051919050565b600082198211156129fd576129fd612985565b500190565b600082821015612a1457612a14612985565b500390565b604081526000612a2c60408301856127b4565b8281036020840152612a3e81856127b4565b95945050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000816000190483118215151615612aac57612aac612985565b500290565b600082612ace57634e487b7160e01b600052601260045260246000fd5b500490565b60005b83811015612aee578181015183820152602001612ad6565b83811115612afd576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612b3b816017850160208801612ad3565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612b6c816028840160208801612ad3565b01602801949350505050565b6020815260008251806020840152612b97816040850160208701612ad3565b601f01601f19169190910160400192915050565b600081612bba57612bba612985565b50600019019056fea264697066735822122051b25e25a9430f903acfa2ed097476a419197f728dd9186ca121f23e0300cd8364736f6c634300080e003360806040523480156200001157600080fd5b5060405162000e7638038062000e768339810160408190526200003491620004b4565b8282828281620000478282600062000061565b50620000559050826200009e565b505050505050620005e7565b6200006c83620000f9565b6000825111806200007a5750805b1562000099576200009783836200013b60201b6200022e1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c96200016a565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f681620001a3565b50565b620001048162000258565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000163838360405180606001604052806027815260200162000e4f602791396200030c565b9392505050565b60006200019460008051602062000e2f83398151915260001b6200038b60201b620001ea1760201c565b546001600160a01b0316919050565b6001600160a01b0381166200020e5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b806200023760008051602062000e2f83398151915260001b6200038b60201b620001ea1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6200026e816200038e60201b6200025a1760201c565b620002d25760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840162000205565b80620002377f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6200038b60201b620001ea1760201c565b6060600080856001600160a01b0316856040516200032b919062000594565b600060405180830381855af49150503d806000811462000368576040519150601f19603f3d011682016040523d82523d6000602084013e6200036d565b606091505b50909250905062000381868383876200039d565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200041157825160000362000409576001600160a01b0385163b620004095760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000205565b50816200041d565b6200041d838362000425565b949350505050565b815115620004365781518083602001fd5b8060405162461bcd60e51b8152600401620002059190620005b2565b80516001600160a01b03811681146200046a57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004a257818101518382015260200162000488565b83811115620000975750506000910152565b600080600060608486031215620004ca57600080fd5b620004d58462000452565b9250620004e56020850162000452565b60408501519092506001600160401b03808211156200050357600080fd5b818601915086601f8301126200051857600080fd5b8151818111156200052d576200052d6200046f565b604051601f8201601f19908116603f011681019083821181831017156200055857620005586200046f565b816040528281528960208487010111156200057257600080fd5b6200058583602083016020880162000485565b80955050505050509250925092565b60008251620005a881846020870162000485565b9190910192915050565b6020815260008251806020840152620005d381604085016020870162000485565b601f01601f19169190910160400192915050565b61083880620005f76000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106c2565b610118565b61005b6100933660046106dd565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106c2565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b6101166101116102fe565b610308565b565b61012061032c565b6001600160a01b0316330361014d5761014a8160405180602001604052806000815250600061035f565b50565b61014a6100fe565b61015d61032c565b6001600160a01b031633036101b4576101af8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061035f915050565b505050565b6101af6100fe565b60006101c661032c565b6001600160a01b031633036101e2576101dd6102fe565b905090565b6101ea6100fe565b90565b6101f561032c565b6001600160a01b0316330361014d5761014a8161038a565b600061021761032c565b6001600160a01b031633036101e2576101dd61032c565b606061025383836040518060600160405280602781526020016107dc602791396103de565b9392505050565b6001600160a01b03163b151590565b61027161032c565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd610456565b3660008037600080366000845af43d6000803e808015610327573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6103688361047e565b6000825111806103755750805b156101af57610384838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b361032c565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a816104be565b6060600080856001600160a01b0316856040516103fb919061078c565b600060405180830381855af49150503d8060008114610436576040519150601f19603f3d011682016040523d82523d6000602084013e61043b565b606091505b509150915061044c86838387610567565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610350565b610487816105e8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105235760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f5565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156105d65782516000036105cf576001600160a01b0385163b6105cf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102f5565b50816105e0565b6105e0838361067c565b949350505050565b6001600160a01b0381163b6106555760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102f5565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610546565b81511561068c5781518083602001fd5b8060405162461bcd60e51b81526004016102f591906107a8565b80356001600160a01b03811681146106bd57600080fd5b919050565b6000602082840312156106d457600080fd5b610253826106a6565b6000806000604084860312156106f257600080fd5b6106fb846106a6565b9250602084013567ffffffffffffffff8082111561071857600080fd5b818601915086601f83011261072c57600080fd5b81358181111561073b57600080fd5b87602082850101111561074d57600080fd5b6020830194508093505050509250925092565b60005b8381101561077b578181015183820152602001610763565b838111156103845750506000910152565b6000825161079e818460208701610760565b9190910192915050565b60208152600082518060208401526107c7816040850160208701610760565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201205da26020dadc8fdbbeef9a84bb0ec78efee7ef251a67eb02565a36f8ee09a64736f6c634300080e0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122088118ce132e35932d498a173255204842e4ef52e56335fa9125b8881c92f4ea464736f6c634300080e0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.