Contract 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa6

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x175bd9e297013f831b3f88d67d7890fe9342406ec603205447a7b5d73e44c0b9User Deposit103464742021-08-25 20:25:37146 days 17 hrs ago0xe2e4f1cd9fcea30599867b97fbd769e5a161c110 IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa62 BNB0.002602
0xfe57c050a1395c26ae7ad4f03c6f10c4917742b48b70fa9f364f1447a7930a27User Deposit100893372021-08-16 21:01:07155 days 16 hrs ago0xfe293510722602942b40546098ea403a00239d96 IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60.0002 BNB0.00097575
0xd85674268647deed300f6742d57fbecf65c0868112f6e1548b806d3dace529a8User Deposit100892182021-08-16 20:55:10155 days 16 hrs ago0xfe293510722602942b40546098ea403a00239d96 IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60.0002 BNB0.00097575
0x70bcd7d06c7b93a51d8f51d4b504303ad5221a6f180cb2875fa2ed66719bea36User Deposit100891682021-08-16 20:52:40155 days 16 hrs ago0xfe293510722602942b40546098ea403a00239d96 IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60.0002 BNB0.00097575
0x64ef6a7742dad861040cf9ab2daf440a258b632e70b141cb51227ce194b28442User Deposit100891472021-08-16 20:51:37155 days 16 hrs ago0xfe293510722602942b40546098ea403a00239d96 IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60.0002 BNB0.00097575
0x6a5986815a870f389b723727c74b171948557b0ec597c46b9322bc0c281bc95cUser Deposit100891432021-08-16 20:51:25155 days 16 hrs ago0xfe293510722602942b40546098ea403a00239d96 IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60.0002 BNB0.00097575
0x45bed8d02d49d7d7441c735ed65438b33a69c83eace4e8570d8d0bbd00113cd0User Deposit100225212021-08-14 13:09:24158 days 23 mins ago0xfe293510722602942b40546098ea403a00239d96 IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60.0002 BNB0.00097575
0x76ff3fe5f71016922ae6bdd8bf0c4b472c606728ff2d64e0a26d9de0436b1084User Withdraw To...80085862021-06-04 17:05:23228 days 20 hrs ago0xb3b26a9507326b7f7cae9c81050000ebdb60d0c2 IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60 BNB0.000231235
0x2309dc128cedf1c52a98a522921c58343ea676c4482794cdd288ab13350bc3ecUser Withdraw To...80011772021-06-04 10:54:56229 days 2 hrs ago0x91a24634aa4faec39e05fdda600fbeafce30272b IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60 BNB0.000306235
0x5e6d6cca0318ab0ba6bc5224d65f0341dd941617dfa4fdb6eca1567fea55f8d2User Withdraw To...80004892021-06-04 10:20:32229 days 3 hrs ago0xed6542664fb5b80c9e862a6ad3d17873d5f2c3cf IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60 BNB0.000306235
0x942c96a70df2e69af304bffb8d6d3a87d54f1b510ea6aa71d6ac49caa796cb05User Withdraw To...80004012021-06-04 10:16:08229 days 3 hrs ago0xace27561ac5103f38d063e34e68d2eb43b0b80d8 IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60 BNB0.000306235
0xd8790452ac2f89f289e542f14620cb60c0b8585e0e9cfaae270700cc039e1191User Withdraw To...79993402021-06-04 9:23:05229 days 4 hrs ago0xf1b0e78a2bc422df50ec9ee4c324895c9b79f80a IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60 BNB0.000306235
0x0ff22e6a5b523de157fed8c328665c660f4f229ba0e9184e4117439f7b08e8ebUser Withdraw To...79992202021-06-04 9:17:05229 days 4 hrs ago0x48a167de66f0c39122b7f6892bb71bc75ecc946e IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60 BNB0.000306235
0xc73dd6818755828c7ca9a27af9a8747c71ae9c1da7c3fafc0ffd05223135bf0bUser Withdraw To...79959042021-06-04 6:31:08229 days 7 hrs ago0xafd67a9a0efc0912070cf633e09bced4ba908feb IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60 BNB0.000306235
0x48aeedc39105f4ea5879898446ac3b01c7c57c7bb44f085bf1f29131cfec3707User Withdraw To...79958332021-06-04 6:27:35229 days 7 hrs ago0xb650462a5e764f7abbfe9d044354e84073589535 IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60 BNB0.000306235
0x9b770d02e420d40f33329698f5806fae24b7dd9268ae973441afbe2377f03666User Withdraw To...79956412021-06-04 6:17:59229 days 7 hrs ago0x0b0d33061c3ee15706c343ae3540766133aa4a3a IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60 BNB0.000306235
0x84185b7f071745ac0fd7a2f09afa9c4095215c3931678434c761a6d45bcb3b42User Withdraw To...79955902021-06-04 6:15:26229 days 7 hrs ago0xdfd8f2408b87239195917850a20ff1ecadf838dc IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60 BNB0.00017548
0xcff0e7f0be0929f0ffc1d5096e39c46d93d0e98b221ca6207c0cd4713f40a185User Withdraw To...79955872021-06-04 6:15:17229 days 7 hrs ago0xdfd8f2408b87239195917850a20ff1ecadf838dc IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60 BNB0.000306235
0x5f9fa76878016f6c34cdeafc20c52b99168ce93cb343b715514078f985a35e03User Withdraw To...79955092021-06-04 6:11:23229 days 7 hrs ago0xc689f720a36d1e03012539586c430ab87d334b37 IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60 BNB0.000306235
0x89f73ad9b6ad4c592e97ce405fcfdc595680c62f9e972e1247a534487db2dc8eUser Withdraw To...79955082021-06-04 6:11:20229 days 7 hrs ago0x9ed7f6dc2bec9b9ed96fd21bd67b9f3f247f1208 IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60 BNB0.000306235
0xffa72a8c608f70c278fe99be6a979c19261d73f985203c0b3f5a6314f9fbcd46User Withdraw To...79954932021-06-04 6:10:35229 days 7 hrs ago0x3d6b3c22671d143f0303a88d91249120b49c3073 IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60 BNB0.000306235
0x28afb6a5fecd24fad566d8b56a3181a305b5079e38d3948fd01d55f51e9a1d17User Withdraw To...79954602021-06-04 6:08:56229 days 7 hrs ago0x00eb540a0da591d99e08090808802d03ca0e317e IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60 BNB0.000306235
0x80ae77e7c3d9c7f490309930c1a75901683e9430fc1961601dba5aa27799d422User Withdraw To...79954512021-06-04 6:08:29229 days 7 hrs ago0x4529b19f34930c2cd74b137a9da7e0bbd66c7f9e IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60 BNB0.000306235
0xa0b4c3bdaa99cd24206e993ed0253ed6dfc0aab7153870145bd5fc1efb502887User Withdraw To...79954392021-06-04 6:07:53229 days 7 hrs ago0x9ddfc00545c1f03a8720a5c90e9639bed7fae661 IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60 BNB0.000306235
0xf9814193ecbbb787984166a833e19e833852a9708a452c29348eb99f1fa112c2User Withdraw To...79954192021-06-04 6:06:53229 days 7 hrs ago0xb9b6decab22ffe57084bc080eeb3d5592526a3c8 IN  0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60 BNB0.000231235
[ Download CSV Export 
Latest 20 internal transactions
Parent Txn Hash Block From To Value
0xb0ff3460ac41fc0b9cd284936a4e87054d62e7c24d7c22279db84deaa11a241579950222021-06-04 5:47:02229 days 7 hrs ago 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa6BitBook: Deployer1,571.2 BNB
0xb0ff3460ac41fc0b9cd284936a4e87054d62e7c24d7c22279db84deaa11a241579950222021-06-04 5:47:02229 days 7 hrs ago 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60xaa3d85ad9d128dfecb55424085754f6dfa643eb157.6 BNB
0xb0ff3460ac41fc0b9cd284936a4e87054d62e7c24d7c22279db84deaa11a241579950222021-06-04 5:47:02229 days 7 hrs ago 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa6 Binance: WBNB Token1,571.2 BNB
0x6700865f0e3cc02cd058b71d35714082f2383e3ff2dd210462faf07534af6b5779950192021-06-04 5:46:53229 days 7 hrs ago 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60x59e40a15ce685fdb194a0ecfa54aa7eb26c4416b5.661081243523801878 BNB
0xc6a7ed3977d108e1e5a13d40fe4cb2bbeda85eee19323f3b1f6e893beeca0c8179949952021-06-04 5:45:41229 days 7 hrs ago 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60xfebd5d2d56d9923324e0bdbe61413e5aef4f1f5c4.294661778954902864 BNB
0xa81bab1817518c62da0ba6e01e1cd819d4a924cd6fc2bd8ace34d1e8dbebbd8279949852021-06-04 5:45:11229 days 7 hrs ago 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60x968af8c01d117ac36abcd1374eee7799bf53cf424.673765627690144868 BNB
0x8e3308f88f9e578bd7201f69f9d876d4719da7a2f9eea9a73e7055fa1a4d964879949782021-06-04 5:44:50229 days 7 hrs ago 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60xa5747c711b7c08983e992dd7aeec2eebc6b713df0.045139650845360767 BNB
0x6e35543f58611beefdf939eeb11359dba3d7820c7a145d97326513a9c9d6286c79949752021-06-04 5:44:41229 days 7 hrs ago 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60xaac2c90e705851ad4e27acc117e213a09c81e4590.05830858 BNB
0x8ff4c9327da7853923ae17ee4231ce05ec657a4ced8369dada4427d84c39a18079949752021-06-04 5:44:41229 days 7 hrs ago 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60x5ef22d551ca109f5cc7996502709065b39cdd23b0.055570787165451227 BNB
0x38be705156dd47ccb5df4730e8c8574da627b1e1f9d8c0d1d5a7b116287e25e879949732021-06-04 5:44:35229 days 7 hrs ago 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60x1488118476171cd4653b54a774f4ff02666961de1.294723053502360776 BNB
0xefccb5ec80220f37e218b804a300d0e782392434d0f8e01be65b1c8f00b91dee79949702021-06-04 5:44:26229 days 7 hrs ago 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60xb3b26a9507326b7f7cae9c81050000ebdb60d0c20.10682992 BNB
0x27028fa388a06aac1ec941dc006789e3ca76d04fec07029eeb7b618c1c897f5e79949672021-06-04 5:44:17229 days 7 hrs ago 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60x11286a8d9ab6c307ce0681ad66c1b588ad85a03a45 BNB
0xb02c90046d7893f7d97381872e165cf5d726ec706cd7aa1fa96e0c9a32bd159779949602021-06-04 5:43:56229 days 7 hrs ago 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60xc728917928cd844886206e18196c2d4580722aa50.181504639460758541 BNB
0x1905ae3d3fb54719ba47d44af9ccbd2d006f32acd4ca6af36d135972867261ce79949592021-06-04 5:43:53229 days 7 hrs ago 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60x7c275e2427f3df4bf068584d097c36675429bc4a0.050260583766323116 BNB
0xdc67a2e5d6351470651a0642ac754d826ca0b728d031666f8e2219048a86532c79949592021-06-04 5:43:53229 days 7 hrs ago 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60x8ad4883942b9ba78a3b5c35fc81b78d2b411e0c456.677443558044331922 BNB
0x6176877a641b42760f05e1665c19a93e2925e5e4ec4cbaa1d2fb9c9e1fb0a74979949582021-06-04 5:43:50229 days 7 hrs ago 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60x5cfbd03f7707a61e514665578f6e1575af2458e367.016171194022285799 BNB
0x2928e6ed49ac775e58f53e5879ab396e1b58bbafffe9e318ca7273b5cdb6f1d079949572021-06-04 5:43:47229 days 7 hrs ago 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60x9e552d89ded9a78d16779e78eb54c2302894a7f08.190561662627807169 BNB
0xfad4bc07eeb5e2e683d65007bc3afef5d12c30c110e646ec98f9910d0545150079949562021-06-04 5:43:44229 days 7 hrs ago 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60xcc138ff3ba2a3dd84eeca045779a2cfe398b39440.405732851402484539 BNB
0x6f851aeec02880d0824fe213815091a8e575be3039579bf1a8ae02980090612b79949562021-06-04 5:43:44229 days 7 hrs ago 0xf4ff031f7625eacaa529d38a3d7d0d8068e46fa60xe5a350d82e4f2ab31ed9b8318e92c9aba268ac6a7.177650378621663105 BNB
0x7423e34081172a8e119a445e8cc1f1d97e82f9ea5421b204a6cadfb04d2ab6ab77754762021-05-27 14:06:09236 days 23 hrs ago 0x42c8da3539de51b74941a2530e9a82f8b08253b6  Contract Creation0 BNB
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x430D8Bd9A8E7a961082F2DC58CF168c3aA13ee35

Contract Name:
Presale01

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, Unlicense license

Contract Source Code (Solidity Multiple files format)

File 1 of 14: Presale01.sol
// SPDX-License-Identifier: UNLICENSED
// ALL RIGHTS RESERVED
// Unicrypt reserves all rights on this code. You may NOT copy these contracts.

// Forked from Ethereum mainnet for Pancakeswap on Binance Smart Chain with no code changes
// WETH = WBNB
// ETH = BNB

// Presale contract. Version 1

/**
  Allows a decentralised presale to take place, and on success creates a uniswap pair and locks liquidity on Unicrypt.
  B_TOKEN, or base token, is the token the presale attempts to raise. (Usally ETH).
  S_TOKEN, or sale token, is the token being sold, which investors buy with the base token.
  If the base currency is set to the WETH9 address, the presale is in ETH.
  Otherwise it is for an ERC20 token - such as DAI, USDC, WBTC etc.
  For the Base token - It is advised to only use tokens such as ETH (WETH), DAI, USDC or tokens that have no rebasing, or complex fee on transfers. 1 token should ideally always be 1 token.
  Token withdrawls are done on a percent of total contribution basis (opposed to via a hardcoded 'amount'). This allows 
  fee on transfer, rebasing, or any magically changing balances to still work for the Sale token.
*/

pragma solidity 0.6.12;

import "./TransferHelper.sol";
import "./EnumerableSet.sol";
import "./SafeMath.sol";
import "./ReentrancyGuard.sol";
import "./IERC20.sol";

interface IUniswapV2Factory {
    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function createPair(address tokenA, address tokenB) external returns (address pair);
}

interface IPresaleLockForwarder {
    function lockLiquidity (IERC20 _baseToken, IERC20 _saleToken, uint256 _baseAmount, uint256 _saleAmount, uint256 _unlock_date, address payable _withdrawer) external;
    function uniswapPairIsInitialised (address _token0, address _token1) external view returns (bool);
}

interface IWETH {
    function deposit() external payable;
    function transfer(address to, uint value) external returns (bool);
    function withdraw(uint) external;
}

interface IPresaleSettings {
    function getMaxPresaleLength () external view returns (uint256);
    function getRound1Length () external view returns (uint256);
    function userHoldsSufficientRound1Token (address _user) external view returns (bool);
    function referrerIsValid(address _referrer) external view returns (bool);
    function getBaseFee () external view returns (uint256);
    function getTokenFee () external view returns (uint256);
    function getEthAddress () external view returns (address payable);
    function getTokenAddress () external view returns (address payable);
    function getReferralFee () external view returns (uint256);
    function getEthCreationFee () external view returns (uint256);
}

contract Presale01 is ReentrancyGuard {
  using SafeMath for uint256;
  using EnumerableSet for EnumerableSet.AddressSet;
  
  /// @notice Presale Contract Version, used to choose the correct ABI to decode the contract
  uint256 public CONTRACT_VERSION = 1;
  
  struct PresaleInfo {
    address payable PRESALE_OWNER;
    IERC20 S_TOKEN; // sale token
    IERC20 B_TOKEN; // base token // usually WETH (ETH)
    uint256 TOKEN_PRICE; // 1 base token = ? s_tokens, fixed price
    uint256 MAX_SPEND_PER_BUYER; // maximum base token BUY amount per account
    uint256 AMOUNT; // the amount of presale tokens up for presale
    uint256 HARDCAP;
    uint256 SOFTCAP;
    uint256 LIQUIDITY_PERCENT; // divided by 1000
    uint256 LISTING_RATE; // fixed rate at which the token will list on uniswap
    uint256 START_BLOCK;
    uint256 END_BLOCK;
    uint256 LOCK_PERIOD; // unix timestamp -> e.g. 2 weeks
    bool PRESALE_IN_ETH; // if this flag is true the presale is raising ETH, otherwise an ERC20 token such as DAI
  }
  
  struct PresaleFeeInfo {
    uint256 UNICRYPT_BASE_FEE; // divided by 1000
    uint256 UNICRYPT_TOKEN_FEE; // divided by 1000
    uint256 REFERRAL_FEE; // divided by 1000
    address payable BASE_FEE_ADDRESS;
    address payable TOKEN_FEE_ADDRESS;
    address payable REFERRAL_FEE_ADDRESS; // if this is not address(0), there is a valid referral
  }
  
  struct PresaleStatus {
    bool WHITELIST_ONLY; // if set to true only whitelisted members may participate
    bool LP_GENERATION_COMPLETE; // final flag required to end a presale and enable withdrawls
    bool FORCE_FAILED; // set this flag to force fail the presale
    uint256 TOTAL_BASE_COLLECTED; // total base currency raised (usually ETH)
    uint256 TOTAL_TOKENS_SOLD; // total presale tokens sold
    uint256 TOTAL_TOKENS_WITHDRAWN; // total tokens withdrawn post successful presale
    uint256 TOTAL_BASE_WITHDRAWN; // total base tokens withdrawn on presale failure
    uint256 ROUND1_LENGTH; // in blocks
    uint256 NUM_BUYERS; // number of unique participants
  }

  struct BuyerInfo {
    uint256 baseDeposited; // total base token (usually ETH) deposited by user, can be withdrawn on presale failure
    uint256 tokensOwed; // num presale tokens a user is owed, can be withdrawn on presale success
  }
  
  PresaleInfo public PRESALE_INFO;
  PresaleFeeInfo public PRESALE_FEE_INFO;
  PresaleStatus public STATUS;
  address public PRESALE_GENERATOR;
  IPresaleLockForwarder public PRESALE_LOCK_FORWARDER;
  IPresaleSettings public PRESALE_SETTINGS;
  address UNICRYPT_DEV_ADDRESS;
  IUniswapV2Factory public UNI_FACTORY;
  IWETH public WETH;
  mapping(address => BuyerInfo) public BUYERS;
  EnumerableSet.AddressSet private WHITELIST;

  constructor(address _presaleGenerator) public {
    PRESALE_GENERATOR = _presaleGenerator;
    UNI_FACTORY = IUniswapV2Factory(0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73);
    WETH = IWETH(0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c);
    PRESALE_SETTINGS = IPresaleSettings(0x8a5e208C1cA217Db8Ee64e8d390CF1f25De35A4e);
    PRESALE_LOCK_FORWARDER = IPresaleLockForwarder(0x46ae2bE0585e7f03d7A22411a76C0fd5CD24FCc3);
    UNICRYPT_DEV_ADDRESS = 0x60e2E1b2a317EdfC870b6Fc6886F69083FB2099a;
  }
  
  function init1 (
    address payable _presaleOwner, 
    uint256 _amount,
    uint256 _tokenPrice, 
    uint256 _maxEthPerBuyer, 
    uint256 _hardcap, 
    uint256 _softcap,
    uint256 _liquidityPercent,
    uint256 _listingRate,
    uint256 _startblock,
    uint256 _endblock,
    uint256 _lockPeriod
    ) external {
          
      require(msg.sender == PRESALE_GENERATOR, 'FORBIDDEN');
      PRESALE_INFO.PRESALE_OWNER = _presaleOwner;
      PRESALE_INFO.AMOUNT = _amount;
      PRESALE_INFO.TOKEN_PRICE = _tokenPrice;
      PRESALE_INFO.MAX_SPEND_PER_BUYER = _maxEthPerBuyer;
      PRESALE_INFO.HARDCAP = _hardcap;
      PRESALE_INFO.SOFTCAP = _softcap;
      PRESALE_INFO.LIQUIDITY_PERCENT = _liquidityPercent;
      PRESALE_INFO.LISTING_RATE = _listingRate;
      PRESALE_INFO.START_BLOCK = _startblock;
      PRESALE_INFO.END_BLOCK = _endblock;
      PRESALE_INFO.LOCK_PERIOD = _lockPeriod;
  }
  
  function init2 (
    IERC20 _baseToken,
    IERC20 _presaleToken,
    uint256 _unicryptBaseFee,
    uint256 _unicryptTokenFee,
    uint256 _referralFee,
    address payable _baseFeeAddress,
    address payable _tokenFeeAddress,
    address payable _referralAddress
    ) external {
          
      require(msg.sender == PRESALE_GENERATOR, 'FORBIDDEN');
      // require(!PRESALE_LOCK_FORWARDER.uniswapPairIsInitialised(address(_presaleToken), address(_baseToken)), 'PAIR INITIALISED');
      
      PRESALE_INFO.PRESALE_IN_ETH = address(_baseToken) == address(WETH);
      PRESALE_INFO.S_TOKEN = _presaleToken;
      PRESALE_INFO.B_TOKEN = _baseToken;
      PRESALE_FEE_INFO.UNICRYPT_BASE_FEE = _unicryptBaseFee;
      PRESALE_FEE_INFO.UNICRYPT_TOKEN_FEE = _unicryptTokenFee;
      PRESALE_FEE_INFO.REFERRAL_FEE = _referralFee;
      
      PRESALE_FEE_INFO.BASE_FEE_ADDRESS = _baseFeeAddress;
      PRESALE_FEE_INFO.TOKEN_FEE_ADDRESS = _tokenFeeAddress;
      PRESALE_FEE_INFO.REFERRAL_FEE_ADDRESS = _referralAddress;
      STATUS.ROUND1_LENGTH = PRESALE_SETTINGS.getRound1Length();
  }
  
  modifier onlyPresaleOwner() {
    require(PRESALE_INFO.PRESALE_OWNER == msg.sender, "NOT PRESALE OWNER");
    _;
  }
  
  function presaleStatus () public view returns (uint256) {
    if (STATUS.FORCE_FAILED) {
      return 3; // FAILED - force fail
    }
    if ((block.number > PRESALE_INFO.END_BLOCK) && (STATUS.TOTAL_BASE_COLLECTED < PRESALE_INFO.SOFTCAP)) {
      return 3; // FAILED - softcap not met by end block
    }
    if (STATUS.TOTAL_BASE_COLLECTED >= PRESALE_INFO.HARDCAP) {
      return 2; // SUCCESS - hardcap met
    }
    if ((block.number > PRESALE_INFO.END_BLOCK) && (STATUS.TOTAL_BASE_COLLECTED >= PRESALE_INFO.SOFTCAP)) {
      return 2; // SUCCESS - endblock and soft cap reached
    }
    if ((block.number >= PRESALE_INFO.START_BLOCK) && (block.number <= PRESALE_INFO.END_BLOCK)) {
      return 1; // ACTIVE - deposits enabled
    }
    return 0; // QUED - awaiting start block
  }
  
  // accepts msg.value for eth or _amount for ERC20 tokens
  function userDeposit (uint256 _amount) external payable nonReentrant {
    require(presaleStatus() == 1, 'NOT ACTIVE'); // ACTIVE
    if (STATUS.WHITELIST_ONLY) {
      require(WHITELIST.contains(msg.sender), 'NOT WHITELISTED');
    }
    // Presale Round 1 - require participant to hold a certain token and balance
    if (block.number < PRESALE_INFO.START_BLOCK + STATUS.ROUND1_LENGTH) { // 276 blocks = 1 hour
        require(PRESALE_SETTINGS.userHoldsSufficientRound1Token(msg.sender), 'INSUFFICENT ROUND 1 TOKEN BALANCE');
    }
    BuyerInfo storage buyer = BUYERS[msg.sender];
    uint256 amount_in = PRESALE_INFO.PRESALE_IN_ETH ? msg.value : _amount;
    uint256 allowance = PRESALE_INFO.MAX_SPEND_PER_BUYER.sub(buyer.baseDeposited);
    uint256 remaining = PRESALE_INFO.HARDCAP - STATUS.TOTAL_BASE_COLLECTED;
    allowance = allowance > remaining ? remaining : allowance;
    if (amount_in > allowance) {
      amount_in = allowance;
    }
    uint256 tokensSold = amount_in.mul(PRESALE_INFO.TOKEN_PRICE).div(10 ** uint256(PRESALE_INFO.B_TOKEN.decimals()));
    require(tokensSold > 0, 'ZERO TOKENS');
    if (buyer.baseDeposited == 0) {
        STATUS.NUM_BUYERS++;
    }
    buyer.baseDeposited = buyer.baseDeposited.add(amount_in);
    buyer.tokensOwed = buyer.tokensOwed.add(tokensSold);
    STATUS.TOTAL_BASE_COLLECTED = STATUS.TOTAL_BASE_COLLECTED.add(amount_in);
    STATUS.TOTAL_TOKENS_SOLD = STATUS.TOTAL_TOKENS_SOLD.add(tokensSold);
    
    // return unused ETH
    if (PRESALE_INFO.PRESALE_IN_ETH && amount_in < msg.value) {
      msg.sender.transfer(msg.value.sub(amount_in));
    }
    // deduct non ETH token from user
    if (!PRESALE_INFO.PRESALE_IN_ETH) {
      TransferHelper.safeTransferFrom(address(PRESALE_INFO.B_TOKEN), msg.sender, address(this), amount_in);
    }
  }
  
  // withdraw presale tokens
  // percentile withdrawls allows fee on transfer or rebasing tokens to still work
  function userWithdrawTokens () external nonReentrant {
    require(STATUS.LP_GENERATION_COMPLETE, 'AWAITING LP GENERATION');
    BuyerInfo storage buyer = BUYERS[msg.sender];
    uint256 tokensRemainingDenominator = STATUS.TOTAL_TOKENS_SOLD.sub(STATUS.TOTAL_TOKENS_WITHDRAWN);
    uint256 tokensOwed = PRESALE_INFO.S_TOKEN.balanceOf(address(this)).mul(buyer.tokensOwed).div(tokensRemainingDenominator);
    require(tokensOwed > 0, 'NOTHING TO WITHDRAW');
    STATUS.TOTAL_TOKENS_WITHDRAWN = STATUS.TOTAL_TOKENS_WITHDRAWN.add(buyer.tokensOwed);
    buyer.tokensOwed = 0;
    TransferHelper.safeTransfer(address(PRESALE_INFO.S_TOKEN), msg.sender, tokensOwed);
  }
  
  // on presale failure
  // percentile withdrawls allows fee on transfer or rebasing tokens to still work
  function userWithdrawBaseTokens () external nonReentrant {
    require(presaleStatus() == 3, 'NOT FAILED'); // FAILED
    BuyerInfo storage buyer = BUYERS[msg.sender];
    uint256 baseRemainingDenominator = STATUS.TOTAL_BASE_COLLECTED.sub(STATUS.TOTAL_BASE_WITHDRAWN);
    uint256 remainingBaseBalance = PRESALE_INFO.PRESALE_IN_ETH ? address(this).balance : PRESALE_INFO.B_TOKEN.balanceOf(address(this));
    uint256 tokensOwed = remainingBaseBalance.mul(buyer.baseDeposited).div(baseRemainingDenominator);
    require(tokensOwed > 0, 'NOTHING TO WITHDRAW');
    STATUS.TOTAL_BASE_WITHDRAWN = STATUS.TOTAL_BASE_WITHDRAWN.add(buyer.baseDeposited);
    buyer.baseDeposited = 0;
    TransferHelper.safeTransferBaseToken(address(PRESALE_INFO.B_TOKEN), msg.sender, tokensOwed, !PRESALE_INFO.PRESALE_IN_ETH);
  }
  
  // on presale failure
  // allows the owner to withdraw the tokens they sent for presale & initial liquidity
  function ownerWithdrawTokens () external onlyPresaleOwner {
    require(presaleStatus() == 3); // FAILED
    TransferHelper.safeTransfer(address(PRESALE_INFO.S_TOKEN), PRESALE_INFO.PRESALE_OWNER, PRESALE_INFO.S_TOKEN.balanceOf(address(this)));
  }
  

  // Can be called at any stage before or during the presale to cancel it before it ends.
  // If the pair already exists on uniswap and it contains the presale token as liquidity 
  // the final stage of the presale 'addLiquidity()' will fail. This function 
  // allows anyone to end the presale prematurely to release funds in such a case.
  function forceFailIfPairExists () external {
    require(!STATUS.LP_GENERATION_COMPLETE && !STATUS.FORCE_FAILED);
    if (PRESALE_LOCK_FORWARDER.uniswapPairIsInitialised(address(PRESALE_INFO.S_TOKEN), address(PRESALE_INFO.B_TOKEN))) {
        STATUS.FORCE_FAILED = true;
    }
  }
  
  // if something goes wrong in LP generation
  function forceFailByUnicrypt () external {
      require(msg.sender == UNICRYPT_DEV_ADDRESS);
      STATUS.FORCE_FAILED = true;
  }
  
  // on presale success, this is the final step to end the presale, lock liquidity and enable withdrawls of the sale token.
  // This function does not use percentile distribution. Rebasing mechanisms, fee on transfers, or any deflationary logic
  // are not taken into account at this stage to ensure stated liquidity is locked and the pool is initialised according to 
  // the presale parameters and fixed prices.
  function addLiquidity() external nonReentrant {
    require(!STATUS.LP_GENERATION_COMPLETE, 'GENERATION COMPLETE');
    require(presaleStatus() == 2, 'NOT SUCCESS'); // SUCCESS
    // Fail the presale if the pair exists and contains presale token liquidity
    if (PRESALE_LOCK_FORWARDER.uniswapPairIsInitialised(address(PRESALE_INFO.S_TOKEN), address(PRESALE_INFO.B_TOKEN))) {
        STATUS.FORCE_FAILED = true;
        return;
    }
    
    uint256 unicryptBaseFee = STATUS.TOTAL_BASE_COLLECTED.mul(PRESALE_FEE_INFO.UNICRYPT_BASE_FEE).div(1000);
    
    // base token liquidity
    uint256 baseLiquidity = STATUS.TOTAL_BASE_COLLECTED.sub(unicryptBaseFee).mul(PRESALE_INFO.LIQUIDITY_PERCENT).div(1000);
    if (PRESALE_INFO.PRESALE_IN_ETH) {
        WETH.deposit{value : baseLiquidity}();
    }
    TransferHelper.safeApprove(address(PRESALE_INFO.B_TOKEN), address(PRESALE_LOCK_FORWARDER), baseLiquidity);
    
    // sale token liquidity
    uint256 tokenLiquidity = baseLiquidity.mul(PRESALE_INFO.LISTING_RATE).div(10 ** uint256(PRESALE_INFO.B_TOKEN.decimals()));
    TransferHelper.safeApprove(address(PRESALE_INFO.S_TOKEN), address(PRESALE_LOCK_FORWARDER), tokenLiquidity);
    
    PRESALE_LOCK_FORWARDER.lockLiquidity(PRESALE_INFO.B_TOKEN, PRESALE_INFO.S_TOKEN, baseLiquidity, tokenLiquidity, block.timestamp + PRESALE_INFO.LOCK_PERIOD, PRESALE_INFO.PRESALE_OWNER);
    
    // transfer fees
    uint256 unicryptTokenFee = STATUS.TOTAL_TOKENS_SOLD.mul(PRESALE_FEE_INFO.UNICRYPT_TOKEN_FEE).div(1000);
    // referrals are checked for validity in the presale generator
    if (PRESALE_FEE_INFO.REFERRAL_FEE_ADDRESS != address(0)) {
        // Base token fee
        uint256 referralBaseFee = unicryptBaseFee.mul(PRESALE_FEE_INFO.REFERRAL_FEE).div(1000);
        TransferHelper.safeTransferBaseToken(address(PRESALE_INFO.B_TOKEN), PRESALE_FEE_INFO.REFERRAL_FEE_ADDRESS, referralBaseFee, !PRESALE_INFO.PRESALE_IN_ETH);
        unicryptBaseFee = unicryptBaseFee.sub(referralBaseFee);
        // Token fee
        uint256 referralTokenFee = unicryptTokenFee.mul(PRESALE_FEE_INFO.REFERRAL_FEE).div(1000);
        TransferHelper.safeTransfer(address(PRESALE_INFO.S_TOKEN), PRESALE_FEE_INFO.REFERRAL_FEE_ADDRESS, referralTokenFee);
        unicryptTokenFee = unicryptTokenFee.sub(referralTokenFee);
    }
    TransferHelper.safeTransferBaseToken(address(PRESALE_INFO.B_TOKEN), PRESALE_FEE_INFO.BASE_FEE_ADDRESS, unicryptBaseFee, !PRESALE_INFO.PRESALE_IN_ETH);
    TransferHelper.safeTransfer(address(PRESALE_INFO.S_TOKEN), PRESALE_FEE_INFO.TOKEN_FEE_ADDRESS, unicryptTokenFee);
    
    // burn unsold tokens
    uint256 remainingSBalance = PRESALE_INFO.S_TOKEN.balanceOf(address(this));
    if (remainingSBalance > STATUS.TOTAL_TOKENS_SOLD) {
        uint256 burnAmount = remainingSBalance.sub(STATUS.TOTAL_TOKENS_SOLD);
        TransferHelper.safeTransfer(address(PRESALE_INFO.S_TOKEN), 0x000000000000000000000000000000000000dEaD, burnAmount);
    }
    
    // send remaining base tokens to presale owner
    uint256 remainingBaseBalance = PRESALE_INFO.PRESALE_IN_ETH ? address(this).balance : PRESALE_INFO.B_TOKEN.balanceOf(address(this));
    TransferHelper.safeTransferBaseToken(address(PRESALE_INFO.B_TOKEN), PRESALE_INFO.PRESALE_OWNER, remainingBaseBalance, !PRESALE_INFO.PRESALE_IN_ETH);
    
    STATUS.LP_GENERATION_COMPLETE = true;
  }
  
  function updateMaxSpendLimit(uint256 _maxSpend) external onlyPresaleOwner {
    PRESALE_INFO.MAX_SPEND_PER_BUYER = _maxSpend;
  }
  
  // postpone or bring a presale forward, this will only work when a presale is inactive.
  // i.e. current start block > block.number
  function updateBlocks(uint256 _startBlock, uint256 _endBlock) external onlyPresaleOwner {
    require(PRESALE_INFO.START_BLOCK > block.number);
    require(_endBlock.sub(_startBlock) <= PRESALE_SETTINGS.getMaxPresaleLength());
    PRESALE_INFO.START_BLOCK = _startBlock;
    PRESALE_INFO.END_BLOCK = _endBlock;
  }

  // editable at any stage of the presale
  function setWhitelistFlag(bool _flag) external onlyPresaleOwner {
    STATUS.WHITELIST_ONLY = _flag;
  }

  // editable at any stage of the presale
  function editWhitelist(address[] memory _users, bool _add) external onlyPresaleOwner {
    if (_add) {
        for (uint i = 0; i < _users.length; i++) {
          WHITELIST.add(_users[i]);
        }
    } else {
        for (uint i = 0; i < _users.length; i++) {
          WHITELIST.remove(_users[i]);
        }
    }
  }

  // whitelist getters
  function getWhitelistedUsersLength () external view returns (uint256) {
    return WHITELIST.length();
  }
  
  function getWhitelistedUserAtIndex (uint256 _index) external view returns (address) {
    return WHITELIST.at(_index);
  }
  
  function getUserWhitelistStatus (address _user) external view returns (bool) {
    return WHITELIST.contains(_user);
  }
}

File 2 of 14: Context.sol
// SPDX-License-Identifier: MIT

// From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/GSN/Context.sol
// Subject to the MIT license.

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;
    }
}

