ERC-20
Loans
Overview
Max Total Supply
1,000,000 TAKE
Holders
326 (0.00%)
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
101.492639547336444579 TAKEValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
DecentralizedAutonomousTrust
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; import "./math/BigDiv.sol"; import "./math/Sqrt.sol"; import "./Take.sol"; import "./uniswap/IUniswapV2Router02.sol"; import "./uniswap/IUniswapV2Factory.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/token/ERC20/TokenTimelock.sol"; /** * @title Decentralized Autonomous Trust * This contract is a modified version of the implementation provided by Fairmint for a * Decentralized Autonomous Trust as described in the continuous * organization whitepaper (https://github.com/c-org/whitepaper) and * specified here: https://github.com/fairmint/c-org/wiki. * Code from : https://github.com/Fairmint/c-org/blob/dfd3129f9bce8717406aba54d1f1888d8e253dbb/contracts/DecentralizedAutonomousTrust.sol * Changes Added: https://github.com/Fairmint/c-org/commit/60bb63b9112a82996f275a75a87c28b1d73e3f11 * * Use at your own risk. */ contract DecentralizedAutonomousTrust is Take { using SafeMath for uint; using Sqrt for uint; using SafeERC20 for IERC20; /** * Events */ event Buy( address indexed _from, address indexed _to, uint256 _currencyValue, uint256 _fairValue ); event Close(); event StateChange( uint256 _previousState, uint256 _newState ); event UpdateConfig( address indexed _beneficiary, address indexed _control, address _uniswapRouterAddress, address _uniswapFactoryAddress, uint256 _minInvestment, uint256 _openUntilAtLeast ); // Constants // The default state uint256 private constant STATE_INIT = 0; // The state after initGoal has been reached uint256 private constant STATE_RUN = 1; // The state after closed by the `beneficiary` account from STATE_RUN uint256 private constant STATE_CLOSE = 2; // The state after closed by the `beneficiary` account from STATE_INIT uint256 private constant STATE_CANCEL = 3; // When multiplying 2 terms, the max value is 2^128-1 uint256 private constant MAX_BEFORE_SQUARE = 2**128 - 1; // The denominator component for values specified in basis points. uint256 private constant BASIS_POINTS_DEN = 10000; // The max `totalSupply` // @dev This limit ensures that the DAT's formulas do not overflow (<MAX_BEFORE_SQUARE/2) uint256 private constant MAX_SUPPLY = 10 ** 38; /** * Data for DAT business logic */ /// @notice The address of the beneficiary organization which receives the investments. /// Points to the wallet of the organization. address payable public beneficiary; /// @notice The buy slope of the bonding curve. /// Does not affect the financial model, only the granularity of TAKE. /// @dev This is the numerator component of the fractional value. uint256 public buySlopeNum; /// @notice The buy slope of the bonding curve. /// Does not affect the financial model, only the granularity of TAKE. /// @dev This is the denominator component of the fractional value. uint256 public buySlopeDen; /// @notice The address from which the updatable variables can be updated address public control; /// @notice The address of the token used as reserve in the bonding curve /// (e.g. the DAI contract). Use ETH if 0. IERC20 public currency; /// @notice The initial fundraising goal (expressed in TAKE) to start the c-org. /// `0` means that there is no initial fundraising and the c-org immediately moves to run state. uint256 public initGoal; uint256 public initReserve; /// @notice The bonding curve fundraising goal. uint256 public bcGoal; /// @notice The bonding curve fundraising final result. uint256 public bcTakeReleased; /// @notice The investment reserve of the c-org. Defines the percentage of the value invested that is /// automatically funneled and held into the buyback_reserve expressed in basis points. uint256 public investmentReserveBasisPoints; /// @notice The earliest date/time (in seconds) that the DAT may enter the `CLOSE` state, ensuring /// that if the DAT reaches the `RUN` state it will remain running for at least this period of time. /// @dev This value may be increased anytime by the control account uint256 public openUntilAtLeast; /// @notice The minimum amount of `currency` investment accepted. uint256 public minInvestment; /// @notice The current state of the contract. /// @dev See the constants above for possible state values. uint256 public state; string public constant version = "2"; // --- EIP712 niceties --- // Original source: https://etherscan.io/address/0x6b175474e89094c44da98b954eedeac495271d0f#code // mapping (address => uint) public nonces; bytes32 public DOMAIN_SEPARATOR; // bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)"); bytes32 public constant PERMIT_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb; address public uniswapFactoryAddress; address public uniswapRouterAddress; IUniswapV2Router02 private uniswapRouter; IUniswapV2Factory private uniswapFactory; address internal constant NULL_ADDRESS = 0x0000000000000000000000000000000000000000; uint96 private constant uniswapBurnRate = 1000; address public uniswapPairAddress = 0x0000000000000000000000000000000000000000; address public uniswapTokenTimelockAddress = 0x0000000000000000000000000000000000000000; address public takeTimelockAddress = 0x0000000000000000000000000000000000000000; // Team Revenue in percent uint256 private constant teamRevenueBasisPoints = 3000; // bool public bcFlowAllowed = false; /// Pay /// @notice Pay the organization on-chain without minting any tokens. /// @dev This allows you to add funds directly to the buybackReserve. function pay() external payable { require(address(currency) == address(0), "ONLY_FOR_CURRENCY_ETH"); } function handleBC( bool withdrawOnError ) external { require(state == STATE_CLOSE, "ONLY_AFTER_CLOSE"); require(msg.sender == beneficiary, "BENEFICIARY_ONLY"); uint256 reserve = address(this).balance; require(reserve > 0, "MUST_BUY_AT_LEAST_1"); uint256 teamReserve = reserve.mul(teamRevenueBasisPoints); teamReserve /= BASIS_POINTS_DEN; uint256 uniswapPoolEthAmount = reserve.sub(teamReserve); uint256 uniswapPoolTakeAmount = uniswapPoolEthAmount.mul(buySlopeDen); uniswapPoolTakeAmount = uniswapPoolTakeAmount.div(bcTakeReleased); uniswapPoolTakeAmount = uniswapPoolTakeAmount.div(buySlopeNum); super._allowTokenTransfer(); super._approve(address(this), uniswapRouterAddress, uint(-1)); try uniswapRouter.addLiquidityETH{ value: uniswapPoolEthAmount }( address(this), uniswapPoolTakeAmount, uniswapPoolTakeAmount, uniswapPoolEthAmount, address(this), block.timestamp + 15 ) returns (uint256 amountToken, uint256 amountETH, uint256 liquidity) { Address.sendValue(beneficiary, address(this).balance); uniswapPairAddress = uniswapFactory.getPair(uniswapRouter.WETH(), address(this)); super._setBurnConfig(uniswapBurnRate, NULL_ADDRESS); super._addBurnSaleAddress(uniswapPairAddress); super._setApproveConfig(NULL_ADDRESS); lockTakeTokens(); } catch { if (withdrawOnError) { Address.sendValue(beneficiary, address(this).balance); uint96 amount = safe96(this.balanceOf(address(this)), "DAT:: amount exceeds 96 bits"); super._transferTokens(address(this), beneficiary, amount); } } } function lockUniswapTokens() external { require(state == STATE_CLOSE, "ONLY_AFTER_CLOSE"); require(msg.sender == beneficiary, "BENEFICIARY_ONLY"); IERC20 uniswapPair = IERC20(uniswapPairAddress); TokenTimelock uniswapTokenTimelock = new TokenTimelock(uniswapPair, beneficiary, block.timestamp + 31 days); uniswapTokenTimelockAddress = address(uniswapTokenTimelock); uniswapPair.transfer(uniswapTokenTimelockAddress, uniswapPair.balanceOf(address(this)) ); } // --- Approve by signature --- // Original source: https://etherscan.io/address/0x6b175474e89094c44da98b954eedeac495271d0f#code function permit( address holder, address spender, uint256 nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s ) external { bytes32 digest = keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR, keccak256( abi.encode(PERMIT_TYPEHASH, holder, spender, nonce, expiry, allowed ) ) ) ); require(holder != address(0), "DAT/invalid-address-0"); require(holder == ecrecover(digest, v, r, s), "DAT/invalid-permit"); require(expiry == 0 || now <= expiry, "DAT/permit-expired"); require(nonce == nonces[holder]++, "DAT/invalid-nonce"); uint256 wad = allowed ? uint(-1) : 0; super._approve(holder, spender, wad); } /** * Config / Control */ /// @notice Called once after deploy to set the initial configuration. /// None of the values provided here may change once initially set. /// @dev using the init pattern in order to support zos upgrades function initialize( address _currencyAddress, uint256 _initGoal, uint256 _bcGoal, uint256 _buySlopeNum, uint256 _buySlopeDen, uint256 _investmentReserveBasisPoints ) public { require(control == address(0), "ALREADY_INITIALIZED"); initReserve = 0; // Set initGoal, which in turn defines the initial state if(_initGoal == 0) { emit StateChange(state, STATE_RUN); state = STATE_RUN; } else { // Math: If this value got too large, the DAT would overflow on sell require(_initGoal < MAX_SUPPLY, "EXCESSIVE_GOAL"); initGoal = _initGoal; } require(_bcGoal > 0, "INVALID_BC_GOAL"); bcGoal = _bcGoal; bcTakeReleased = 0; require(_buySlopeNum > 0, "INVALID_SLOPE_NUM"); require(_buySlopeDen > 0, "INVALID_SLOPE_DEN"); require(_buySlopeNum < MAX_BEFORE_SQUARE, "EXCESSIVE_SLOPE_NUM"); require(_buySlopeDen < MAX_BEFORE_SQUARE, "EXCESSIVE_SLOPE_DEN"); buySlopeNum = _buySlopeNum; buySlopeDen = _buySlopeDen; // 100% or less require(_investmentReserveBasisPoints <= BASIS_POINTS_DEN, "INVALID_RESERVE"); investmentReserveBasisPoints = _investmentReserveBasisPoints; // Set default values (which may be updated using `updateConfig`) minInvestment = 1 ether; beneficiary = msg.sender; control = msg.sender; // Save currency currency = IERC20(_currencyAddress); // Initialize permit DOMAIN_SEPARATOR = keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(name)), keccak256(bytes(version)), _getChainId(), address(this) ) ); } function updateConfig( address payable _beneficiary, address _control, address _uniswapRouterAddress, address _uniswapFactoryAddress, uint256 _minInvestment, uint256 _openUntilAtLeast ) public { // This require(also confirms that initialize has been called. require(msg.sender == control, "CONTROL_ONLY"); require(_control != address(0), "INVALID_ADDRESS"); control = _control; require(_uniswapRouterAddress != address(0), "INVALID_ADDRESS"); uniswapRouterAddress = _uniswapRouterAddress; require(_uniswapFactoryAddress != address(0), "INVALID_ADDRESS"); uniswapFactoryAddress = _uniswapFactoryAddress; uniswapRouter = IUniswapV2Router02(uniswapRouterAddress); uniswapFactory = IUniswapV2Factory(uniswapFactoryAddress); require(_minInvestment > 0, "INVALID_MIN_INVESTMENT"); minInvestment = _minInvestment; require(_openUntilAtLeast >= openUntilAtLeast, "OPEN_UNTIL_MAY_NOT_BE_REDUCED"); openUntilAtLeast = _openUntilAtLeast; if(beneficiary != _beneficiary) { require(_beneficiary != address(0), "INVALID_ADDRESS"); uint256 tokens = balances[beneficiary]; if(tokens > 0) { _transfer(beneficiary, _beneficiary, tokens); } beneficiary = _beneficiary; } emit UpdateConfig( _beneficiary, _control, _uniswapRouterAddress, _uniswapFactoryAddress, _minInvestment, _openUntilAtLeast ); } function allowBcFlow() public { require(msg.sender == beneficiary, "BENEFICIARY_ONLY"); bcFlowAllowed = true; } /** * Functions for our business logic */ // Buy /// @notice Calculate how many TAKE tokens you would buy with the given amount of currency if `buy` was called now. /// @param _currencyValue How much currency to spend in order to buy TAKE. function estimateBuyValue( uint256 _currencyValue ) public view returns (uint) { if(_currencyValue < minInvestment) { return 0; } /// Calculate the tokenValue for this investment uint256 tokenValue; if(state == STATE_RUN) { uint256 supply = bcTakeReleased; // Math: worst case // MAX * 2 * MAX_BEFORE_SQUARE // / MAX_BEFORE_SQUARE tokenValue = BigDiv.bigDiv2x1( _currencyValue, 2 * buySlopeDen, buySlopeNum ); // Math: worst case MAX + (MAX_BEFORE_SQUARE * MAX_BEFORE_SQUARE) tokenValue = tokenValue.add(supply * supply); tokenValue = tokenValue.sqrt(); // Math: small chance of underflow due to possible rounding in sqrt tokenValue = tokenValue.sub(supply); } else { // invalid state return 0; } return tokenValue; } function estimateBuyTokensValue ( uint256 _tokenValue ) public view returns (uint) { /// Calculate the investment to buy _tokenValue uint256 currencyValue; if(state == STATE_RUN) { uint256 supply = bcTakeReleased; uint256 tokenValue = _tokenValue.add(supply); tokenValue = tokenValue.mul(tokenValue); tokenValue = tokenValue.sub(supply * supply); currencyValue = BigDiv.bigDiv2x1( tokenValue, buySlopeNum, 2 * buySlopeDen ); } else { // invalid state return 0; } return currencyValue; } /// @notice Purchase TAKE tokens with the given amount of currency. /// @param _to The account to receive the TAKE tokens from this purchase. /// @param _currencyValue How much currency to spend in order to buy TAKE. /// @param _minTokensBought Buy at least this many TAKE tokens or the transaction reverts. /// @dev _minTokensBought is necessary as the price will change if some elses transaction mines after /// yours was submitted. function buy( address _to, uint256 _currencyValue, uint256 _minTokensBought ) public payable { require(bcFlowAllowed, "TOKEN_SALE_NOT_STARTED"); require(_to != address(0), "INVALID_ADDRESS"); require(_minTokensBought > 0, "MUST_BUY_AT_LEAST_1"); require(bcGoal >= bcTakeReleased, "BC_GOAL_REACHED"); bool closeAfterBuy = false; // Calculate the tokenValue for this investment uint256 tokenValue = estimateBuyValue(_currencyValue); if (bcTakeReleased.add(tokenValue) >= bcGoal) { closeAfterBuy = true; tokenValue = bcGoal.sub(bcTakeReleased); _currencyValue = estimateBuyTokensValue(tokenValue); } require(tokenValue >= _minTokensBought, "PRICE_SLIPPAGE"); emit Buy(msg.sender, _to, _currencyValue, tokenValue); _collectInvestment(_currencyValue, msg.value, true); super._transferTokens(address(this), _to, safe96(tokenValue, "DAT:: amount exceeds 96 bits")); bcTakeReleased = bcTakeReleased.add(tokenValue); if(state == STATE_RUN && closeAfterBuy) { _close(); } } /// Close /// @notice Called by the beneficiary account to STATE_CLOSE or STATE_CANCEL the c-org. function close() public { require(msg.sender == beneficiary, "BENEFICIARY_ONLY"); _close(); } /** * Functions required by the ERC-20 token standard */ /// @dev Moves tokens from one account to another if authorized. function _transfer( address _from, address _to, uint256 _amount ) internal { require(state != STATE_INIT || _from == beneficiary, "ONLY_BENEFICIARY_DURING_INIT"); uint96 amount = safe96(_amount, "DAT::transfer: amount exceeds 96 bits"); super._transferTokens(_from, _to, amount); } function _close() private { if(state == STATE_INIT) { // Allow the org to cancel anytime if the initGoal was not reached. emit StateChange(state, STATE_CANCEL); state = STATE_CANCEL; } else if(state == STATE_RUN) { require(openUntilAtLeast <= block.timestamp, "TOO_EARLY"); emit StateChange(state, STATE_CLOSE); state = STATE_CLOSE; } else { revert("INVALID_STATE"); } emit Close(); } /** * Transaction Helpers */ /// @notice Confirms the transfer of `_quantityToInvest` currency to the contract. function _collectInvestment( uint256 _quantityToInvest, uint256 _msgValue, bool _refundRemainder ) private { if(address(currency) == address(0)) { // currency is ETH if(_refundRemainder) { // Math: if _msgValue was not sufficient then revert uint256 refund = _msgValue.sub(_quantityToInvest); if(refund > 0) { Address.sendValue(msg.sender, refund); } } else { require(_quantityToInvest == _msgValue, "INCORRECT_MSG_VALUE"); } } else { // currency is ERC20 require(_msgValue == 0, "DO_NOT_SEND_ETH"); currency.safeTransferFrom(msg.sender, address(this), _quantityToInvest); } } /// @dev Send `_amount` currency from the contract to the `_to` account. function _transferCurrency( address payable _to, uint256 _amount ) private { if(_amount > 0) { if(address(currency) == address(0)) { Address.sendValue(_to, _amount); } else { currency.safeTransfer(_to, _amount); } } } function _getChainId( ) private pure returns (uint256 id) { // solium-disable-next-line assembly { id := chainid() } } function lockTakeTokens() private { require(state == STATE_CLOSE, "ONLY_AFTER_CLOSE"); require(msg.sender == beneficiary, "BENEFICIARY_ONLY"); TokenTimelock takeTokenTimelock = new TokenTimelock(IERC20(address(this)), beneficiary, block.timestamp + 31 days); takeTimelockAddress = address(takeTokenTimelock); this.transfer(takeTimelockAddress, this.balanceOf(address(this)) ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "@openzeppelin/contracts/math/SafeMath.sol"; /** * @title Reduces the size of terms before multiplication, to avoid an overflow, and then * restores the proper size after division. * @notice This effectively allows us to overflow values in the numerator and/or denominator * of a fraction, so long as the end result does not overflow as well. * @dev Results may be off by 1 + 0.000001% for 2x1 calls and 2 + 0.00001% for 2x2 calls. * Do not use if your contract expects very small result values to be accurate. */ library BigDiv { using SafeMath for uint256; // @notice The max possible value uint256 private constant MAX_UINT = 2**256 - 1; // @notice When multiplying 2 terms <= this value the result won't overflow uint256 private constant MAX_BEFORE_SQUARE = 2**128 - 1; // @notice The max error target is off by 1 plus up to 0.000001% error // for bigDiv2x1 and that `* 2` for bigDiv2x2 uint256 private constant MAX_ERROR = 100000000; // @notice A larger error threshold to use when multiple rounding errors may apply uint256 private constant MAX_ERROR_BEFORE_DIV = MAX_ERROR * 2; /** * @notice Returns the approx result of `a * b / d` so long as the result is <= MAX_UINT * @param _numA the first numerator term * @param _numB the second numerator term * @param _den the denominator * @return the approx result with up to off by 1 + MAX_ERROR, rounding down if needed */ function bigDiv2x1( uint256 _numA, uint256 _numB, uint256 _den ) internal pure returns(uint256) { if(_numA == 0 || _numB == 0) { // would div by 0 or underflow if we don't special case 0 return 0; } uint256 value; if(MAX_UINT / _numA >= _numB) { // a*b does not overflow, return exact math value = _numA * _numB; value /= _den; return value; } // Sort numerators uint256 numMax = _numB; uint256 numMin = _numA; if(_numA > _numB) { numMax = _numA; numMin = _numB; } value = numMax / _den; if(value > MAX_ERROR) { // _den is small enough to be MAX_ERROR or better w/o a factor value = value.mul(numMin); return value; } // formula = ((a / f) * b) / (d / f) // factor >= a / sqrt(MAX) * (b / sqrt(MAX)) uint256 factor = numMin - 1; factor /= MAX_BEFORE_SQUARE; factor += 1; uint256 temp = numMax - 1; temp /= MAX_BEFORE_SQUARE; temp += 1; if(MAX_UINT / factor >= temp) { factor *= temp; value = numMax / factor; if(value > MAX_ERROR_BEFORE_DIV) { value = value.mul(numMin); temp = _den - 1; temp /= factor; temp = temp.add(1); value /= temp; return value; } } // formula: (a / (d / f)) * (b / f) // factor: b / sqrt(MAX) factor = numMin - 1; factor /= MAX_BEFORE_SQUARE; factor += 1; value = numMin / factor; temp = _den - 1; temp /= factor; temp += 1; temp = numMax / temp; value = value.mul(temp); return value; } /** * @notice Returns the approx result of `a * b / d` so long as the result is <= MAX_UINT * @param _numA the first numerator term * @param _numB the second numerator term * @param _den the denominator * @return the approx result with up to off by 1 + MAX_ERROR, rounding down if needed * @dev roundUp is implemented by first rounding down and then adding the max error to the result */ function bigDiv2x1RoundUp( uint256 _numA, uint256 _numB, uint256 _den ) internal pure returns(uint256) { // first get the rounded down result uint256 value = bigDiv2x1(_numA, _numB, _den); if(value == 0) { // when the value rounds down to 0, assume up to an off by 1 error return 1; } // round down has a max error of MAX_ERROR, add that to the result // for a round up error of <= MAX_ERROR uint256 temp = value - 1; temp /= MAX_ERROR; temp += 1; if(MAX_UINT - value < temp) { // value + error would overflow, return MAX return MAX_UINT; } value += temp; return value; } /** * @notice Returns the approx result of `a * b / (c * d)` so long as the result is <= MAX_UINT * @param _numA the first numerator term * @param _numB the second numerator term * @param _denA the first denominator term * @param _denB the second denominator term * @return the approx result with up to off by 2 + MAX_ERROR*10 error, rounding down if needed * @dev this uses bigDiv2x1 and adds additional rounding error so the max error of this * formula is larger */ function bigDiv2x2( uint256 _numA, uint256 _numB, uint256 _denA, uint256 _denB ) internal pure returns (uint256) { if(MAX_UINT / _denA >= _denB) { // denA*denB does not overflow, use bigDiv2x1 instead return bigDiv2x1(_numA, _numB, _denA * _denB); } if(_numA == 0 || _numB == 0) { // would div by 0 or underflow if we don't special case 0 return 0; } // Sort denominators uint256 denMax = _denB; uint256 denMin = _denA; if(_denA > _denB) { denMax = _denA; denMin = _denB; } uint256 value; if(MAX_UINT / _numA >= _numB) { // a*b does not overflow, use `a / d / c` value = _numA * _numB; value /= denMin; value /= denMax; return value; } // `ab / cd` where both `ab` and `cd` would overflow // Sort numerators uint256 numMax = _numB; uint256 numMin = _numA; if(_numA > _numB) { numMax = _numA; numMin = _numB; } // formula = (a/d) * b / c uint256 temp = numMax / denMin; if(temp > MAX_ERROR_BEFORE_DIV) { return bigDiv2x1(temp, numMin, denMax); } // formula: ((a/f) * b) / d then either * f / c or / c * f // factor >= a / sqrt(MAX) * (b / sqrt(MAX)) uint256 factor = numMin - 1; factor /= MAX_BEFORE_SQUARE; factor += 1; temp = numMax - 1; temp /= MAX_BEFORE_SQUARE; temp += 1; if(MAX_UINT / factor >= temp) { factor *= temp; value = numMax / factor; if(value > MAX_ERROR_BEFORE_DIV) { value = value.mul(numMin); value /= denMin; if(value > 0 && MAX_UINT / value >= factor) { value *= factor; value /= denMax; return value; } } } // formula: (a/f) * b / ((c*d)/f) // factor >= c / sqrt(MAX) * (d / sqrt(MAX)) factor = denMin; factor /= MAX_BEFORE_SQUARE; temp = denMax; // + 1 here prevents overflow of factor*temp temp /= MAX_BEFORE_SQUARE + 1; factor *= temp; return bigDiv2x1(numMax / factor, numMin, MAX_UINT); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @title Calculates the square root of a given value. * @dev Results may be off by 1. */ library Sqrt { // The max possible value uint256 private constant MAX_UINT = 2**256 - 1; // Source: https://github.com/ethereum/dapp-bin/pull/50 function sqrt( uint x ) internal pure returns (uint y) { if (x == 0) { return 0; } else if (x <= 3) { return 1; } else if (x == MAX_UINT) { // Without this we fail on x + 1 below return 2**128 - 1; } uint z = (x + 1) / 2; y = x; while (z < y) { y = z; z = (x / z + z) / 2; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract Take is Ownable { using SafeMath for uint; /// @notice EIP-20 token name for this token string public constant name = "Take"; /// @notice EIP-20 token symbol for this token string public constant symbol = "TAKE"; /// @notice EIP-20 token decimals for this token uint8 public constant decimals = 18; /// @notice Total number of tokens in circulation uint256 public totalSupply; // Allowance amounts on behalf of others mapping (address => mapping (address => uint96)) internal allowances; // Official record of token balances for each account mapping (address => uint96) internal balances; /// @notice A record of each accounts delegate mapping (address => address) public delegates; /// @notice A checkpoint for marking number of votes from a given block struct Checkpoint { uint32 fromBlock; uint96 votes; } /// @notice A record of votes checkpoints for each account, by index mapping (address => mapping (uint32 => Checkpoint)) public checkpoints; /// @notice The number of checkpoints for each account mapping (address => uint32) public numCheckpoints; /// @notice A record of states for signing / validating signatures mapping (address => uint) public nonces; /// @notice An event thats emitted when an burn config changed event BurnConfigChanged(uint96 burnRate, address burnPoolAddress); /// @notice An event thats emitted when an account changes its delegate event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /// @notice An event thats emitted when a delegate account's vote balance changes event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance); /// @notice The standard EIP-20 transfer event event Transfer(address indexed from, address indexed to, uint256 amount); /// @notice The standard EIP-20 approval event event Approval(address indexed owner, address indexed spender, uint256 amount); // additional variables for use if transaction fees ever became necessary uint96 public burnRate; address public burnPoolAddress; uint96 public constant burnRateBase = 10000; address public approveDisabledAddress; bool public tokenTransferAllowed = false; mapping (address => bool) public burnSaleAddresses; /** * @notice Construct a new Take token */ constructor() public { uint96 _totalSupply = 1000000e18; totalSupply = _totalSupply; balances[msg.sender] = _totalSupply; emit Transfer(address(0), msg.sender, _totalSupply); burnRate = 0; burnPoolAddress = 0x0000000000000000000000000000000000000000; approveDisabledAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; } function setBurnConfig(uint96 _burnRate, address _burnPoolAddress) external onlyOwner { _setBurnConfig(_burnRate, _burnPoolAddress); } function addBurnSaleAddress(address burnAddress) external onlyOwner { _addBurnSaleAddress(burnAddress); } function removeBurnSaleAddress(address burnAddress) external onlyOwner { burnSaleAddresses[burnAddress] = false; } function setApproveConfig(address _approveDisabledAddress) external onlyOwner { _setApproveConfig(_approveDisabledAddress); } function allowTokenTransfer() external onlyOwner { _allowTokenTransfer(); } /** * @notice Get the number of tokens `spender` is approved to spend on behalf of `account` * @param account The address of the account holding the funds * @param spender The address of the account spending the funds * @return The number of tokens approved */ function allowance(address account, address spender) external view returns (uint) { return allowances[account][spender]; } /** * @notice Approve `spender` to transfer up to `amount` from `src` * @dev This will overwrite the approval amount for `spender` * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) * @param spender The address of the account which may transfer tokens * @param rawAmount The number of tokens that are approved (2^256-1 means infinite) * @return Whether or not the approval succeeded */ function approve(address spender, uint256 rawAmount) external returns (bool) { require(approveDisabledAddress != spender, "Take::approve: disabled"); uint96 amount; if (rawAmount == uint(-1)) { amount = uint96(-1); } else { amount = safe96(rawAmount, "Take::approve: amount exceeds 96 bits"); } allowances[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } /** * @notice Get the number of tokens held by the `account` * @param account The address of the account to get the balance of * @return The number of tokens held */ function balanceOf(address account) external view returns (uint) { return balances[account]; } /** * @notice Transfer `amount` tokens from `msg.sender` to `dst` * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transfer(address dst, uint256 rawAmount) external returns (bool) { if (msg.sender != owner()) { require(tokenTransferAllowed, "Take:: Token transfer not allowed"); } uint96 amount = safe96(rawAmount, "Take::transfer: amount exceeds 96 bits"); _transferTokens(msg.sender, dst, amount); return true; } /** * @notice Transfer `amount` tokens from `src` to `dst` * @param src The address of the source account * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transferFrom(address src, address dst, uint256 rawAmount) external returns (bool) { if (msg.sender != owner()) { require(tokenTransferAllowed, "Take:: Token transfer not allowed"); } address spender = msg.sender; uint96 spenderAllowance = allowances[src][spender]; uint96 amount = safe96(rawAmount, "Take::approve: amount exceeds 96 bits"); if (spender != src && spenderAllowance != uint96(-1)) { uint96 newAllowance = sub96(spenderAllowance, amount, "Take::transferFrom: transfer amount exceeds spender allowance"); allowances[src][spender] = newAllowance; emit Approval(src, spender, newAllowance); } _transferTokens(src, dst, amount); return true; } /** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */ function getCurrentVotes(address account) external view returns (uint96) { uint32 nCheckpoints = numCheckpoints[account]; return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; } /** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */ function delegate(address delegatee) public { return _delegate(msg.sender, delegatee); } /** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at * @return The number of votes the account had as of the given block */ function getPriorVotes(address account, uint256 blockNumber) public view returns (uint96) { require(blockNumber < block.number, "Take::getPriorVotes: not yet determined"); uint32 nCheckpoints = numCheckpoints[account]; if (nCheckpoints == 0) { return 0; } // First check most recent balance if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) { return checkpoints[account][nCheckpoints - 1].votes; } // Next check implicit zero balance if (checkpoints[account][0].fromBlock > blockNumber) { return 0; } uint32 lower = 0; uint32 upper = nCheckpoints - 1; while (upper > lower) { uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow Checkpoint memory cp = checkpoints[account][center]; if (cp.fromBlock == blockNumber) { return cp.votes; } else if (cp.fromBlock < blockNumber) { lower = center; } else { upper = center - 1; } } return checkpoints[account][lower].votes; } function _delegate(address delegator, address delegatee) internal { address currentDelegate = delegates[delegator]; uint96 delegatorBalance = balances[delegator]; delegates[delegator] = delegatee; emit DelegateChanged(delegator, currentDelegate, delegatee); _moveDelegates(currentDelegate, delegatee, delegatorBalance); } function _transferTokens(address src, address dst, uint96 amount) internal { require(src != address(0), "Take::_transferTokens: cannot transfer from the zero address"); require(dst != address(0), "Take::_transferTokens: cannot transfer to the zero address"); uint96 sendAmount = amount; uint96 burnFee = div96(mul96(burnRate, amount), burnRateBase); if (burnFee >0 && burnSaleAddresses[dst]) { balances[burnPoolAddress] = add96( balances[burnPoolAddress], burnFee, "Take::_transferTokens: transfer amount burnFee overflows" ); sendAmount = sub96(amount, burnFee, "Take::_transferTokens: burnFee > amount"); emit Transfer(src, burnPoolAddress, burnFee); } balances[src] = sub96(balances[src], amount, "Take::_transferTokens: transfer amount exceeds balance"); balances[dst] = add96(balances[dst], sendAmount, "Take::_transferTokens: transfer amount overflows"); emit Transfer(src, dst, sendAmount); _moveDelegates(delegates[src], delegates[dst], amount); } function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal { if (srcRep != dstRep && amount > 0) { if (srcRep != address(0)) { uint32 srcRepNum = numCheckpoints[srcRep]; uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0; uint96 srcRepNew = sub96(srcRepOld, amount, "Take::_moveVotes: vote amount underflows"); _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew); } if (dstRep != address(0)) { uint32 dstRepNum = numCheckpoints[dstRep]; uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0; uint96 dstRepNew = add96(dstRepOld, amount, "Take::_moveVotes: vote amount overflows"); _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew); } } } function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal { uint32 blockNumber = safe32(block.number, "Take::_writeCheckpoint: block number exceeds 32 bits"); if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) { checkpoints[delegatee][nCheckpoints - 1].votes = newVotes; } else { checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes); numCheckpoints[delegatee] = nCheckpoints + 1; } emit DelegateVotesChanged(delegatee, oldVotes, newVotes); } function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) { require(n < 2**32, errorMessage); return uint32(n); } function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) { require(n < 2**96, errorMessage); return uint96(n); } function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { uint96 c = a + b; require(c >= a, errorMessage); return c; } function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { require(b <= a, errorMessage); return a - b; } function mul96(uint96 a, uint96 b) internal pure returns (uint96) { if (a == 0) { return 0; } uint96 c = a * b; require(c / a == b, "multiplication overflow"); return c; } function div96(uint96 a, uint96 b) internal pure returns (uint96) { require(b > 0, "division by zero"); uint96 c = a / b; return c; } function getChainId() internal pure returns (uint) { uint256 chainId; assembly { chainId := chainid() } return chainId; } //DAT Helpers function _approve(address owner, address spender, uint256 rawAmount) internal { require(owner != address(0), "Take::approve: approve from the zero address"); require(spender != address(0), "Take::approve: approve to the zero address"); uint96 amount; if (rawAmount == uint(-1)) { amount = uint96(-1); } else { amount = safe96(rawAmount, "Take::approve: amount exceeds 96 bits"); } allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _addBurnSaleAddress(address burnAddress) internal onlyOwner { burnSaleAddresses[burnAddress] = true; } function _setBurnConfig(uint96 _burnRate, address _burnPoolAddress) internal { burnRate = _burnRate; burnPoolAddress = _burnPoolAddress; emit BurnConfigChanged(burnRate, burnPoolAddress); } function _setApproveConfig(address _approveDisabledAddress) internal { approveDisabledAddress = _approveDisabledAddress; } function _allowTokenTransfer() internal { tokenTransferAllowed = true; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @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; // assert(a == b * c + a % b); // There is no case in which this doesn't hold 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; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./SafeERC20.sol"; /** * @dev A token holder contract that will allow a beneficiary to extract the * tokens after a given release time. * * Useful for simple vesting schedules like "advisors get all of their tokens * after 1 year". */ contract TokenTimelock { using SafeERC20 for IERC20; // ERC20 basic token contract being held IERC20 private _token; // beneficiary of tokens after they are released address private _beneficiary; // timestamp when token release is enabled uint256 private _releaseTime; constructor (IERC20 token_, address beneficiary_, uint256 releaseTime_) public { // solhint-disable-next-line not-rely-on-time require(releaseTime_ > block.timestamp, "TokenTimelock: release time is before current time"); _token = token_; _beneficiary = beneficiary_; _releaseTime = releaseTime_; } /** * @return the token being held. */ function token() public view returns (IERC20) { return _token; } /** * @return the beneficiary of the tokens. */ function beneficiary() public view returns (address) { return _beneficiary; } /** * @return the time when the tokens are released. */ function releaseTime() public view returns (uint256) { return _releaseTime; } /** * @notice Transfers tokens held by timelock to beneficiary. */ function release() public virtual { // solhint-disable-next-line not-rely-on-time require(block.timestamp >= _releaseTime, "TokenTimelock: current time is before release time"); uint256 amount = _token.balanceOf(address(this)); require(amount > 0, "TokenTimelock: no tokens to release"); _token.safeTransfer(_beneficiary, amount); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../GSN/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @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 virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with 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; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint96","name":"burnRate","type":"uint96"},{"indexed":false,"internalType":"address","name":"burnPoolAddress","type":"address"}],"name":"BurnConfigChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_currencyValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_fairValue","type":"uint256"}],"name":"Buy","type":"event"},{"anonymous":false,"inputs":[],"name":"Close","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":true,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","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":"uint256","name":"_previousState","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newState","type":"uint256"}],"name":"StateChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":true,"internalType":"address","name":"_control","type":"address"},{"indexed":false,"internalType":"address","name":"_uniswapRouterAddress","type":"address"},{"indexed":false,"internalType":"address","name":"_uniswapFactoryAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"_minInvestment","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_openUntilAtLeast","type":"uint256"}],"name":"UpdateConfig","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"burnAddress","type":"address"}],"name":"addBurnSaleAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allowBcFlow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allowTokenTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"rawAmount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"approveDisabledAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bcFlowAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bcGoal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bcTakeReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beneficiary","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnPoolAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnRate","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnRateBase","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"burnSaleAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_currencyValue","type":"uint256"},{"internalType":"uint256","name":"_minTokensBought","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"buySlopeDen","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buySlopeNum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint32","name":"","type":"uint32"}],"name":"checkpoints","outputs":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint96","name":"votes","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"close","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"control","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currency","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenValue","type":"uint256"}],"name":"estimateBuyTokensValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_currencyValue","type":"uint256"}],"name":"estimateBuyValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getCurrentVotes","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPriorVotes","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"withdrawOnError","type":"bool"}],"name":"handleBC","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initGoal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_currencyAddress","type":"address"},{"internalType":"uint256","name":"_initGoal","type":"uint256"},{"internalType":"uint256","name":"_bcGoal","type":"uint256"},{"internalType":"uint256","name":"_buySlopeNum","type":"uint256"},{"internalType":"uint256","name":"_buySlopeDen","type":"uint256"},{"internalType":"uint256","name":"_investmentReserveBasisPoints","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"investmentReserveBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockUniswapTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minInvestment","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openUntilAtLeast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pay","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"bool","name":"allowed","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"burnAddress","type":"address"}],"name":"removeBurnSaleAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_approveDisabledAddress","type":"address"}],"name":"setApproveConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint96","name":"_burnRate","type":"uint96"},{"internalType":"address","name":"_burnPoolAddress","type":"address"}],"name":"setBurnConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"state","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"takeTimelockAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenTransferAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"rawAmount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"rawAmount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapFactoryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapPairAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapRouterAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapTokenTimelockAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_beneficiary","type":"address"},{"internalType":"address","name":"_control","type":"address"},{"internalType":"address","name":"_uniswapRouterAddress","type":"address"},{"internalType":"address","name":"_uniswapFactoryAddress","type":"address"},{"internalType":"uint256","name":"_minInvestment","type":"uint256"},{"internalType":"uint256","name":"_openUntilAtLeast","type":"uint256"}],"name":"updateConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040526009805460ff60a01b19169055601d80546001600160a01b0319908116909155601e80549091169055601f80546001600160a81b03191690553480156200004a57600080fd5b506000620000576200013b565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35069d3c21bcecceda100000060018190553360008181526003602052604080822080546001600160601b03191685179055517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90620001019085906200013f565b60405180910390a3506000600855600980546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d17905562000153565b3390565b6001600160601b0391909116815260200190565b61552780620001636000396000f3fe608060405260043610620004165760003560e01c806371b5ee711162000223578063b6d43f181162000127578063d8de658711620000af578063f1127ed81162000079578063f1127ed81462000b26578063f2fde38b1462000b5b578063f3c54e5d1462000b80578063ff66916f1462000b985762000416565b8063d8de65871462000ab9578063dcf81d171462000ad1578063dd62ed3e1462000ae9578063e5a6b10f1462000b0e5762000416565b8063c19d93fb11620000f1578063c19d93fb1462000a4c578063c536395e1462000a64578063d1f786fe1462000a89578063d38f74c51462000aa15762000416565b8063b6d43f1814620009ec578063bd3733fe1462000a04578063be51d2441462000a1c578063bed998501462000a345762000416565b80639a7b412311620001ab578063a71ddd251162000175578063a71ddd251462000965578063a9059cbb146200097d578063b4b5ea5714620009a2578063b6b7e1ba14620009c75762000416565b80639a7b412314620008f95780639df3f4f6146200091e578063a43581ed1462000936578063a59ac6dd146200094e5762000416565b80638ac2c68011620001ed5780638ac2c680146200088c5780638da5cb5b14620008a45780638fcbaf0c14620008bc57806395d89b4114620008e15762000416565b806371b5ee7114620007f6578063782d6fe1146200080e5780637ecebe0014620008425780637f6a693c14620008675762000416565b806335e5cc31116200032b57806358439fa511620002b35780636fcfff45116200027d5780636fcfff4514620007605780637060fc6e146200079457806370a0823114620007b9578063715018a614620007de5762000416565b806358439fa514620006e6578063587cde1e14620006fe5780635c19a95c146200072357806362ded3fa14620007485762000416565b806343d726d611620002f557806343d726d6146200066c578063444b3610146200068457806345ff4c8014620006a957806354fd4d5014620006ce5762000416565b806335e5cc31146200060c5780633644e51514620006245780633655ac3c146200063c57806338af3eed14620006545762000416565b80631f479d8411620003af5780632631543811620003795780632631543814620005905780632e872bb314620005a857806330adf81f14620005cd578063313ce56714620005e55762000416565b80631f479d84146200051457806320ca3c7f146200052c57806323b872dd146200055357806324e4c90914620005785762000416565b80630d5c0c5611620003f15780630d5c0c5614620004a657806313484ca814620004cb57806318160ddd14620004f25780631b9265b8146200050a5762000416565b806301541ac6146200041b57806306fdde031462000442578063095ea7b31462000472575b600080fd5b3480156200042857600080fd5b50620004406200043a36600462003f17565b62000bb0565b005b3480156200044f57600080fd5b506200045a62000fd9565b6040516200046991906200417e565b60405180910390f35b3480156200047f57600080fd5b50620004976200049136600462003e2b565b62000ff9565b604051620004699190620040ea565b348015620004b357600080fd5b5062000497620004c536600462003c66565b620010f2565b348015620004d857600080fd5b50620004e362001107565b604051620004699190620040f5565b348015620004ff57600080fd5b50620004e36200110d565b6200044062001113565b3480156200052157600080fd5b506200044062001141565b3480156200053957600080fd5b506200054462001183565b6040516200046991906200401b565b3480156200056057600080fd5b50620004976200057236600462003d57565b62001192565b3480156200058557600080fd5b506200054462001336565b3480156200059d57600080fd5b50620004e362001345565b348015620005b557600080fd5b50620004e3620005c736600462003f55565b6200134b565b348015620005da57600080fd5b50620004e3620013d1565b348015620005f257600080fd5b50620005fd620013f5565b60405162000469919062004b76565b3480156200061957600080fd5b50620004e3620013fa565b3480156200063157600080fd5b50620004e362001400565b3480156200064957600080fd5b506200054462001406565b3480156200066157600080fd5b506200054462001415565b3480156200067957600080fd5b506200044062001424565b3480156200069157600080fd5b5062000440620006a336600462003c66565b6200145b565b348015620006b657600080fd5b5062000440620006c836600462003e90565b620014a3565b348015620006db57600080fd5b506200045a62001769565b348015620006f357600080fd5b50620004e362001786565b3480156200070b57600080fd5b50620005446200071d36600462003c66565b6200178c565b3480156200073057600080fd5b50620004406200074236600462003c66565b620017a7565b3480156200075557600080fd5b5062000544620017b3565b3480156200076d57600080fd5b50620007856200077f36600462003c66565b620017c2565b60405162000469919062004b46565b348015620007a157600080fd5b5062000440620007b336600462003fb5565b620017da565b348015620007c657600080fd5b50620004e3620007d836600462003c66565b62001824565b348015620007eb57600080fd5b506200044062001848565b3480156200080357600080fd5b5062000440620018cc565b3480156200081b57600080fd5b50620008336200082d36600462003e2b565b62001910565b60405162000469919062004b84565b3480156200084f57600080fd5b50620004e36200086136600462003c66565b62001b2f565b3480156200087457600080fd5b50620004406200088636600462003c66565b62001b41565b3480156200089957600080fd5b50620004e362001b9c565b348015620008b157600080fd5b506200054462001ba2565b348015620008c957600080fd5b5062000440620008db36600462003d9c565b62001bb1565b348015620008ee57600080fd5b506200045a62001d85565b3480156200090657600080fd5b50620004406200091836600462003c66565b62001da5565b3480156200092b57600080fd5b50620004e362001dea565b3480156200094357600080fd5b506200044062001df0565b620004406200095f36600462003e59565b62001fc2565b3480156200097257600080fd5b50620004e3620021b5565b3480156200098a57600080fd5b50620004976200099c36600462003e2b565b620021bb565b348015620009af57600080fd5b5062000833620009c136600462003c66565b6200224c565b348015620009d457600080fd5b50620004e3620009e636600462003f55565b620022be565b348015620009f957600080fd5b50620004976200231c565b34801562000a1157600080fd5b50620005446200232c565b34801562000a2957600080fd5b50620005446200233b565b34801562000a4157600080fd5b506200083362002351565b34801562000a5957600080fd5b50620004e362002360565b34801562000a7157600080fd5b506200044062000a8336600462003ca4565b62002366565b34801562000a9657600080fd5b5062000544620025c9565b34801562000aae57600080fd5b5062000833620025d8565b34801562000ac657600080fd5b5062000544620025de565b34801562000ade57600080fd5b50620004e3620025ed565b34801562000af657600080fd5b50620004e362000b0836600462003d1a565b620025f3565b34801562000b1b57600080fd5b506200054462002627565b34801562000b3357600080fd5b5062000b4b62000b4536600462003ede565b62002636565b6040516200046992919062004b57565b34801562000b6857600080fd5b506200044062000b7a36600462003c66565b6200266b565b34801562000b8d57600080fd5b506200049762002729565b34801562000ba557600080fd5b50620004e362002739565b60026017541462000bde5760405162461bcd60e51b815260040162000bd590620045bf565b60405180910390fd5b600b546001600160a01b0316331462000c0b5760405162461bcd60e51b815260040162000bd590620049d3565b478062000c2c5760405162461bcd60e51b815260040162000bd59062004618565b600062000c3c82610bb86200273f565b61271090049050600062000c5183836200277f565b9050600062000c6c600d54836200273f90919063ffffffff16565b905062000c8560135482620027c390919063ffffffff16565b905062000c9e600c5482620027c390919063ffffffff16565b905062000caa62002807565b601a5462000cc69030906001600160a01b03166000196200281c565b601b5460405163f305d71960e01b81526001600160a01b039091169063f305d71990849062000d079030908690819085908490600f420190600401620040af565b6060604051808303818588803b15801562000d2157600080fd5b505af19350505050801562000d55575060408051601f3d908101601f1916820190925262000d529181019062003f87565b60015b62000e5b57841562000e5557600b5462000d79906001600160a01b0316476200292e565b6040516370a0823160e01b815260009062000e369030906370a082319062000da69083906004016200401b565b60206040518083038186803b15801562000dbf57600080fd5b505afa15801562000dd4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000dfa919062003f6e565b6040518060400160405280601c81526020017f4441543a3a20616d6f756e742065786365656473203936206269747300000000815250620029d4565b600b5490915062000e539030906001600160a01b03168362002a06565b505b62000fd2565b600b5462000e73906001600160a01b0316476200292e565b601c54601b54604080516315ab88c960e31b815290516001600160a01b039384169363e6a4390593169163ad5c4648916004808301926020929190829003018186803b15801562000ec357600080fd5b505afa15801562000ed8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000efe919062003c85565b306040518363ffffffff1660e01b815260040162000f1e9291906200402f565b60206040518083038186803b15801562000f3757600080fd5b505afa15801562000f4c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000f72919062003c85565b601d80546001600160a01b0319166001600160a01b039290921691909117905562000fa16103e8600062002d48565b601d5462000fb8906001600160a01b031662002dc7565b62000fc4600062002e25565b62000fce62002e47565b5050505b5050505050565b6040518060400160405280600481526020016354616b6560e01b81525081565b6009546000906001600160a01b03848116911614156200102d5760405162461bcd60e51b815260040162000bd5906200440d565b60006000198314156200104457506000196200106c565b62001069836040518060600160405280602581526020016200538360259139620029d4565b90505b3360008181526002602090815260408083206001600160a01b03891680855292529182902080546001600160601b0319166001600160601b03861617905590519091907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590620010de90859062004b84565b60405180910390a360019150505b92915050565b600a6020526000908152604090205460ff1681565b60135481565b60015481565b600f546001600160a01b0316156200113f5760405162461bcd60e51b815260040162000bd590620041b3565b565b600b546001600160a01b031633146200116e5760405162461bcd60e51b815260040162000bd590620049d3565b601f805460ff60a01b1916600160a01b179055565b601a546001600160a01b031681565b60006200119e62001ba2565b6001600160a01b0316336001600160a01b031614620011e357600954600160a01b900460ff16620011e35760405162461bcd60e51b815260040162000bd590620049fd565b6001600160a01b03841660009081526002602090815260408083203380855290835281842054825160608101909352602580845291946001600160601b039091169390926200123c9288926200538390830139620029d4565b9050866001600160a01b0316836001600160a01b0316141580156200126a57506001600160601b0382811614155b156200131a5760006200129883836040518060600160405280603d81526020016200540c603d91396200300c565b6001600160a01b038981166000818152600260209081526040808320948a16808452949091529081902080546001600160601b0319166001600160601b0386161790555192935090917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906200131090859062004b84565b60405180910390a3505b6200132787878362002a06565b600193505050505b9392505050565b6009546001600160a01b031681565b60105481565b60006016548210156200136157506000620013cc565b600060016017541415620013be57600060135490506200138a84600d54600202600c546200304e565b91506200139a82828002620031dc565b9150620013a78262003204565b9150620013b582826200277f565b915050620013c9565b6000915050620013cc565b90505b919050565b7fea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb81565b601281565b600c5481565b60185481565b6019546001600160a01b031681565b600b546001600160a01b031681565b600b546001600160a01b03163314620014515760405162461bcd60e51b815260040162000bd590620049d3565b6200113f6200327d565b620014656200338d565b6000546001600160a01b03908116911614620014955760405162461bcd60e51b815260040162000bd59062004781565b620014a08162002dc7565b50565b600e546001600160a01b031615620014cf5760405162461bcd60e51b815260040162000bd590620042db565b60006011558462001523577f107dddb4541735557564238389eccfc9979bfdde5e57e24e9777b6fe79b4d22f60175460016040516200151092919062004b38565b60405180910390a160016017556200155b565b6f4b3b4ca85a86c47a098a2240000000008510620015555760405162461bcd60e51b815260040162000bd59062004b10565b60108590555b600084116200157e5760405162461bcd60e51b815260040162000bd59062004237565b6012849055600060135582620015a85760405162461bcd60e51b815260040162000bd5906200472a565b60008211620015cb5760405162461bcd60e51b815260040162000bd590620042b0565b6001600160801b038310620015f45760405162461bcd60e51b815260040162000bd5906200468f565b6001600160801b0382106200161d5760405162461bcd60e51b815260040162000bd590620046bc565b600c839055600d8290556127108111156200164c5760405162461bcd60e51b815260040162000bd59062004376565b6014819055670de0b6b3a7640000601655600b8054336001600160a01b03199182168117909255600e80548216909217909155600f80549091166001600160a01b038816179055604080518082018252600481526354616b6560e01b602091820152815180830190925260018252601960f91b9101527f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f818137f2b4abdd30e9b19adb6d019d7ef80212f3f15073dd2f6902e776bed7b07fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a56200172f62003391565b306040516020016200174695949392919062004134565b60408051601f198184030181529190528051602090910120601855505050505050565b604051806040016040528060018152602001601960f91b81525081565b600d5481565b6004602052600090815260409020546001600160a01b031681565b620014a0338262003395565b601f546001600160a01b031681565b60066020526000908152604090205463ffffffff1681565b620017e46200338d565b6000546001600160a01b03908116911614620018145760405162461bcd60e51b815260040162000bd59062004781565b62001820828262002d48565b5050565b6001600160a01b03166000908152600360205260409020546001600160601b031690565b620018526200338d565b6000546001600160a01b03908116911614620018825760405162461bcd60e51b815260040162000bd59062004781565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b620018d66200338d565b6000546001600160a01b03908116911614620019065760405162461bcd60e51b815260040162000bd59062004781565b6200113f62002807565b6000438210620019345760405162461bcd60e51b815260040162000bd5906200451e565b6001600160a01b03831660009081526006602052604090205463ffffffff168062001964576000915050620010ec565b6001600160a01b038416600090815260056020908152604080832063ffffffff600019860181168552925290912054168310620019e2576001600160a01b03841660009081526005602090815260408083206000199490940163ffffffff1683529290522054600160201b90046001600160601b03169050620010ec565b6001600160a01b038416600090815260056020908152604080832083805290915290205463ffffffff1683101562001a1f576000915050620010ec565b600060001982015b8163ffffffff168163ffffffff16111562001aea57600282820363ffffffff1604810362001a5462003c41565b506001600160a01b038716600090815260056020908152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b0316918101919091529087141562001ac257602001519450620010ec9350505050565b805163ffffffff1687111562001adb5781935062001ae2565b6001820392505b505062001a27565b506001600160a01b038516600090815260056020908152604080832063ffffffff909416835292905220546001600160601b03600160201b9091041691505092915050565b60076020526000908152604090205481565b62001b4b6200338d565b6000546001600160a01b0390811691161462001b7b5760405162461bcd60e51b815260040162000bd59062004781565b6001600160a01b03166000908152600a60205260409020805460ff19169055565b60165481565b6000546001600160a01b031690565b60006018547fea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb60001b8a8a8a8a8a60405160200162001bf696959493929190620040fe565b6040516020818303038152906040528051906020012060405160200162001c1f92919062003ffd565b60408051601f19818403018152919052805160209091012090506001600160a01b03891662001c625760405162461bcd60e51b815260040162000bd590620045e9565b6001818585856040516000815260200160405260405162001c87949392919062004160565b6020604051602081039080840390855afa15801562001caa573d6000803e3d6000fd5b505050602060405103516001600160a01b0316896001600160a01b03161462001ce75760405162461bcd60e51b815260040162000bd59062004755565b85158062001cf55750854211155b62001d145760405162461bcd60e51b815260040162000bd590620041e2565b6001600160a01b0389166000908152600760205260409020805460018101909155871462001d565760405162461bcd60e51b815260040162000bd59062004a9b565b60008562001d6657600062001d6a565b6000195b905062001d798a8a836200281c565b50505050505050505050565b6040518060400160405280600481526020016354414b4560e01b81525081565b62001daf6200338d565b6000546001600160a01b0390811691161462001ddf5760405162461bcd60e51b815260040162000bd59062004781565b620014a08162002e25565b60145481565b60026017541462001e155760405162461bcd60e51b815260040162000bd590620045bf565b600b546001600160a01b0316331462001e425760405162461bcd60e51b815260040162000bd590620049d3565b601d54600b546040516001600160a01b039283169260009284929116906228de8042019062001e719062003c58565b62001e7f9392919062004049565b604051809103906000f08015801562001e9c573d6000803e3d6000fd5b50601e80546001600160a01b0319166001600160a01b0383811691909117918290556040516370a0823160e01b81529293508481169263a9059cbb929091169083906370a082319062001ef49030906004016200401b565b60206040518083038186803b15801562001f0d57600080fd5b505afa15801562001f22573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001f48919062003f6e565b6040518363ffffffff1660e01b815260040162001f6792919062004096565b602060405180830381600087803b15801562001f8257600080fd5b505af115801562001f97573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001fbd919062003f36565b505050565b601f54600160a01b900460ff1662001fee5760405162461bcd60e51b815260040162000bd590620048e5565b6001600160a01b038316620020175760405162461bcd60e51b815260040162000bd5906200420e565b600081116200203a5760405162461bcd60e51b815260040162000bd59062004618565b6013546012541015620020615760405162461bcd60e51b815260040162000bd59062004287565b6000806200206f846200134b565b90506012546200208b82601354620031dc90919063ffffffff16565b10620020b65760135460125460019350620020a6916200277f565b9050620020b381620022be565b93505b82811015620020d95760405162461bcd60e51b815260040162000bd5906200434e565b846001600160a01b0316336001600160a01b03167f89f5adc174562e07c9c9b1cae7109bbecb21cf9d1b2847e550042b8653c54a0e86846040516200212092919062004b38565b60405180910390a3620021368434600162003421565b6200218330866200217d846040518060400160405280601c81526020017f4441543a3a20616d6f756e742065786365656473203936206269747300000000815250620029d4565b62002a06565b601354620021929082620031dc565b6013556017546001148015620021a55750815b1562000fd25762000fd26200327d565b60115481565b6000620021c762001ba2565b6001600160a01b0316336001600160a01b0316146200220c57600954600160a01b900460ff166200220c5760405162461bcd60e51b815260040162000bd590620049fd565b600062002233836040518060600160405280602681526020016200532560269139620029d4565b90506200224233858362002a06565b5060019392505050565b6001600160a01b03811660009081526006602052604081205463ffffffff1680620022795760006200132f565b6001600160a01b0383166000908152600560209081526040808320600019850163ffffffff168452909152902054600160201b90046001600160601b03169392505050565b60008060016017541415620013be576013546000620022de8583620031dc565b9050620022ec81806200273f565b9050620022fc818380026200277f565b90506200231281600c54600d546002026200304e565b92505050620013c9565b601f54600160a01b900460ff1681565b601d546001600160a01b031681565b600854600160601b90046001600160a01b031681565b6008546001600160601b031681565b60175481565b600e546001600160a01b03163314620023935760405162461bcd60e51b815260040162000bd590620047e3565b6001600160a01b038516620023bc5760405162461bcd60e51b815260040162000bd5906200420e565b600e80546001600160a01b0319166001600160a01b03878116919091179091558416620023fd5760405162461bcd60e51b815260040162000bd5906200420e565b601a80546001600160a01b0319166001600160a01b038681169190911790915583166200243e5760405162461bcd60e51b815260040162000bd5906200420e565b601980546001600160a01b038086166001600160a01b03199283161792839055601a54601b80548416918316919091179055601c80549092169216919091179055816200249f5760405162461bcd60e51b815260040162000bd59062004855565b6016829055601554811015620024c95760405162461bcd60e51b815260040162000bd59062004588565b6015819055600b546001600160a01b038781169116146200256e576001600160a01b0386166200250d5760405162461bcd60e51b815260040162000bd5906200420e565b600b546001600160a01b03166000908152600360205260409020546001600160601b031680156200255157600b5462002551906001600160a01b03168883620034c6565b50600b80546001600160a01b0319166001600160a01b0388161790555b846001600160a01b0316866001600160a01b03167f56ff1a2579aed1da9e25d6d6f1135ce7af98843e17bfd90c5adfe839b46c5e0086868686604051620025b994939291906200406d565b60405180910390a3505050505050565b601e546001600160a01b031681565b61271081565b600e546001600160a01b031681565b60155481565b6001600160a01b0391821660009081526002602090815260408083209390941682529190915220546001600160601b031690565b600f546001600160a01b031681565b600560209081526000928352604080842090915290825290205463ffffffff811690600160201b90046001600160601b031682565b620026756200338d565b6000546001600160a01b03908116911614620026a55760405162461bcd60e51b815260040162000bd59062004781565b6001600160a01b038116620026ce5760405162461bcd60e51b815260040162000bd59062004308565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600954600160a01b900460ff1681565b60125481565b6000826200275057506000620010ec565b828202828482816200275e57fe5b04146200132f5760405162461bcd60e51b815260040162000bd590620046e9565b60006200132f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525062003539565b60006200132f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525062003560565b6009805460ff60a01b1916600160a01b179055565b6001600160a01b038316620028455760405162461bcd60e51b815260040162000bd59062004809565b6001600160a01b0382166200286e5760405162461bcd60e51b815260040162000bd59062004645565b6000600019821415620028855750600019620028ad565b620028aa826040518060600160405280602581526020016200538360259139620029d4565b90505b6001600160a01b038481166000818152600260209081526040808320948816808452949091529081902080546001600160601b0319166001600160601b038616179055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906200292090859062004b84565b60405180910390a350505050565b80471015620029515760405162461bcd60e51b815260040162000bd590620044a1565b6000826001600160a01b0316826040516200296c9062004018565b60006040518083038185875af1925050503d8060008114620029ab576040519150601f19603f3d011682016040523d82523d6000602084013e620029b0565b606091505b505090508062001fbd5760405162461bcd60e51b815260040162000bd59062004444565b600081600160601b8410620029fe5760405162461bcd60e51b815260040162000bd591906200417e565b509192915050565b6001600160a01b03831662002a2f5760405162461bcd60e51b815260040162000bd59062004915565b6001600160a01b03821662002a585760405162461bcd60e51b815260040162000bd59062004a3e565b600854819060009062002a839062002a7a906001600160601b0316846200359b565b612710620035fc565b90506000816001600160601b031611801562002ab757506001600160a01b0384166000908152600a602052604090205460ff165b1562002be457600854600160601b90046001600160a01b031660009081526003602090815260409182902054825160608101909352603880845262002b14936001600160601b0390921692859291906200534b9083013962003650565b600854600160601b90046001600160a01b031660009081526003602090815260409182902080546001600160601b0319166001600160601b039490941693909317909255805160608101909152602780825262002b7f92869285929091620054cb908301396200300c565b91506008600c9054906101000a90046001600160a01b03166001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405162002bdb919062004b84565b60405180910390a35b6001600160a01b03851660009081526003602090815260409182902054825160608101909352603680845262002c32936001600160601b0390921692879291906200546e908301396200300c565b6001600160a01b03868116600090815260036020908152604080832080546001600160601b0319166001600160601b0396871617905592881682529082902054825160608101909352603080845262002c9d9491909116928692909190620053dc9083013962003650565b6001600160a01b038581166000818152600360205260409081902080546001600160601b0319166001600160601b0395909516949094179093559151908716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9062002d0c90869062004b84565b60405180910390a36001600160a01b0380861660009081526004602052604080822054878416835291205462000fd2929182169116856200368f565b600880546001600160a01b03808416600160601b9081026001600160601b038088166001600160601b031990951694909417841617938490556040517f7c12cc5bdbd01081255ce1e17572984e33e6f8bb2333baa84f7bf5292a65250a9462002dbb948116939290049091169062004b98565b60405180910390a15050565b62002dd16200338d565b6000546001600160a01b0390811691161462002e015760405162461bcd60e51b815260040162000bd59062004781565b6001600160a01b03166000908152600a60205260409020805460ff19166001179055565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b60026017541462002e6c5760405162461bcd60e51b815260040162000bd590620045bf565b600b546001600160a01b0316331462002e995760405162461bcd60e51b815260040162000bd590620049d3565b600b5460405160009130916001600160a01b03909116906228de8042019062002ec29062003c58565b62002ed09392919062004049565b604051809103906000f08015801562002eed573d6000803e3d6000fd5b50601f80546001600160a01b0319166001600160a01b0383811691909117918290556040516370a0823160e01b8152929350309263a9059cbb929091169083906370a082319062002f439083906004016200401b565b60206040518083038186803b15801562002f5c57600080fd5b505afa15801562002f71573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002f97919062003f6e565b6040518363ffffffff1660e01b815260040162002fb692919062004096565b602060405180830381600087803b15801562002fd157600080fd5b505af115801562002fe6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001820919062003f36565b6000836001600160601b0316836001600160601b031611158290620030465760405162461bcd60e51b815260040162000bd591906200417e565b505050900390565b60008315806200305c575082155b156200306b575060006200132f565b60008385600019816200307a57fe5b04106200309a57508383028281816200308f57fe5b0491506200132f9050565b838581811115620030ab5750859050845b848281620030b557fe5b0492506305f5e100831115620030dd57620030d183826200273f565b93506200132f92505050565b60001981016001600160801b038104600101905060001983016001600160801b03810460010190508082600019816200311257fe5b04106200318057908102908184816200312757fe5b049450630bebc20085111562003180576200314385846200273f565b94505060001986018181816200315557fe5b04905062003165816001620031dc565b90508085816200317157fe5b0495506200132f945050505050565b60016001600160801b036000198501040191508183816200319d57fe5b049450506000198601818181620031b057fe5b046001019050808481620031c057fe5b049050620031cf85826200273f565b9998505050505050505050565b6000828201838110156200132f5760405162461bcd60e51b815260040162000bd5906200439f565b6000816200321557506000620013cc565b600382116200322757506001620013cc565b6000198214156200324157506001600160801b03620013cc565b5080600260018201045b8181101562003277578091506002818285816200326457fe5b0401816200326e57fe5b0490506200324b565b50919050565b601754620032ce577f107dddb4541735557564238389eccfc9979bfdde5e57e24e9777b6fe79b4d22f6017546003604051620032bb92919062004b38565b60405180910390a1600360175562003362565b600160175414156200334857426015541115620032ff5760405162461bcd60e51b815260040162000bd59062004565565b7f107dddb4541735557564238389eccfc9979bfdde5e57e24e9777b6fe79b4d22f60175460026040516200333592919062004b38565b60405180910390a1600260175562003362565b60405162461bcd60e51b815260040162000bd59062004260565b6040517fc35789ccff76271dc0efa6bfde2f4d4a32cd48dd86278f75f8648cb068c86e3b90600090a1565b3390565b4690565b6001600160a01b03808316600081815260046020818152604080842080546003845282862054949093528787166001600160a01b031984168117909155905191909516946001600160601b039092169391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46200341b8284836200368f565b50505050565b600f546001600160a01b03166200348b578015620034635760006200344783856200277f565b905080156200345c576200345c33826200292e565b5062003485565b818314620034855760405162461bcd60e51b815260040162000bd590620047b6565b62001fbd565b8115620034ac5760405162461bcd60e51b815260040162000bd59062004885565b600f5462001fbd906001600160a01b03163330866200383b565b601754151580620034e45750600b546001600160a01b038481169116145b620035035760405162461bcd60e51b815260040162000bd590620048ae565b60006200352a826040518060600160405280602581526020016200544960259139620029d4565b90506200341b84848362002a06565b60008184841115620030465760405162461bcd60e51b815260040162000bd591906200417e565b60008183620035845760405162461bcd60e51b815260040162000bd591906200417e565b5060008385816200359157fe5b0495945050505050565b60006001600160601b038316620035b557506000620010ec565b8282026001600160601b038084169080861690831681620035d257fe5b046001600160601b0316146200132f5760405162461bcd60e51b815260040162000bd590620043d6565b600080826001600160601b031611620036295760405162461bcd60e51b815260040162000bd590620049a9565b6000826001600160601b0316846001600160601b0316816200364757fe5b04949350505050565b6000838301826001600160601b038087169083161015620036865760405162461bcd60e51b815260040162000bd591906200417e565b50949350505050565b816001600160a01b0316836001600160a01b031614158015620036bb57506000816001600160601b0316115b1562001fbd576001600160a01b038316156200377c576001600160a01b03831660009081526006602052604081205463ffffffff169081620036ff5760006200373e565b6001600160a01b0385166000908152600560209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b90506000620037688285604051806060016040528060288152602001620052fd602891396200300c565b9050620037788684848462003897565b5050505b6001600160a01b0382161562001fbd576001600160a01b03821660009081526006602052604081205463ffffffff169081620037ba576000620037f9565b6001600160a01b0384166000908152600560209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b90506000620038238285604051806060016040528060278152602001620054a46027913962003650565b9050620038338584848462003897565b505050505050565b6200341b846323b872dd60e01b8585856040516024016200385f9392919062004049565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915262003a54565b6000620038be43604051806060016040528060348152602001620053a86034913962003aeb565b905060008463ffffffff161180156200390857506001600160a01b038516600090815260056020908152604080832063ffffffff6000198901811685529252909120548282169116145b1562003969576001600160a01b0385166000908152600560209081526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff000000001916600160201b6001600160601b0385160217905562003a08565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000818152600583528781208c871682528352878120965187549451909516600160201b026fffffffffffffffffffffffff000000001995871663ffffffff19958616179590951694909417909555938252600690935292909220805460018801909316929091169190911790555b846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724848460405162003a4592919062004bba565b60405180910390a25050505050565b606062003aab826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031662003b159092919063ffffffff16565b80519091501562001fbd578080602001905181019062003acc919062003f36565b62001fbd5760405162461bcd60e51b815260040162000bd59062004ac6565b600081600160201b8410620029fe5760405162461bcd60e51b815260040162000bd591906200417e565b606062003b26848460008562003b2e565b949350505050565b60608247101562003b535760405162461bcd60e51b815260040162000bd590620044d8565b62003b5e8562003bfd565b62003b7d5760405162461bcd60e51b815260040162000bd59062004972565b60006060866001600160a01b0316858760405162003b9c919062003fdf565b60006040518083038185875af1925050503d806000811462003bdb576040519150601f19603f3d011682016040523d82523d6000602084013e62003be0565b606091505b509150915062003bf282828662003c03565b979650505050505050565b3b151590565b6060831562003c145750816200132f565b82511562003c255782518084602001fd5b8160405162461bcd60e51b815260040162000bd591906200417e565b604080518082019091526000808252602082015290565b6106d48062004c2983390190565b60006020828403121562003c78578081fd5b81356200132f8162004c03565b60006020828403121562003c97578081fd5b81516200132f8162004c03565b60008060008060008060c0878903121562003cbd578182fd5b863562003cca8162004c03565b9550602087013562003cdc8162004c03565b9450604087013562003cee8162004c03565b9350606087013562003d008162004c03565b9598949750929560808101359460a0909101359350915050565b6000806040838503121562003d2d578182fd5b823562003d3a8162004c03565b9150602083013562003d4c8162004c03565b809150509250929050565b60008060006060848603121562003d6c578283fd5b833562003d798162004c03565b9250602084013562003d8b8162004c03565b929592945050506040919091013590565b600080600080600080600080610100898b03121562003db9578182fd5b883562003dc68162004c03565b9750602089013562003dd88162004c03565b96506040890135955060608901359450608089013562003df88162004c19565b935060a089013560ff8116811462003e0e578283fd5b979a969950949793969295929450505060c08201359160e0013590565b6000806040838503121562003e3e578182fd5b823562003e4b8162004c03565b946020939093013593505050565b60008060006060848603121562003e6e578283fd5b833562003e7b8162004c03565b95602085013595506040909401359392505050565b60008060008060008060c0878903121562003ea9578182fd5b863562003eb68162004c03565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b6000806040838503121562003ef1578182fd5b823562003efe8162004c03565b9150602083013563ffffffff8116811462003d4c578182fd5b60006020828403121562003f29578081fd5b81356200132f8162004c19565b60006020828403121562003f48578081fd5b81516200132f8162004c19565b60006020828403121562003f67578081fd5b5035919050565b60006020828403121562003f80578081fd5b5051919050565b60008060006060848603121562003f9c578081fd5b8351925060208401519150604084015190509250925092565b6000806040838503121562003fc8578182fd5b82356001600160601b038116811462003d3a578283fd5b6000825162003ff381846020870162004bd4565b9190910192915050565b61190160f01b81526002810192909252602282015260420190565b90565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0394851681529290931660208301526040820152606081019190915260800190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039687168152602081019590955260408501939093526060840191909152909216608082015260a081019190915260c00190565b901515815260200190565b90815260200190565b9586526001600160a01b03948516602087015292909316604085015260608401526080830191909152151560a082015260c00190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b60006020825282518060208401526200419f81604085016020870162004bd4565b601f01601f19169190910160400192915050565b60208082526015908201527409e9c98b2be8c9ea4be86aaa4a48a9c86b2be8aa89605b1b604082015260600190565b6020808252601290820152711110550bdc195c9b5a5d0b595e1c1a5c995960721b604082015260600190565b6020808252600f908201526e494e56414c49445f4144445245535360881b604082015260600190565b6020808252600f908201526e1253959053125117d090d7d1d3d053608a1b604082015260600190565b6020808252600d908201526c494e56414c49445f535441544560981b604082015260600190565b6020808252600f908201526e1090d7d1d3d05317d4915050d21151608a1b604082015260600190565b60208082526011908201527024a72b20a624a22fa9a627a822afa222a760791b604082015260600190565b6020808252601390820152721053149150511657d253925512505312569151606a1b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252600e908201526d50524943455f534c49505041474560901b604082015260600190565b6020808252600f908201526e494e56414c49445f5245534552564560881b604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526017908201527f6d756c7469706c69636174696f6e206f766572666c6f77000000000000000000604082015260600190565b60208082526017908201527f54616b653a3a617070726f76653a2064697361626c6564000000000000000000604082015260600190565b6020808252603a908201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260408201527f6563697069656e74206d61792068617665207265766572746564000000000000606082015260800190565b6020808252601d908201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b60208082526027908201527f54616b653a3a6765745072696f72566f7465733a206e6f742079657420646574604082015266195c9b5a5b995960ca1b606082015260800190565b602080825260099082015268544f4f5f4541524c5960b81b604082015260600190565b6020808252601d908201527f4f50454e5f554e54494c5f4d41595f4e4f545f42455f52454455434544000000604082015260600190565b60208082526010908201526f4f4e4c595f41465445525f434c4f534560801b604082015260600190565b60208082526015908201527404441542f696e76616c69642d616464726573732d3605c1b604082015260600190565b6020808252601390820152724d5553545f4255595f41545f4c454153545f3160681b604082015260600190565b6020808252602a908201527f54616b653a3a617070726f76653a20617070726f766520746f20746865207a65604082015269726f206164647265737360b01b606082015260800190565b6020808252601390820152724558434553534956455f534c4f50455f4e554d60681b604082015260600190565b60208082526013908201527222ac21a2a9a9a4ab22afa9a627a822afa222a760691b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b602080825260119082015270494e56414c49445f534c4f50455f4e554d60781b604082015260600190565b6020808252601290820152711110550bda5b9d985b1a590b5c195c9b5a5d60721b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b602080825260139082015272494e434f52524543545f4d53475f56414c554560681b604082015260600190565b6020808252600c908201526b434f4e54524f4c5f4f4e4c5960a01b604082015260600190565b6020808252602c908201527f54616b653a3a617070726f76653a20617070726f76652066726f6d207468652060408201526b7a65726f206164647265737360a01b606082015260800190565b6020808252601690820152751253959053125117d3525397d253959154d51351539560521b604082015260600190565b6020808252600f908201526e0889ebe9c9ea8bea68a9c88be8aa89608b1b604082015260600190565b6020808252601c908201527f4f4e4c595f42454e45464943494152595f445552494e475f494e495400000000604082015260600190565b6020808252601690820152751513d2d15397d4d0531157d393d517d4d5105495115160521b604082015260600190565b6020808252603c908201527f54616b653a3a5f7472616e73666572546f6b656e733a2063616e6e6f7420747260408201527f616e736665722066726f6d20746865207a65726f206164647265737300000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526010908201526f6469766973696f6e206279207a65726f60801b604082015260600190565b60208082526010908201526f42454e45464943494152595f4f4e4c5960801b604082015260600190565b60208082526021908201527f54616b653a3a20546f6b656e207472616e73666572206e6f7420616c6c6f77656040820152601960fa1b606082015260800190565b6020808252603a908201527f54616b653a3a5f7472616e73666572546f6b656e733a2063616e6e6f7420747260408201527f616e7366657220746f20746865207a65726f2061646472657373000000000000606082015260800190565b6020808252601190820152704441542f696e76616c69642d6e6f6e636560781b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252600e908201526d115610d154d4d2559157d1d3d05360921b604082015260600190565b918252602082015260400190565b63ffffffff91909116815260200190565b63ffffffff9290921682526001600160601b0316602082015260400190565b60ff91909116815260200190565b6001600160601b0391909116815260200190565b6001600160601b039290921682526001600160a01b0316602082015260400190565b6001600160601b0392831681529116602082015260400190565b60005b8381101562004bf157818101518382015260200162004bd7565b838111156200341b5750506000910152565b6001600160a01b0381168114620014a057600080fd5b8015158114620014a057600080fdfe608060405234801561001057600080fd5b506040516106d43803806106d48339818101604052606081101561003357600080fd5b50805160208201516040909201519091904281116100825760405162461bcd60e51b81526004018080602001828103825260328152602001806106a26032913960400191505060405180910390fd5b600080546001600160a01b039485166001600160a01b03199182161790915560018054939094169216919091179091556002556105de806100c46000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806338af3eed1461005157806386d1a69f14610075578063b91d40011461007f578063fc0c546a14610099575b600080fd5b6100596100a1565b604080516001600160a01b039092168252519081900360200190f35b61007d6100b0565b005b6100876101c7565b60408051918252519081900360200190f35b6100596101cd565b6001546001600160a01b031690565b6002544210156100f15760405162461bcd60e51b81526004018080602001828103825260328152602001806105046032913960400191505060405180910390fd5b60008054604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561013d57600080fd5b505afa158015610151573d6000803e3d6000fd5b505050506040513d602081101561016757600080fd5b50519050806101a75760405162461bcd60e51b81526004018080602001828103825260238152602001806105866023913960400191505060405180910390fd5b6001546000546101c4916001600160a01b039182169116836101dc565b50565b60025490565b6000546001600160a01b031690565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261022e908490610233565b505050565b6060610288826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166102e49092919063ffffffff16565b80519091501561022e578080602001905160208110156102a757600080fd5b505161022e5760405162461bcd60e51b815260040180806020018281038252602a81526020018061055c602a913960400191505060405180910390fd5b60606102f384846000856102fd565b90505b9392505050565b60608247101561033e5760405162461bcd60e51b81526004018080602001828103825260268152602001806105366026913960400191505060405180910390fd5b61034785610459565b610398576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106103d75780518252601f1990920191602091820191016103b8565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610439576040519150601f19603f3d011682016040523d82523d6000602084013e61043e565b606091505b509150915061044e82828661045f565b979650505050505050565b3b151590565b6060831561046e5750816102f6565b82511561047e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104c85781810151838201526020016104b0565b50505050905090810190601f1680156104f55780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe546f6b656e54696d656c6f636b3a2063757272656e742074696d65206973206265666f72652072656c656173652074696d65416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564546f6b656e54696d656c6f636b3a206e6f20746f6b656e7320746f2072656c65617365a26469706673582212208a4695abce7ef9551fe36dc0524676fd0a70f9bcbfee39f5b7025883077b1a6564736f6c634300060c0033546f6b656e54696d656c6f636b3a2072656c656173652074696d65206973206265666f72652063757272656e742074696d6554616b653a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f777354616b653a3a7472616e736665723a20616d6f756e742065786365656473203936206269747354616b653a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206275726e466565206f766572666c6f777354616b653a3a617070726f76653a20616d6f756e742065786365656473203936206269747354616b653a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747354616b653a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206f766572666c6f777354616b653a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e63654441543a3a7472616e736665723a20616d6f756e742065786365656473203936206269747354616b653a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e636554616b653a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f777354616b653a3a5f7472616e73666572546f6b656e733a206275726e466565203e20616d6f756e74a2646970667358221220c3972c70039bbf4047003618aaf9e5516f09bd1c14ee1b9d8fba4629a45f62bf64736f6c634300060c0033
Deployed Bytecode
0x608060405260043610620004165760003560e01c806371b5ee711162000223578063b6d43f181162000127578063d8de658711620000af578063f1127ed81162000079578063f1127ed81462000b26578063f2fde38b1462000b5b578063f3c54e5d1462000b80578063ff66916f1462000b985762000416565b8063d8de65871462000ab9578063dcf81d171462000ad1578063dd62ed3e1462000ae9578063e5a6b10f1462000b0e5762000416565b8063c19d93fb11620000f1578063c19d93fb1462000a4c578063c536395e1462000a64578063d1f786fe1462000a89578063d38f74c51462000aa15762000416565b8063b6d43f1814620009ec578063bd3733fe1462000a04578063be51d2441462000a1c578063bed998501462000a345762000416565b80639a7b412311620001ab578063a71ddd251162000175578063a71ddd251462000965578063a9059cbb146200097d578063b4b5ea5714620009a2578063b6b7e1ba14620009c75762000416565b80639a7b412314620008f95780639df3f4f6146200091e578063a43581ed1462000936578063a59ac6dd146200094e5762000416565b80638ac2c68011620001ed5780638ac2c680146200088c5780638da5cb5b14620008a45780638fcbaf0c14620008bc57806395d89b4114620008e15762000416565b806371b5ee7114620007f6578063782d6fe1146200080e5780637ecebe0014620008425780637f6a693c14620008675762000416565b806335e5cc31116200032b57806358439fa511620002b35780636fcfff45116200027d5780636fcfff4514620007605780637060fc6e146200079457806370a0823114620007b9578063715018a614620007de5762000416565b806358439fa514620006e6578063587cde1e14620006fe5780635c19a95c146200072357806362ded3fa14620007485762000416565b806343d726d611620002f557806343d726d6146200066c578063444b3610146200068457806345ff4c8014620006a957806354fd4d5014620006ce5762000416565b806335e5cc31146200060c5780633644e51514620006245780633655ac3c146200063c57806338af3eed14620006545762000416565b80631f479d8411620003af5780632631543811620003795780632631543814620005905780632e872bb314620005a857806330adf81f14620005cd578063313ce56714620005e55762000416565b80631f479d84146200051457806320ca3c7f146200052c57806323b872dd146200055357806324e4c90914620005785762000416565b80630d5c0c5611620003f15780630d5c0c5614620004a657806313484ca814620004cb57806318160ddd14620004f25780631b9265b8146200050a5762000416565b806301541ac6146200041b57806306fdde031462000442578063095ea7b31462000472575b600080fd5b3480156200042857600080fd5b50620004406200043a36600462003f17565b62000bb0565b005b3480156200044f57600080fd5b506200045a62000fd9565b6040516200046991906200417e565b60405180910390f35b3480156200047f57600080fd5b50620004976200049136600462003e2b565b62000ff9565b604051620004699190620040ea565b348015620004b357600080fd5b5062000497620004c536600462003c66565b620010f2565b348015620004d857600080fd5b50620004e362001107565b604051620004699190620040f5565b348015620004ff57600080fd5b50620004e36200110d565b6200044062001113565b3480156200052157600080fd5b506200044062001141565b3480156200053957600080fd5b506200054462001183565b6040516200046991906200401b565b3480156200056057600080fd5b50620004976200057236600462003d57565b62001192565b3480156200058557600080fd5b506200054462001336565b3480156200059d57600080fd5b50620004e362001345565b348015620005b557600080fd5b50620004e3620005c736600462003f55565b6200134b565b348015620005da57600080fd5b50620004e3620013d1565b348015620005f257600080fd5b50620005fd620013f5565b60405162000469919062004b76565b3480156200061957600080fd5b50620004e3620013fa565b3480156200063157600080fd5b50620004e362001400565b3480156200064957600080fd5b506200054462001406565b3480156200066157600080fd5b506200054462001415565b3480156200067957600080fd5b506200044062001424565b3480156200069157600080fd5b5062000440620006a336600462003c66565b6200145b565b348015620006b657600080fd5b5062000440620006c836600462003e90565b620014a3565b348015620006db57600080fd5b506200045a62001769565b348015620006f357600080fd5b50620004e362001786565b3480156200070b57600080fd5b50620005446200071d36600462003c66565b6200178c565b3480156200073057600080fd5b50620004406200074236600462003c66565b620017a7565b3480156200075557600080fd5b5062000544620017b3565b3480156200076d57600080fd5b50620007856200077f36600462003c66565b620017c2565b60405162000469919062004b46565b348015620007a157600080fd5b5062000440620007b336600462003fb5565b620017da565b348015620007c657600080fd5b50620004e3620007d836600462003c66565b62001824565b348015620007eb57600080fd5b506200044062001848565b3480156200080357600080fd5b5062000440620018cc565b3480156200081b57600080fd5b50620008336200082d36600462003e2b565b62001910565b60405162000469919062004b84565b3480156200084f57600080fd5b50620004e36200086136600462003c66565b62001b2f565b3480156200087457600080fd5b50620004406200088636600462003c66565b62001b41565b3480156200089957600080fd5b50620004e362001b9c565b348015620008b157600080fd5b506200054462001ba2565b348015620008c957600080fd5b5062000440620008db36600462003d9c565b62001bb1565b348015620008ee57600080fd5b506200045a62001d85565b3480156200090657600080fd5b50620004406200091836600462003c66565b62001da5565b3480156200092b57600080fd5b50620004e362001dea565b3480156200094357600080fd5b506200044062001df0565b620004406200095f36600462003e59565b62001fc2565b3480156200097257600080fd5b50620004e3620021b5565b3480156200098a57600080fd5b50620004976200099c36600462003e2b565b620021bb565b348015620009af57600080fd5b5062000833620009c136600462003c66565b6200224c565b348015620009d457600080fd5b50620004e3620009e636600462003f55565b620022be565b348015620009f957600080fd5b50620004976200231c565b34801562000a1157600080fd5b50620005446200232c565b34801562000a2957600080fd5b50620005446200233b565b34801562000a4157600080fd5b506200083362002351565b34801562000a5957600080fd5b50620004e362002360565b34801562000a7157600080fd5b506200044062000a8336600462003ca4565b62002366565b34801562000a9657600080fd5b5062000544620025c9565b34801562000aae57600080fd5b5062000833620025d8565b34801562000ac657600080fd5b5062000544620025de565b34801562000ade57600080fd5b50620004e3620025ed565b34801562000af657600080fd5b50620004e362000b0836600462003d1a565b620025f3565b34801562000b1b57600080fd5b506200054462002627565b34801562000b3357600080fd5b5062000b4b62000b4536600462003ede565b62002636565b6040516200046992919062004b57565b34801562000b6857600080fd5b506200044062000b7a36600462003c66565b6200266b565b34801562000b8d57600080fd5b506200049762002729565b34801562000ba557600080fd5b50620004e362002739565b60026017541462000bde5760405162461bcd60e51b815260040162000bd590620045bf565b60405180910390fd5b600b546001600160a01b0316331462000c0b5760405162461bcd60e51b815260040162000bd590620049d3565b478062000c2c5760405162461bcd60e51b815260040162000bd59062004618565b600062000c3c82610bb86200273f565b61271090049050600062000c5183836200277f565b9050600062000c6c600d54836200273f90919063ffffffff16565b905062000c8560135482620027c390919063ffffffff16565b905062000c9e600c5482620027c390919063ffffffff16565b905062000caa62002807565b601a5462000cc69030906001600160a01b03166000196200281c565b601b5460405163f305d71960e01b81526001600160a01b039091169063f305d71990849062000d079030908690819085908490600f420190600401620040af565b6060604051808303818588803b15801562000d2157600080fd5b505af19350505050801562000d55575060408051601f3d908101601f1916820190925262000d529181019062003f87565b60015b62000e5b57841562000e5557600b5462000d79906001600160a01b0316476200292e565b6040516370a0823160e01b815260009062000e369030906370a082319062000da69083906004016200401b565b60206040518083038186803b15801562000dbf57600080fd5b505afa15801562000dd4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000dfa919062003f6e565b6040518060400160405280601c81526020017f4441543a3a20616d6f756e742065786365656473203936206269747300000000815250620029d4565b600b5490915062000e539030906001600160a01b03168362002a06565b505b62000fd2565b600b5462000e73906001600160a01b0316476200292e565b601c54601b54604080516315ab88c960e31b815290516001600160a01b039384169363e6a4390593169163ad5c4648916004808301926020929190829003018186803b15801562000ec357600080fd5b505afa15801562000ed8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000efe919062003c85565b306040518363ffffffff1660e01b815260040162000f1e9291906200402f565b60206040518083038186803b15801562000f3757600080fd5b505afa15801562000f4c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000f72919062003c85565b601d80546001600160a01b0319166001600160a01b039290921691909117905562000fa16103e8600062002d48565b601d5462000fb8906001600160a01b031662002dc7565b62000fc4600062002e25565b62000fce62002e47565b5050505b5050505050565b6040518060400160405280600481526020016354616b6560e01b81525081565b6009546000906001600160a01b03848116911614156200102d5760405162461bcd60e51b815260040162000bd5906200440d565b60006000198314156200104457506000196200106c565b62001069836040518060600160405280602581526020016200538360259139620029d4565b90505b3360008181526002602090815260408083206001600160a01b03891680855292529182902080546001600160601b0319166001600160601b03861617905590519091907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590620010de90859062004b84565b60405180910390a360019150505b92915050565b600a6020526000908152604090205460ff1681565b60135481565b60015481565b600f546001600160a01b0316156200113f5760405162461bcd60e51b815260040162000bd590620041b3565b565b600b546001600160a01b031633146200116e5760405162461bcd60e51b815260040162000bd590620049d3565b601f805460ff60a01b1916600160a01b179055565b601a546001600160a01b031681565b60006200119e62001ba2565b6001600160a01b0316336001600160a01b031614620011e357600954600160a01b900460ff16620011e35760405162461bcd60e51b815260040162000bd590620049fd565b6001600160a01b03841660009081526002602090815260408083203380855290835281842054825160608101909352602580845291946001600160601b039091169390926200123c9288926200538390830139620029d4565b9050866001600160a01b0316836001600160a01b0316141580156200126a57506001600160601b0382811614155b156200131a5760006200129883836040518060600160405280603d81526020016200540c603d91396200300c565b6001600160a01b038981166000818152600260209081526040808320948a16808452949091529081902080546001600160601b0319166001600160601b0386161790555192935090917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906200131090859062004b84565b60405180910390a3505b6200132787878362002a06565b600193505050505b9392505050565b6009546001600160a01b031681565b60105481565b60006016548210156200136157506000620013cc565b600060016017541415620013be57600060135490506200138a84600d54600202600c546200304e565b91506200139a82828002620031dc565b9150620013a78262003204565b9150620013b582826200277f565b915050620013c9565b6000915050620013cc565b90505b919050565b7fea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb81565b601281565b600c5481565b60185481565b6019546001600160a01b031681565b600b546001600160a01b031681565b600b546001600160a01b03163314620014515760405162461bcd60e51b815260040162000bd590620049d3565b6200113f6200327d565b620014656200338d565b6000546001600160a01b03908116911614620014955760405162461bcd60e51b815260040162000bd59062004781565b620014a08162002dc7565b50565b600e546001600160a01b031615620014cf5760405162461bcd60e51b815260040162000bd590620042db565b60006011558462001523577f107dddb4541735557564238389eccfc9979bfdde5e57e24e9777b6fe79b4d22f60175460016040516200151092919062004b38565b60405180910390a160016017556200155b565b6f4b3b4ca85a86c47a098a2240000000008510620015555760405162461bcd60e51b815260040162000bd59062004b10565b60108590555b600084116200157e5760405162461bcd60e51b815260040162000bd59062004237565b6012849055600060135582620015a85760405162461bcd60e51b815260040162000bd5906200472a565b60008211620015cb5760405162461bcd60e51b815260040162000bd590620042b0565b6001600160801b038310620015f45760405162461bcd60e51b815260040162000bd5906200468f565b6001600160801b0382106200161d5760405162461bcd60e51b815260040162000bd590620046bc565b600c839055600d8290556127108111156200164c5760405162461bcd60e51b815260040162000bd59062004376565b6014819055670de0b6b3a7640000601655600b8054336001600160a01b03199182168117909255600e80548216909217909155600f80549091166001600160a01b038816179055604080518082018252600481526354616b6560e01b602091820152815180830190925260018252601960f91b9101527f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f818137f2b4abdd30e9b19adb6d019d7ef80212f3f15073dd2f6902e776bed7b07fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a56200172f62003391565b306040516020016200174695949392919062004134565b60408051601f198184030181529190528051602090910120601855505050505050565b604051806040016040528060018152602001601960f91b81525081565b600d5481565b6004602052600090815260409020546001600160a01b031681565b620014a0338262003395565b601f546001600160a01b031681565b60066020526000908152604090205463ffffffff1681565b620017e46200338d565b6000546001600160a01b03908116911614620018145760405162461bcd60e51b815260040162000bd59062004781565b62001820828262002d48565b5050565b6001600160a01b03166000908152600360205260409020546001600160601b031690565b620018526200338d565b6000546001600160a01b03908116911614620018825760405162461bcd60e51b815260040162000bd59062004781565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b620018d66200338d565b6000546001600160a01b03908116911614620019065760405162461bcd60e51b815260040162000bd59062004781565b6200113f62002807565b6000438210620019345760405162461bcd60e51b815260040162000bd5906200451e565b6001600160a01b03831660009081526006602052604090205463ffffffff168062001964576000915050620010ec565b6001600160a01b038416600090815260056020908152604080832063ffffffff600019860181168552925290912054168310620019e2576001600160a01b03841660009081526005602090815260408083206000199490940163ffffffff1683529290522054600160201b90046001600160601b03169050620010ec565b6001600160a01b038416600090815260056020908152604080832083805290915290205463ffffffff1683101562001a1f576000915050620010ec565b600060001982015b8163ffffffff168163ffffffff16111562001aea57600282820363ffffffff1604810362001a5462003c41565b506001600160a01b038716600090815260056020908152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b0316918101919091529087141562001ac257602001519450620010ec9350505050565b805163ffffffff1687111562001adb5781935062001ae2565b6001820392505b505062001a27565b506001600160a01b038516600090815260056020908152604080832063ffffffff909416835292905220546001600160601b03600160201b9091041691505092915050565b60076020526000908152604090205481565b62001b4b6200338d565b6000546001600160a01b0390811691161462001b7b5760405162461bcd60e51b815260040162000bd59062004781565b6001600160a01b03166000908152600a60205260409020805460ff19169055565b60165481565b6000546001600160a01b031690565b60006018547fea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb60001b8a8a8a8a8a60405160200162001bf696959493929190620040fe565b6040516020818303038152906040528051906020012060405160200162001c1f92919062003ffd565b60408051601f19818403018152919052805160209091012090506001600160a01b03891662001c625760405162461bcd60e51b815260040162000bd590620045e9565b6001818585856040516000815260200160405260405162001c87949392919062004160565b6020604051602081039080840390855afa15801562001caa573d6000803e3d6000fd5b505050602060405103516001600160a01b0316896001600160a01b03161462001ce75760405162461bcd60e51b815260040162000bd59062004755565b85158062001cf55750854211155b62001d145760405162461bcd60e51b815260040162000bd590620041e2565b6001600160a01b0389166000908152600760205260409020805460018101909155871462001d565760405162461bcd60e51b815260040162000bd59062004a9b565b60008562001d6657600062001d6a565b6000195b905062001d798a8a836200281c565b50505050505050505050565b6040518060400160405280600481526020016354414b4560e01b81525081565b62001daf6200338d565b6000546001600160a01b0390811691161462001ddf5760405162461bcd60e51b815260040162000bd59062004781565b620014a08162002e25565b60145481565b60026017541462001e155760405162461bcd60e51b815260040162000bd590620045bf565b600b546001600160a01b0316331462001e425760405162461bcd60e51b815260040162000bd590620049d3565b601d54600b546040516001600160a01b039283169260009284929116906228de8042019062001e719062003c58565b62001e7f9392919062004049565b604051809103906000f08015801562001e9c573d6000803e3d6000fd5b50601e80546001600160a01b0319166001600160a01b0383811691909117918290556040516370a0823160e01b81529293508481169263a9059cbb929091169083906370a082319062001ef49030906004016200401b565b60206040518083038186803b15801562001f0d57600080fd5b505afa15801562001f22573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001f48919062003f6e565b6040518363ffffffff1660e01b815260040162001f6792919062004096565b602060405180830381600087803b15801562001f8257600080fd5b505af115801562001f97573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001fbd919062003f36565b505050565b601f54600160a01b900460ff1662001fee5760405162461bcd60e51b815260040162000bd590620048e5565b6001600160a01b038316620020175760405162461bcd60e51b815260040162000bd5906200420e565b600081116200203a5760405162461bcd60e51b815260040162000bd59062004618565b6013546012541015620020615760405162461bcd60e51b815260040162000bd59062004287565b6000806200206f846200134b565b90506012546200208b82601354620031dc90919063ffffffff16565b10620020b65760135460125460019350620020a6916200277f565b9050620020b381620022be565b93505b82811015620020d95760405162461bcd60e51b815260040162000bd5906200434e565b846001600160a01b0316336001600160a01b03167f89f5adc174562e07c9c9b1cae7109bbecb21cf9d1b2847e550042b8653c54a0e86846040516200212092919062004b38565b60405180910390a3620021368434600162003421565b6200218330866200217d846040518060400160405280601c81526020017f4441543a3a20616d6f756e742065786365656473203936206269747300000000815250620029d4565b62002a06565b601354620021929082620031dc565b6013556017546001148015620021a55750815b1562000fd25762000fd26200327d565b60115481565b6000620021c762001ba2565b6001600160a01b0316336001600160a01b0316146200220c57600954600160a01b900460ff166200220c5760405162461bcd60e51b815260040162000bd590620049fd565b600062002233836040518060600160405280602681526020016200532560269139620029d4565b90506200224233858362002a06565b5060019392505050565b6001600160a01b03811660009081526006602052604081205463ffffffff1680620022795760006200132f565b6001600160a01b0383166000908152600560209081526040808320600019850163ffffffff168452909152902054600160201b90046001600160601b03169392505050565b60008060016017541415620013be576013546000620022de8583620031dc565b9050620022ec81806200273f565b9050620022fc818380026200277f565b90506200231281600c54600d546002026200304e565b92505050620013c9565b601f54600160a01b900460ff1681565b601d546001600160a01b031681565b600854600160601b90046001600160a01b031681565b6008546001600160601b031681565b60175481565b600e546001600160a01b03163314620023935760405162461bcd60e51b815260040162000bd590620047e3565b6001600160a01b038516620023bc5760405162461bcd60e51b815260040162000bd5906200420e565b600e80546001600160a01b0319166001600160a01b03878116919091179091558416620023fd5760405162461bcd60e51b815260040162000bd5906200420e565b601a80546001600160a01b0319166001600160a01b038681169190911790915583166200243e5760405162461bcd60e51b815260040162000bd5906200420e565b601980546001600160a01b038086166001600160a01b03199283161792839055601a54601b80548416918316919091179055601c80549092169216919091179055816200249f5760405162461bcd60e51b815260040162000bd59062004855565b6016829055601554811015620024c95760405162461bcd60e51b815260040162000bd59062004588565b6015819055600b546001600160a01b038781169116146200256e576001600160a01b0386166200250d5760405162461bcd60e51b815260040162000bd5906200420e565b600b546001600160a01b03166000908152600360205260409020546001600160601b031680156200255157600b5462002551906001600160a01b03168883620034c6565b50600b80546001600160a01b0319166001600160a01b0388161790555b846001600160a01b0316866001600160a01b03167f56ff1a2579aed1da9e25d6d6f1135ce7af98843e17bfd90c5adfe839b46c5e0086868686604051620025b994939291906200406d565b60405180910390a3505050505050565b601e546001600160a01b031681565b61271081565b600e546001600160a01b031681565b60155481565b6001600160a01b0391821660009081526002602090815260408083209390941682529190915220546001600160601b031690565b600f546001600160a01b031681565b600560209081526000928352604080842090915290825290205463ffffffff811690600160201b90046001600160601b031682565b620026756200338d565b6000546001600160a01b03908116911614620026a55760405162461bcd60e51b815260040162000bd59062004781565b6001600160a01b038116620026ce5760405162461bcd60e51b815260040162000bd59062004308565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600954600160a01b900460ff1681565b60125481565b6000826200275057506000620010ec565b828202828482816200275e57fe5b04146200132f5760405162461bcd60e51b815260040162000bd590620046e9565b60006200132f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525062003539565b60006200132f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525062003560565b6009805460ff60a01b1916600160a01b179055565b6001600160a01b038316620028455760405162461bcd60e51b815260040162000bd59062004809565b6001600160a01b0382166200286e5760405162461bcd60e51b815260040162000bd59062004645565b6000600019821415620028855750600019620028ad565b620028aa826040518060600160405280602581526020016200538360259139620029d4565b90505b6001600160a01b038481166000818152600260209081526040808320948816808452949091529081902080546001600160601b0319166001600160601b038616179055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906200292090859062004b84565b60405180910390a350505050565b80471015620029515760405162461bcd60e51b815260040162000bd590620044a1565b6000826001600160a01b0316826040516200296c9062004018565b60006040518083038185875af1925050503d8060008114620029ab576040519150601f19603f3d011682016040523d82523d6000602084013e620029b0565b606091505b505090508062001fbd5760405162461bcd60e51b815260040162000bd59062004444565b600081600160601b8410620029fe5760405162461bcd60e51b815260040162000bd591906200417e565b509192915050565b6001600160a01b03831662002a2f5760405162461bcd60e51b815260040162000bd59062004915565b6001600160a01b03821662002a585760405162461bcd60e51b815260040162000bd59062004a3e565b600854819060009062002a839062002a7a906001600160601b0316846200359b565b612710620035fc565b90506000816001600160601b031611801562002ab757506001600160a01b0384166000908152600a602052604090205460ff165b1562002be457600854600160601b90046001600160a01b031660009081526003602090815260409182902054825160608101909352603880845262002b14936001600160601b0390921692859291906200534b9083013962003650565b600854600160601b90046001600160a01b031660009081526003602090815260409182902080546001600160601b0319166001600160601b039490941693909317909255805160608101909152602780825262002b7f92869285929091620054cb908301396200300c565b91506008600c9054906101000a90046001600160a01b03166001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405162002bdb919062004b84565b60405180910390a35b6001600160a01b03851660009081526003602090815260409182902054825160608101909352603680845262002c32936001600160601b0390921692879291906200546e908301396200300c565b6001600160a01b03868116600090815260036020908152604080832080546001600160601b0319166001600160601b0396871617905592881682529082902054825160608101909352603080845262002c9d9491909116928692909190620053dc9083013962003650565b6001600160a01b038581166000818152600360205260409081902080546001600160601b0319166001600160601b0395909516949094179093559151908716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9062002d0c90869062004b84565b60405180910390a36001600160a01b0380861660009081526004602052604080822054878416835291205462000fd2929182169116856200368f565b600880546001600160a01b03808416600160601b9081026001600160601b038088166001600160601b031990951694909417841617938490556040517f7c12cc5bdbd01081255ce1e17572984e33e6f8bb2333baa84f7bf5292a65250a9462002dbb948116939290049091169062004b98565b60405180910390a15050565b62002dd16200338d565b6000546001600160a01b0390811691161462002e015760405162461bcd60e51b815260040162000bd59062004781565b6001600160a01b03166000908152600a60205260409020805460ff19166001179055565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b60026017541462002e6c5760405162461bcd60e51b815260040162000bd590620045bf565b600b546001600160a01b0316331462002e995760405162461bcd60e51b815260040162000bd590620049d3565b600b5460405160009130916001600160a01b03909116906228de8042019062002ec29062003c58565b62002ed09392919062004049565b604051809103906000f08015801562002eed573d6000803e3d6000fd5b50601f80546001600160a01b0319166001600160a01b0383811691909117918290556040516370a0823160e01b8152929350309263a9059cbb929091169083906370a082319062002f439083906004016200401b565b60206040518083038186803b15801562002f5c57600080fd5b505afa15801562002f71573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002f97919062003f6e565b6040518363ffffffff1660e01b815260040162002fb692919062004096565b602060405180830381600087803b15801562002fd157600080fd5b505af115801562002fe6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001820919062003f36565b6000836001600160601b0316836001600160601b031611158290620030465760405162461bcd60e51b815260040162000bd591906200417e565b505050900390565b60008315806200305c575082155b156200306b575060006200132f565b60008385600019816200307a57fe5b04106200309a57508383028281816200308f57fe5b0491506200132f9050565b838581811115620030ab5750859050845b848281620030b557fe5b0492506305f5e100831115620030dd57620030d183826200273f565b93506200132f92505050565b60001981016001600160801b038104600101905060001983016001600160801b03810460010190508082600019816200311257fe5b04106200318057908102908184816200312757fe5b049450630bebc20085111562003180576200314385846200273f565b94505060001986018181816200315557fe5b04905062003165816001620031dc565b90508085816200317157fe5b0495506200132f945050505050565b60016001600160801b036000198501040191508183816200319d57fe5b049450506000198601818181620031b057fe5b046001019050808481620031c057fe5b049050620031cf85826200273f565b9998505050505050505050565b6000828201838110156200132f5760405162461bcd60e51b815260040162000bd5906200439f565b6000816200321557506000620013cc565b600382116200322757506001620013cc565b6000198214156200324157506001600160801b03620013cc565b5080600260018201045b8181101562003277578091506002818285816200326457fe5b0401816200326e57fe5b0490506200324b565b50919050565b601754620032ce577f107dddb4541735557564238389eccfc9979bfdde5e57e24e9777b6fe79b4d22f6017546003604051620032bb92919062004b38565b60405180910390a1600360175562003362565b600160175414156200334857426015541115620032ff5760405162461bcd60e51b815260040162000bd59062004565565b7f107dddb4541735557564238389eccfc9979bfdde5e57e24e9777b6fe79b4d22f60175460026040516200333592919062004b38565b60405180910390a1600260175562003362565b60405162461bcd60e51b815260040162000bd59062004260565b6040517fc35789ccff76271dc0efa6bfde2f4d4a32cd48dd86278f75f8648cb068c86e3b90600090a1565b3390565b4690565b6001600160a01b03808316600081815260046020818152604080842080546003845282862054949093528787166001600160a01b031984168117909155905191909516946001600160601b039092169391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46200341b8284836200368f565b50505050565b600f546001600160a01b03166200348b578015620034635760006200344783856200277f565b905080156200345c576200345c33826200292e565b5062003485565b818314620034855760405162461bcd60e51b815260040162000bd590620047b6565b62001fbd565b8115620034ac5760405162461bcd60e51b815260040162000bd59062004885565b600f5462001fbd906001600160a01b03163330866200383b565b601754151580620034e45750600b546001600160a01b038481169116145b620035035760405162461bcd60e51b815260040162000bd590620048ae565b60006200352a826040518060600160405280602581526020016200544960259139620029d4565b90506200341b84848362002a06565b60008184841115620030465760405162461bcd60e51b815260040162000bd591906200417e565b60008183620035845760405162461bcd60e51b815260040162000bd591906200417e565b5060008385816200359157fe5b0495945050505050565b60006001600160601b038316620035b557506000620010ec565b8282026001600160601b038084169080861690831681620035d257fe5b046001600160601b0316146200132f5760405162461bcd60e51b815260040162000bd590620043d6565b600080826001600160601b031611620036295760405162461bcd60e51b815260040162000bd590620049a9565b6000826001600160601b0316846001600160601b0316816200364757fe5b04949350505050565b6000838301826001600160601b038087169083161015620036865760405162461bcd60e51b815260040162000bd591906200417e565b50949350505050565b816001600160a01b0316836001600160a01b031614158015620036bb57506000816001600160601b0316115b1562001fbd576001600160a01b038316156200377c576001600160a01b03831660009081526006602052604081205463ffffffff169081620036ff5760006200373e565b6001600160a01b0385166000908152600560209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b90506000620037688285604051806060016040528060288152602001620052fd602891396200300c565b9050620037788684848462003897565b5050505b6001600160a01b0382161562001fbd576001600160a01b03821660009081526006602052604081205463ffffffff169081620037ba576000620037f9565b6001600160a01b0384166000908152600560209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b90506000620038238285604051806060016040528060278152602001620054a46027913962003650565b9050620038338584848462003897565b505050505050565b6200341b846323b872dd60e01b8585856040516024016200385f9392919062004049565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915262003a54565b6000620038be43604051806060016040528060348152602001620053a86034913962003aeb565b905060008463ffffffff161180156200390857506001600160a01b038516600090815260056020908152604080832063ffffffff6000198901811685529252909120548282169116145b1562003969576001600160a01b0385166000908152600560209081526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff000000001916600160201b6001600160601b0385160217905562003a08565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000818152600583528781208c871682528352878120965187549451909516600160201b026fffffffffffffffffffffffff000000001995871663ffffffff19958616179590951694909417909555938252600690935292909220805460018801909316929091169190911790555b846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724848460405162003a4592919062004bba565b60405180910390a25050505050565b606062003aab826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031662003b159092919063ffffffff16565b80519091501562001fbd578080602001905181019062003acc919062003f36565b62001fbd5760405162461bcd60e51b815260040162000bd59062004ac6565b600081600160201b8410620029fe5760405162461bcd60e51b815260040162000bd591906200417e565b606062003b26848460008562003b2e565b949350505050565b60608247101562003b535760405162461bcd60e51b815260040162000bd590620044d8565b62003b5e8562003bfd565b62003b7d5760405162461bcd60e51b815260040162000bd59062004972565b60006060866001600160a01b0316858760405162003b9c919062003fdf565b60006040518083038185875af1925050503d806000811462003bdb576040519150601f19603f3d011682016040523d82523d6000602084013e62003be0565b606091505b509150915062003bf282828662003c03565b979650505050505050565b3b151590565b6060831562003c145750816200132f565b82511562003c255782518084602001fd5b8160405162461bcd60e51b815260040162000bd591906200417e565b604080518082019091526000808252602082015290565b6106d48062004c2983390190565b60006020828403121562003c78578081fd5b81356200132f8162004c03565b60006020828403121562003c97578081fd5b81516200132f8162004c03565b60008060008060008060c0878903121562003cbd578182fd5b863562003cca8162004c03565b9550602087013562003cdc8162004c03565b9450604087013562003cee8162004c03565b9350606087013562003d008162004c03565b9598949750929560808101359460a0909101359350915050565b6000806040838503121562003d2d578182fd5b823562003d3a8162004c03565b9150602083013562003d4c8162004c03565b809150509250929050565b60008060006060848603121562003d6c578283fd5b833562003d798162004c03565b9250602084013562003d8b8162004c03565b929592945050506040919091013590565b600080600080600080600080610100898b03121562003db9578182fd5b883562003dc68162004c03565b9750602089013562003dd88162004c03565b96506040890135955060608901359450608089013562003df88162004c19565b935060a089013560ff8116811462003e0e578283fd5b979a969950949793969295929450505060c08201359160e0013590565b6000806040838503121562003e3e578182fd5b823562003e4b8162004c03565b946020939093013593505050565b60008060006060848603121562003e6e578283fd5b833562003e7b8162004c03565b95602085013595506040909401359392505050565b60008060008060008060c0878903121562003ea9578182fd5b863562003eb68162004c03565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b6000806040838503121562003ef1578182fd5b823562003efe8162004c03565b9150602083013563ffffffff8116811462003d4c578182fd5b60006020828403121562003f29578081fd5b81356200132f8162004c19565b60006020828403121562003f48578081fd5b81516200132f8162004c19565b60006020828403121562003f67578081fd5b5035919050565b60006020828403121562003f80578081fd5b5051919050565b60008060006060848603121562003f9c578081fd5b8351925060208401519150604084015190509250925092565b6000806040838503121562003fc8578182fd5b82356001600160601b038116811462003d3a578283fd5b6000825162003ff381846020870162004bd4565b9190910192915050565b61190160f01b81526002810192909252602282015260420190565b90565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0394851681529290931660208301526040820152606081019190915260800190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039687168152602081019590955260408501939093526060840191909152909216608082015260a081019190915260c00190565b901515815260200190565b90815260200190565b9586526001600160a01b03948516602087015292909316604085015260608401526080830191909152151560a082015260c00190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b60006020825282518060208401526200419f81604085016020870162004bd4565b601f01601f19169190910160400192915050565b60208082526015908201527409e9c98b2be8c9ea4be86aaa4a48a9c86b2be8aa89605b1b604082015260600190565b6020808252601290820152711110550bdc195c9b5a5d0b595e1c1a5c995960721b604082015260600190565b6020808252600f908201526e494e56414c49445f4144445245535360881b604082015260600190565b6020808252600f908201526e1253959053125117d090d7d1d3d053608a1b604082015260600190565b6020808252600d908201526c494e56414c49445f535441544560981b604082015260600190565b6020808252600f908201526e1090d7d1d3d05317d4915050d21151608a1b604082015260600190565b60208082526011908201527024a72b20a624a22fa9a627a822afa222a760791b604082015260600190565b6020808252601390820152721053149150511657d253925512505312569151606a1b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252600e908201526d50524943455f534c49505041474560901b604082015260600190565b6020808252600f908201526e494e56414c49445f5245534552564560881b604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526017908201527f6d756c7469706c69636174696f6e206f766572666c6f77000000000000000000604082015260600190565b60208082526017908201527f54616b653a3a617070726f76653a2064697361626c6564000000000000000000604082015260600190565b6020808252603a908201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260408201527f6563697069656e74206d61792068617665207265766572746564000000000000606082015260800190565b6020808252601d908201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b60208082526027908201527f54616b653a3a6765745072696f72566f7465733a206e6f742079657420646574604082015266195c9b5a5b995960ca1b606082015260800190565b602080825260099082015268544f4f5f4541524c5960b81b604082015260600190565b6020808252601d908201527f4f50454e5f554e54494c5f4d41595f4e4f545f42455f52454455434544000000604082015260600190565b60208082526010908201526f4f4e4c595f41465445525f434c4f534560801b604082015260600190565b60208082526015908201527404441542f696e76616c69642d616464726573732d3605c1b604082015260600190565b6020808252601390820152724d5553545f4255595f41545f4c454153545f3160681b604082015260600190565b6020808252602a908201527f54616b653a3a617070726f76653a20617070726f766520746f20746865207a65604082015269726f206164647265737360b01b606082015260800190565b6020808252601390820152724558434553534956455f534c4f50455f4e554d60681b604082015260600190565b60208082526013908201527222ac21a2a9a9a4ab22afa9a627a822afa222a760691b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b602080825260119082015270494e56414c49445f534c4f50455f4e554d60781b604082015260600190565b6020808252601290820152711110550bda5b9d985b1a590b5c195c9b5a5d60721b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b602080825260139082015272494e434f52524543545f4d53475f56414c554560681b604082015260600190565b6020808252600c908201526b434f4e54524f4c5f4f4e4c5960a01b604082015260600190565b6020808252602c908201527f54616b653a3a617070726f76653a20617070726f76652066726f6d207468652060408201526b7a65726f206164647265737360a01b606082015260800190565b6020808252601690820152751253959053125117d3525397d253959154d51351539560521b604082015260600190565b6020808252600f908201526e0889ebe9c9ea8bea68a9c88be8aa89608b1b604082015260600190565b6020808252601c908201527f4f4e4c595f42454e45464943494152595f445552494e475f494e495400000000604082015260600190565b6020808252601690820152751513d2d15397d4d0531157d393d517d4d5105495115160521b604082015260600190565b6020808252603c908201527f54616b653a3a5f7472616e73666572546f6b656e733a2063616e6e6f7420747260408201527f616e736665722066726f6d20746865207a65726f206164647265737300000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526010908201526f6469766973696f6e206279207a65726f60801b604082015260600190565b60208082526010908201526f42454e45464943494152595f4f4e4c5960801b604082015260600190565b60208082526021908201527f54616b653a3a20546f6b656e207472616e73666572206e6f7420616c6c6f77656040820152601960fa1b606082015260800190565b6020808252603a908201527f54616b653a3a5f7472616e73666572546f6b656e733a2063616e6e6f7420747260408201527f616e7366657220746f20746865207a65726f2061646472657373000000000000606082015260800190565b6020808252601190820152704441542f696e76616c69642d6e6f6e636560781b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252600e908201526d115610d154d4d2559157d1d3d05360921b604082015260600190565b918252602082015260400190565b63ffffffff91909116815260200190565b63ffffffff9290921682526001600160601b0316602082015260400190565b60ff91909116815260200190565b6001600160601b0391909116815260200190565b6001600160601b039290921682526001600160a01b0316602082015260400190565b6001600160601b0392831681529116602082015260400190565b60005b8381101562004bf157818101518382015260200162004bd7565b838111156200341b5750506000910152565b6001600160a01b0381168114620014a057600080fd5b8015158114620014a057600080fdfe608060405234801561001057600080fd5b506040516106d43803806106d48339818101604052606081101561003357600080fd5b50805160208201516040909201519091904281116100825760405162461bcd60e51b81526004018080602001828103825260328152602001806106a26032913960400191505060405180910390fd5b600080546001600160a01b039485166001600160a01b03199182161790915560018054939094169216919091179091556002556105de806100c46000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806338af3eed1461005157806386d1a69f14610075578063b91d40011461007f578063fc0c546a14610099575b600080fd5b6100596100a1565b604080516001600160a01b039092168252519081900360200190f35b61007d6100b0565b005b6100876101c7565b60408051918252519081900360200190f35b6100596101cd565b6001546001600160a01b031690565b6002544210156100f15760405162461bcd60e51b81526004018080602001828103825260328152602001806105046032913960400191505060405180910390fd5b60008054604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561013d57600080fd5b505afa158015610151573d6000803e3d6000fd5b505050506040513d602081101561016757600080fd5b50519050806101a75760405162461bcd60e51b81526004018080602001828103825260238152602001806105866023913960400191505060405180910390fd5b6001546000546101c4916001600160a01b039182169116836101dc565b50565b60025490565b6000546001600160a01b031690565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261022e908490610233565b505050565b6060610288826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166102e49092919063ffffffff16565b80519091501561022e578080602001905160208110156102a757600080fd5b505161022e5760405162461bcd60e51b815260040180806020018281038252602a81526020018061055c602a913960400191505060405180910390fd5b60606102f384846000856102fd565b90505b9392505050565b60608247101561033e5760405162461bcd60e51b81526004018080602001828103825260268152602001806105366026913960400191505060405180910390fd5b61034785610459565b610398576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106103d75780518252601f1990920191602091820191016103b8565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610439576040519150601f19603f3d011682016040523d82523d6000602084013e61043e565b606091505b509150915061044e82828661045f565b979650505050505050565b3b151590565b6060831561046e5750816102f6565b82511561047e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104c85781810151838201526020016104b0565b50505050905090810190601f1680156104f55780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe546f6b656e54696d656c6f636b3a2063757272656e742074696d65206973206265666f72652072656c656173652074696d65416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564546f6b656e54696d656c6f636b3a206e6f20746f6b656e7320746f2072656c65617365a26469706673582212208a4695abce7ef9551fe36dc0524676fd0a70f9bcbfee39f5b7025883077b1a6564736f6c634300060c0033546f6b656e54696d656c6f636b3a2072656c656173652074696d65206973206265666f72652063757272656e742074696d6554616b653a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f777354616b653a3a7472616e736665723a20616d6f756e742065786365656473203936206269747354616b653a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206275726e466565206f766572666c6f777354616b653a3a617070726f76653a20616d6f756e742065786365656473203936206269747354616b653a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747354616b653a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206f766572666c6f777354616b653a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e63654441543a3a7472616e736665723a20616d6f756e742065786365656473203936206269747354616b653a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e636554616b653a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f777354616b653a3a5f7472616e73666572546f6b656e733a206275726e466565203e20616d6f756e74a2646970667358221220c3972c70039bbf4047003618aaf9e5516f09bd1c14ee1b9d8fba4629a45f62bf64736f6c634300060c0033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.