Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 10 from a total of 10 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Deploy | 13054695 | 1249 days ago | IN | 0 ETH | 0.07745636 | ||||
Deploy | 13054694 | 1249 days ago | IN | 0 ETH | 0.07426315 | ||||
Deploy | 13053717 | 1249 days ago | IN | 0 ETH | 0.07745592 | ||||
Deploy | 13041368 | 1251 days ago | IN | 0 ETH | 0.12629259 | ||||
Deploy | 13041291 | 1251 days ago | IN | 0 ETH | 0.14711106 | ||||
Deploy | 13041280 | 1251 days ago | IN | 0 ETH | 0.13874694 | ||||
Deploy | 13036580 | 1252 days ago | IN | 0 ETH | 0.28903875 | ||||
Deploy | 12998091 | 1258 days ago | IN | 0 ETH | 0.21594812 | ||||
Deploy | 12970371 | 1262 days ago | IN | 0 ETH | 0.12804154 | ||||
Transfer Ownersh... | 12970347 | 1262 days ago | IN | 0 ETH | 0.00105633 |
Latest 9 internal transactions
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
13054695 | 1249 days ago | Contract Creation | 0 ETH | |||
13054694 | 1249 days ago | Contract Creation | 0 ETH | |||
13053717 | 1249 days ago | Contract Creation | 0 ETH | |||
13041368 | 1251 days ago | Contract Creation | 0 ETH | |||
13041291 | 1251 days ago | Contract Creation | 0 ETH | |||
13041280 | 1251 days ago | Contract Creation | 0 ETH | |||
13036580 | 1252 days ago | Contract Creation | 0 ETH | |||
12998091 | 1258 days ago | Contract Creation | 0 ETH | |||
12970371 | 1262 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
CohortFactory
Compiler Version
v0.7.6+commit.7338295f
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-08-06 */ // Sources flattened with hardhat v2.5.0 https://hardhat.org // File contracts/access/Context.sol // SPDX-License-Identifier: MIT; pragma solidity ^0.7.6; /* * @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 GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // File contracts/access/Pausable.sol pragma solidity >=0.6.0 <=0.8.0; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } } // File contracts/access/Ownable.sol pragma solidity >=0.6.0 <=0.8.0; abstract contract Ownable is Pausable { address public _owner; address public _admin; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor(address ownerAddress) { _owner = ownerAddress; _admin = ownerAddress; emit OwnershipTransferred(address(0), _owner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require( _owner == _msgSender(), "Ownable: caller is not the owner" ); _; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyAdmin() { require( _admin == _msgSender(), "Ownable: caller is not the Admin" ); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyAdmin { emit OwnershipTransferred(_owner, _admin); _owner = _admin; } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require( newOwner != address(0), "Ownable: new owner is the zero address" ); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File contracts/abstract/CohortStaking.sol pragma solidity ^0.7.6; abstract contract CohortStaking { struct tokenInfo { bool isExist; uint8 decimal; uint256 userMinStake; uint256 userMaxStake; uint256 totalMaxStake; uint256 lockableDays; bool optionableStatus; } mapping(address => tokenInfo) public tokenDetails; mapping(address => uint256) public totalStaking; mapping(address => address[]) public tokensSequenceList; mapping(address => mapping(address => uint256)) public tokenDailyDistribution; mapping(address => mapping(address => bool)) public tokenBlockedStatus; uint256 public refPercentage; uint256 public poolStartTime; uint256 public stakeDuration; function viewStakingDetails(address _user) public view virtual returns ( address[] memory, address[] memory, bool[] memory, uint256[] memory, uint256[] memory, uint256[] memory ); function safeWithdraw(address tokenAddress, uint256 amount) public virtual; function transferOwnership(address newOwner) public virtual; } // File contracts/libraries/SafeMath.sol pragma solidity ^0.7.6; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @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) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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 sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @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) { // 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 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) { require(b > 0, errorMessage); uint256 c = a / b; return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts 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 mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message 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, string memory errorMessage ) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } // File contracts/interfaces/IERC20.sol pragma solidity ^0.7.6; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer( address indexed from, address indexed to, uint256 value ); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval( address indexed owner, address indexed spender, uint256 value ); } // File contracts/interfaces/ICohort.sol pragma solidity ^0.7.6; interface ICohort { function setupCohort(uint256[] memory _intervalDays, bool _isSwapfy) external returns (bool); } // File contracts/Cohort.sol pragma solidity ^0.7.6; /** * @title Unifarm Cohort Unstake Handler Contract * @author Opendefi by OroPocket */ contract Cohort is Ownable, ICohort { /// @notice LockableToken struct for storing token lockable details struct LockableTokens { uint256 lockableDays; bool optionableStatus; } /// @notice Wrappers over Solidity's arithmetic operations using SafeMath for uint256; /// @notice totalStaking of a specfic tokenAddress. mapping(address => uint256) public totalUnStaking; /// @notice tokens old to new token swap mapping(address => address) public tokens; /// @notice unStakeStatus of a user. mapping(address => mapping(uint256 => bool)) public unStakeStatus; /// @notice tokenBlocked status. mapping(address => bool) public tokenBlockedStatus; /// @notice lockable token mapping mapping(address => LockableTokens) public lockableDetails; /// @notice cohort instance. CohortStaking public cohort; /// @notice DAYS is equal to 86400. uint256 public DAYS = 1 days; /// @notice HOURS is equal to 3600. uint256 public HOURS = 1 hours; /// @notice intervalDays uint256[] public intervalDays; /// @notice poolStartTime uint256 public poolStartTime; /// @notice stakeDuration uint256 public stakeDuration; /// @notice isSwapify bool public swapiFy; /// @notice factory address public factory; event LockableTokenDetails( address indexed tokenAddress, uint256 lockableDys, bool optionalbleStatus, uint256 updatedTime ); event WithdrawDetails( address indexed tokenAddress, uint256 withdrawalAmount, uint256 time ); event Claim( address indexed userAddress, address indexed stakedTokenAddress, address indexed tokenAddress, uint256 claimRewards, uint256 time ); event UnStake( address indexed userAddress, address indexed unStakedtokenAddress, uint256 unStakedAmount, uint256 time, uint256 stakeId ); event ReferralEarn( address indexed userAddress, address indexed callerAddress, address indexed rewardTokenAddress, uint256 rewardAmount, uint256 time ); event IntervalDaysDetails(uint256[] updatedIntervals, uint256 time); /** * @notice construct the cohort unstake handler. * @param cohortAddress specfic cohortAddress. * @param ownerAddress owner Address of a cohort. */ constructor( address cohortAddress, address ownerAddress, address factoryAddress ) Ownable(ownerAddress) { require( cohortAddress != address(0), "Cohort: invalid cohortAddress" ); cohort = CohortStaking(cohortAddress); factory = factoryAddress; } function setupCohort(uint256[] memory _intervalDays, bool _isSwapfy) external override returns (bool) { require(_msgSender() == factory, "Cohort: permission denied"); swapiFy = _isSwapfy; poolStartTime = cohort.poolStartTime(); stakeDuration = cohort.stakeDuration(); updateIntervalDays(_intervalDays); return true; } function setTokenBlockedStatus(address tokenAddress, bool status) external onlyOwner returns (bool) { tokenBlockedStatus[tokenAddress] = status; return true; } // make sure about ownership things before call this function. function init(address[] memory tokenAddress) external onlyOwner returns (bool) { for (uint256 i = 0; i < tokenAddress.length; i++) { transferFromCohort(tokenAddress[i]); } return true; } function transferFromCohort(address tokenAddress) internal { uint256 bal = IERC20(tokenAddress).balanceOf(address(cohort)); if (bal > 0) cohort.safeWithdraw(tokenAddress, bal); } function updateCohort(address _newCohortAddress) external onlyOwner returns (bool) { cohort = CohortStaking(_newCohortAddress); return true; } function setSwapTokens( address[] memory oldTokenAddresses, address[] memory newTokenAddresses ) external onlyOwner returns (bool) { require( oldTokenAddresses.length == newTokenAddresses.length, "Invalid Input Tokens" ); for (uint8 m = 0; m < oldTokenAddresses.length; m++) { tokens[oldTokenAddresses[m]] = newTokenAddresses[m]; } return true; } function updateTotalUnStaking( address[] memory tokenAddresses, uint256[] memory overAllUnStakedTokens ) external onlyOwner returns (bool) { require( tokenAddresses.length == overAllUnStakedTokens.length, "Cohort: Invalid Inputs" ); for (uint8 n = 0; n < tokenAddresses.length; n++) { require( tokenAddresses[n] != address(0), "Cohort: invalid poolAddress" ); require( overAllUnStakedTokens[n] > 0, "Cohort: emptied overAllStaked" ); totalUnStaking[tokenAddresses[n]] = overAllUnStakedTokens[n]; } return true; } function updateIntervalDays(uint256[] memory _interval) public { require( _msgSender() == factory || _msgSender() == _owner, "Cohort: permission denied" ); intervalDays = new uint256[](0); for (uint8 i = 0; i < _interval.length; i++) { uint256 noD = stakeDuration.div(DAYS); require(noD > _interval[i], "Invalid Interval Day"); intervalDays.push(_interval[i]); } emit IntervalDaysDetails(intervalDays, block.timestamp); } function lockableToken( address tokenAddress, uint8 lockableStatus, uint256 lockedDays, bool optionableStatus ) external onlyOwner { require( lockableStatus == 1 || lockableStatus == 2 || lockableStatus == 3, "Invalid Lockable Status" ); (bool tokenExist, , , , , , ) = cohort.tokenDetails(tokenAddress); require(tokenExist == true, "Token Not Exist"); if (lockableStatus == 1) { lockableDetails[tokenAddress].lockableDays = block .timestamp .add(lockedDays); } else if (lockableStatus == 2) lockableDetails[tokenAddress].lockableDays = 0; else if (lockableStatus == 3) lockableDetails[tokenAddress] .optionableStatus = optionableStatus; emit LockableTokenDetails( tokenAddress, lockableDetails[tokenAddress].lockableDays, lockableDetails[tokenAddress].optionableStatus, block.timestamp ); } function reclaimOwnership(address newOwner) external onlyOwner returns (bool) { cohort.transferOwnership(newOwner); return true; } function safeWithdraw(address tokenAddress, uint256 amount) external onlyOwner { require( IERC20(tokenAddress).balanceOf(address(this)) >= amount, "SAFEWITHDRAW: Insufficient Balance" ); require( IERC20(tokenAddress).transfer(_owner, amount) == true, "SAFEWITHDRAW: Transfer failed" ); emit WithdrawDetails(tokenAddress, amount, block.timestamp); } function getTokenAddress(address tokenAddress) internal view returns (address) { if (swapiFy) { address newAddress = tokens[tokenAddress] == address(0) ? tokenAddress : tokens[tokenAddress]; return (newAddress); } else { return (tokenAddress); } } /** * @notice Claim accumulated rewards * @param userAddress user Address through he staked. * @param stakeId Stake ID of the user * @param totalStake total Staking. */ function claimRewards( address userAddress, uint256 stakeId, uint256 totalStake ) internal { // Local variables uint256 interval; uint256 endOfProfit; ( address[] memory referrar, address[] memory tokenAddresses, , , uint256[] memory stakedAmount, uint256[] memory startTime ) = cohort.viewStakingDetails(userAddress); interval = poolStartTime.add(stakeDuration); // Interval calculation if (interval > block.timestamp) endOfProfit = block.timestamp; else endOfProfit = poolStartTime.add(stakeDuration); interval = endOfProfit.sub(startTime[stakeId]); uint256 refPercentage = cohort.refPercentage(); uint256[3] memory stakeData; stakeData[0] = (stakedAmount[stakeId]); stakeData[1] = (totalStake); stakeData[2] = (refPercentage); // Reward calculation if (interval >= HOURS) _rewardCalculation( userAddress, tokenAddresses[stakeId], referrar[stakeId], stakeData, interval ); } function _rewardCalculation( address userAddress, address tokenAddress, address referrer, uint256[3] memory stakingData, uint256 interval ) internal { uint256 rewardsEarned; uint256 refEarned; uint256[2] memory noOfDays; noOfDays[1] = interval.div(HOURS); noOfDays[0] = interval.div(DAYS); rewardsEarned = noOfDays[1].mul( getOneDayReward( stakingData[0], tokenAddress, tokenAddress, stakingData[1] ) ); address stakedToken = getTokenAddress(tokenAddress); // Referrer Earning if (referrer != address(0)) { refEarned = (rewardsEarned.mul(stakingData[2])).div(100 ether); rewardsEarned = rewardsEarned.sub(refEarned); require( IERC20(stakedToken).transfer(referrer, refEarned) == true, "Transfer Failed" ); emit ReferralEarn( referrer, _msgSender(), stakedToken, refEarned, block.timestamp ); } // Rewards Send sendToken(userAddress, stakedToken, stakedToken, rewardsEarned); uint8 i = 1; while (i < intervalDays.length) { if (noOfDays[0] >= intervalDays[i]) { uint256 reductionHours = (intervalDays[i].sub(1)).mul(24); uint256 balHours = noOfDays[1].sub(reductionHours); address rewardToken = cohort.tokensSequenceList( tokenAddress, i ); if ( rewardToken != tokenAddress && cohort.tokenBlockedStatus(tokenAddress, rewardToken) == false ) { rewardsEarned = balHours.mul( getOneDayReward( stakingData[0], tokenAddress, rewardToken, stakingData[1] ) ); address rewardToken1 = getTokenAddress(rewardToken); // Referrer Earning if (referrer != address(0)) { refEarned = (rewardsEarned.mul(stakingData[2])).div( 100 ether ); rewardsEarned = rewardsEarned.sub(refEarned); require( IERC20(rewardToken1).transfer(referrer, refEarned) == true, "Transfer Failed" ); emit ReferralEarn( referrer, _msgSender(), rewardToken1, refEarned, block.timestamp ); } // Rewards Send sendToken( userAddress, tokenAddress, rewardToken1, rewardsEarned ); } i = i + 1; } else { break; } } } /** * @notice Get rewards for one day * @param stakedAmount Stake amount of the user * @param stakedToken Staked token address of the user * @param rewardToken Reward token address * @return reward One dayh reward for the user */ function getOneDayReward( uint256 stakedAmount, address stakedToken, address rewardToken, uint256 totalStake ) public view returns (uint256 reward) { reward = ( stakedAmount.mul( cohort.tokenDailyDistribution(stakedToken, rewardToken) ) ).div(totalStake); } /** * @notice Get rewards for one day * @param stakedToken Stake amount of the user * @param tokenAddress Reward token address * @param amount Amount to be transferred as reward */ function sendToken( address userAddress, address stakedToken, address tokenAddress, uint256 amount ) internal { // Checks if (tokenAddress != address(0)) { require( IERC20(tokenAddress).balanceOf(address(this)) >= amount, "SEND : Insufficient Reward Balance" ); require( IERC20(tokenAddress).transfer(userAddress, amount), "Transfer failed" ); // Emit state changes emit Claim( userAddress, stakedToken, tokenAddress, amount, block.timestamp ); } } function getTotalStaking(address tokenAddress) public view returns (uint256) { uint256 totalStaking = cohort.totalStaking(tokenAddress); uint256 actualStaking = totalStaking.add( totalUnStaking[tokenAddress] ); return actualStaking; } /** * @notice Unstake and claim rewards * @param stakeId Stake ID of the user */ function unStake(address userAddress, uint256 stakeId) external whenNotPaused returns (bool) { require( _msgSender() == userAddress || _msgSender() == _owner, "UNSTAKE: Invalid User Entry" ); // view the staking details ( , address[] memory tokenAddress, bool[] memory isActive, , uint256[] memory stakedAmount, uint256[] memory startTime ) = cohort.viewStakingDetails(userAddress); uint256 totalStaking = getTotalStaking(tokenAddress[stakeId]); address stakedToken = getTokenAddress(tokenAddress[stakeId]); // lockableDays check require( lockableDetails[stakedToken].lockableDays <= block.timestamp, "UNSTAKE: Token Locked" ); // optional lock check if (lockableDetails[stakedToken].optionableStatus == true) require( startTime[stakeId].add(stakeDuration) <= block.timestamp, "UNSTAKE: Locked in optional lock" ); // Checks require( stakedAmount[stakeId] > 0 && isActive[stakeId] == true && unStakeStatus[userAddress][stakeId] == false, "UNSTAKE : Already Claimed (or) Insufficient Staked" ); // update the state unStakeStatus[userAddress][stakeId] = true; // Balance check require( IERC20(stakedToken).balanceOf(address(this)) >= stakedAmount[stakeId], "UNSTAKE : Insufficient Balance" ); // Transfer staked token back to user if (tokenBlockedStatus[tokenAddress[stakeId]] == false) { IERC20(stakedToken).transfer( userAddress, stakedAmount[stakeId] ); } claimRewards(userAddress, stakeId, totalStaking); // Emit state changes emit UnStake( userAddress, stakedToken, stakedAmount[stakeId], block.timestamp, stakeId ); return true; } function emergencyUnstake( uint256 stakeId, address userAddress, address[] memory rewardtokens, uint256[] memory amount ) external onlyOwner { // view the staking details ( address[] memory referrer, address[] memory tokenAddress, bool[] memory isActive, , uint256[] memory stakedAmount, ) = cohort.viewStakingDetails(userAddress); require( stakedAmount[stakeId] > 0 && isActive[stakeId] == true && unStakeStatus[userAddress][stakeId] == false, "EMERGENCY : Already Claimed (or) Insufficient Staked" ); address stakedToken = getTokenAddress(tokenAddress[stakeId]); // Balance check require( IERC20(stakedToken).balanceOf(address(this)) >= stakedAmount[stakeId], "EMERGENCY : Insufficient Balance" ); unStakeStatus[userAddress][stakeId] = true; IERC20(stakedToken).transfer(userAddress, stakedAmount[stakeId]); uint256 refPercentage = cohort.refPercentage(); for (uint256 i; i < rewardtokens.length; i++) { uint256 rewardsEarned = amount[i]; if (referrer[stakeId] != address(0)) { uint256 refEarned = (rewardsEarned.mul(refPercentage)).div( 100 ether ); rewardsEarned = rewardsEarned.sub(refEarned); require( IERC20(rewardtokens[i]).transfer( referrer[stakeId], refEarned ), "EMERGENCY : Transfer Failed" ); emit ReferralEarn( referrer[stakeId], userAddress, rewardtokens[i], refEarned, block.timestamp ); } sendToken( userAddress, tokenAddress[stakeId], rewardtokens[i], rewardsEarned ); } // Emit state changes emit UnStake( userAddress, tokenAddress[stakeId], stakedAmount[stakeId], block.timestamp, stakeId ); } function pause() external onlyOwner returns (bool) { _pause(); return true; } function unpause() external onlyOwner returns (bool) { _unpause(); return true; } } // File contracts/CohortFactory.sol pragma solidity ^0.7.6; contract CohortFactory is Ownable { /// @notice public mapping for storing unstakeHandler Address. mapping(address => address) public unStakeHandlers; /// @notice CohortDeployment event event CohortDeployment( address indexed deployer, address indexed cohort, address poolAddress, uint256 when ); /// @notice construct the Cohort factory constructor() Ownable(_msgSender()) {} function deploy( address cohort, bool isSwapfy, uint256[] memory intervalDays ) external onlyOwner returns (address) { require( cohort != address(0), "CohortFactory: invalid cohort address." ); address poolAddress = address( new Cohort(cohort, _msgSender(), address(this)) ); unStakeHandlers[cohort] = poolAddress; // setup cohort ICohort(poolAddress).setupCohort(intervalDays, isSwapfy); emit CohortDeployment( _owner, cohort, unStakeHandlers[cohort], block.timestamp ); return poolAddress; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"deployer","type":"address"},{"indexed":true,"internalType":"address","name":"cohort","type":"address"},{"indexed":false,"internalType":"address","name":"poolAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"when","type":"uint256"}],"name":"CohortDeployment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"_admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"cohort","type":"address"},{"internalType":"bool","name":"isSwapfy","type":"bool"},{"internalType":"uint256[]","name":"intervalDays","type":"uint256[]"}],"name":"deploy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"unStakeHandlers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50610019610089565b600080546001600160a01b038084166101008181026001600160a81b031990941693909317808555600180546001600160a01b0319169092179091556040519290041691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061008d565b3390565b614bda8061009c6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80635e6470981161005b5780635e6470981461017c578063715018a6146101a2578063b2bdfa7b146101ac578063f2fde38b146101b45761007d565b806301bc45c9146100825780634f2e338c146100a65780635c975abb14610160575b600080fd5b61008a6101da565b604080516001600160a01b039092168252519081900360200190f35b61008a600480360360608110156100bc57600080fd5b6001600160a01b038235169160208101351515918101906060810160408201356401000000008111156100ee57600080fd5b82018360208201111561010057600080fd5b8035906020019184602083028401116401000000008311171561012257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506101e9945050505050565b610168610446565b604080519115158252519081900360200190f35b61008a6004803603602081101561019257600080fd5b50356001600160a01b031661044f565b6101aa61046a565b005b61008a610542565b6101aa600480360360208110156101ca57600080fd5b50356001600160a01b0316610556565b6001546001600160a01b031681565b60006101f3610670565b60005461010090046001600160a01b0390811691161461025a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03841661029f5760405162461bcd60e51b8152600401808060200182810382526026815260200180614b7f6026913960400191505060405180910390fd5b6000846102aa610670565b306040516102b790610674565b6001600160a01b03938416815291831660208301529091166040808301919091525190819003606001906000f0801580156102f6573d6000803e3d6000fd5b506001600160a01b03868116600090815260026020908152604080832080546001600160a01b0319169486169485179055805163063a66b960e11b81528915156024820152600481019182528851604482015288519596509394630c74cd729489948b948493606490930192878201929102908190849084905b83811015610388578181015183820152602001610370565b505050509050019350505050602060405180830381600087803b1580156103ae57600080fd5b505af11580156103c2573d6000803e3d6000fd5b505050506040513d60208110156103d857600080fd5b5050600080546001600160a01b03808816808452600260209081526040948590205485519084168152429181019190915284519194610100909404909216927ecf5bef2ee546e7116118ed039425d278d011d79b3fd2b20669c6d5877f27c8928290030190a3949350505050565b60005460ff1690565b6002602052600090815260409020546001600160a01b031681565b610472610670565b6001546001600160a01b039081169116146104d4576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652041646d696e604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693610100909204909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600154600080546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60005461010090046001600160a01b031681565b61055e610670565b60005461010090046001600160a01b039081169116146105c5576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811661060a5760405162461bcd60e51b8152600401808060200182810382526026815260200180614b596026913960400191505060405180910390fd5b600080546040516001600160a01b038085169361010090930416917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b3390565b6144d7806106828339019056fe608060405262015180600855610e106009553480156200001e57600080fd5b50604051620044d7380380620044d7833981810160405260608110156200004457600080fd5b5080516020820151604092830151600080546001600160a01b038085166101008181026001600160a81b031990941693909317808555600180546001600160a01b031916909217909155965195969495939486949290041691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160a01b03831662000120576040805162461bcd60e51b815260206004820152601d60248201527f436f686f72743a20696e76616c696420636f686f727441646472657373000000604482015290519081900360640190fd5b600780546001600160a01b039485166001600160a01b0319909116179055600d80549190931661010002610100600160a81b0319909116179091555061436b806200016c6000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c8063a5030f7e1161011a578063c922e937116100ad578063d93938141161007c578063d939381414610908578063e486033914610934578063f2fde38b1461095a578063f6d5f16514610980578063fbfcd24114610aa357610206565b8063c922e93714610741578063d3f8f1ce14610879578063d43135061461089f578063d58c2228146108dc57610206565b8063b2bdfa7b116100e9578063b2bdfa7b14610688578063c45a015514610690578063c549e6b914610698578063c6044c46146106a057610206565b8063a5030f7e146105e0578063a90fa6031461061f578063ac007f2814610645578063b104e0061461066b57610206565b80634cd365311161019d578063715018a61161016c578063715018a6146104615780637290d03b14610469578063736a9d861461058c5780637ae15a73146105b25780638456cb59146105d857610206565b80634cd36531146103e95780635058c460146104255780635c975abb146104515780635f96dc111461045957610206565b806313176a40116101d957806313176a40146103b757806316b60d8f146103bf5780633f4ba83a146103c757806340f02ab6146103cf57610206565b806301193ad71461020b57806301bc45c9146102ae57806306de6dd4146102d25780630c74cd7214610314575b600080fd5b6102ac6004803603602081101561022157600080fd5b810190602081018135600160201b81111561023b57600080fd5b82018360208201111561024d57600080fd5b803590602001918460208302840111600160201b8311171561026e57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610aab945050505050565b005b6102b6610cb1565b604080516001600160a01b039092168252519081900360200190f35b610300600480360360408110156102e857600080fd5b506001600160a01b0381351690602001351515610cc0565b604080519115158252519081900360200190f35b6103006004803603604081101561032a57600080fd5b810190602081018135600160201b81111561034457600080fd5b82018360208201111561035657600080fd5b803590602001918460208302840111600160201b8311171561037757600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505050503515159050610d4d565b6102b6610ec8565b610300610ed7565b610300610ee0565b6103d7610f4d565b60408051918252519081900360200190f35b6103d7600480360360808110156103ff57600080fd5b508035906001600160a01b03602082013581169160408101359091169060600135610f53565b6102ac6004803603604081101561043b57600080fd5b506001600160a01b038135169060200135610ff7565b61030061123f565b6103d7611248565b6102ac61124e565b6103006004803603604081101561047f57600080fd5b810190602081018135600160201b81111561049957600080fd5b8201836020820111156104ab57600080fd5b803590602001918460208302840111600160201b831117156104cc57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561051b57600080fd5b82018360208201111561052d57600080fd5b803590602001918460208302840111600160201b8311171561054e57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611326945050505050565b6103d7600480360360208110156105a257600080fd5b50356001600160a01b031661152c565b6103d7600480360360208110156105c857600080fd5b50356001600160a01b031661153e565b6103006115eb565b610606600480360360208110156105f657600080fd5b50356001600160a01b0316611652565b6040805192835290151560208301528051918290030190f35b6103006004803603602081101561063557600080fd5b50356001600160a01b031661166e565b6103006004803603602081101561065b57600080fd5b50356001600160a01b031661173b565b6103d76004803603602081101561068157600080fd5b5035611750565b6102b6611771565b6102b6611785565b6103d7611799565b610300600480360360208110156106b657600080fd5b810190602081018135600160201b8111156106d057600080fd5b8201836020820111156106e257600080fd5b803590602001918460208302840111600160201b8311171561070357600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061179f945050505050565b6102ac6004803603608081101561075757600080fd5b8135916001600160a01b0360208201351691810190606081016040820135600160201b81111561078657600080fd5b82018360208201111561079857600080fd5b803590602001918460208302840111600160201b831117156107b957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561080857600080fd5b82018360208201111561081a57600080fd5b803590602001918460208302840111600160201b8311171561083b57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061182e945050505050565b6103006004803603602081101561088f57600080fd5b50356001600160a01b03166121ea565b6102ac600480360360808110156108b557600080fd5b506001600160a01b038135169060ff6020820135169060408101359060600135151561226e565b610300600480360360408110156108f257600080fd5b506001600160a01b038135169060200135612506565b6103006004803603604081101561091e57600080fd5b506001600160a01b038135169060200135612526565b6102b66004803603602081101561094a57600080fd5b50356001600160a01b0316612e1d565b6102ac6004803603602081101561097057600080fd5b50356001600160a01b0316612e38565b6103006004803603604081101561099657600080fd5b810190602081018135600160201b8111156109b057600080fd5b8201836020820111156109c257600080fd5b803590602001918460208302840111600160201b831117156109e357600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610a3257600080fd5b820183602082011115610a4457600080fd5b803590602001918460208302840111600160201b83111715610a6557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612f40945050505050565b6103d7613069565b600d5461010090046001600160a01b0316610ac461306f565b6001600160a01b03161480610af8575060005461010090046001600160a01b0316610aed61306f565b6001600160a01b0316145b610b45576040805162461bcd60e51b815260206004820152601960248201527810dbda1bdc9d0e881c195c9b5a5cdcda5bdb8819195b9a5959603a1b604482015290519081900360640190fd5b6040805160008152602081019182905251610b6291600a91614188565b5060005b81518160ff161015610c2f576000610b8b600854600c5461307390919063ffffffff16565b9050828260ff1681518110610b9c57fe5b60200260200101518111610bee576040805162461bcd60e51b8152602060048201526014602482015273496e76616c696420496e74657276616c2044617960601b604482015290519081900360640190fd5b600a838360ff1681518110610bff57fe5b60209081029190910181015182546001818101855560009485529290932090920191909155919091019050610b66565b507f29635226d0b00834767b0cf38daca8dc0fe978152b0a8a5b39eb281126352361600a4260405180806020018381526020018281038252848181548152602001915080548015610c9f57602002820191906000526020600020905b815481526020019060010190808311610c8b575b5050935050505060405180910390a150565b6001546001600160a01b031681565b6000610cca61306f565b60005461010090046001600160a01b03908116911614610d1f576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b506001600160a01b0382166000908152600560205260409020805460ff191682151517905560015b92915050565b600d5460009061010090046001600160a01b0316610d6961306f565b6001600160a01b031614610dc0576040805162461bcd60e51b815260206004820152601960248201527810dbda1bdc9d0e881c195c9b5a5cdcda5bdb8819195b9a5959603a1b604482015290519081900360640190fd5b600d805460ff191683151517905560075460408051635f96dc1160e01b815290516001600160a01b0390921691635f96dc1191600480820192602092909190829003018186803b158015610e1357600080fd5b505afa158015610e27573d6000803e3d6000fd5b505050506040513d6020811015610e3d57600080fd5b5051600b5560075460408051632078155b60e11b815290516001600160a01b03909216916340f02ab691600480820192602092909190829003018186803b158015610e8757600080fd5b505afa158015610e9b573d6000803e3d6000fd5b505050506040513d6020811015610eb157600080fd5b5051600c55610ebf83610aab565b50600192915050565b6007546001600160a01b031681565b600d5460ff1681565b6000610eea61306f565b60005461010090046001600160a01b03908116911614610f3f576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b610f476130bc565b50600190565b600c5481565b6007546040805163061dce6960e21b81526001600160a01b03868116600483015285811660248301529151600093610fee938693610fe893919092169163187739a4916044808301926020929190829003018186803b158015610fb557600080fd5b505afa158015610fc9573d6000803e3d6000fd5b505050506040513d6020811015610fdf57600080fd5b5051889061315c565b90613073565b95945050505050565b610fff61306f565b60005461010090046001600160a01b03908116911614611054576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b80826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156110a257600080fd5b505afa1580156110b6573d6000803e3d6000fd5b505050506040513d60208110156110cc57600080fd5b5051101561110b5760405162461bcd60e51b81526004018080602001828103825260228152602001806142256022913960400191505060405180910390fd5b816001600160a01b031663a9059cbb600060019054906101000a90046001600160a01b0316836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561117757600080fd5b505af115801561118b573d6000803e3d6000fd5b505050506040513d60208110156111a157600080fd5b505115156001146111f9576040805162461bcd60e51b815260206004820152601d60248201527f5341464557495448445241573a205472616e73666572206661696c6564000000604482015290519081900360640190fd5b6040805182815242602082015281516001600160a01b038516927fcb92e2679de255302c9b8d0673cbdf8ef54667e943bf8f049bcaf6a85926ba1a928290030190a25050565b60005460ff1690565b600b5481565b61125661306f565b6001546001600160a01b039081169116146112b8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652041646d696e604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693610100909204909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600154600080546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b600061133061306f565b60005461010090046001600160a01b03908116911614611385576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b81518351146113d4576040805162461bcd60e51b8152602060048201526016602482015275436f686f72743a20496e76616c696420496e7075747360501b604482015290519081900360640190fd5b60005b83518160ff1610156115225760006001600160a01b0316848260ff16815181106113fd57fe5b60200260200101516001600160a01b03161415611461576040805162461bcd60e51b815260206004820152601b60248201527f436f686f72743a20696e76616c696420706f6f6c416464726573730000000000604482015290519081900360640190fd5b6000838260ff168151811061147257fe5b6020026020010151116114cc576040805162461bcd60e51b815260206004820152601d60248201527f436f686f72743a20656d7074696564206f766572416c6c5374616b6564000000604482015290519081900360640190fd5b828160ff16815181106114db57fe5b602002602001015160026000868460ff16815181106114f657fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020556001016113d7565b5060019392505050565b60026020526000908152604090205481565b60075460408051637053cd8b60e11b81526001600160a01b03848116600483015291516000938493169163e0a79b16916024808301926020929190829003018186803b15801561158d57600080fd5b505afa1580156115a1573d6000803e3d6000fd5b505050506040513d60208110156115b757600080fd5b50516001600160a01b038416600090815260026020526040812054919250906115e19083906131b5565b925050505b919050565b60006115f561306f565b60005461010090046001600160a01b0390811691161461164a576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b610f4761320f565b6006602052600090815260409020805460019091015460ff1682565b600061167861306f565b60005461010090046001600160a01b039081169116146116cd576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b6007546040805163f2fde38b60e01b81526001600160a01b0385811660048301529151919092169163f2fde38b91602480830192600092919082900301818387803b15801561171b57600080fd5b505af115801561172f573d6000803e3d6000fd5b50600195945050505050565b60056020526000908152604090205460ff1681565b600a818154811061176057600080fd5b600091825260209091200154905081565b60005461010090046001600160a01b031681565b600d5461010090046001600160a01b031681565b60085481565b60006117a961306f565b60005461010090046001600160a01b039081169116146117fe576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b60005b8251811015610ebf5761182683828151811061181957fe5b6020026020010151613292565b600101611801565b61183661306f565b60005461010090046001600160a01b0390811691161461188b576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b600754604080516326fa24e960e01b81526001600160a01b038681166004830152915160009384938493849391909216916326fa24e99160248083019286929190829003018186803b1580156118e057600080fd5b505afa1580156118f4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260c081101561191d57600080fd5b8101908080516040519392919084600160201b82111561193c57600080fd5b90830190602082018581111561195157600080fd5b82518660208202830111600160201b8211171561196d57600080fd5b82525081516020918201928201910280838360005b8381101561199a578181015183820152602001611982565b5050505090500160405260200180516040519392919084600160201b8211156119c257600080fd5b9083019060208201858111156119d757600080fd5b82518660208202830111600160201b821117156119f357600080fd5b82525081516020918201928201910280838360005b83811015611a20578181015183820152602001611a08565b5050505090500160405260200180516040519392919084600160201b821115611a4857600080fd5b908301906020820185811115611a5d57600080fd5b82518660208202830111600160201b82111715611a7957600080fd5b82525081516020918201928201910280838360005b83811015611aa6578181015183820152602001611a8e565b5050505090500160405260200180516040519392919084600160201b821115611ace57600080fd5b908301906020820185811115611ae357600080fd5b82518660208202830111600160201b82111715611aff57600080fd5b82525081516020918201928201910280838360005b83811015611b2c578181015183820152602001611b14565b5050505090500160405260200180516040519392919084600160201b821115611b5457600080fd5b908301906020820185811115611b6957600080fd5b82518660208202830111600160201b82111715611b8557600080fd5b82525081516020918201928201910280838360005b83811015611bb2578181015183820152602001611b9a565b5050505090500160405260200180516040519392919084600160201b821115611bda57600080fd5b908301906020820185811115611bef57600080fd5b82518660208202830111600160201b82111715611c0b57600080fd5b82525081516020918201928201910280838360005b83811015611c38578181015183820152602001611c20565b50505050905001604052505050509450509350935093506000818981518110611c5d57fe5b6020026020010151118015611c895750818881518110611c7957fe5b6020026020010151151560011515145b8015611cb957506001600160a01b03871660009081526004602090815260408083208b845290915290205460ff16155b611cf45760405162461bcd60e51b81526004018080602001828103825260348152602001806143026034913960400191505060405180910390fd5b6000611d12848a81518110611d0557fe5b6020026020010151613386565b9050818981518110611d2057fe5b6020026020010151816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611d7557600080fd5b505afa158015611d89573d6000803e3d6000fd5b505050506040513d6020811015611d9f57600080fd5b50511015611df4576040805162461bcd60e51b815260206004820181905260248201527f454d455247454e4359203a20496e73756666696369656e742042616c616e6365604482015290519081900360640190fd5b6001600160a01b0380891660009081526004602090815260408083208d84529091529020805460ff1916600117905582519082169063a9059cbb908a9085908d908110611e3d57fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611e8b57600080fd5b505af1158015611e9f573d6000803e3d6000fd5b505050506040513d6020811015611eb557600080fd5b50506007546040805163e5c4686960e01b815290516000926001600160a01b03169163e5c46869916004808301926020929190829003018186803b158015611efc57600080fd5b505afa158015611f10573d6000803e3d6000fd5b505050506040513d6020811015611f2657600080fd5b5051905060005b885181101561215c576000888281518110611f4457fe5b6020026020010151905060006001600160a01b0316888d81518110611f6557fe5b60200260200101516001600160a01b031614612121576000611f9468056bc75e2d63100000610fe8848761315c565b9050611fa082826133e8565b91508a8381518110611fae57fe5b60200260200101516001600160a01b031663a9059cbb8a8f81518110611fd057fe5b6020026020010151836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561201f57600080fd5b505af1158015612033573d6000803e3d6000fd5b505050506040513d602081101561204957600080fd5b505161209c576040805162461bcd60e51b815260206004820152601b60248201527f454d455247454e4359203a205472616e73666572204661696c65640000000000604482015290519081900360640190fd5b8a83815181106120a857fe5b60200260200101516001600160a01b03168c6001600160a01b03168a8f815181106120cf57fe5b60200260200101516001600160a01b03167fcc30edb66a991e48ca3676c277d3a35485ebfaf3016fa9536663b2689c8f5eef8442604051808381526020018281526020019250505060405180910390a4505b6121538b888e8151811061213157fe5b60200260200101518c858151811061214557fe5b60200260200101518461342a565b50600101611f2d565b50848a8151811061216957fe5b60200260200101516001600160a01b0316896001600160a01b03167fa4b627609e711628747558b171b04b9636337afdadac065ee7113fb91eab0b72858d815181106121b157fe5b6020026020010151428e60405180848152602001838152602001828152602001935050505060405180910390a350505050505050505050565b60006121f461306f565b60005461010090046001600160a01b03908116911614612249576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b50600780546001600160a01b0383166001600160a01b03199091161790556001919050565b61227661306f565b60005461010090046001600160a01b039081169116146122cb576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b8260ff16600114806122e057508260ff166002145b806122ee57508260ff166003145b61233f576040805162461bcd60e51b815260206004820152601760248201527f496e76616c6964204c6f636b61626c6520537461747573000000000000000000604482015290519081900360640190fd5b6007546040805163dd4be68360e01b81526001600160a01b0387811660048301529151600093929092169163dd4be6839160248082019260e092909190829003018186803b15801561239057600080fd5b505afa1580156123a4573d6000803e3d6000fd5b505050506040513d60e08110156123ba57600080fd5b50519050600181151514612407576040805162461bcd60e51b815260206004820152600f60248201526e151bdad95b88139bdd08115e1a5cdd608a1b604482015290519081900360640190fd5b8360ff166001141561243b5761241d42846131b5565b6001600160a01b038616600090815260066020526040902055612499565b8360ff1660021415612465576001600160a01b038516600090815260066020526040812055612499565b8360ff1660031415612499576001600160a01b0385166000908152600660205260409020600101805460ff19168315151790555b6001600160a01b0385166000818152600660209081526040918290208054600190910154835191825260ff16151591810191909152428183015290517f4030f7d2425e172fe94d03a4cfd07dcdbc4909529bdf15d2732aa1559ff9be7c9181900360600190a25050505050565b600460209081526000928352604080842090915290825290205460ff1681565b600061253061123f565b15612575576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b826001600160a01b031661258761306f565b6001600160a01b031614806125bb575060005461010090046001600160a01b03166125b061306f565b6001600160a01b0316145b61260c576040805162461bcd60e51b815260206004820152601b60248201527f554e5354414b453a20496e76616c6964205573657220456e7472790000000000604482015290519081900360640190fd5b600754604080516326fa24e960e01b81526001600160a01b038681166004830152915160009384938493849391909216916326fa24e99160248083019286929190829003018186803b15801561266157600080fd5b505afa158015612675573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260c081101561269e57600080fd5b8101908080516040519392919084600160201b8211156126bd57600080fd5b9083019060208201858111156126d257600080fd5b82518660208202830111600160201b821117156126ee57600080fd5b82525081516020918201928201910280838360005b8381101561271b578181015183820152602001612703565b5050505090500160405260200180516040519392919084600160201b82111561274357600080fd5b90830190602082018581111561275857600080fd5b82518660208202830111600160201b8211171561277457600080fd5b82525081516020918201928201910280838360005b838110156127a1578181015183820152602001612789565b5050505090500160405260200180516040519392919084600160201b8211156127c957600080fd5b9083019060208201858111156127de57600080fd5b82518660208202830111600160201b821117156127fa57600080fd5b82525081516020918201928201910280838360005b8381101561282757818101518382015260200161280f565b5050505090500160405260200180516040519392919084600160201b82111561284f57600080fd5b90830190602082018581111561286457600080fd5b82518660208202830111600160201b8211171561288057600080fd5b82525081516020918201928201910280838360005b838110156128ad578181015183820152602001612895565b5050505090500160405260200180516040519392919084600160201b8211156128d557600080fd5b9083019060208201858111156128ea57600080fd5b82518660208202830111600160201b8211171561290657600080fd5b82525081516020918201928201910280838360005b8381101561293357818101518382015260200161291b565b5050505090500160405260200180516040519392919084600160201b82111561295b57600080fd5b90830190602082018581111561297057600080fd5b82518660208202830111600160201b8211171561298c57600080fd5b82525081516020918201928201910280838360005b838110156129b95781810151838201526020016129a1565b505050509050016040525050509550955050945094505060006129ee8588815181106129e157fe5b602002602001015161153e565b90506000612a01868981518110611d0557fe5b6001600160a01b038116600090815260066020526040902054909150421015612a69576040805162461bcd60e51b8152602060048201526015602482015274155394d51052d14e88151bdad95b88131bd8dad959605a1b604482015290519081900360640190fd5b6001600160a01b038116600090815260066020526040902060019081015460ff1615151415612b0e5742612abb600c54858b81518110612aa557fe5b60200260200101516131b590919063ffffffff16565b1115612b0e576040805162461bcd60e51b815260206004820181905260248201527f554e5354414b453a204c6f636b656420696e206f7074696f6e616c206c6f636b604482015290519081900360640190fd5b6000848981518110612b1c57fe5b6020026020010151118015612b485750848881518110612b3857fe5b6020026020010151151560011515145b8015612b7857506001600160a01b03891660009081526004602090815260408083208b845290915290205460ff16155b612bb35760405162461bcd60e51b81526004018080602001828103825260328152602001806142d06032913960400191505060405180910390fd5b6001600160a01b03891660009081526004602090815260408083208b84529091529020805460ff191660011790558351849089908110612bef57fe5b6020026020010151816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612c4457600080fd5b505afa158015612c58573d6000803e3d6000fd5b505050506040513d6020811015612c6e57600080fd5b50511015612cc3576040805162461bcd60e51b815260206004820152601e60248201527f554e5354414b45203a20496e73756666696369656e742042616c616e63650000604482015290519081900360640190fd5b60056000878a81518110612cd357fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff16612d9557806001600160a01b031663a9059cbb8a868b81518110612d1a57fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015612d6857600080fd5b505af1158015612d7c573d6000803e3d6000fd5b505050506040513d6020811015612d9257600080fd5b50505b612da089898461361a565b806001600160a01b0316896001600160a01b03167fa4b627609e711628747558b171b04b9636337afdadac065ee7113fb91eab0b72868b81518110612de157fe5b6020026020010151428c60405180848152602001838152602001828152602001935050505060405180910390a350600198975050505050505050565b6003602052600090815260409020546001600160a01b031681565b612e4061306f565b60005461010090046001600160a01b03908116911614612e95576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b6001600160a01b038116612eda5760405162461bcd60e51b81526004018080602001828103825260268152602001806142476026913960400191505060405180910390fd5b600080546040516001600160a01b038085169361010090930416917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6000612f4a61306f565b60005461010090046001600160a01b03908116911614612f9f576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b8151835114612fec576040805162461bcd60e51b8152602060048201526014602482015273496e76616c696420496e70757420546f6b656e7360601b604482015290519081900360640190fd5b60005b83518160ff16101561152257828160ff168151811061300a57fe5b602002602001015160036000868460ff168151811061302557fe5b6020908102919091018101516001600160a01b0390811683529082019290925260400160002080546001600160a01b03191692909116919091179055600101612fef565b60095481565b3390565b60006130b583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613b49565b9392505050565b6130c461123f565b61310c576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61313f61306f565b604080516001600160a01b039092168252519081900360200190a1565b60008261316b57506000610d47565b8282028284828161317857fe5b04146130b55760405162461bcd60e51b815260040180806020018281038252602181526020018061428f6021913960400191505060405180910390fd5b6000828201838110156130b5576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b61321761123f565b1561325c576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861313f61306f565b600754604080516370a0823160e01b81526001600160a01b03928316600482015290516000928416916370a08231916024808301926020929190829003018186803b1580156132e057600080fd5b505afa1580156132f4573d6000803e3d6000fd5b505050506040513d602081101561330a57600080fd5b5051905080156133825760075460408051630282c62360e51b81526001600160a01b0385811660048301526024820185905291519190921691635058c46091604480830192600092919082900301818387803b15801561336957600080fd5b505af115801561337d573d6000803e3d6000fd5b505050505b5050565b600d5460009060ff16156133e1576001600160a01b03828116600090815260036020526040812054909116156133d6576001600160a01b03808416600090815260036020526040902054166133d8565b825b91506115e69050565b50806115e6565b60006130b583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613beb565b6001600160a01b038216156136145780826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561348757600080fd5b505afa15801561349b573d6000803e3d6000fd5b505050506040513d60208110156134b157600080fd5b505110156134f05760405162461bcd60e51b815260040180806020018281038252602281526020018061426d6022913960400191505060405180910390fd5b816001600160a01b031663a9059cbb85836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561354757600080fd5b505af115801561355b573d6000803e3d6000fd5b505050506040513d602081101561357157600080fd5b50516135b6576040805162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b604482015290519081900360640190fd5b816001600160a01b0316836001600160a01b0316856001600160a01b03167fcd5e4f020ddad29434c2200a9edf2f8d7ec30f0d787f03b528ab7279aab0acbe8442604051808381526020018281526020019250505060405180910390a45b50505050565b600754604080516326fa24e960e01b81526001600160a01b03868116600483015291516000938493849384938493849316916326fa24e99160248083019286929190829003018186803b15801561367057600080fd5b505afa158015613684573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260c08110156136ad57600080fd5b8101908080516040519392919084600160201b8211156136cc57600080fd5b9083019060208201858111156136e157600080fd5b82518660208202830111600160201b821117156136fd57600080fd5b82525081516020918201928201910280838360005b8381101561372a578181015183820152602001613712565b5050505090500160405260200180516040519392919084600160201b82111561375257600080fd5b90830190602082018581111561376757600080fd5b82518660208202830111600160201b8211171561378357600080fd5b82525081516020918201928201910280838360005b838110156137b0578181015183820152602001613798565b5050505090500160405260200180516040519392919084600160201b8211156137d857600080fd5b9083019060208201858111156137ed57600080fd5b82518660208202830111600160201b8211171561380957600080fd5b82525081516020918201928201910280838360005b8381101561383657818101518382015260200161381e565b5050505090500160405260200180516040519392919084600160201b82111561385e57600080fd5b90830190602082018581111561387357600080fd5b82518660208202830111600160201b8211171561388f57600080fd5b82525081516020918201928201910280838360005b838110156138bc5781810151838201526020016138a4565b5050505090500160405260200180516040519392919084600160201b8211156138e457600080fd5b9083019060208201858111156138f957600080fd5b82518660208202830111600160201b8211171561391557600080fd5b82525081516020918201928201910280838360005b8381101561394257818101518382015260200161392a565b5050505090500160405260200180516040519392919084600160201b82111561396a57600080fd5b90830190602082018581111561397f57600080fd5b82518660208202830111600160201b8211171561399b57600080fd5b82525081516020918201928201910280838360005b838110156139c85781810151838201526020016139b0565b50505050905001604052505050955095505050935093506139f6600c54600b546131b590919063ffffffff16565b955042861115613a0857429450613a1a565b600c54600b54613a17916131b5565b94505b613a40818981518110613a2957fe5b6020026020010151866133e890919063ffffffff16565b95506000600760009054906101000a90046001600160a01b03166001600160a01b031663e5c468696040518163ffffffff1660e01b815260040160206040518083038186803b158015613a9257600080fd5b505afa158015613aa6573d6000803e3d6000fd5b505050506040513d6020811015613abc57600080fd5b50519050613ac86141d3565b838a81518110613ad457fe5b602002602001015181600060038110613ae957fe5b60200201528881600160200201528181600260200201526009548810613b3c57613b3c8b868c81518110613b1957fe5b6020026020010151888d81518110613b2d57fe5b6020026020010151848c613c45565b5050505050505050505050565b60008183613bd55760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613b9a578181015183820152602001613b82565b50505050905090810190601f168015613bc75780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581613be157fe5b0495945050505050565b60008184841115613c3d5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315613b9a578181015183820152602001613b82565b505050900390565b600080613c506141f1565b600954613c5e908590613073565b6020820152600854613c71908590613073565b81528451613c9890613c8d9089808960015b6020020151610f53565b60208301519061315c565b92506000613ca588613386565b90506001600160a01b03871615613e0757613cd568056bc75e2d63100000610fe88860026020020151879061315c565b9250613ce184846133e8565b9350806001600160a01b031663a9059cbb88856040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015613d3a57600080fd5b505af1158015613d4e573d6000803e3d6000fd5b505050506040513d6020811015613d6457600080fd5b50511515600114613dae576040805162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8811985a5b1959608a1b604482015290519081900360640190fd5b806001600160a01b0316613dc061306f565b6040805186815242602082015281516001600160a01b03938416938c16927fcc30edb66a991e48ca3676c277d3a35485ebfaf3016fa9536663b2689c8f5eef928290030190a45b613e138982838761342a565b60015b600a5460ff8216101561417c57600a8160ff1681548110613e3357fe5b600091825260209091200154835110614172576000613e816018613e7b6001600a8660ff1681548110613e6257fe5b90600052602060002001546133e890919063ffffffff16565b9061315c565b90506000613e97828660016020020151906133e8565b600754604080516314e734ed60e21b81526001600160a01b038f8116600483015260ff881660248301529151939450600093919092169163539cd3b4916044808301926020929190829003018186803b158015613ef357600080fd5b505afa158015613f07573d6000803e3d6000fd5b505050506040513d6020811015613f1d57600080fd5b505190506001600160a01b03808216908d1614801590613fbb5750600754604080516314291f5b60e11b81526001600160a01b038f811660048301528481166024830152915191909216916328523eb6916044808301926020929190829003018186803b158015613f8d57600080fd5b505afa158015613fa1573d6000803e3d6000fd5b505050506040513d6020811015613fb757600080fd5b5051155b15614164578951613fdb90613fd4908e848e6001613c83565b839061315c565b97506000613fe882613386565b90506001600160a01b038c16156141565761401868056bc75e2d63100000610fe88d600260200201518c9061315c565b975061402489896133e8565b9850806001600160a01b031663a9059cbb8d8a6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561407d57600080fd5b505af1158015614091573d6000803e3d6000fd5b505050506040513d60208110156140a757600080fd5b505115156001146140f1576040805162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8811985a5b1959608a1b604482015290519081900360640190fd5b806001600160a01b031661410361306f565b6001600160a01b03168d6001600160a01b03167fcc30edb66a991e48ca3676c277d3a35485ebfaf3016fa9536663b2689c8f5eef8b42604051808381526020018281526020019250505060405180910390a45b6141628e8e838c61342a565b505b836001019350505050614177565b61417c565b613e16565b50505050505050505050565b8280548282559060005260206000209081019282156141c3579160200282015b828111156141c35782518255916020019190600101906141a8565b506141cf92915061420f565b5090565b60405180606001604052806003906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b5b808211156141cf576000815560010161421056fe5341464557495448445241573a20496e73756666696369656e742042616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737353454e44203a20496e73756666696369656e74205265776172642042616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572554e5354414b45203a20416c726561647920436c61696d656420286f722920496e73756666696369656e74205374616b6564454d455247454e4359203a20416c726561647920436c61696d656420286f722920496e73756666696369656e74205374616b6564a2646970667358221220a802112114a5f66a2f113a2b88e09c1113b62cbdf9e0002c3da7b1a218ef136064736f6c634300070600334f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373436f686f7274466163746f72793a20696e76616c696420636f686f727420616464726573732ea2646970667358221220f69eb496132bd744968f6341e8e163600f6e24d7e7918c1e4a4c234829bb0bc664736f6c63430007060033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80635e6470981161005b5780635e6470981461017c578063715018a6146101a2578063b2bdfa7b146101ac578063f2fde38b146101b45761007d565b806301bc45c9146100825780634f2e338c146100a65780635c975abb14610160575b600080fd5b61008a6101da565b604080516001600160a01b039092168252519081900360200190f35b61008a600480360360608110156100bc57600080fd5b6001600160a01b038235169160208101351515918101906060810160408201356401000000008111156100ee57600080fd5b82018360208201111561010057600080fd5b8035906020019184602083028401116401000000008311171561012257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506101e9945050505050565b610168610446565b604080519115158252519081900360200190f35b61008a6004803603602081101561019257600080fd5b50356001600160a01b031661044f565b6101aa61046a565b005b61008a610542565b6101aa600480360360208110156101ca57600080fd5b50356001600160a01b0316610556565b6001546001600160a01b031681565b60006101f3610670565b60005461010090046001600160a01b0390811691161461025a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03841661029f5760405162461bcd60e51b8152600401808060200182810382526026815260200180614b7f6026913960400191505060405180910390fd5b6000846102aa610670565b306040516102b790610674565b6001600160a01b03938416815291831660208301529091166040808301919091525190819003606001906000f0801580156102f6573d6000803e3d6000fd5b506001600160a01b03868116600090815260026020908152604080832080546001600160a01b0319169486169485179055805163063a66b960e11b81528915156024820152600481019182528851604482015288519596509394630c74cd729489948b948493606490930192878201929102908190849084905b83811015610388578181015183820152602001610370565b505050509050019350505050602060405180830381600087803b1580156103ae57600080fd5b505af11580156103c2573d6000803e3d6000fd5b505050506040513d60208110156103d857600080fd5b5050600080546001600160a01b03808816808452600260209081526040948590205485519084168152429181019190915284519194610100909404909216927ecf5bef2ee546e7116118ed039425d278d011d79b3fd2b20669c6d5877f27c8928290030190a3949350505050565b60005460ff1690565b6002602052600090815260409020546001600160a01b031681565b610472610670565b6001546001600160a01b039081169116146104d4576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652041646d696e604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693610100909204909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600154600080546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60005461010090046001600160a01b031681565b61055e610670565b60005461010090046001600160a01b039081169116146105c5576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811661060a5760405162461bcd60e51b8152600401808060200182810382526026815260200180614b596026913960400191505060405180910390fd5b600080546040516001600160a01b038085169361010090930416917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b3390565b6144d7806106828339019056fe608060405262015180600855610e106009553480156200001e57600080fd5b50604051620044d7380380620044d7833981810160405260608110156200004457600080fd5b5080516020820151604092830151600080546001600160a01b038085166101008181026001600160a81b031990941693909317808555600180546001600160a01b031916909217909155965195969495939486949290041691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160a01b03831662000120576040805162461bcd60e51b815260206004820152601d60248201527f436f686f72743a20696e76616c696420636f686f727441646472657373000000604482015290519081900360640190fd5b600780546001600160a01b039485166001600160a01b0319909116179055600d80549190931661010002610100600160a81b0319909116179091555061436b806200016c6000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c8063a5030f7e1161011a578063c922e937116100ad578063d93938141161007c578063d939381414610908578063e486033914610934578063f2fde38b1461095a578063f6d5f16514610980578063fbfcd24114610aa357610206565b8063c922e93714610741578063d3f8f1ce14610879578063d43135061461089f578063d58c2228146108dc57610206565b8063b2bdfa7b116100e9578063b2bdfa7b14610688578063c45a015514610690578063c549e6b914610698578063c6044c46146106a057610206565b8063a5030f7e146105e0578063a90fa6031461061f578063ac007f2814610645578063b104e0061461066b57610206565b80634cd365311161019d578063715018a61161016c578063715018a6146104615780637290d03b14610469578063736a9d861461058c5780637ae15a73146105b25780638456cb59146105d857610206565b80634cd36531146103e95780635058c460146104255780635c975abb146104515780635f96dc111461045957610206565b806313176a40116101d957806313176a40146103b757806316b60d8f146103bf5780633f4ba83a146103c757806340f02ab6146103cf57610206565b806301193ad71461020b57806301bc45c9146102ae57806306de6dd4146102d25780630c74cd7214610314575b600080fd5b6102ac6004803603602081101561022157600080fd5b810190602081018135600160201b81111561023b57600080fd5b82018360208201111561024d57600080fd5b803590602001918460208302840111600160201b8311171561026e57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610aab945050505050565b005b6102b6610cb1565b604080516001600160a01b039092168252519081900360200190f35b610300600480360360408110156102e857600080fd5b506001600160a01b0381351690602001351515610cc0565b604080519115158252519081900360200190f35b6103006004803603604081101561032a57600080fd5b810190602081018135600160201b81111561034457600080fd5b82018360208201111561035657600080fd5b803590602001918460208302840111600160201b8311171561037757600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505050503515159050610d4d565b6102b6610ec8565b610300610ed7565b610300610ee0565b6103d7610f4d565b60408051918252519081900360200190f35b6103d7600480360360808110156103ff57600080fd5b508035906001600160a01b03602082013581169160408101359091169060600135610f53565b6102ac6004803603604081101561043b57600080fd5b506001600160a01b038135169060200135610ff7565b61030061123f565b6103d7611248565b6102ac61124e565b6103006004803603604081101561047f57600080fd5b810190602081018135600160201b81111561049957600080fd5b8201836020820111156104ab57600080fd5b803590602001918460208302840111600160201b831117156104cc57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561051b57600080fd5b82018360208201111561052d57600080fd5b803590602001918460208302840111600160201b8311171561054e57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611326945050505050565b6103d7600480360360208110156105a257600080fd5b50356001600160a01b031661152c565b6103d7600480360360208110156105c857600080fd5b50356001600160a01b031661153e565b6103006115eb565b610606600480360360208110156105f657600080fd5b50356001600160a01b0316611652565b6040805192835290151560208301528051918290030190f35b6103006004803603602081101561063557600080fd5b50356001600160a01b031661166e565b6103006004803603602081101561065b57600080fd5b50356001600160a01b031661173b565b6103d76004803603602081101561068157600080fd5b5035611750565b6102b6611771565b6102b6611785565b6103d7611799565b610300600480360360208110156106b657600080fd5b810190602081018135600160201b8111156106d057600080fd5b8201836020820111156106e257600080fd5b803590602001918460208302840111600160201b8311171561070357600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061179f945050505050565b6102ac6004803603608081101561075757600080fd5b8135916001600160a01b0360208201351691810190606081016040820135600160201b81111561078657600080fd5b82018360208201111561079857600080fd5b803590602001918460208302840111600160201b831117156107b957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561080857600080fd5b82018360208201111561081a57600080fd5b803590602001918460208302840111600160201b8311171561083b57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061182e945050505050565b6103006004803603602081101561088f57600080fd5b50356001600160a01b03166121ea565b6102ac600480360360808110156108b557600080fd5b506001600160a01b038135169060ff6020820135169060408101359060600135151561226e565b610300600480360360408110156108f257600080fd5b506001600160a01b038135169060200135612506565b6103006004803603604081101561091e57600080fd5b506001600160a01b038135169060200135612526565b6102b66004803603602081101561094a57600080fd5b50356001600160a01b0316612e1d565b6102ac6004803603602081101561097057600080fd5b50356001600160a01b0316612e38565b6103006004803603604081101561099657600080fd5b810190602081018135600160201b8111156109b057600080fd5b8201836020820111156109c257600080fd5b803590602001918460208302840111600160201b831117156109e357600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610a3257600080fd5b820183602082011115610a4457600080fd5b803590602001918460208302840111600160201b83111715610a6557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612f40945050505050565b6103d7613069565b600d5461010090046001600160a01b0316610ac461306f565b6001600160a01b03161480610af8575060005461010090046001600160a01b0316610aed61306f565b6001600160a01b0316145b610b45576040805162461bcd60e51b815260206004820152601960248201527810dbda1bdc9d0e881c195c9b5a5cdcda5bdb8819195b9a5959603a1b604482015290519081900360640190fd5b6040805160008152602081019182905251610b6291600a91614188565b5060005b81518160ff161015610c2f576000610b8b600854600c5461307390919063ffffffff16565b9050828260ff1681518110610b9c57fe5b60200260200101518111610bee576040805162461bcd60e51b8152602060048201526014602482015273496e76616c696420496e74657276616c2044617960601b604482015290519081900360640190fd5b600a838360ff1681518110610bff57fe5b60209081029190910181015182546001818101855560009485529290932090920191909155919091019050610b66565b507f29635226d0b00834767b0cf38daca8dc0fe978152b0a8a5b39eb281126352361600a4260405180806020018381526020018281038252848181548152602001915080548015610c9f57602002820191906000526020600020905b815481526020019060010190808311610c8b575b5050935050505060405180910390a150565b6001546001600160a01b031681565b6000610cca61306f565b60005461010090046001600160a01b03908116911614610d1f576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b506001600160a01b0382166000908152600560205260409020805460ff191682151517905560015b92915050565b600d5460009061010090046001600160a01b0316610d6961306f565b6001600160a01b031614610dc0576040805162461bcd60e51b815260206004820152601960248201527810dbda1bdc9d0e881c195c9b5a5cdcda5bdb8819195b9a5959603a1b604482015290519081900360640190fd5b600d805460ff191683151517905560075460408051635f96dc1160e01b815290516001600160a01b0390921691635f96dc1191600480820192602092909190829003018186803b158015610e1357600080fd5b505afa158015610e27573d6000803e3d6000fd5b505050506040513d6020811015610e3d57600080fd5b5051600b5560075460408051632078155b60e11b815290516001600160a01b03909216916340f02ab691600480820192602092909190829003018186803b158015610e8757600080fd5b505afa158015610e9b573d6000803e3d6000fd5b505050506040513d6020811015610eb157600080fd5b5051600c55610ebf83610aab565b50600192915050565b6007546001600160a01b031681565b600d5460ff1681565b6000610eea61306f565b60005461010090046001600160a01b03908116911614610f3f576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b610f476130bc565b50600190565b600c5481565b6007546040805163061dce6960e21b81526001600160a01b03868116600483015285811660248301529151600093610fee938693610fe893919092169163187739a4916044808301926020929190829003018186803b158015610fb557600080fd5b505afa158015610fc9573d6000803e3d6000fd5b505050506040513d6020811015610fdf57600080fd5b5051889061315c565b90613073565b95945050505050565b610fff61306f565b60005461010090046001600160a01b03908116911614611054576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b80826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156110a257600080fd5b505afa1580156110b6573d6000803e3d6000fd5b505050506040513d60208110156110cc57600080fd5b5051101561110b5760405162461bcd60e51b81526004018080602001828103825260228152602001806142256022913960400191505060405180910390fd5b816001600160a01b031663a9059cbb600060019054906101000a90046001600160a01b0316836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561117757600080fd5b505af115801561118b573d6000803e3d6000fd5b505050506040513d60208110156111a157600080fd5b505115156001146111f9576040805162461bcd60e51b815260206004820152601d60248201527f5341464557495448445241573a205472616e73666572206661696c6564000000604482015290519081900360640190fd5b6040805182815242602082015281516001600160a01b038516927fcb92e2679de255302c9b8d0673cbdf8ef54667e943bf8f049bcaf6a85926ba1a928290030190a25050565b60005460ff1690565b600b5481565b61125661306f565b6001546001600160a01b039081169116146112b8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652041646d696e604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693610100909204909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600154600080546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b600061133061306f565b60005461010090046001600160a01b03908116911614611385576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b81518351146113d4576040805162461bcd60e51b8152602060048201526016602482015275436f686f72743a20496e76616c696420496e7075747360501b604482015290519081900360640190fd5b60005b83518160ff1610156115225760006001600160a01b0316848260ff16815181106113fd57fe5b60200260200101516001600160a01b03161415611461576040805162461bcd60e51b815260206004820152601b60248201527f436f686f72743a20696e76616c696420706f6f6c416464726573730000000000604482015290519081900360640190fd5b6000838260ff168151811061147257fe5b6020026020010151116114cc576040805162461bcd60e51b815260206004820152601d60248201527f436f686f72743a20656d7074696564206f766572416c6c5374616b6564000000604482015290519081900360640190fd5b828160ff16815181106114db57fe5b602002602001015160026000868460ff16815181106114f657fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020556001016113d7565b5060019392505050565b60026020526000908152604090205481565b60075460408051637053cd8b60e11b81526001600160a01b03848116600483015291516000938493169163e0a79b16916024808301926020929190829003018186803b15801561158d57600080fd5b505afa1580156115a1573d6000803e3d6000fd5b505050506040513d60208110156115b757600080fd5b50516001600160a01b038416600090815260026020526040812054919250906115e19083906131b5565b925050505b919050565b60006115f561306f565b60005461010090046001600160a01b0390811691161461164a576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b610f4761320f565b6006602052600090815260409020805460019091015460ff1682565b600061167861306f565b60005461010090046001600160a01b039081169116146116cd576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b6007546040805163f2fde38b60e01b81526001600160a01b0385811660048301529151919092169163f2fde38b91602480830192600092919082900301818387803b15801561171b57600080fd5b505af115801561172f573d6000803e3d6000fd5b50600195945050505050565b60056020526000908152604090205460ff1681565b600a818154811061176057600080fd5b600091825260209091200154905081565b60005461010090046001600160a01b031681565b600d5461010090046001600160a01b031681565b60085481565b60006117a961306f565b60005461010090046001600160a01b039081169116146117fe576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b60005b8251811015610ebf5761182683828151811061181957fe5b6020026020010151613292565b600101611801565b61183661306f565b60005461010090046001600160a01b0390811691161461188b576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b600754604080516326fa24e960e01b81526001600160a01b038681166004830152915160009384938493849391909216916326fa24e99160248083019286929190829003018186803b1580156118e057600080fd5b505afa1580156118f4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260c081101561191d57600080fd5b8101908080516040519392919084600160201b82111561193c57600080fd5b90830190602082018581111561195157600080fd5b82518660208202830111600160201b8211171561196d57600080fd5b82525081516020918201928201910280838360005b8381101561199a578181015183820152602001611982565b5050505090500160405260200180516040519392919084600160201b8211156119c257600080fd5b9083019060208201858111156119d757600080fd5b82518660208202830111600160201b821117156119f357600080fd5b82525081516020918201928201910280838360005b83811015611a20578181015183820152602001611a08565b5050505090500160405260200180516040519392919084600160201b821115611a4857600080fd5b908301906020820185811115611a5d57600080fd5b82518660208202830111600160201b82111715611a7957600080fd5b82525081516020918201928201910280838360005b83811015611aa6578181015183820152602001611a8e565b5050505090500160405260200180516040519392919084600160201b821115611ace57600080fd5b908301906020820185811115611ae357600080fd5b82518660208202830111600160201b82111715611aff57600080fd5b82525081516020918201928201910280838360005b83811015611b2c578181015183820152602001611b14565b5050505090500160405260200180516040519392919084600160201b821115611b5457600080fd5b908301906020820185811115611b6957600080fd5b82518660208202830111600160201b82111715611b8557600080fd5b82525081516020918201928201910280838360005b83811015611bb2578181015183820152602001611b9a565b5050505090500160405260200180516040519392919084600160201b821115611bda57600080fd5b908301906020820185811115611bef57600080fd5b82518660208202830111600160201b82111715611c0b57600080fd5b82525081516020918201928201910280838360005b83811015611c38578181015183820152602001611c20565b50505050905001604052505050509450509350935093506000818981518110611c5d57fe5b6020026020010151118015611c895750818881518110611c7957fe5b6020026020010151151560011515145b8015611cb957506001600160a01b03871660009081526004602090815260408083208b845290915290205460ff16155b611cf45760405162461bcd60e51b81526004018080602001828103825260348152602001806143026034913960400191505060405180910390fd5b6000611d12848a81518110611d0557fe5b6020026020010151613386565b9050818981518110611d2057fe5b6020026020010151816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611d7557600080fd5b505afa158015611d89573d6000803e3d6000fd5b505050506040513d6020811015611d9f57600080fd5b50511015611df4576040805162461bcd60e51b815260206004820181905260248201527f454d455247454e4359203a20496e73756666696369656e742042616c616e6365604482015290519081900360640190fd5b6001600160a01b0380891660009081526004602090815260408083208d84529091529020805460ff1916600117905582519082169063a9059cbb908a9085908d908110611e3d57fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611e8b57600080fd5b505af1158015611e9f573d6000803e3d6000fd5b505050506040513d6020811015611eb557600080fd5b50506007546040805163e5c4686960e01b815290516000926001600160a01b03169163e5c46869916004808301926020929190829003018186803b158015611efc57600080fd5b505afa158015611f10573d6000803e3d6000fd5b505050506040513d6020811015611f2657600080fd5b5051905060005b885181101561215c576000888281518110611f4457fe5b6020026020010151905060006001600160a01b0316888d81518110611f6557fe5b60200260200101516001600160a01b031614612121576000611f9468056bc75e2d63100000610fe8848761315c565b9050611fa082826133e8565b91508a8381518110611fae57fe5b60200260200101516001600160a01b031663a9059cbb8a8f81518110611fd057fe5b6020026020010151836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561201f57600080fd5b505af1158015612033573d6000803e3d6000fd5b505050506040513d602081101561204957600080fd5b505161209c576040805162461bcd60e51b815260206004820152601b60248201527f454d455247454e4359203a205472616e73666572204661696c65640000000000604482015290519081900360640190fd5b8a83815181106120a857fe5b60200260200101516001600160a01b03168c6001600160a01b03168a8f815181106120cf57fe5b60200260200101516001600160a01b03167fcc30edb66a991e48ca3676c277d3a35485ebfaf3016fa9536663b2689c8f5eef8442604051808381526020018281526020019250505060405180910390a4505b6121538b888e8151811061213157fe5b60200260200101518c858151811061214557fe5b60200260200101518461342a565b50600101611f2d565b50848a8151811061216957fe5b60200260200101516001600160a01b0316896001600160a01b03167fa4b627609e711628747558b171b04b9636337afdadac065ee7113fb91eab0b72858d815181106121b157fe5b6020026020010151428e60405180848152602001838152602001828152602001935050505060405180910390a350505050505050505050565b60006121f461306f565b60005461010090046001600160a01b03908116911614612249576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b50600780546001600160a01b0383166001600160a01b03199091161790556001919050565b61227661306f565b60005461010090046001600160a01b039081169116146122cb576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b8260ff16600114806122e057508260ff166002145b806122ee57508260ff166003145b61233f576040805162461bcd60e51b815260206004820152601760248201527f496e76616c6964204c6f636b61626c6520537461747573000000000000000000604482015290519081900360640190fd5b6007546040805163dd4be68360e01b81526001600160a01b0387811660048301529151600093929092169163dd4be6839160248082019260e092909190829003018186803b15801561239057600080fd5b505afa1580156123a4573d6000803e3d6000fd5b505050506040513d60e08110156123ba57600080fd5b50519050600181151514612407576040805162461bcd60e51b815260206004820152600f60248201526e151bdad95b88139bdd08115e1a5cdd608a1b604482015290519081900360640190fd5b8360ff166001141561243b5761241d42846131b5565b6001600160a01b038616600090815260066020526040902055612499565b8360ff1660021415612465576001600160a01b038516600090815260066020526040812055612499565b8360ff1660031415612499576001600160a01b0385166000908152600660205260409020600101805460ff19168315151790555b6001600160a01b0385166000818152600660209081526040918290208054600190910154835191825260ff16151591810191909152428183015290517f4030f7d2425e172fe94d03a4cfd07dcdbc4909529bdf15d2732aa1559ff9be7c9181900360600190a25050505050565b600460209081526000928352604080842090915290825290205460ff1681565b600061253061123f565b15612575576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b826001600160a01b031661258761306f565b6001600160a01b031614806125bb575060005461010090046001600160a01b03166125b061306f565b6001600160a01b0316145b61260c576040805162461bcd60e51b815260206004820152601b60248201527f554e5354414b453a20496e76616c6964205573657220456e7472790000000000604482015290519081900360640190fd5b600754604080516326fa24e960e01b81526001600160a01b038681166004830152915160009384938493849391909216916326fa24e99160248083019286929190829003018186803b15801561266157600080fd5b505afa158015612675573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260c081101561269e57600080fd5b8101908080516040519392919084600160201b8211156126bd57600080fd5b9083019060208201858111156126d257600080fd5b82518660208202830111600160201b821117156126ee57600080fd5b82525081516020918201928201910280838360005b8381101561271b578181015183820152602001612703565b5050505090500160405260200180516040519392919084600160201b82111561274357600080fd5b90830190602082018581111561275857600080fd5b82518660208202830111600160201b8211171561277457600080fd5b82525081516020918201928201910280838360005b838110156127a1578181015183820152602001612789565b5050505090500160405260200180516040519392919084600160201b8211156127c957600080fd5b9083019060208201858111156127de57600080fd5b82518660208202830111600160201b821117156127fa57600080fd5b82525081516020918201928201910280838360005b8381101561282757818101518382015260200161280f565b5050505090500160405260200180516040519392919084600160201b82111561284f57600080fd5b90830190602082018581111561286457600080fd5b82518660208202830111600160201b8211171561288057600080fd5b82525081516020918201928201910280838360005b838110156128ad578181015183820152602001612895565b5050505090500160405260200180516040519392919084600160201b8211156128d557600080fd5b9083019060208201858111156128ea57600080fd5b82518660208202830111600160201b8211171561290657600080fd5b82525081516020918201928201910280838360005b8381101561293357818101518382015260200161291b565b5050505090500160405260200180516040519392919084600160201b82111561295b57600080fd5b90830190602082018581111561297057600080fd5b82518660208202830111600160201b8211171561298c57600080fd5b82525081516020918201928201910280838360005b838110156129b95781810151838201526020016129a1565b505050509050016040525050509550955050945094505060006129ee8588815181106129e157fe5b602002602001015161153e565b90506000612a01868981518110611d0557fe5b6001600160a01b038116600090815260066020526040902054909150421015612a69576040805162461bcd60e51b8152602060048201526015602482015274155394d51052d14e88151bdad95b88131bd8dad959605a1b604482015290519081900360640190fd5b6001600160a01b038116600090815260066020526040902060019081015460ff1615151415612b0e5742612abb600c54858b81518110612aa557fe5b60200260200101516131b590919063ffffffff16565b1115612b0e576040805162461bcd60e51b815260206004820181905260248201527f554e5354414b453a204c6f636b656420696e206f7074696f6e616c206c6f636b604482015290519081900360640190fd5b6000848981518110612b1c57fe5b6020026020010151118015612b485750848881518110612b3857fe5b6020026020010151151560011515145b8015612b7857506001600160a01b03891660009081526004602090815260408083208b845290915290205460ff16155b612bb35760405162461bcd60e51b81526004018080602001828103825260328152602001806142d06032913960400191505060405180910390fd5b6001600160a01b03891660009081526004602090815260408083208b84529091529020805460ff191660011790558351849089908110612bef57fe5b6020026020010151816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612c4457600080fd5b505afa158015612c58573d6000803e3d6000fd5b505050506040513d6020811015612c6e57600080fd5b50511015612cc3576040805162461bcd60e51b815260206004820152601e60248201527f554e5354414b45203a20496e73756666696369656e742042616c616e63650000604482015290519081900360640190fd5b60056000878a81518110612cd357fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff16612d9557806001600160a01b031663a9059cbb8a868b81518110612d1a57fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015612d6857600080fd5b505af1158015612d7c573d6000803e3d6000fd5b505050506040513d6020811015612d9257600080fd5b50505b612da089898461361a565b806001600160a01b0316896001600160a01b03167fa4b627609e711628747558b171b04b9636337afdadac065ee7113fb91eab0b72868b81518110612de157fe5b6020026020010151428c60405180848152602001838152602001828152602001935050505060405180910390a350600198975050505050505050565b6003602052600090815260409020546001600160a01b031681565b612e4061306f565b60005461010090046001600160a01b03908116911614612e95576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b6001600160a01b038116612eda5760405162461bcd60e51b81526004018080602001828103825260268152602001806142476026913960400191505060405180910390fd5b600080546040516001600160a01b038085169361010090930416917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6000612f4a61306f565b60005461010090046001600160a01b03908116911614612f9f576040805162461bcd60e51b815260206004820181905260248201526000805160206142b0833981519152604482015290519081900360640190fd5b8151835114612fec576040805162461bcd60e51b8152602060048201526014602482015273496e76616c696420496e70757420546f6b656e7360601b604482015290519081900360640190fd5b60005b83518160ff16101561152257828160ff168151811061300a57fe5b602002602001015160036000868460ff168151811061302557fe5b6020908102919091018101516001600160a01b0390811683529082019290925260400160002080546001600160a01b03191692909116919091179055600101612fef565b60095481565b3390565b60006130b583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613b49565b9392505050565b6130c461123f565b61310c576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61313f61306f565b604080516001600160a01b039092168252519081900360200190a1565b60008261316b57506000610d47565b8282028284828161317857fe5b04146130b55760405162461bcd60e51b815260040180806020018281038252602181526020018061428f6021913960400191505060405180910390fd5b6000828201838110156130b5576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b61321761123f565b1561325c576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861313f61306f565b600754604080516370a0823160e01b81526001600160a01b03928316600482015290516000928416916370a08231916024808301926020929190829003018186803b1580156132e057600080fd5b505afa1580156132f4573d6000803e3d6000fd5b505050506040513d602081101561330a57600080fd5b5051905080156133825760075460408051630282c62360e51b81526001600160a01b0385811660048301526024820185905291519190921691635058c46091604480830192600092919082900301818387803b15801561336957600080fd5b505af115801561337d573d6000803e3d6000fd5b505050505b5050565b600d5460009060ff16156133e1576001600160a01b03828116600090815260036020526040812054909116156133d6576001600160a01b03808416600090815260036020526040902054166133d8565b825b91506115e69050565b50806115e6565b60006130b583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613beb565b6001600160a01b038216156136145780826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561348757600080fd5b505afa15801561349b573d6000803e3d6000fd5b505050506040513d60208110156134b157600080fd5b505110156134f05760405162461bcd60e51b815260040180806020018281038252602281526020018061426d6022913960400191505060405180910390fd5b816001600160a01b031663a9059cbb85836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561354757600080fd5b505af115801561355b573d6000803e3d6000fd5b505050506040513d602081101561357157600080fd5b50516135b6576040805162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b604482015290519081900360640190fd5b816001600160a01b0316836001600160a01b0316856001600160a01b03167fcd5e4f020ddad29434c2200a9edf2f8d7ec30f0d787f03b528ab7279aab0acbe8442604051808381526020018281526020019250505060405180910390a45b50505050565b600754604080516326fa24e960e01b81526001600160a01b03868116600483015291516000938493849384938493849316916326fa24e99160248083019286929190829003018186803b15801561367057600080fd5b505afa158015613684573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260c08110156136ad57600080fd5b8101908080516040519392919084600160201b8211156136cc57600080fd5b9083019060208201858111156136e157600080fd5b82518660208202830111600160201b821117156136fd57600080fd5b82525081516020918201928201910280838360005b8381101561372a578181015183820152602001613712565b5050505090500160405260200180516040519392919084600160201b82111561375257600080fd5b90830190602082018581111561376757600080fd5b82518660208202830111600160201b8211171561378357600080fd5b82525081516020918201928201910280838360005b838110156137b0578181015183820152602001613798565b5050505090500160405260200180516040519392919084600160201b8211156137d857600080fd5b9083019060208201858111156137ed57600080fd5b82518660208202830111600160201b8211171561380957600080fd5b82525081516020918201928201910280838360005b8381101561383657818101518382015260200161381e565b5050505090500160405260200180516040519392919084600160201b82111561385e57600080fd5b90830190602082018581111561387357600080fd5b82518660208202830111600160201b8211171561388f57600080fd5b82525081516020918201928201910280838360005b838110156138bc5781810151838201526020016138a4565b5050505090500160405260200180516040519392919084600160201b8211156138e457600080fd5b9083019060208201858111156138f957600080fd5b82518660208202830111600160201b8211171561391557600080fd5b82525081516020918201928201910280838360005b8381101561394257818101518382015260200161392a565b5050505090500160405260200180516040519392919084600160201b82111561396a57600080fd5b90830190602082018581111561397f57600080fd5b82518660208202830111600160201b8211171561399b57600080fd5b82525081516020918201928201910280838360005b838110156139c85781810151838201526020016139b0565b50505050905001604052505050955095505050935093506139f6600c54600b546131b590919063ffffffff16565b955042861115613a0857429450613a1a565b600c54600b54613a17916131b5565b94505b613a40818981518110613a2957fe5b6020026020010151866133e890919063ffffffff16565b95506000600760009054906101000a90046001600160a01b03166001600160a01b031663e5c468696040518163ffffffff1660e01b815260040160206040518083038186803b158015613a9257600080fd5b505afa158015613aa6573d6000803e3d6000fd5b505050506040513d6020811015613abc57600080fd5b50519050613ac86141d3565b838a81518110613ad457fe5b602002602001015181600060038110613ae957fe5b60200201528881600160200201528181600260200201526009548810613b3c57613b3c8b868c81518110613b1957fe5b6020026020010151888d81518110613b2d57fe5b6020026020010151848c613c45565b5050505050505050505050565b60008183613bd55760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613b9a578181015183820152602001613b82565b50505050905090810190601f168015613bc75780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581613be157fe5b0495945050505050565b60008184841115613c3d5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315613b9a578181015183820152602001613b82565b505050900390565b600080613c506141f1565b600954613c5e908590613073565b6020820152600854613c71908590613073565b81528451613c9890613c8d9089808960015b6020020151610f53565b60208301519061315c565b92506000613ca588613386565b90506001600160a01b03871615613e0757613cd568056bc75e2d63100000610fe88860026020020151879061315c565b9250613ce184846133e8565b9350806001600160a01b031663a9059cbb88856040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015613d3a57600080fd5b505af1158015613d4e573d6000803e3d6000fd5b505050506040513d6020811015613d6457600080fd5b50511515600114613dae576040805162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8811985a5b1959608a1b604482015290519081900360640190fd5b806001600160a01b0316613dc061306f565b6040805186815242602082015281516001600160a01b03938416938c16927fcc30edb66a991e48ca3676c277d3a35485ebfaf3016fa9536663b2689c8f5eef928290030190a45b613e138982838761342a565b60015b600a5460ff8216101561417c57600a8160ff1681548110613e3357fe5b600091825260209091200154835110614172576000613e816018613e7b6001600a8660ff1681548110613e6257fe5b90600052602060002001546133e890919063ffffffff16565b9061315c565b90506000613e97828660016020020151906133e8565b600754604080516314e734ed60e21b81526001600160a01b038f8116600483015260ff881660248301529151939450600093919092169163539cd3b4916044808301926020929190829003018186803b158015613ef357600080fd5b505afa158015613f07573d6000803e3d6000fd5b505050506040513d6020811015613f1d57600080fd5b505190506001600160a01b03808216908d1614801590613fbb5750600754604080516314291f5b60e11b81526001600160a01b038f811660048301528481166024830152915191909216916328523eb6916044808301926020929190829003018186803b158015613f8d57600080fd5b505afa158015613fa1573d6000803e3d6000fd5b505050506040513d6020811015613fb757600080fd5b5051155b15614164578951613fdb90613fd4908e848e6001613c83565b839061315c565b97506000613fe882613386565b90506001600160a01b038c16156141565761401868056bc75e2d63100000610fe88d600260200201518c9061315c565b975061402489896133e8565b9850806001600160a01b031663a9059cbb8d8a6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561407d57600080fd5b505af1158015614091573d6000803e3d6000fd5b505050506040513d60208110156140a757600080fd5b505115156001146140f1576040805162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8811985a5b1959608a1b604482015290519081900360640190fd5b806001600160a01b031661410361306f565b6001600160a01b03168d6001600160a01b03167fcc30edb66a991e48ca3676c277d3a35485ebfaf3016fa9536663b2689c8f5eef8b42604051808381526020018281526020019250505060405180910390a45b6141628e8e838c61342a565b505b836001019350505050614177565b61417c565b613e16565b50505050505050505050565b8280548282559060005260206000209081019282156141c3579160200282015b828111156141c35782518255916020019190600101906141a8565b506141cf92915061420f565b5090565b60405180606001604052806003906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b5b808211156141cf576000815560010161421056fe5341464557495448445241573a20496e73756666696369656e742042616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737353454e44203a20496e73756666696369656e74205265776172642042616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572554e5354414b45203a20416c726561647920436c61696d656420286f722920496e73756666696369656e74205374616b6564454d455247454e4359203a20416c726561647920436c61696d656420286f722920496e73756666696369656e74205374616b6564a2646970667358221220a802112114a5f66a2f113a2b88e09c1113b62cbdf9e0002c3da7b1a218ef136064736f6c634300070600334f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373436f686f7274466163746f72793a20696e76616c696420636f686f727420616464726573732ea2646970667358221220f69eb496132bd744968f6341e8e163600f6e24d7e7918c1e4a4c234829bb0bc664736f6c63430007060033
Deployed Bytecode Sourcemap
31836:1051:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3310:21;;;:::i;:::-;;;;-1:-1:-1;;;;;3310:21:0;;;;;;;;;;;;;;32263:621;;;;;;;;;;;;;;;;-1:-1:-1;;;;;32263:621:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32263:621:0;;-1:-1:-1;32263:621:0;;-1:-1:-1;;;;;32263:621:0:i;2089:80::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;31941:50;;;;;;;;;;;;;;;;-1:-1:-1;31941:50:0;-1:-1:-1;;;;;31941:50:0;;:::i;4449:122::-;;;:::i;:::-;;3284:21;;;:::i;4716:269::-;;;;;;;;;;;;;;;;-1:-1:-1;4716:269:0;-1:-1:-1;;;;;4716:269:0;;:::i;3310:21::-;;;-1:-1:-1;;;;;3310:21:0;;:::o;32263:621::-;32389:7;3823:12;:10;:12::i;:::-;3813:6;;;;;-1:-1:-1;;;;;3813:6:0;;;:22;;;3797:88;;;;;-1:-1:-1;;;3797:88:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;32421:20:0;::::1;32405:92;;;;-1:-1:-1::0;;;32405:92:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32506:19;32555:6;32563:12;:10;:12::i;:::-;32585:4;32544:47;;;;;:::i;:::-;-1:-1:-1::0;;;;;32544:47:0;;::::1;::::0;;;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;;;;;;;;;-1:-1:-1;32544:47:0::1;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;;;;;32607:23:0;;::::1;;::::0;;;:15:::1;:23;::::0;;;;;;;:37;;-1:-1:-1;;;;;;32607:37:0::1;::::0;;::::1;::::0;;::::1;::::0;;32672:56;;-1:-1:-1;;;32672:56:0;;;::::1;;::::0;;;;::::1;::::0;::::1;::::0;;;;;;;;;;;32607:37;;-1:-1:-1;32607:37:0;;32672:32:::1;::::0;:56;;;;;;;;;;;;;::::1;::::0;;::::1;::::0;;;;;;;::::1;;;;;;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;;32767:6:0::1;::::0;;-1:-1:-1;;;;;32742:109:0;;::::1;32797:23:::0;;;:15:::1;32672:56;32797:23:::0;;;;;;;;;32742:109;;32797:23;;::::1;32742:109:::0;;32829:15:::1;32742:109:::0;;::::1;::::0;;;;;;;;32767:6:::1;::::0;;::::1;::::0;;::::1;::::0;32742:109:::1;::::0;;;;;;::::1;32867:11:::0;32263:621;-1:-1:-1;;;;32263:621:0:o;2089:80::-;2136:4;2156:7;;;2089:80;:::o;31941:50::-;;;;;;;;;;;;-1:-1:-1;;;;;31941:50:0;;:::o;4449:122::-;4038:12;:10;:12::i;:::-;4028:6;;-1:-1:-1;;;;;4028:6:0;;;:22;;;4012:88;;;;;-1:-1:-1;;;4012:88:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4536:6:::1;::::0;::::1;4528::::0;;4507:36:::1;::::0;-1:-1:-1;;;;;4536:6:0;;::::1;::::0;::::1;4528::::0;;::::1;::::0;;::::1;::::0;4507:36:::1;::::0;::::1;4559:6;::::0;::::1;4550:15:::0;;-1:-1:-1;;;;;4559:6:0;;::::1;;4550:15;-1:-1:-1::0;;;;;;4550:15:0;;::::1;::::0;;;::::1;::::0;;4449:122::o;3284:21::-;;;;;;-1:-1:-1;;;;;3284:21:0;;:::o;4716:269::-;3823:12;:10;:12::i;:::-;3813:6;;;;;-1:-1:-1;;;;;3813:6:0;;;:22;;;3797:88;;;;;-1:-1:-1;;;3797:88:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4827:22:0;::::1;4811:94;;;;-1:-1:-1::0;;;4811:94:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4938:6;::::0;;4917:38:::1;::::0;-1:-1:-1;;;;;4917:38:0;;::::1;::::0;4938:6:::1;::::0;;::::1;;::::0;4917:38:::1;::::0;::::1;4962:6;:17:::0;;-1:-1:-1;;;;;4962:17:0;;::::1;;;-1:-1:-1::0;;;;;;4962:17:0;;::::1;::::0;;;::::1;::::0;;4716:269::o;708:123::-;815:10;708:123;:::o;-1:-1:-1:-;;;;;;;;:::o
Swarm Source
ipfs://f69eb496132bd744968f6341e8e163600f6e24d7e7918c1e4a4c234829bb0bc6
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.