File 3 of 14: EnumerableSet.sol
// SPDX-License-Identifier: MIT

// From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/EnumerableSet.sol
// Subject to the MIT license.

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;

        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping (bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) { // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint256(_at(set._inner, index)));
    }


    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}

File 4 of 14: IERC20.sol
pragma solidity >=0.5.0;

interface IERC20 {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function decimals() external view returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);
}

File 5 of 14: Migrations.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.8.0;

contract Migrations {
  address public owner = msg.sender;
  uint public last_completed_migration;

  modifier restricted() {
    require(
      msg.sender == owner,
      "This function is restricted to the contract's owner"
    );
    _;
  }

  function setCompleted(uint completed) public restricted {
    last_completed_migration = completed;
  }
}

File 6 of 14: Ownable.sol
// SPDX-License-Identifier: MIT

// From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol
// Subject to the MIT license.

pragma solidity >=0.6.0 <0.8.0;

import "./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;
    }
}

File 7 of 14: PresaleFactory.sol
// SPDX-License-Identifier: UNLICENSED
// ALL RIGHTS RESERVED
// Unicrypt reserves all rights on this code. You may NOT copy these contracts.

// Forked from Ethereum mainnet for Pancakeswap on Binance Smart Chain with no code changes
// WETH = WBNB
// ETH = BNB

// This contract logs all presales on the platform

pragma solidity 0.6.12;

import "./Ownable.sol";
import "./EnumerableSet.sol";

contract PresaleFactory is Ownable {
    using EnumerableSet for EnumerableSet.AddressSet;
    
    EnumerableSet.AddressSet private presales;
    EnumerableSet.AddressSet private presaleGenerators;
    
    mapping(address => EnumerableSet.AddressSet) private presaleOwners;
    
    event presaleRegistered(address presaleContract);
    
    function adminAllowPresaleGenerator (address _address, bool _allow) public onlyOwner {
        if (_allow) {
            presaleGenerators.add(_address);
        } else {
            presaleGenerators.remove(_address);
        }
    }
    
    /**
     * @notice called by a registered PresaleGenerator upon Presale creation
     */
    function registerPresale (address _presaleAddress) public {
        require(presaleGenerators.contains(msg.sender), 'FORBIDDEN');
        presales.add(_presaleAddress);
        emit presaleRegistered(_presaleAddress);
    }
    
    /**
     * @notice Number of allowed PresaleGenerators
     */
    function presaleGeneratorsLength() external view returns (uint256) {
        return presaleGenerators.length();
    }
    
    /**
     * @notice Gets the address of a registered PresaleGenerator at specified index
     */
    function presaleGeneratorAtIndex(uint256 _index) external view returns (address) {
        return presaleGenerators.at(_index);
    }
    
    /**
     * @notice returns true if the presale address was generated by the Unicrypt presale platform
     */
    function presaleIsRegistered(address _presaleAddress) external view returns (bool) {
        return presales.contains(_presaleAddress);
    }
    
    /**
     * @notice The length of all presales on the platform
     */
    function presalesLength() external view returns (uint256) {
        return presales.length();
    }
    
    /**
     * @notice gets a presale at a specific index. Although using Enumerable Set, since presales are only added and not removed, indexes will never change
     * @return the address of the Presale contract at index
     */
    function presaleAtIndex(uint256 _index) external view returns (address) {
        return presales.at(_index);
    }
    
}

File 8 of 14: PresaleGenerator01.sol
// SPDX-License-Identifier: UNLICENSED
// ALL RIGHTS RESERVED
// Unicrypt reserves all rights on this code. You may NOT copy these contracts.

// Forked from Ethereum mainnet for Pancakeswap on Binance Smart Chain with no code changes
// WETH = WBNB
// ETH = BNB

// This contract generates Presale01 contracts and registers them in the PresaleFactory.
// Ideally you should not interact with this contract directly, and use the Unicrypt presale app instead so warnings can be shown where necessary.

pragma solidity 0.6.12;

import "./Presale01.sol";
import "./SafeMath.sol";
import "./Ownable.sol";
import "./IERC20.sol";
import "./TransferHelper.sol";
import "./PresaleHelper.sol";

interface IPresaleFactory {
    function registerPresale (address _presaleAddress) external;
    function presaleIsRegistered(address _presaleAddress) external view returns (bool);
}

interface IUniswapV2Locker {
    function lockLPToken (address _lpToken, uint256 _amount, uint256 _unlock_date, address payable _referral, bool _fee_in_eth, address payable _withdrawer) external payable;
}

contract PresaleGenerator01 is Ownable {
    using SafeMath for uint256;
    
    IPresaleFactory public PRESALE_FACTORY;
    IPresaleSettings public PRESALE_SETTINGS;
    
    struct PresaleParams {
        uint256 amount;
        uint256 tokenPrice;
        uint256 maxSpendPerBuyer;
        uint256 hardcap;
        uint256 softcap;
        uint256 liquidityPercent;
        uint256 listingRate; // sale token listing price on uniswap
        uint256 startblock;
        uint256 endblock;
        uint256 lockPeriod;
    }
    
    constructor() public {
        PRESALE_FACTORY = IPresaleFactory(0x206EC1d1C0147f5B2b8D302901Bfb6b7CBFAcb09);
        PRESALE_SETTINGS = IPresaleSettings(0x8a5e208C1cA217Db8Ee64e8d390CF1f25De35A4e);
    }
    
    /**
     * @notice Creates a new Presale contract and registers it in the PresaleFactory.sol.
     */
    function createPresale (
      address payable _presaleOwner,
      IERC20 _presaleToken,
      IERC20 _baseToken,
      address payable _referralAddress,
      uint256[10] memory uint_params
      ) public payable {
        
        PresaleParams memory params;
        params.amount = uint_params[0];
        params.tokenPrice = uint_params[1];
        params.maxSpendPerBuyer = uint_params[2];
        params.hardcap = uint_params[3];
        params.softcap = uint_params[4];
        params.liquidityPercent = uint_params[5];
        params.listingRate = uint_params[6];
        params.startblock = uint_params[7];
        params.endblock = uint_params[8];
        params.lockPeriod = uint_params[9];
        
        if (params.lockPeriod < 4 weeks) {
            params.lockPeriod = 4 weeks;
        }
        
        // Charge ETH fee for contract creation
        require(msg.value == PRESALE_SETTINGS.getEthCreationFee(), 'FEE NOT MET');
        PRESALE_SETTINGS.getEthAddress().transfer(PRESALE_SETTINGS.getEthCreationFee());
        
        if (_referralAddress != address(0)) {
            require(PRESALE_SETTINGS.referrerIsValid(_referralAddress), 'INVALID REFERRAL');
        }
        
        require(params.amount >= 10000, 'MIN DIVIS'); // minimum divisibility
        require(params.endblock.sub(params.startblock) <= PRESALE_SETTINGS.getMaxPresaleLength());
        require(params.tokenPrice.mul(params.hardcap) > 0, 'INVALID PARAMS'); // ensure no overflow for future calculations
        require(params.liquidityPercent >= 300 && params.liquidityPercent <= 1000, 'MIN LIQUIDITY'); // 30% minimum liquidity lock
        
        uint256 tokensRequiredForPresale = PresaleHelper.calculateAmountRequired(params.amount, params.tokenPrice, params.listingRate, params.liquidityPercent, PRESALE_SETTINGS.getTokenFee());
      
        Presale01 newPresale = new Presale01(address(this));
        TransferHelper.safeTransferFrom(address(_presaleToken), address(msg.sender), address(newPresale), tokensRequiredForPresale);
        newPresale.init1(_presaleOwner, params.amount, params.tokenPrice, params.maxSpendPerBuyer, params.hardcap, params.softcap, 
        params.liquidityPercent, params.listingRate, params.startblock, params.endblock, params.lockPeriod);
        newPresale.init2(_baseToken, _presaleToken, PRESALE_SETTINGS.getBaseFee(), PRESALE_SETTINGS.getTokenFee(), PRESALE_SETTINGS.getReferralFee(), PRESALE_SETTINGS.getEthAddress(), PRESALE_SETTINGS.getTokenAddress(), _referralAddress);
        PRESALE_FACTORY.registerPresale(address(newPresale));
    }
    
}

File 9 of 14: PresaleHelper.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.6.12;

// A simple library for initial presale parameter calculations
import "./SafeMath.sol";

library PresaleHelper {
    using SafeMath for uint256;
    
    function calculateAmountRequired (uint256 _amount, uint256 _tokenPrice, uint256 _listingRate, uint256 _liquidityPercent, uint256 _tokenFee) public pure returns (uint256) {
        uint256 listingRatePercent = _listingRate.mul(1000).div(_tokenPrice);
        uint256 unicryptTokenFee = _amount.mul(_tokenFee).div(1000);
        uint256 amountMinusFee = _amount.sub(unicryptTokenFee);
        uint256 liquidityRequired = amountMinusFee.mul(_liquidityPercent).mul(listingRatePercent).div(1000000);
        uint256 tokensRequiredForPresale = _amount.add(liquidityRequired).add(unicryptTokenFee);
        return tokensRequiredForPresale;
    }
}

File 10 of 14: PresaleLockForwarder.sol
// SPDX-License-Identifier: UNLICENSED
// ALL RIGHTS RESERVED
// Unicrypt reserves all rights on this code. You may NOT copy these contracts.

// Forked from Ethereum mainnet for Pancakeswap on Binance Smart Chain with no code changes
// WETH = WBNB
// ETH = BNB

/**
    This contract creates the lock on behalf of each presale. This contract will be whitelisted to bypass the flat rate 
    ETH fee. Please do not use the below locking code in your own contracts as the lock will fail without the ETH fee
*/

pragma solidity 0.6.12;

import "./Ownable.sol";
import "./TransferHelper.sol";
import "./IERC20.sol";

interface IPresaleFactory {
    function registerPresale (address _presaleAddress) external;
    function presaleIsRegistered(address _presaleAddress) external view returns (bool);
}

interface IUniswapV2Locker {
    function lockLPToken (address _lpToken, uint256 _amount, uint256 _unlock_date, address payable _referral, bool _fee_in_eth, address payable _withdrawer) external payable;
}

interface IUniswapV2Factory {
    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function createPair(address tokenA, address tokenB) external returns (address pair);
}

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

contract PresaleLockForwarder is Ownable {
    
    IPresaleFactory public PRESALE_FACTORY;
    IUniswapV2Locker public UNICRYPT_LOCKER;
    IUniswapV2Factory public UNI_FACTORY;
    
    constructor() public {
        PRESALE_FACTORY = IPresaleFactory(0x206EC1d1C0147f5B2b8D302901Bfb6b7CBFAcb09);
        UNICRYPT_LOCKER = IUniswapV2Locker(0xC765bddB93b0D1c1A88282BA0fa6B2d00E3e0c83);
        UNI_FACTORY = IUniswapV2Factory(0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73);
    }

    /**
        Send in _token0 as the PRESALE token, _token1 as the BASE token (usually WETH) for the check to work. As anyone can create a pair,
        and send WETH to it while a presale is running, but no one should have access to the presale token. If they do and they send it to 
        the pair, scewing the initial liquidity, this function will return true
    */
    function uniswapPairIsInitialised (address _token0, address _token1) public view returns (bool) {
        address pairAddress = UNI_FACTORY.getPair(_token0, _token1);
        if (pairAddress == address(0)) {
            return false;
        }
        uint256 balance = IERC20(_token0).balanceOf(pairAddress);
        if (balance > 0) {
            return true;
        }
        return false;
    }
    
    function lockLiquidity (IERC20 _baseToken, IERC20 _saleToken, uint256 _baseAmount, uint256 _saleAmount, uint256 _unlock_date, address payable _withdrawer) external {
        require(PRESALE_FACTORY.presaleIsRegistered(msg.sender), 'PRESALE NOT REGISTERED');
        address pair = UNI_FACTORY.getPair(address(_baseToken), address(_saleToken));
        if (pair == address(0)) {
            UNI_FACTORY.createPair(address(_baseToken), address(_saleToken));
            pair = UNI_FACTORY.getPair(address(_baseToken), address(_saleToken));
        }
        
        TransferHelper.safeTransferFrom(address(_baseToken), msg.sender, address(pair), _baseAmount);
        TransferHelper.safeTransferFrom(address(_saleToken), msg.sender, address(pair), _saleAmount);
        IUniswapV2Pair(pair).mint(address(this));
        uint256 totalLPTokensMinted = IUniswapV2Pair(pair).balanceOf(address(this));
        require(totalLPTokensMinted != 0 , "LP creation failed");
    
        TransferHelper.safeApprove(pair, address(UNICRYPT_LOCKER), totalLPTokensMinted);
        uint256 unlock_date = _unlock_date > 9999999999 ? 9999999999 : _unlock_date;
        UNICRYPT_LOCKER.lockLPToken(pair, totalLPTokensMinted, unlock_date, address(0), true, _withdrawer);
    }
    
}

File 11 of 14: PresaleSettings.sol
// SPDX-License-Identifier: UNLICENSED
// ALL RIGHTS RESERVED
// Unicrypt reserves all rights on this code. You may NOT copy these contracts.

// Forked from Ethereum mainnet for Pancakeswap on Binance Smart Chain with no code changes
// WETH = WBNB
// ETH = BNB

// Settings to initialize presale contracts and edit fees.

pragma solidity 0.6.12;

import "./Ownable.sol";
import "./EnumerableSet.sol";
import "./IERC20.sol";

contract PresaleSettings is Ownable {
    using EnumerableSet for EnumerableSet.AddressSet;
    
    EnumerableSet.AddressSet private EARLY_ACCESS_TOKENS;
    mapping(address => uint256) public EARLY_ACCESS_MAP;
    
    EnumerableSet.AddressSet private ALLOWED_REFERRERS;
    
    struct Settings {
        uint256 BASE_FEE; // base fee divided by 1000
        uint256 TOKEN_FEE; // token fee divided by 1000
        uint256 REFERRAL_FEE; // a referrals percentage of the presale profits divided by 1000
        address payable ETH_FEE_ADDRESS;
        address payable TOKEN_FEE_ADDRESS;
        uint256 ETH_CREATION_FEE; // fee to generate a presale contract on the platform
        uint256 ROUND1_LENGTH; // length of round 1 in blocks
        uint256 MAX_PRESALE_LENGTH; // maximum difference between start and endblock
    }
    
    Settings public SETTINGS;
    
    constructor() public {
        SETTINGS.BASE_FEE = 18; // 1.8%
        SETTINGS.TOKEN_FEE = 18; // 1.8%
        SETTINGS.REFERRAL_FEE = 200; // 20%
        SETTINGS.ETH_CREATION_FEE = 1e18;
        SETTINGS.ETH_FEE_ADDRESS = msg.sender;
        SETTINGS.TOKEN_FEE_ADDRESS = msg.sender;
        SETTINGS.ROUND1_LENGTH = 533; // 553 blocks = 2 hours
        SETTINGS.MAX_PRESALE_LENGTH = 93046; // 2 weeks
    }
    
    function getRound1Length () external view returns (uint256) {
        return SETTINGS.ROUND1_LENGTH;
    }

    function getMaxPresaleLength () external view returns (uint256) {
        return SETTINGS.MAX_PRESALE_LENGTH;
    }
    
    function getBaseFee () external view returns (uint256) {
        return SETTINGS.BASE_FEE;
    }
    
    function getTokenFee () external view returns (uint256) {
        return SETTINGS.TOKEN_FEE;
    }
    
    function getReferralFee () external view returns (uint256) {
        return SETTINGS.REFERRAL_FEE;
    }
    
    function getEthCreationFee () external view returns (uint256) {
        return SETTINGS.ETH_CREATION_FEE;
    }
    
    function getEthAddress () external view returns (address payable) {
        return SETTINGS.ETH_FEE_ADDRESS;
    }
    
    function getTokenAddress () external view returns (address payable) {
        return SETTINGS.TOKEN_FEE_ADDRESS;
    }
    
    function setFeeAddresses(address payable _ethAddress, address payable _tokenFeeAddress) external onlyOwner {
        SETTINGS.ETH_FEE_ADDRESS = _ethAddress;
        SETTINGS.TOKEN_FEE_ADDRESS = _tokenFeeAddress;
    }
    
    function setFees(uint256 _baseFee, uint256 _tokenFee, uint256 _ethCreationFee, uint256 _referralFee) external onlyOwner {
        SETTINGS.BASE_FEE = _baseFee;
        SETTINGS.TOKEN_FEE = _tokenFee;
        SETTINGS.REFERRAL_FEE = _referralFee;
        SETTINGS.ETH_CREATION_FEE = _ethCreationFee;
    }
    
    function setRound1Length(uint256 _round1Length) external onlyOwner {
        SETTINGS.ROUND1_LENGTH = _round1Length;
    }

    function setMaxPresaleLength(uint256 _maxLength) external onlyOwner {
        SETTINGS.MAX_PRESALE_LENGTH = _maxLength;
    }
    
    function editAllowedReferrers(address payable _referrer, bool _allow) external onlyOwner {
        if (_allow) {
            ALLOWED_REFERRERS.add(_referrer);
        } else {
            ALLOWED_REFERRERS.remove(_referrer);
        }
    }
    
    function editEarlyAccessTokens(address _token, uint256 _holdAmount, bool _allow) external onlyOwner {
        if (_allow) {
            EARLY_ACCESS_TOKENS.add(_token);
        } else {
            EARLY_ACCESS_TOKENS.remove(_token);
        }
        EARLY_ACCESS_MAP[_token] = _holdAmount;
    }
    
    // there will never be more than 10 items in this array. Care for gas limits will be taken.
    // We are aware too many tokens in this unbounded array results in out of gas errors.
    function userHoldsSufficientRound1Token (address _user) external view returns (bool) {
        if (earlyAccessTokensLength() == 0) {
            return true;
        }
        for (uint i = 0; i < earlyAccessTokensLength(); i++) {
          (address token, uint256 amountHold) = getEarlyAccessTokenAtIndex(i);
          if (IERC20(token).balanceOf(_user) >= amountHold) {
              return true;
          }
        }
        return false;
    }
    
    function getEarlyAccessTokenAtIndex(uint256 _index) public view returns (address, uint256) {
        address tokenAddress = EARLY_ACCESS_TOKENS.at(_index);
        return (tokenAddress, EARLY_ACCESS_MAP[tokenAddress]);
    }
    
    function earlyAccessTokensLength() public view returns (uint256) {
        return EARLY_ACCESS_TOKENS.length();
    }
    
    // Referrers
    function allowedReferrersLength() external view returns (uint256) {
        return ALLOWED_REFERRERS.length();
    }
    
    function getReferrerAtIndex(uint256 _index) external view returns (address) {
        return ALLOWED_REFERRERS.at(_index);
    }
    
    function referrerIsValid(address _referrer) external view returns (bool) {
        return ALLOWED_REFERRERS.contains(_referrer);
    }
    
}

File 12 of 14: ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

// From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/ReentrancyGuard.sol
// Subject to the MIT license.

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 13 of 14: SafeMath.sol
// SPDX-License-Identifier: MIT

// From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
// Subject to the MIT license.

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;
    }
}

File 14 of 14: TransferHelper.sol
pragma solidity 0.6.12;

/**
    helper methods for interacting with ERC20 tokens that do not consistently return true/false
    with the addition of a transfer function to send eth or an erc20 token
*/
library TransferHelper {
    function safeApprove(address token, address to, uint value) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED');
    }

    function safeTransfer(address token, address to, uint value) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED');
    }

    function safeTransferFrom(address token, address from, address to, uint value) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED');
    }
    
    // sends ETH or an erc20 token
    function safeTransferBaseToken(address token, address payable to, uint value, bool isERC20) internal {
        if (!isERC20) {
            to.transfer(value);
        } else {
            (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
            require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED');
        }
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_presaleGenerator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"BUYERS","outputs":[{"internalType":"uint256","name":"baseDeposited","type":"uint256"},{"internalType":"uint256","name":"tokensOwed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CONTRACT_VERSION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRESALE_FEE_INFO","outputs":[{"internalType":"uint256","name":"UNICRYPT_BASE_FEE","type":"uint256"},{"internalType":"uint256","name":"UNICRYPT_TOKEN_FEE","type":"uint256"},{"internalType":"uint256","name":"REFERRAL_FEE","type":"uint256"},{"internalType":"address payable","name":"BASE_FEE_ADDRESS","type":"address"},{"internalType":"address payable","name":"TOKEN_FEE_ADDRESS","type":"address"},{"internalType":"address payable","name":"REFERRAL_FEE_ADDRESS","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRESALE_GENERATOR","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRESALE_INFO","outputs":[{"internalType":"address payable","name":"PRESALE_OWNER","type":"address"},{"internalType":"contract IERC20","name":"S_TOKEN","type":"address"},{"internalType":"contract IERC20","name":"B_TOKEN","type":"address"},{"internalType":"uint256","name":"TOKEN_PRICE","type":"uint256"},{"internalType":"uint256","name":"MAX_SPEND_PER_BUYER","type":"uint256"},{"internalType":"uint256","name":"AMOUNT","type":"uint256"},{"internalType":"uint256","name":"HARDCAP","type":"uint256"},{"internalType":"uint256","name":"SOFTCAP","type":"uint256"},{"internalType":"uint256","name":"LIQUIDITY_PERCENT","type":"uint256"},{"internalType":"uint256","name":"LISTING_RATE","type":"uint256"},{"internalType":"uint256","name":"START_BLOCK","type":"uint256"},{"internalType":"uint256","name":"END_BLOCK","type":"uint256"},{"internalType":"uint256","name":"LOCK_PERIOD","type":"uint256"},{"internalType":"bool","name":"PRESALE_IN_ETH","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRESALE_LOCK_FORWARDER","outputs":[{"internalType":"contract IPresaleLockForwarder","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRESALE_SETTINGS","outputs":[{"internalType":"contract IPresaleSettings","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS","outputs":[{"internalType":"bool","name":"WHITELIST_ONLY","type":"bool"},{"internalType":"bool","name":"LP_GENERATION_COMPLETE","type":"bool"},{"internalType":"bool","name":"FORCE_FAILED","type":"bool"},{"internalType":"uint256","name":"TOTAL_BASE_COLLECTED","type":"uint256"},{"internalType":"uint256","name":"TOTAL_TOKENS_SOLD","type":"uint256"},{"internalType":"uint256","name":"TOTAL_TOKENS_WITHDRAWN","type":"uint256"},{"internalType":"uint256","name":"TOTAL_BASE_WITHDRAWN","type":"uint256"},{"internalType":"uint256","name":"ROUND1_LENGTH","type":"uint256"},{"internalType":"uint256","name":"NUM_BUYERS","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNI_FACTORY","outputs":[{"internalType":"contract IUniswapV2Factory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"contract IWETH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"addLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_users","type":"address[]"},{"internalType":"bool","name":"_add","type":"bool"}],"name":"editWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"forceFailByUnicrypt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"forceFailIfPairExists","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getUserWhitelistStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getWhitelistedUserAtIndex","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWhitelistedUsersLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_presaleOwner","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_tokenPrice","type":"uint256"},{"internalType":"uint256","name":"_maxEthPerBuyer","type":"uint256"},{"internalType":"uint256","name":"_hardcap","type":"uint256"},{"internalType":"uint256","name":"_softcap","type":"uint256"},{"internalType":"uint256","name":"_liquidityPercent","type":"uint256"},{"internalType":"uint256","name":"_listingRate","type":"uint256"},{"internalType":"uint256","name":"_startblock","type":"uint256"},{"internalType":"uint256","name":"_endblock","type":"uint256"},{"internalType":"uint256","name":"_lockPeriod","type":"uint256"}],"name":"init1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_baseToken","type":"address"},{"internalType":"contract IERC20","name":"_presaleToken","type":"address"},{"internalType":"uint256","name":"_unicryptBaseFee","type":"uint256"},{"internalType":"uint256","name":"_unicryptTokenFee","type":"uint256"},{"internalType":"uint256","name":"_referralFee","type":"uint256"},{"internalType":"address payable","name":"_baseFeeAddress","type":"address"},{"internalType":"address payable","name":"_tokenFeeAddress","type":"address"},{"internalType":"address payable","name":"_referralAddress","type":"address"}],"name":"init2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ownerWithdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"presaleStatus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_flag","type":"bool"}],"name":"setWhitelistFlag","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"uint256","name":"_endBlock","type":"uint256"}],"name":"updateBlocks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSpend","type":"uint256"}],"name":"updateMaxSpendLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"userDeposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"userWithdrawBaseTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"userWithdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526001805534801561001457600080fd5b506040516200456b3803806200456b8339818101604052602081101561003957600080fd5b8101908080519060200190929190505050600160008190555080601d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555073ca143ce32fe78f1f7019d7d551a6402fc5350c73602160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555073bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c602260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550738a5e208c1ca217db8ee64e8d390cf1f25de35a4e601f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507346ae2be0585e7f03d7a22411a76c0fd5cd24fcc3601e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507360e2e1b2a317edfc870b6fc6886f69083fb2099a602060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061431e806200024d6000396000f3fe60806040526004361061019c5760003560e01c8063927ac44d116100ec578063c39e7dbb1161008a578063e8078d9411610064578063e8078d94146109db578063e86e6340146109f2578063f868e76614610a09578063fe8121de14610a375761019c565b8063c39e7dbb1461091a578063c870279e14610931578063e33865b3146109725761019c565b8063acfb2355116100c6578063acfb235514610791578063ad5c4648146107bc578063b93ac792146107fd578063b9863a44146108b35761019c565b8063927ac44d14610619578063a5d0de8c146106ea578063a94e7e801461077a5761019c565b806346ed62c911610159578063760fe56e11610133578063760fe56e146104ed5780637bfc66001461053257806389fc0056146105735780638c301df8146105b45761019c565b806346ed62c9146103bb5780634bb18e3f146104ab57806373c30b6c146104d65761019c565b80630bbebba4146101a157806310c55f2b146101e257806324ef1bc71461024e57806338b90333146102895780633f74aa38146102b45780634200e4fc1461037e575b600080fd5b3480156101ad57600080fd5b506101b6610a4e565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101ee57600080fd5b506102316004803603602081101561020557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a74565b604051808381526020018281526020019250505060405180910390f35b34801561025a57600080fd5b506102876004803603602081101561027157600080fd5b8101908080359060200190929190505050610a98565b005b34801561029557600080fd5b5061029e610b6b565b6040518082815260200191505060405180910390f35b3480156102c057600080fd5b506102c9610b71565b604051808f73ffffffffffffffffffffffffffffffffffffffff1681526020018e73ffffffffffffffffffffffffffffffffffffffff1681526020018d73ffffffffffffffffffffffffffffffffffffffff1681526020018c81526020018b81526020018a815260200189815260200188815260200187815260200186815260200185815260200184815260200183815260200182151581526020019e50505050505050505050505050505060405180910390f35b34801561038a57600080fd5b506103b9600480360360208110156103a157600080fd5b81019080803515159060200190929190505050610c38565b005b3480156103c757600080fd5b506104a960048036036101008110156103df57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d1e565b005b3480156104b757600080fd5b506104c0611075565b6040518082815260200191505060405180910390f35b3480156104e257600080fd5b506104eb611086565b005b3480156104f957600080fd5b506105306004803603604081101561051057600080fd5b810190808035906020019092919080359060200190929190505050611100565b005b34801561053e57600080fd5b506105476112b0565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561057f57600080fd5b506105886112d6565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105c057600080fd5b506105ed600480360360208110156105d757600080fd5b81019080803590602001909291905050506112fc565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561062557600080fd5b506106e86004803603604081101561063c57600080fd5b810190808035906020019064010000000081111561065957600080fd5b82018360208201111561066b57600080fd5b8035906020019184602083028401116401000000008311171561068d57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803515159060200190929190505050611319565b005b3480156106f657600080fd5b506106ff611473565b604051808781526020018681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff168152602001965050505050505060405180910390f35b34801561078657600080fd5b5061078f6114fd565b005b34801561079d57600080fd5b506107a66116f4565b6040518082815260200191505060405180910390f35b3480156107c857600080fd5b506107d16117b8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561080957600080fd5b506108b1600480360361016081101561082157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291905050506117de565b005b3480156108bf57600080fd5b50610902600480360360208110156108d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611956565b60405180821515815260200191505060405180910390f35b34801561092657600080fd5b5061092f611973565b005b34801561093d57600080fd5b50610946611ce0565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561097e57600080fd5b50610987611d06565b604051808a1515815260200189151581526020018815158152602001878152602001868152602001858152602001848152602001838152602001828152602001995050505050505050505060405180910390f35b3480156109e757600080fd5b506109f0611d69565b005b3480156109fe57600080fd5b50610a0761297b565b005b610a3560048036036020811015610a1f57600080fd5b8101908080359060200190929190505050612b05565b005b348015610a4357600080fd5b50610a4c61314a565b005b601f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60236020528060005260406000206000915090508060000154908060010154905082565b3373ffffffffffffffffffffffffffffffffffffffff16600260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b5e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4e4f542050524553414c45204f574e455200000000000000000000000000000081525060200191505060405180910390fd5b8060026004018190555050565b60015481565b60028060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600301549080600401549080600501549080600601549080600701549080600801549080600901549080600a01549080600b01549080600c01549080600d0160009054906101000a900460ff1690508e565b3373ffffffffffffffffffffffffffffffffffffffff16600260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cfe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4e4f542050524553414c45204f574e455200000000000000000000000000000081525060200191505060405180910390fd5b80601660000160006101000a81548160ff02191690831515021790555050565b601d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610de1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f464f5242494444454e000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b602260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16146002600d0160006101000a81548160ff02191690831515021790555086600260010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550876002800160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085601060000181905550846010600101819055508360106002018190555082601060030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081601060040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080601060050160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aac912166040518163ffffffff1660e01b815260040160206040518083038186803b15801561102757600080fd5b505afa15801561103b573d6000803e3d6000fd5b505050506040513d602081101561105157600080fd5b81019080805190602001909291905050506016600501819055505050505050505050565b60006110816024613489565b905090565b602060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146110e057600080fd5b6001601660000160026101000a81548160ff021916908315150217905550565b3373ffffffffffffffffffffffffffffffffffffffff16600260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4e4f542050524553414c45204f574e455200000000000000000000000000000081525060200191505060405180910390fd5b436002600a0154116111d757600080fd5b601f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663120ac7e66040518163ffffffff1660e01b815260040160206040518083038186803b15801561123f57600080fd5b505afa158015611253573d6000803e3d6000fd5b505050506040513d602081101561126957600080fd5b810190808051906020019092919050505061128d838361349e90919063ffffffff16565b111561129857600080fd5b816002600a0181905550806002600b01819055505050565b601e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b602160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006113128260246134e890919063ffffffff16565b9050919050565b3373ffffffffffffffffffffffffffffffffffffffff16600260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4e4f542050524553414c45204f574e455200000000000000000000000000000081525060200191505060405180910390fd5b801561142c5760005b82518110156114265761141883828151811061140057fe5b6020026020010151602461350290919063ffffffff16565b5080806001019150506113e8565b5061146f565b60005b825181101561146d5761145f83828151811061144757fe5b6020026020010151602461353290919063ffffffff16565b50808060010191505061142f565b505b5050565b60108060000154908060010154908060020154908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905086565b3373ffffffffffffffffffffffffffffffffffffffff16600260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146115c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4e4f542050524553414c45204f574e455200000000000000000000000000000081525060200191505060405180910390fd5b60036115cd6116f4565b146115d757600080fd5b6116f2600260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156116b257600080fd5b505afa1580156116c6573d6000803e3d6000fd5b505050506040513d60208110156116dc57600080fd5b8101908080519060200190929190505050613562565b565b6000601660000160029054906101000a900460ff161561171757600390506117b5565b6002600b0154431180156117345750600260070154601660010154105b1561174257600390506117b5565b6002600601546016600101541061175c57600290506117b5565b6002600b01544311801561177a575060026007015460166001015410155b1561178857600290506117b5565b6002600a015443101580156117a257506002600b01544311155b156117b057600190506117b5565b600090505b90565b602260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146118a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f464f5242494444454e000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8a600260000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555089600260050181905550886002600301819055508760026004018190555086600260060181905550856002600701819055508460026008018190555083600260090181905550826002600a0181905550816002600b0181905550806002600c01819055505050505050505050505050565b600061196c82602461374590919063ffffffff16565b9050919050565b600260005414156119ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b600260008190555060036119fe6116f4565b14611a71576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4e4f54204641494c45440000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000602360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000611ad360166004015460166001015461349e90919063ffffffff16565b905060006002600d0160009054906101000a900460ff16611bb9576002800160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611b7957600080fd5b505afa158015611b8d573d6000803e3d6000fd5b505050506040513d6020811015611ba357600080fd5b8101908080519060200190929190505050611bbb565b475b90506000611be883611bda86600001548561377590919063ffffffff16565b6137fb90919063ffffffff16565b905060008111611c60576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f4e4f5448494e4720544f2057495448445241570000000000000000000000000081525060200191505060405180910390fd5b611c7c846000015460166004015461384590919063ffffffff16565b60166004018190555060008460000181905550611cd26002800160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633836002600d0160009054906101000a900460ff16156138cd565b505050506001600081905550565b601d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60168060000160009054906101000a900460ff16908060000160019054906101000a900460ff16908060000160029054906101000a900460ff16908060010154908060020154908060030154908060040154908060050154908060060154905089565b60026000541415611de2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6002600081905550601660000160019054906101000a900460ff1615611e70576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f47454e45524154494f4e20434f4d504c4554450000000000000000000000000081525060200191505060405180910390fd5b6002611e7a6116f4565b14611eed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4e4f54205355434345535300000000000000000000000000000000000000000081525060200191505060405180910390fd5b601e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638d8c70bb600260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166002800160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611fdd57600080fd5b505afa158015611ff1573d6000803e3d6000fd5b505050506040513d602081101561200757600080fd5b810190808051906020019092919050505015612040576001601660000160026101000a81548160ff021916908315150217905550612971565b60006120736103e861206560106000015460166001015461377590919063ffffffff16565b6137fb90919063ffffffff16565b905060006120ba6103e86120ac60026008015461209e8660166001015461349e90919063ffffffff16565b61377590919063ffffffff16565b6137fb90919063ffffffff16565b90506002600d0160009054906101000a900460ff161561215857602260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561213e57600080fd5b505af1158015612152573d6000803e3d6000fd5b50505050505b6121a96002800160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16601e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683613b03565b600061227f6002800160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561221857600080fd5b505afa15801561222c573d6000803e3d6000fd5b505050506040513d602081101561224257600080fd5b810190808051906020019092919050505060ff16600a0a6122716002600901548561377590919063ffffffff16565b6137fb90919063ffffffff16565b90506122d3600260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16601e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683613b03565b601e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632277d0e36002800160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685856002600c01544201600260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518763ffffffff1660e01b8152600401808773ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019650505050505050600060405180830381600087803b15801561242757600080fd5b505af115801561243b573d6000803e3d6000fd5b5050505060006124726103e861246460106001015460166002015461377590919063ffffffff16565b6137fb90919063ffffffff16565b9050600073ffffffffffffffffffffffffffffffffffffffff16601060050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146126175760006124fb6103e86124ed6010600201548861377590919063ffffffff16565b6137fb90919063ffffffff16565b90506125656002800160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16601060050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836002600d0160009054906101000a900460ff16156138cd565b612578818661349e90919063ffffffff16565b945060006125a86103e861259a6010600201548661377590919063ffffffff16565b6137fb90919063ffffffff16565b90506125ff600260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16601060050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683613562565b612612818461349e90919063ffffffff16565b925050505b61267f6002800160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16601060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16866002600d0160009054906101000a900460ff16156138cd565b6126d4600260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16601060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683613562565b6000600260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561276257600080fd5b505afa158015612776573d6000803e3d6000fd5b505050506040513d602081101561278c57600080fd5b810190808051906020019092919050505090506016600201548111156127fc5760006127c66016600201548361349e90919063ffffffff16565b90506127fa600260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661dead83613562565b505b60006002600d0160009054906101000a900460ff166128e0576002800160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156128a057600080fd5b505afa1580156128b4573d6000803e3d6000fd5b505050506040513d60208110156128ca57600080fd5b81019080805190602001909291905050506128e2565b475b905061294c6002800160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836002600d0160009054906101000a900460ff16156138cd565b6001601660000160016101000a81548160ff0219169083151502179055505050505050505b6001600081905550565b601660000160019054906101000a900460ff161580156129ab5750601660000160029054906101000a900460ff16155b6129b457600080fd5b601e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638d8c70bb600260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166002800160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612aa457600080fd5b505afa158015612ab8573d6000803e3d6000fd5b505050506040513d6020811015612ace57600080fd5b810190808051906020019092919050505015612b03576001601660000160026101000a81548160ff0219169083151502179055505b565b60026000541415612b7e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60026000819055506001612b906116f4565b14612c03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4e4f54204143544956450000000000000000000000000000000000000000000081525060200191505060405180910390fd5b601660000160009054906101000a900460ff1615612ca257612c2f33602461374590919063ffffffff16565b612ca1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4e4f542057484954454c4953544544000000000000000000000000000000000081525060200191505060405180910390fd5b5b6016600501546002600a015401431015612dd057601f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634a6da481336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612d3f57600080fd5b505afa158015612d53573d6000803e3d6000fd5b505050506040513d6020811015612d6957600080fd5b8101908080519060200190929190505050612dcf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806142616021913960400191505060405180910390fd5b5b6000602360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060006002600d0160009054906101000a900460ff16612e325782612e34565b345b90506000612e54836000015460026004015461349e90919063ffffffff16565b90506000601660010154600260060154039050808211612e745781612e76565b805b915081831115612e84578192505b6000612f5a6002800160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015612ef357600080fd5b505afa158015612f07573d6000803e3d6000fd5b505050506040513d6020811015612f1d57600080fd5b810190808051906020019092919050505060ff16600a0a612f4c6002600301548761377590919063ffffffff16565b6137fb90919063ffffffff16565b905060008111612fd2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f5a45524f20544f4b454e5300000000000000000000000000000000000000000081525060200191505060405180910390fd5b600085600001541415612ff5576016600601600081548092919060010191905055505b61300c84866000015461384590919063ffffffff16565b856000018190555061302b81866001015461384590919063ffffffff16565b856001018190555061304b8460166001015461384590919063ffffffff16565b60166001018190555061306c8160166002015461384590919063ffffffff16565b6016600201819055506002600d0160009054906101000a900460ff16801561309357503484105b156130f2573373ffffffffffffffffffffffffffffffffffffffff166108fc6130c5863461349e90919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156130f0573d6000803e3d6000fd5b505b6002600d0160009054906101000a900460ff1661313a576131396002800160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16333087613ce6565b5b5050505050600160008190555050565b600260005414156131c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6002600081905550601660000160019054906101000a900460ff16613250576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4157414954494e47204c502047454e45524154494f4e0000000000000000000081525060200191505060405180910390fd5b6000602360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060006132b260166003015460166002015461349e90919063ffffffff16565b905060006133a5826133978560010154600260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561334e57600080fd5b505afa158015613362573d6000803e3d6000fd5b505050506040513d602081101561337857600080fd5b810190808051906020019092919050505061377590919063ffffffff16565b6137fb90919063ffffffff16565b90506000811161341d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f4e4f5448494e4720544f2057495448445241570000000000000000000000000081525060200191505060405180910390fd5b613439836001015460166003015461384590919063ffffffff16565b6016600301819055506000836001018190555061347c600260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff163383613562565b5050506001600081905550565b600061349782600001613ecb565b9050919050565b60006134e083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613edc565b905092915050565b60006134f78360000183613f9c565b60001c905092915050565b600061352a836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61401f565b905092915050565b600061355a836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61408f565b905092915050565b600060608473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401808373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106136255780518252602082019150602081019050602083039250613602565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613687576040519150601f19603f3d011682016040523d82523d6000602084013e61368c565b606091505b50915091508180156136cc57506000815114806136cb57508080602001905160208110156136b957600080fd5b81019080805190602001909291905050505b5b61373e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5472616e7366657248656c7065723a205452414e534645525f4641494c45440081525060200191505060405180910390fd5b5050505050565b600061376d836000018373ffffffffffffffffffffffffffffffffffffffff1660001b614177565b905092915050565b60008083141561378857600090506137f5565b600082840290508284828161379957fe5b04146137f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806142a46021913960400191505060405180910390fd5b809150505b92915050565b600061383d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061419a565b905092915050565b6000808284019050838110156138c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b8061391e578273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015613918573d6000803e3d6000fd5b50613afd565b600060608573ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8686604051602401808373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106139e157805182526020820191506020810190506020830392506139be565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613a43576040519150601f19603f3d011682016040523d82523d6000602084013e613a48565b606091505b5091509150818015613a885750600081511480613a875750808060200190516020811015613a7557600080fd5b81019080805190602001909291905050505b5b613afa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5472616e7366657248656c7065723a205452414e534645525f4641494c45440081525060200191505060405180910390fd5b50505b50505050565b600060608473ffffffffffffffffffffffffffffffffffffffff1663095ea7b38585604051602401808373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310613bc65780518252602082019150602081019050602083039250613ba3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613c28576040519150601f19603f3d011682016040523d82523d6000602084013e613c2d565b606091505b5091509150818015613c6d5750600081511480613c6c5750808060200190516020811015613c5a57600080fd5b81019080805190602001909291905050505b5b613cdf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f5472616e7366657248656c7065723a20415050524f56455f4641494c4544000081525060200191505060405180910390fd5b5050505050565b600060608573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200193505050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310613dc75780518252602082019150602081019050602083039250613da4565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613e29576040519150601f19603f3d011682016040523d82523d6000602084013e613e2e565b606091505b5091509150818015613e6e5750600081511480613e6d5750808060200190516020811015613e5b57600080fd5b81019080805190602001909291905050505b5b613ec3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806142c56024913960400191505060405180910390fd5b505050505050565b600081600001805490509050919050565b6000838311158290613f89576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613f4e578082015181840152602081019050613f33565b50505050905090810190601f168015613f7b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600081836000018054905011613ffd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806142826022913960400191505060405180910390fd5b82600001828154811061400c57fe5b9060005260206000200154905092915050565b600061402b8383614177565b614084578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050614089565b600090505b92915050565b6000808360010160008481526020019081526020016000205490506000811461416b57600060018203905060006001866000018054905003905060008660000182815481106140da57fe5b90600052602060002001549050808760000184815481106140f757fe5b906000526020600020018190555060018301876001016000838152602001908152602001600020819055508660000180548061412f57fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050614171565b60009150505b92915050565b600080836001016000848152602001908152602001600020541415905092915050565b60008083118290614246576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561420b5780820151818401526020810190506141f0565b50505050905090810190601f1680156142385780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161425257fe5b04905080915050939250505056fe494e535546464943454e5420524f554e44203120544f4b454e2042414c414e4345456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775472616e7366657248656c7065723a205452414e534645525f46524f4d5f4641494c4544a2646970667358221220c88715d34d6456f297ed9db36d7a48f1f8e30204eaece9dd4630c13641386c2864736f6c634300060c003300000000000000000000000042c8da3539de51b74941a2530e9a82f8b08253b6

Deployed ByteCode Sourcemap

2799:16484:5:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5352:40;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;5493:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;17749:131;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3025:35;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;5148:31;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18393:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;7033:1113;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;18910:108;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;13778:134;;;;;;;;;;;;;:::i;:::-;;18025:319;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5296:51;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;5430:36;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;19026:124;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;18548:332;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5184:38;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12831:250;;;;;;;;;;;;;:::i;:::-;;8281:801;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;5471:17;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;6094:931;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;19158:122;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;11894:816;;;;;;;;;;;;;:::i;:::-;;5259:32;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;5227:27;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14341:3400;;;;;;;;;;;;;:::i;:::-;;13438:285;;;;;;;;;;;;;:::i;:::-;;9150:1835;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;11107:670;;;;;;;;;;;;;:::i;:::-;;5352:40;;;;;;;;;;;;;:::o;5493:43::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;17749:131::-;8227:10;8197:40;;:12;:26;;;;;;;;;;;;:40;;;8189:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17865:9:::1;17830:12;:32;;:44;;;;17749:131:::0;:::o;3025:35::-;;;;:::o;5148:31::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;18393:106::-;8227:10;8197:40;;:12;:26;;;;;;;;;;;;:40;;;8189:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18488:5:::1;18464:6;:21;;;:29;;;;;;;;;;;;;;;;;;18393:106:::0;:::o;7033:1113::-;7365:17;;;;;;;;;;;7351:31;;:10;:31;;;7343:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7608:4;;;;;;;;;;;7577:36;;7585:10;7577:36;;;7547:12;:27;;;:66;;;;;;;;;;;;;;;;;;7645:13;7622:12;:20;;;:36;;;;;;;;;;;;;;;;;;7690:10;7667:12;:20;;;:33;;;;;;;;;;;;;;;;;;7746:16;7709;:34;;:53;;;;7809:17;7771:16;:35;;:55;;;;7867:12;7835:16;:29;;:44;;;;7932:15;7896:16;:33;;;:51;;;;;;;;;;;;;;;;;;7993:16;7956;:34;;;:53;;;;;;;;;;;;;;;;;;8058:16;8018;:37;;;:56;;;;;;;;;;;;;;;;;;8106:16;;;;;;;;;;;:32;;;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8083:6;:20;;:57;;;;7033:1113;;;;;;;;:::o;18910:108::-;18971:7;18994:18;:9;:16;:18::i;:::-;18987:25;;18910:108;:::o;13778:134::-;13850:20;;;;;;;;;;;13836:34;;:10;:34;;;13828:43;;;;;;13902:4;13880:6;:19;;;:26;;;;;;;;;;;;;;;;;;13778:134::o;18025:319::-;8227:10;8197:40;;:12;:26;;;;;;;;;;;;:40;;;8189:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18155:12:::1;18128;:24;;;:39;18120:48;;;::::0;::::1;;18213:16;;;;;;;;;;;:36;;;:38;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;18183:26;18197:11;18183:9;:13;;:26;;;;:::i;:::-;:68;;18175:77;;;::::0;::::1;;18286:11;18259:12;:24;;:38;;;;18329:9;18304:12;:22;;:34;;;;18025:319:::0;;:::o;5296:51::-;;;;;;;;;;;;;:::o;5430:36::-;;;;;;;;;;;;;:::o;19026:124::-;19101:7;19124:20;19137:6;19124:9;:12;;:20;;;;:::i;:::-;19117:27;;19026:124;;;:::o;18548:332::-;8227:10;8197:40;;:12;:26;;;;;;;;;;;;:40;;;8189:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18644:4:::1;18640:235;;;18666:6;18661:90;18682:6;:13;18678:1;:17;18661:90;;;18715:24;18729:6;18736:1;18729:9;;;;;;;;;;;;;;18715;:13;;:24;;;;:::i;:::-;;18697:3;;;;;;;18661:90;;;;18640:235;;;18780:6;18775:93;18796:6;:13;18792:1;:17;18775:93;;;18829:27;18846:6;18853:1;18846:9;;;;;;;;;;;;;;18829;:16;;:27;;;;:::i;:::-;;18811:3;;;;;;;18775:93;;;;18640:235;18548:332:::0;;:::o;5184:38::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;12831:250::-;8227:10;8197:40;;:12;:26;;;;;;;;;;;;:40;;;8189:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12923:1:::1;12904:15;:13;:15::i;:::-;:20;12896:29;;;::::0;::::1;;12942:133;12978:12;:20;;;;;;;;;;;;13001:12;:26;;;;;;;;;;;;13029:12;:20;;;;;;;;;;;;:30;;;13068:4;13029:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;12942:27;:133::i;:::-;12831:250::o:0;8281:801::-;8328:7;8348:6;:19;;;;;;;;;;;;8344:73;;;8385:1;8378:8;;;;8344:73;8443:12;:22;;;8428:12;:37;8427:95;;;;;8501:12;:20;;;8471:6;:27;;;:50;8427:95;8423:167;;;8540:1;8533:8;;;;8423:167;8631:12;:20;;;8600:6;:27;;;:51;8596:107;;8669:1;8662:8;;;;8596:107;8729:12;:22;;;8714:12;:37;8713:96;;;;;8788:12;:20;;;8757:6;:27;;;:51;;8713:96;8709:170;;;8827:1;8820:8;;;;8709:170;8906:12;:24;;;8890:12;:40;;8889:86;;;;;8952:12;:22;;;8936:12;:38;;8889:86;8885:146;;;8993:1;8986:8;;;;8885:146;9044:1;9037:8;;8281:801;;:::o;5471:17::-;;;;;;;;;;;;;:::o;6094:931::-;6468:17;;;;;;;;;;;6454:31;;:10;:31;;;6446:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6537:13;6508:12;:26;;;:42;;;;;;;;;;;;;;;;;;6581:7;6559:12;:19;;:29;;;;6624:11;6597:12;:24;;:38;;;;6679:15;6644:12;:32;;:50;;;;6726:8;6703:12;:20;;:31;;;;6766:8;6743:12;:20;;:31;;;;6816:17;6783:12;:30;;:50;;;;6870:12;6842;:25;;:40;;;;6918:11;6891:12;:24;;:38;;;;6963:9;6938:12;:22;;:34;;;;7008:11;6981:12;:24;;:38;;;;6094:931;;;;;;;;;;;:::o;19158:122::-;19229:4;19249:25;19268:5;19249:9;:18;;:25;;;;:::i;:::-;19242:32;;19158:122;;;:::o;11894:816::-;1867:1:11;2473:7;;:19;;2465:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1867:1;2606:7;:18;;;;11985:1:5::1;11966:15;:13;:15::i;:::-;:20;11958:43;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;12018:23;12044:6;:18;12051:10;12044:18;;;;;;;;;;;;;;;12018:44;;12069:32;12104:60;12136:6;:27;;;12104:6;:27;;;:31;;:60;;;;:::i;:::-;12069:95;;12171:28;12202:12;:27;;;;;;;;;;;;:99;;12256:12;:20:::0;::::1;;;;;;;;;;;:30;;;12295:4;12256:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;12202:99;;;12232:21;12202:99;12171:130;;12308:18;12329:75;12379:24;12329:45;12354:5;:19;;;12329:20;:24;;:45;;;;:::i;:::-;:49;;:75;;;;:::i;:::-;12308:96;;12432:1;12419:10;:14;12411:46;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;12494:52;12526:5;:19;;;12494:6;:27;;;:31;;:52;;;;:::i;:::-;12464:6;:27;;:82;;;;12575:1;12553:5;:19;;:23;;;;12583:121;12628:12;:20:::0;::::1;;;;;;;;;;;12651:10;12663;12676:12;:27;;;;;;;;;;;;12675:28;12583:36;:121::i;:::-;2637:1:11;;;;1823::::0;2785:7;:22;;;;11894:816:5:o;5259:32::-;;;;;;;;;;;;;:::o;5227:27::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;14341:3400::-;1867:1:11;2473:7;;:19;;2465:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1867:1;2606:7;:18;;;;14403:6:5::1;:29;;;;;;;;;;;;14402:30;14394:62;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;14490:1;14471:15;:13;:15::i;:::-;:20;14463:44;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;14610:22;;;;;;;;;;;:47;;;14666:12;:20;;;;;;;;;;;;14697:12;:20:::0;::::1;;;;;;;;;;;14610:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;14606:177;;;14754:4;14732:6;:19;;;:26;;;;;;;;;;;;;;;;;;14769:7;;14606:177;14795:23;14821:77;14893:4;14821:67;14853:16;:34;;;14821:6;:27;;;:31;;:67;;;;:::i;:::-;:71;;:77;;;;:::i;:::-;14795:103;;14940:21;14964:94;15053:4;14964:84;15017:12;:30;;;14964:48;14996:15;14964:6;:27;;;:31;;:48;;;;:::i;:::-;:52;;:84;;;;:::i;:::-;:88;;:94;;;;:::i;:::-;14940:118;;15069:12;:27;;;;;;;;;;;;15065:89;;;15109:4;;;;;;;;;;;:12;;;15130:13;15109:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;15065:89;15160:105;15195:12;:20:::0;::::1;;;;;;;;;;;15226:22;;;;;;;;;;;15251:13;15160:26;:105::i;:::-;15307:22;15332:96;15395:12;:20:::0;::::1;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;15387:40;;15381:2;:46;15332:44;15350:12;:25;;;15332:13;:17;;:44;;;;:::i;:::-;:48;;:96;;;;:::i;:::-;15307:121;;15435:106;15470:12;:20;;;;;;;;;;;;15501:22;;;;;;;;;;;15526:14;15435:26;:106::i;:::-;15554:22;;;;;;;;;;;:36;;;15591:12;:20:::0;::::1;;;;;;;;;;;15613:12;:20;;;;;;;;;;;;15635:13;15650:14;15684:12;:24;;;15666:15;:42;15710:12;:26;;;;;;;;;;;;15554:183;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;15772:24;15799:75;15869:4;15799:65;15828:16;:35;;;15799:6;:24;;;:28;;:65;;;;:::i;:::-;:69;;:75;;;;:::i;:::-;15772:102;;16002:1;15953:51;;:16;:37;;;;;;;;;;;;:51;;;15949:733;;16044:23;16070:60;16125:4;16070:50;16090:16;:29;;;16070:15;:19;;:50;;;;:::i;:::-;:54;;:60;;;;:::i;:::-;16044:86;;16141:153;16186:12;:20:::0;::::1;;;;;;;;;;;16209:16;:37;;;;;;;;;;;;16248:15;16266:12;:27;;;;;;;;;;;;16265:28;16141:36;:153::i;:::-;16323:36;16343:15;16323;:19;;:36;;;;:::i;:::-;16305:54;;16392:24;16419:61;16475:4;16419:51;16440:16;:29;;;16419:16;:20;;:51;;;;:::i;:::-;:55;;:61;;;;:::i;:::-;16392:88;;16491:115;16527:12;:20;;;;;;;;;;;;16550:16;:37;;;;;;;;;;;;16589:16;16491:27;:115::i;:::-;16636:38;16657:16;16636;:20;;:38;;;;:::i;:::-;16617:57;;15949:733;;;16688:149;16733:12;:20:::0;::::1;;;;;;;;;;;16756:16;:33;;;;;;;;;;;;16791:15;16809:12;:27;;;;;;;;;;;;16808:28;16688:36;:149::i;:::-;16844:112;16880:12;:20;;;;;;;;;;;;16903:16;:34;;;;;;;;;;;;16939:16;16844:27;:112::i;:::-;16996:25;17024:12;:20;;;;;;;;;;;;:30;;;17063:4;17024:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;16996:73;;17100:6;:24;;;17080:17;:44;17076:262;;;17137:18;17158:47;17180:6;:24;;;17158:17;:21;;:47;;;;:::i;:::-;17137:68;;17216:114;17252:12;:20;;;;;;;;;;;;17275:42;17319:10;17216:27;:114::i;:::-;17076:262;;17402:28;17433:12;:27;;;;;;;;;;;;:99;;17487:12;:20:::0;::::1;;;;;;;;;;;:30;;;17526:4;17487:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;17433:99;;;17463:21;17433:99;17402:130;;17539:147;17584:12;:20:::0;::::1;;;;;;;;;;;17607:12;:26;;;;;;;;;;;;17635:20;17658:12;:27;;;;;;;;;;;;17657:28;17539:36;:147::i;:::-;17731:4;17699:6;:29;;;:36;;;;;;;;;;;;;;;;;;2637:1:11;;;;;;;1823::::0;2785:7;:22;;;;14341:3400:5:o;13438:285::-;13497:6;:29;;;;;;;;;;;;13496:30;:54;;;;;13531:6;:19;;;;;;;;;;;;13530:20;13496:54;13488:63;;;;;;13562:22;;;;;;;;;;;:47;;;13618:12;:20;;;;;;;;;;;;13649:12;:20;;;;;;;;;;;;13562:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13558:160;;;13706:4;13684:6;:19;;;:26;;;;;;;;;;;;;;;;;;13558:160;13438:285::o;9150:1835::-;1867:1:11;2473:7;;:19;;2465:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1867:1;2606:7;:18;;;;9253:1:5::1;9234:15;:13;:15::i;:::-;:20;9226:43;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;9290:6;:21;;;;;;;;;;;;9286:102;;;9330:30;9349:10;9330:9;:18;;:30;;;;:::i;:::-;9322:58;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;9286:102;9522:6;:20;;;9495:12;:24;;;:47;9480:12;:62;9476:215;;;9586:16;;;;;;;;;;;:47;;;9634:10;9586:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;9578:105;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9476:215;9697:23;9723:6;:18;9730:10;9723:18;;;;;;;;;;;;;;;9697:44;;9748:17;9768:12;:27;;;;;;;;;;;;:49;;9810:7;9768:49;;;9798:9;9768:49;9748:69;;9824:17;9844:57;9881:5;:19;;;9844:12;:32;;;:36;;:57;;;;:::i;:::-;9824:77;;9908:17;9951:6;:27;;;9928:12;:20;;;:50;9908:70;;10009:9;9997;:21;:45;;10033:9;9997:45;;;10021:9;9997:45;9985:57;;10065:9;10053;:21;10049:65;;;10097:9;10085:21;;10049:65;10120:18;10141:91;10199:12;:20:::0;::::1;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;10191:40;;10185:2;:46;10141:39;10155:12;:24;;;10141:9;:13;;:39;;;;:::i;:::-;:43;;:91;;;;:::i;:::-;10120:112;;10260:1;10247:10;:14;10239:38;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;10311:1;10288:5;:19;;;:24;10284:68;;;10325:6;:17;;;:19;;;;;;;;;;;;;10284:68;10380:34;10404:9;10380:5;:19;;;:23;;:34;;;;:::i;:::-;10358:5;:19;;:56;;;;10440:32;10461:10;10440:5;:16;;;:20;;:32;;;;:::i;:::-;10421:5;:16;;:51;;;;10509:42;10541:9;10509:6;:27;;;:31;;:42;;;;:::i;:::-;10479:6;:27;;:72;;;;10585:40;10614:10;10585:6;:24;;;:28;;:40;;;;:::i;:::-;10558:6;:24;;:67;;;;10668:12;:27;;;;;;;;;;;;:52;;;;;10711:9;10699;:21;10668:52;10664:120;;;10731:10;:19;;:45;10751:24;10765:9;10751;:13;;:24;;;;:::i;:::-;10731:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;10664:120;10834:12;:27;;;;;;;;;;;;10829:151;;10872:100;10912:12;:20:::0;::::1;;;;;;;;;;;10935:10;10955:4;10962:9;10872:31;:100::i;:::-;10829:151;2637:1:11;;;;;1823::::0;2785:7;:22;;;;9150:1835:5;:::o;11107:670::-;1867:1:11;2473:7;;:19;;2465:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1867:1;2606:7;:18;;;;11175:6:5::1;:29;;;;;;;;;;;;11167:64;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;11238:23;11264:6;:18;11271:10;11264:18;;;;;;;;;;;;;;;11238:44;;11289:34;11326:59;11355:6;:29;;;11326:6;:24;;;:28;;:59;;;;:::i;:::-;11289:96;;11392:18;11413:99;11485:26;11413:67;11463:5;:16;;;11413:12;:20;;;;;;;;;;;;:30;;;11452:4;11413:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;:49;;:67;;;;:::i;:::-;:71;;:99;;;;:::i;:::-;11392:120;;11540:1;11527:10;:14;11519:46;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;11604:51;11638:5;:16;;;11604:6;:29;;;:33;;:51;;;;:::i;:::-;11572:6;:29;;:83;;;;11681:1;11662:5;:16;;:20;;;;11689:82;11725:12;:20;;;;;;;;;;;;11748:10;11760;11689:27;:82::i;:::-;2637:1:11;;;1823::::0;2785:7;:22;;;;11107:670:5:o;7571:117:1:-;7634:7;7661:19;7669:3;:10;;7661:7;:19::i;:::-;7654:26;;7571:117;;;:::o;1512:136:12:-;1570:7;1597:43;1601:1;1604;1597:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;1590:50;;1512:136;;;;:::o;8032:149:1:-;8106:7;8149:22;8153:3;:10;;8165:5;8149:3;:22::i;:::-;8141:31;;8126:47;;8032:149;;;;:::o;6773:143::-;6843:4;6867:41;6872:3;:10;;6900:5;6892:14;;6884:23;;6867:4;:41::i;:::-;6860:48;;6773:143;;;;:::o;7092:149::-;7165:4;7189:44;7197:3;:10;;7225:5;7217:14;;7209:23;;7189:7;:44::i;:::-;7182:51;;7092:149;;;;:::o;539:294:13:-;621:12;635:17;656:5;:10;;690;702:2;706:5;667:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;656:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;620:93;;;;732:7;:57;;;;;759:1;744:4;:11;:16;:44;;;;775:4;764:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;744:44;732:57;724:101;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;539:294;;;;;:::o;7327:158:1:-;7407:4;7431:46;7441:3;:10;;7469:5;7461:14;;7453:23;;7431:9;:46::i;:::-;7424:53;;7327:158;;;;:::o;2402:471:12:-;2460:7;2710:1;2705;:6;2701:47;;;2735:1;2728:8;;;;2701:47;2760:9;2776:1;2772;:5;2760:17;;2805:1;2800;2796;:5;;;;;;:10;2788:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2864:1;2857:8;;;2402:471;;;;;:::o;3349:132::-;3407:7;3434:39;3438:1;3441;3434:39;;;;;;;;;;;;;;;;;:3;:39::i;:::-;3427:46;;3349:132;;;;:::o;1048:181::-;1106:7;1126:9;1142:1;1138;:5;1126:17;;1167:1;1162;:6;;1154:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1220:1;1213:8;;;1048:181;;;;:::o;1212:420:13:-;1329:7;1324:301;;1353:2;:11;;:18;1365:5;1353:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1324:301;;;1405:12;1419:17;1440:5;:10;;1474;1486:2;1490:5;1451:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1440:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1404:93;;;;1520:7;:57;;;;;1547:1;1532:4;:11;:16;:44;;;;1563:4;1552:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1532:44;1520:57;1512:101;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1324:301;;;1212:420;;;;:::o;239:292::-;320:12;334:17;355:5;:10;;389;401:2;405:5;366:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;355:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;319:93;;;;431:7;:57;;;;;458:1;443:4;:11;:16;:44;;;;474:4;463:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;443:44;431:57;423:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;239:292;;;;;:::o;841:323::-;941:12;955:17;976:5;:10;;1010;1022:4;1028:2;1032:5;987:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;976:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;940:99;;;;1058:7;:57;;;;;1085:1;1070:4;:11;:16;:44;;;;1101:4;1090:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1070:44;1058:57;1050:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;841:323;;;;;;:::o;4272:109:1:-;4328:7;4355:3;:11;;:18;;;;4348:25;;4272:109;;;:::o;1951:192:12:-;2037:7;2070:1;2065;:6;;2073:12;2057:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2097:9;2113:1;2109;:5;2097:17;;2134:1;2127:8;;;1951:192;;;;;:::o;4725:204:1:-;4792:7;4841:5;4820:3;:11;;:18;;;;:26;4812:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4903:3;:11;;4915:5;4903:18;;;;;;;;;;;;;;;;4896:25;;4725:204;;;;:::o;1837:414::-;1900:4;1922:21;1932:3;1937:5;1922:9;:21::i;:::-;1917:327;;1960:3;:11;;1977:5;1960:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2143:3;:11;;:18;;;;2121:3;:12;;:19;2134:5;2121:19;;;;;;;;;;;:40;;;;2183:4;2176:11;;;;1917:327;2227:5;2220:12;;1837:414;;;;;:::o;2427:1544::-;2493:4;2611:18;2632:3;:12;;:19;2645:5;2632:19;;;;;;;;;;;;2611:40;;2682:1;2668:10;:15;2664:1300;;3030:21;3067:1;3054:10;:14;3030:38;;3083:17;3124:1;3103:3;:11;;:18;;;;:22;3083:42;;3370:17;3390:3;:11;;3402:9;3390:22;;;;;;;;;;;;;;;;3370:42;;3536:9;3507:3;:11;;3519:13;3507:26;;;;;;;;;;;;;;;:38;;;;3655:1;3639:13;:17;3613:3;:12;;:23;3626:9;3613:23;;;;;;;;;;;:43;;;;3765:3;:11;;:17;;;;;;;;;;;;;;;;;;;;;;;;3860:3;:12;;:19;3873:5;3860:19;;;;;;;;;;;3853:26;;;3903:4;3896:11;;;;;;;;2664:1300;3947:5;3940:12;;;2427:1544;;;;;:::o;4057:129::-;4130:4;4177:1;4154:3;:12;;:19;4167:5;4154:19;;;;;;;;;;;;:24;;4147:31;;4057:129;;;;:::o;3977:278:12:-;4063:7;4095:1;4091;:5;4098:12;4083:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4122:9;4138:1;4134;:5;;;;;;4122:17;;4246:1;4239:8;;;3977:278;;;;;:::o

Swarm Source

ipfs://c88715d34d6456f297ed9db36d7a48f1f8e30204eaece9dd4630c13641386c28
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.