Contract 0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b2

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x38bdd589aa3013525bd79d1a9851e9983123766994ade624d2359311d9701eacWithdraw314683112022-08-03 10:00:155 days 2 hrs ago0xbe8ac6d73b81bafd2d2f23b4a622f229e60fd7aa IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.004467807888 36.899026185
0x05dff30516dbff202660104e0aede55f1f62df611341351e5a138550db129006Withdraw311265522022-07-25 15:40:1113 days 21 hrs ago0xef1e3aa6dac621dd94e1193d771be909c289dc05 IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.003150208321 32.02016956
0xac780d5bb28c0f2af4cc52337e59aa20aefbdde72e3433b903d522bd4d1a9b78Deposit311255642022-07-25 15:01:5513 days 21 hrs ago0xef1e3aa6dac621dd94e1193d771be909c289dc05 IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.006434072564 59.82401269
0x57b49188b8733dde94fd3d4b4867ca4cc533342cc94e8d559e8d91be9a2725ebWithdraw301244152022-06-29 5:06:0540 days 7 hrs ago0xa0af8ecb679a3803c0c65660dfb664ede7e69a52 IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.005933017961 48.99999968
0x150c04c60d80c3e87648b1ae9bd547498adcb08430d0b7cb90788084ebeb6548Withdraw300226302022-06-26 14:28:1042 days 22 hrs ago0x43fc49753730e7ee5d9f5d39ddc1ac0a2d21ae8b IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.003010122043 30.596268049
0xf509e091f18af997785d3ba4f30b80a31f3916b3e0ac7dbecc07dd3c84f32229Deposit300225642022-06-26 14:25:5442 days 22 hrs ago0x43fc49753730e7ee5d9f5d39ddc1ac0a2d21ae8b IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.002523586049 30.756685553
0x46478dd1a640e0786edd493e59bca5c4c4a789136322d4c1cc6172702c32675cDeposit300225602022-06-26 14:25:4642 days 22 hrs ago0x43fc49753730e7ee5d9f5d39ddc1ac0a2d21ae8b IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.003303248102 30.713603928
0x02987dc1d3a9636d231d9aaa67328bb08021503ecc049f64a140e682ab97bbe5Withdraw298305972022-06-21 14:00:4447 days 22 hrs ago0x472a67d871abe7d0097c0c9f034ab0f6285d487a IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.059631202289 492.534916079
0xbf54771fedf8fd336cbfc4fed07c051bcd2103c241fac0a478f7019d6d1a23cdWithdraw296508582022-06-16 21:05:3952 days 15 hrs ago0xe8a05af47cee4fa075d02eb1ebe53b06d7f51a12 IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.003658332755 30.213679621
0xf51f36d7222956cc59941b7d00a3442ba069714ce99def644d912a572da01a90Withdraw296093492022-06-15 19:22:0353 days 17 hrs ago0x3abdec634f30ed416f723cc5b4b95859651623b2 IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.011867325672 98.000938717
0x70b31b5efa05eca2bc5f5f031972a92916ed7af2e0c35c12cc286f30949defb8Withdraw295697242022-06-14 19:50:5154 days 17 hrs ago0xcbac46ebf7723440df31729b601060e429631702 IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.00377723588 38.393566719
0x49e31fa55f5a87ab4934041c1f143c676d7dea9ac7db3c5196d34e1e9f2c532bDeposit295697012022-06-14 19:50:0554 days 17 hrs ago0xcbac46ebf7723440df31729b601060e429631702 IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.00385548359 35.848290009
0x2b1e93d38498c63441a20f517c51d6d82ad57e4398996550a379e5e85ba0d83eWithdraw294012692022-06-10 16:14:1658 days 20 hrs ago0x2aa9f08b09c9678ac47a86b6b7b5877ed2bd00fe IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.00390096811532.217572516
0x4b5835edcd8ad5b83db3bc101827f3343c3e8403cbe610f77914df5d84b64cf5Withdraw292823982022-06-07 16:48:1761 days 20 hrs ago0x60f0c2cff1861a7bf53f6edb55e6eaa9a28f5f50 IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.002858160001 30.000000014
0x644f6000c73e47a84d7c9a3754402afe78e2b13ff55ce080e85dd460d042bac8Withdraw292823582022-06-07 16:46:5361 days 20 hrs ago0x60f0c2cff1861a7bf53f6edb55e6eaa9a28f5f50 IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.002951460001 30.000000019
0xfc3555c0f4224a9edb72d32b49979ae828a83091d50dc0df638f617020a71ba9Deposit292821092022-06-07 16:38:1961 days 20 hrs ago0x60f0c2cff1861a7bf53f6edb55e6eaa9a28f5f50 IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.002688690001 30.000000013
0xf745d43864edf07a177ac73f168f70fb23a6562fda2e572695c7e750caee4d0bDeposit292820162022-06-07 16:35:0961 days 20 hrs ago0x60f0c2cff1861a7bf53f6edb55e6eaa9a28f5f50 IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.002467243499 30.069999997
0x22703342c88072af090731d101e1339b3217bc79e6909f9b60d247d575cdd0dbDeposit292819852022-06-07 16:34:0761 days 20 hrs ago0x60f0c2cff1861a7bf53f6edb55e6eaa9a28f5f50 IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.003226500002 30.000000022
0x63a3a31ad7d4b4d1a5d00b7739a13e828d01016d1c15e2999ade3d894eb49170Withdraw291942262022-06-05 11:35:5264 days 1 hr ago0x60502fb7ddc4d3027adf657d764606aa7ab26bb5 IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.003149207821 32.010000015
0x43c26789564a1deee8395f999cd9800ac02c69bd6c48adc1b139eab05404ad67Deposit291941962022-06-05 11:34:5264 days 1 hr ago0x60502fb7ddc4d3027adf657d764606aa7ab26bb5 IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.003226500001 30.000000014
0x26e6b75db964e1de96496603b0d63d72898b4f470bf05be1640a261b4a81e48eWithdraw290471672022-06-01 20:57:5167 days 15 hrs ago0xdba64f019c92649cf645d598322ae1ae2318e55b IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.003632460003 30.00000003
0xd70eec09aa95306516d8ed66cca5060f01ecb533cdace1943c368fb26ce2e4b4Withdraw289961762022-05-31 14:57:0668 days 21 hrs ago0x16e38a32a4c8d2904829d4749b10f91307cbe9fb IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.00452626465637.378108379
0xea9c3f0010755ac76f3cccf2d2b3ab21df854db2ee7e9f3fd66d1558619f8b19Withdraw289531952022-05-30 13:00:4169 days 23 hrs ago0x8e140b709ad3a3213a9061926d46a67b844e5936 IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.002951460456 30.000004643
0xc7ed6ab3875d7bf75894bc7abc5457f1d3c078fb8d904f4239969fb8190b3c9aDeposit289531632022-05-30 12:59:2969 days 23 hrs ago0x8e140b709ad3a3213a9061926d46a67b844e5936 IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.003226500822 30.000007646
0x38425898617f4eae6bb382caf63dadd463788aa565478a3de1aa5e6442cf03c3Withdraw288298252022-05-27 11:13:1773 days 1 hr ago0x3608d9bafc2c47866b86217036345cdb0ac894db IN  0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b20 MATIC0.00419535813 34.648900171
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0xb0b442b2d6773561d5317d105b47e3efc11114a2bb411d7a2488954b4b79b852264971422022-03-29 10:49:06132 days 2 hrs ago 0x845b7939d7e01fd29d6452ce9ddf9bd3ecf886b2  Contract Creation0 MATIC
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ElysianFields

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 12 : ElysianFields.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

import './Denarius.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/utils/structs/EnumerableSet.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';

contract ElysianFields is Ownable {
  using SafeMath for uint256;
  using SafeERC20 for Denarius;
  using SafeERC20 for IERC20;

  struct UserInfo {
    uint256 amount; // amount of LP tokens provided by the user
    uint256 rewardDebt; // Reward debt. See explanation below.
    //
    // We do some fancy math here. Basically, any point in time, the amount of AURs
    // entitled to a user but is pending to be distributed is:
    //
    //   pending reward = (user.amount * pool.accRwdPerShare) - user.rewardDebt
    //
    // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
    //   1. The pool's `accRwdPerShare` (and `lastRewardBlock`) gets updated.
    //   2. User receives the pending reward sent to his/her address.
    //   3. User's `amount` gets updated.
    //   4. User's `rewardDebt` gets updated.
  }

  struct PoolInfo {
    IERC20 lpToken; // address of the LP token contract
    uint256 allocPoint; // Allocation points for said pool. AURs to be distributed to pool participants per block
    uint256 lastRewardBlock; // Last block number that AURs distribution occurs.
    uint256 accRwdPerShare; // Accumulated AUR rewards per share, times 1e18
  }

  constructor(
    address _owner,
    string memory _name,
    string memory _symbol,
    uint256 _cap,
    uint256 _amountForPool,
    address _rewardReceiver
  ) {
    transferOwnership(_owner);
    deployDenarius(_name, _symbol, _cap, _amountForPool, _rewardReceiver);
  }

  // The Reward token
  Denarius public rwdToken;
  // Info of each pool.
  PoolInfo[] public poolInfo;
  // Info of each user that stakes LP tokens.
  mapping(uint256 => mapping(address => UserInfo)) public userInfo;
  // Total allocation points in all pools.
  uint256 public totalAllocPoints = 0;
  // Reward tokens per block to be distributed
  uint256 public rwdPerBlock;
  // The block number when RWD mining starts
  uint256 public startBlock;
  // The ending block of the current program - rwdPerBlock will be set to 0 after block number is reached
  uint256 public endBlock;
  // The timeout expressed in block, after which owner can withdraw excess amount
  uint256 public claimTimeout;

  event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
  event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
  event EmergencyWithdraw(
    address indexed user,
    uint256 indexed pid,
    uint256 amount
  );

  /** @dev Deploys a new RewardToken contract. Callable only by Owner. Mints the cap amount and transfers it to this contract
   * @param _name - Pass a name for the token
   * @param _symbol - Pass a symbol for the token
   * @param _cap - set a cap on how many ERC20 reward tokens can be minted
   * @param _amountForPool - a portion of the ERC20 reward token is transferred to owner to create a new pool on a DEX
   * @param _rewardReceiver - receiver of the portion of ERC20 reward token
   */
  function deployDenarius(
    string memory _name,
    string memory _symbol,
    uint256 _cap,
    uint256 _amountForPool,
    address _rewardReceiver
  ) internal {
    rwdToken = new Denarius(_name, _symbol, _cap);
    rwdToken.safeTransfer(_rewardReceiver, _amountForPool);
  }

  /** @dev - A function to add a pool or multiple pools to the contract
   * @param _allocPoints - An array of the allocation points for each pool that will be added
   * @param _lpTokens - An array of each LP token for which a pool is created
   */
  function add(uint256[] calldata _allocPoints, IERC20[] calldata _lpTokens)
    external
    onlyOwner
  {
    require(
      address(rwdToken) != address(0),
      'A reward token has not been deployed'
    );
    require(
      _allocPoints.length == _lpTokens.length,
      'Arrays length doesnt match'
    );
    massUpdatePools();
    uint256 lastRewardBlock =
      block.number > startBlock ? block.number : startBlock;
    uint256 tempTotalAllocPoints = totalAllocPoints;
    for (uint256 j = 0; j < _lpTokens.length; j++) {
      tempTotalAllocPoints = tempTotalAllocPoints.add(_allocPoints[j]);
      poolInfo.push(
        PoolInfo({
          lpToken: _lpTokens[j],
          allocPoint: _allocPoints[j],
          lastRewardBlock: lastRewardBlock,
          accRwdPerShare: 0
        })
      );
    }
    totalAllocPoints = tempTotalAllocPoints;
  }

  /** @dev - Updates the allocationPoints for an array of pools
   * @param _pids - An array of pool ids which will be updated
   * @param _allocPoints - An array of allocationPoints for each pool that will be updated
   */
  function set(uint256[] calldata _pids, uint256[] calldata _allocPoints)
    external
    onlyOwner
  {
    require(_pids.length == _allocPoints.length, 'Arrays length doesnt match');
    massUpdatePools();
    uint256 tempTotalAllocPoints = totalAllocPoints;
    for (uint256 j = 0; j < _pids.length; j++) {
      tempTotalAllocPoints = tempTotalAllocPoints
        .sub(poolInfo[_pids[j]].allocPoint)
        .add(_allocPoints[j]);
      poolInfo[_pids[j]].allocPoint = _allocPoints[j];
    }
    totalAllocPoints = tempTotalAllocPoints;
  }

  /** @dev Allows the owner to set the parameters for a new upcomming farming program
   * @param _startBlock - the starting block when the farming program will start
   * @param _endBlock - the block on which the farming program will end
   * @param _rwdPerBlock - updates the rwdPerBlock variable for the new farming program
   * @param _ownerWithdrawBlockTimeout - The added timeout after a program finishes after which the excess ERC20 tokens stored can be withdrawn by the owner
   */
  function setProgramParameters(
    uint256 _startBlock,
    uint256 _endBlock,
    uint256 _rwdPerBlock,
    uint256 _ownerWithdrawBlockTimeout
  ) external onlyOwner {
    require(
      startBlock == 0,
      'The start block of a program has already been set'
    );
    require(poolInfo.length > 0, 'No pools added');
    require(
      _startBlock > block.number,
      'The start block passed is before the current block number'
    );
    require(
      _endBlock > _startBlock,
      'The end block passed should be bigger than _startBlock'
    );
    require(_rwdPerBlock != 0, 'The reward per block can not be set to 0');
    require(
      _ownerWithdrawBlockTimeout > 0,
      'Claim timeout can not be set to 0'
    );
    require(
      rwdToken.balanceOf(address(this)) >=
        _rwdPerBlock.mul(_endBlock - _startBlock),
      'Smart contract has not enough balance in rewards token'
    );
    startBlock = _startBlock;
    endBlock = _endBlock;
    rwdPerBlock = _rwdPerBlock;
    claimTimeout = endBlock.add(_ownerWithdrawBlockTimeout);
  }

  /** @dev Allows the owner to withdraw any excess ERC20 tokens stored in the contract
   * @param _receiver - The receiving address for the ERC20 tokens
   */
  function withdrawExcessRwd(address _receiver) external onlyOwner {
    require(
      block.number > claimTimeout,
      'The current farming program has not finished'
    );
    uint256 amount = rwdToken.balanceOf(address(this));
    rwdToken.safeTransfer(_receiver, amount);
  }

  /** @dev - A function to be called when depositing LP tokens to a certain pool
   * @param _pid - The pool id to which the user wants to deposit LP tokens
   * @param _amount - The amount of LP tokens to be deposited
   * emit - Emits the Deposit event
   */
  function deposit(uint256 _pid, uint256 _amount) external {
    PoolInfo storage pool = poolInfo[_pid];
    UserInfo storage user = userInfo[_pid][msg.sender];
    updatePool(_pid);
    if (user.amount > 0) {
      uint256 pending =
        user.amount.mul(pool.accRwdPerShare).div(1e18).sub(user.rewardDebt);
      safeRewardTransfer(msg.sender, pending);
    }
    pool.lpToken.safeTransferFrom(msg.sender, address(this), _amount);
    user.amount = user.amount.add(_amount);
    user.rewardDebt = user.amount.mul(pool.accRwdPerShare).div(1e18);
    emit Deposit(msg.sender, _pid, _amount);
  }

  /** @dev - A function which is called to withdraw LP tokens from a pool
   * @param _pid - The pool id from which to withdraw the deposited LP tokens
   * @param _amount - The amount of LP tokens to withdraw
   * emits - Withdraw event is emited
   */
  function withdraw(uint256 _pid, uint256 _amount) external {
    PoolInfo storage pool = poolInfo[_pid];
    UserInfo storage user = userInfo[_pid][msg.sender];
    require(user.amount >= _amount, 'withdraw: not good');
    updatePool(_pid);
    uint256 pending =
      user.amount.mul(pool.accRwdPerShare).div(1e18).sub(user.rewardDebt);
    safeRewardTransfer(msg.sender, pending);
    user.amount = user.amount.sub(_amount);
    user.rewardDebt = user.amount.mul(pool.accRwdPerShare).div(1e18);
    pool.lpToken.safeTransfer(address(msg.sender), _amount);
    emit Withdraw(msg.sender, _pid, _amount);
  }

  /** @dev - A function to withdraw any outstanding LP tokens of a user without withdrawing ERC20 reward tokens
   * @param _pid - The pool id on which to perform emergency withdraw
   */
  function emergencyWithdraw(uint256 _pid) external {
    PoolInfo storage pool = poolInfo[_pid];
    UserInfo storage user = userInfo[_pid][msg.sender];
    pool.lpToken.safeTransfer(address(msg.sender), user.amount);
    emit EmergencyWithdraw(msg.sender, _pid, user.amount);
    user.amount = 0;
    user.rewardDebt = 0;
  }

  /** @dev - Calculates the pending ERC20 reward tokens the user can claim
   * @param _pid - The pool id
   * @param _user - The address of the user
   * return - the pending ERC20 reward tokens to be claimed
   */
  function pendingRwd(uint256 _pid, address _user)
    external
    view
    returns (uint256)
  {
    PoolInfo storage pool = poolInfo[_pid];
    UserInfo storage user = userInfo[_pid][_user];
    uint256 accRwdPerShare = pool.accRwdPerShare;
    uint256 lpSupply = pool.lpToken.balanceOf(address(this));
    if (block.number > pool.lastRewardBlock && lpSupply != 0) {
      uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
      uint256 rwdReward =
        multiplier.mul(rwdPerBlock).mul(pool.allocPoint).div(totalAllocPoints);
      accRwdPerShare = accRwdPerShare.add(rwdReward.mul(1e18).div(lpSupply));
    }
    return user.amount.mul(accRwdPerShare).div(1e18).sub(user.rewardDebt);
  }

  /** @dev Checks the poolInfo struct lenght
   * return the number of active pools
   */
  function poolLength() external view returns (uint256) {
    return poolInfo.length;
  }

  /** @dev - Updates the variables of each pool in the array
   */
  function massUpdatePools() public {
    uint256 length = poolInfo.length;
    for (uint256 pid = 0; pid < length; ++pid) {
      updatePool(pid);
    }
  }

  /** @dev - Updates the pool variables to be up to date
   * @param _pid - The ID of the pool to be updated
   */
  function updatePool(uint256 _pid) public {
    require(
      block.number >= startBlock,
      'The farming program has not yet started!'
    );
    PoolInfo storage pool = poolInfo[_pid];
    if (block.number <= pool.lastRewardBlock) {
      return;
    }
    uint256 lpSupply = pool.lpToken.balanceOf(address(this));
    if (lpSupply == 0) {
      pool.lastRewardBlock = block.number;
      return;
    }
    uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
    uint256 rwdReward =
      multiplier.mul(rwdPerBlock).mul(pool.allocPoint).div(totalAllocPoints);
    pool.accRwdPerShare = pool.accRwdPerShare.add(
      rwdReward.mul(1e18).div(lpSupply)
    );
    pool.lastRewardBlock = block.number < endBlock ? block.number : endBlock;
  }

  /** @dev - Calculates and returns reward multiplier over the given _from to _to block.
   * @param _from - Should be a block number
   * @param _to - Should be a block number
   */
  function getMultiplier(uint256 _from, uint256 _to)
    public
    view
    returns (uint256)
  {
    if (_to <= endBlock) {
      return _to.sub(_from);
    } else if (_from >= endBlock) {
      return (_to.sub(_from)).mul(0);
    } else {
      return endBlock.sub(_from);
    }
  }

  /** @dev - A function used for safeTransfer of ERC20 tokens to the user
   * @param _to - The address to which the ERC20 tokens should be transferred
   * @param _amount - The amount to be transferred
   */
  function safeRewardTransfer(address _to, uint256 _amount) internal {
    uint256 rwdTokenBal = rwdToken.balanceOf(address(this));
    if (_amount > rwdTokenBal) {
      rwdToken.transfer(_to, rwdTokenBal);
    } else {
      rwdToken.transfer(_to, _amount);
    }
  }
}

File 2 of 12 : Denarius.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

import '@openzeppelin/contracts/token/ERC20/extensions/ERC20Capped.sol';

contract Denarius is ERC20Capped {
  /** @dev - The constructor creates the ERC20 token and mints the cap amount
   * @param _name - The name of the ERC20 token that is deployed
   * @param _symbol - The symbol which will be used to distinguish the ERC20 token
   * @param _cap - The cap amount which can be minted of the ERC20 token
   */
  constructor(
    string memory _name,
    string memory _symbol,
    uint256 _cap
  ) ERC20(_name, _symbol) ERC20Capped(_cap) {
    ERC20._mint(msg.sender, _cap);
  }

  /** @dev - A burn function to be called for the ERC20 token from another contract/user
   * @param _amount - The amount of ERC20 tokens to be burned
   */
  function burn(uint256 _amount) external {
    _burn(msg.sender, _amount);
  }
}

File 3 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 4 of 12 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^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;

            if (lastIndex != toDeleteIndex) {
                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] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // 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) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // 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(uint160(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(uint160(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(uint160(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(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 5 of 12 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 6 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 7 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/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() {
        _setOwner(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual 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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 8 of 12 : ERC20Capped.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC20.sol";

/**
 * @dev Extension of {ERC20} that adds a cap to the supply of tokens.
 */
abstract contract ERC20Capped is ERC20 {
    uint256 private immutable _cap;

    /**
     * @dev Sets the value of the `cap`. This value is immutable, it can only be
     * set once during construction.
     */
    constructor(uint256 cap_) {
        require(cap_ > 0, "ERC20Capped: cap is 0");
        _cap = cap_;
    }

    /**
     * @dev Returns the cap on the token's total supply.
     */
    function cap() public view virtual returns (uint256) {
        return _cap;
    }

    /**
     * @dev See {ERC20-_mint}.
     */
    function _mint(address account, uint256 amount) internal virtual override {
        require(ERC20.totalSupply() + amount <= cap(), "ERC20Capped: cap exceeded");
        super._mint(account, amount);
    }
}

File 9 of 12 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 10 of 12 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 11 of 12 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^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 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) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_cap","type":"uint256"},{"internalType":"uint256","name":"_amountForPool","type":"uint256"},{"internalType":"address","name":"_rewardReceiver","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"uint256[]","name":"_allocPoints","type":"uint256[]"},{"internalType":"contract IERC20[]","name":"_lpTokens","type":"address[]"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimTimeout","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingRwd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accRwdPerShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rwdPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rwdToken","outputs":[{"internalType":"contract Denarius","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_pids","type":"uint256[]"},{"internalType":"uint256[]","name":"_allocPoints","type":"uint256[]"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"uint256","name":"_endBlock","type":"uint256"},{"internalType":"uint256","name":"_rwdPerBlock","type":"uint256"},{"internalType":"uint256","name":"_ownerWithdrawBlockTimeout","type":"uint256"}],"name":"setProgramParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"}],"name":"withdrawExcessRwd","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405260006004553480156200001657600080fd5b50604051620032f6380380620032f683398101604081905262000039916200058c565b62000044336200006a565b6200004f86620000ba565b6200005e85858585856200018f565b50505050505062000731565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000546001600160a01b031633146200011a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b038116620001815760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840162000111565b6200018c816200006a565b50565b848484604051620001a090620004d2565b620001ae93929190620006ae565b604051809103906000f080158015620001cb573d6000803e3d6000fd5b50600180546001600160a01b0319166001600160a01b03929092169182179055620002049082846200020b602090811b620013fa17901c565b5050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663a9059cbb60e01b17909152620002639185916200026816565b505050565b6000620002c4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200034660201b62001462179092919060201c565b805190915015620002635780806020019051810190620002e591906200062b565b620002635760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840162000111565b606062000357848460008562000361565b90505b9392505050565b606082471015620003c45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840162000111565b843b620004145760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000111565b600080866001600160a01b031685876040516200043291906200067b565b60006040518083038185875af1925050503d806000811462000471576040519150601f19603f3d011682016040523d82523d6000602084013e62000476565b606091505b5090925090506200048982828662000494565b979650505050505050565b60608315620004a55750816200035a565b825115620004b65782518084602001fd5b8160405162461bcd60e51b815260040162000111919062000699565b610fad806200234983390190565b80516001600160a01b0381168114620004f857600080fd5b919050565b600082601f8301126200050e578081fd5b81516001600160401b03808211156200052b576200052b6200071b565b604051601f8301601f19908116603f011681019082821181831017156200055657620005566200071b565b816040528381528660208588010111156200056f578485fd5b62000582846020830160208901620006e8565b9695505050505050565b60008060008060008060c08789031215620005a5578182fd5b620005b087620004e0565b60208801519096506001600160401b0380821115620005cd578384fd5b620005db8a838b01620004fd565b96506040890151915080821115620005f1578384fd5b506200060089828a01620004fd565b94505060608701519250608087015191506200061f60a08801620004e0565b90509295509295509295565b6000602082840312156200063d578081fd5b815180151581146200035a578182fd5b6000815180845262000667816020860160208601620006e8565b601f01601f19169290920160200192915050565b600082516200068f818460208701620006e8565b9190910192915050565b6020815260006200035a60208301846200064d565b606081526000620006c360608301866200064d565b8281036020840152620006d781866200064d565b915050826040830152949350505050565b60005b8381101562000705578181015183820152602001620006eb565b8381111562000715576000848401525b50505050565b634e487b7160e01b600052604160045260246000fd5b611c0880620007416000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c8063715018a6116100c3578063b16049a21161007c578063b16049a2146102d1578063bb366bf2146102e4578063e2bbb158146102f7578063f214b7121461030a578063f2fde38b1461031d578063f61a7ff01461033057600080fd5b8063715018a6146102205780637d787a24146102285780638da5cb5b146102535780638dbb1e3a1461026457806393f1a40b14610277578063abc7c069146102be57600080fd5b8063441a3e7011610115578063441a3e70146101c157806348cd4cb1146101d657806351eb05a6146101df5780635312ea8e146101f2578063630b5ba1146102055780637064f1301461020d57600080fd5b8063081e3eda14610152578063083c6323146101695780630e1da6c3146101725780631526fe271461017b5780631fa36cbe146101b8575b600080fd5b6002545b6040519081526020015b60405180910390f35b61015660075481565b61015660085481565b61018e6101893660046119bd565b610339565b604080516001600160a01b0390951685526020850193909352918301526060820152608001610160565b61015660045481565b6101d46101cf366004611a1c565b61037d565b005b61015660065481565b6101d46101ed3660046119bd565b6104ea565b6101d46102003660046119bd565b6106a6565b6101d4610756565b6101d461021b3660046118ec565b610781565b6101d46108a7565b60015461023b906001600160a01b031681565b6040516001600160a01b039091168152602001610160565b6000546001600160a01b031661023b565b610156610272366004611a1c565b6108dd565b6102a96102853660046119ed565b60036020908152600092835260408084209091529082529020805460019091015482565b60408051928352602083019190915201610160565b6101d46102cc366004611971565b610924565b6101d46102df366004611908565b610aee565b6101d46102f2366004611a3d565b610d30565b6101d4610305366004611a1c565b6110bd565b6101566103183660046119ed565b6111dc565b6101d461032b3660046118ec565b61135f565b61015660055481565b6002818154811061034957600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b6000600283815481106103a057634e487b7160e01b600052603260045260246000fd5b6000918252602080832086845260038252604080852033865290925292208054600490920290920192508311156104135760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b60448201526064015b60405180910390fd5b61041c846104ea565b60006104598260010154610453670de0b6b3a764000061044d8760030154876000015461147b90919063ffffffff16565b90611487565b90611493565b9050610465338261149f565b81546104719085611493565b808355600384015461049191670de0b6b3a76400009161044d919061147b565b600183015582546104ac906001600160a01b031633866113fa565b604051848152859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a35050505050565b60065443101561054d5760405162461bcd60e51b815260206004820152602860248201527f546865206661726d696e672070726f6772616d20686173206e6f742079657420604482015267737461727465642160c01b606482015260840161040a565b60006002828154811061057057634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020190508060020154431161058f575050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156105d257600080fd5b505afa1580156105e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060a91906119d5565b90508061061c57504360029091015550565b600061062c8360020154436108dd565b9050600061065960045461044d86600101546106536005548761147b90919063ffffffff16565b9061147b565b905061067f6106748461044d84670de0b6b3a764000061147b565b6003860154906115eb565b6003850155600754431061069557600754610697565b435b84600201819055505050505050565b6000600282815481106106c957634e487b7160e01b600052603260045260246000fd5b6000918252602080832085845260038252604080852033808752935290932080546004909302909301805490945061070e926001600160a01b039190911691906113fa565b8054604051908152839033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a360008082556001909101555050565b60025460005b8181101561077d5761076d816104ea565b61077681611b8c565b905061075c565b5050565b6000546001600160a01b031633146107ab5760405162461bcd60e51b815260040161040a90611abd565b60085443116108115760405162461bcd60e51b815260206004820152602c60248201527f5468652063757272656e74206661726d696e672070726f6772616d206861732060448201526b1b9bdd08199a5b9a5cda195960a21b606482015260840161040a565b6001546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561085557600080fd5b505afa158015610869573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088d91906119d5565b60015490915061077d906001600160a01b031683836113fa565b6000546001600160a01b031633146108d15760405162461bcd60e51b815260040161040a90611abd565b6108db60006115f7565b565b600060075482116108f9576108f28284611493565b905061091e565b6007548310610911576108f260006106538486611493565b6007546108f29084611493565b92915050565b6000546001600160a01b0316331461094e5760405162461bcd60e51b815260040161040a90611abd565b82811461099d5760405162461bcd60e51b815260206004820152601a60248201527f417272617973206c656e67746820646f65736e74206d61746368000000000000604482015260640161040a565b6109a5610756565b60045460005b84811015610ae457610a4e8484838181106109d657634e487b7160e01b600052603260045260246000fd5b90506020020135610a486002898986818110610a0257634e487b7160e01b600052603260045260246000fd5b9050602002013581548110610a2757634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201600101548561149390919063ffffffff16565b906115eb565b9150838382818110610a7057634e487b7160e01b600052603260045260246000fd5b905060200201356002878784818110610a9957634e487b7160e01b600052603260045260246000fd5b9050602002013581548110610abe57634e487b7160e01b600052603260045260246000fd5b600091825260209091206001600490920201015580610adc81611b8c565b9150506109ab565b5060045550505050565b6000546001600160a01b03163314610b185760405162461bcd60e51b815260040161040a90611abd565b6001546001600160a01b0316610b7c5760405162461bcd60e51b8152602060048201526024808201527f412072657761726420746f6b656e20686173206e6f74206265656e206465706c6044820152631bde595960e21b606482015260840161040a565b828114610bcb5760405162461bcd60e51b815260206004820152601a60248201527f417272617973206c656e67746820646f65736e74206d61746368000000000000604482015260640161040a565b610bd3610756565b60006006544311610be657600654610be8565b435b60045490915060005b83811015610d2557610c32878783818110610c1c57634e487b7160e01b600052603260045260246000fd5b90506020020135836115eb90919063ffffffff16565b915060026040518060800160405280878785818110610c6157634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610c7691906118ec565b6001600160a01b03168152602001898985818110610ca457634e487b7160e01b600052603260045260246000fd5b602090810292909201358352508181018790526000604092830181905284546001808201875595825290829020845160049092020180546001600160a01b0319166001600160a01b03909216919091178155908301519381019390935581015160028301556060015160039091015580610d1d81611b8c565b915050610bf1565b506004555050505050565b6000546001600160a01b03163314610d5a5760405162461bcd60e51b815260040161040a90611abd565b60065415610dc45760405162461bcd60e51b815260206004820152603160248201527f54686520737461727420626c6f636b206f6620612070726f6772616d2068617360448201527008185b1c9958591e481899595b881cd95d607a1b606482015260840161040a565b600254610e045760405162461bcd60e51b815260206004820152600e60248201526d139bc81c1bdbdb1cc8185919195960921b604482015260640161040a565b438411610e795760405162461bcd60e51b815260206004820152603960248201527f54686520737461727420626c6f636b20706173736564206973206265666f726560448201527f207468652063757272656e7420626c6f636b206e756d62657200000000000000606482015260840161040a565b838311610ee75760405162461bcd60e51b815260206004820152603660248201527f54686520656e6420626c6f636b207061737365642073686f756c6420626520626044820152756967676572207468616e205f7374617274426c6f636b60501b606482015260840161040a565b81610f455760405162461bcd60e51b815260206004820152602860248201527f546865207265776172642070657220626c6f636b2063616e206e6f7420626520604482015267073657420746f20360c41b606482015260840161040a565b60008111610f9f5760405162461bcd60e51b815260206004820152602160248201527f436c61696d2074696d656f75742063616e206e6f742062652073657420746f206044820152600360fc1b606482015260840161040a565b610fb3610fac8585611b49565b839061147b565b6001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015610ff657600080fd5b505afa15801561100a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102e91906119d5565b101561109b5760405162461bcd60e51b815260206004820152603660248201527f536d61727420636f6e747261637420686173206e6f7420656e6f7567682062616044820152753630b731b29034b7103932bbb0b93239903a37b5b2b760511b606482015260840161040a565b6006849055600783905560058290556110b483826115eb565b60085550505050565b6000600283815481106110e057634e487b7160e01b600052603260045260246000fd5b60009182526020808320868452600382526040808520338652909252922060049091029091019150611111846104ea565b8054156111575760006111498260010154610453670de0b6b3a764000061044d8760030154876000015461147b90919063ffffffff16565b9050611155338261149f565b505b815461116e906001600160a01b0316333086611647565b805461117a90846115eb565b808255600383015461119a91670de0b6b3a76400009161044d919061147b565b6001820155604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a350505050565b6000806002848154811061120057634e487b7160e01b600052603260045260246000fd5b60009182526020808320878452600380835260408086206001600160a01b038a811688529452808620600495860290930191820154825491516370a0823160e01b8152309681019690965291965091949093909291909116906370a082319060240160206040518083038186803b15801561127a57600080fd5b505afa15801561128e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112b291906119d5565b90508360020154431180156112c657508015155b156113295760006112db8560020154436108dd565b9050600061130260045461044d88600101546106536005548761147b90919063ffffffff16565b905061132461131d8461044d84670de0b6b3a764000061147b565b85906115eb565b935050505b6113548360010154610453670de0b6b3a764000061044d86886000015461147b90919063ffffffff16565b979650505050505050565b6000546001600160a01b031633146113895760405162461bcd60e51b815260040161040a90611abd565b6001600160a01b0381166113ee5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161040a565b6113f7816115f7565b50565b6040516001600160a01b03831660248201526044810182905261145d90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261167f565b505050565b60606114718484600085611751565b90505b9392505050565b60006114748284611b2a565b60006114748284611b0a565b60006114748284611b49565b6001546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156114e357600080fd5b505afa1580156114f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061151b91906119d5565b9050808211156115b25760015460405163a9059cbb60e01b81526001600160a01b038581166004830152602482018490529091169063a9059cbb906044015b602060405180830381600087803b15801561157457600080fd5b505af1158015611588573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ac919061199d565b50505050565b60015460405163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529091169063a9059cbb9060440161155a565b60006114748284611af2565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526115ac9085906323b872dd60e01b90608401611426565b60006116d4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114629092919063ffffffff16565b80519091501561145d57808060200190518101906116f2919061199d565b61145d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161040a565b6060824710156117b25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161040a565b843b6118005760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161040a565b600080866001600160a01b0316858760405161181c9190611a6e565b60006040518083038185875af1925050503d8060008114611859576040519150601f19603f3d011682016040523d82523d6000602084013e61185e565b606091505b509150915061135482828660608315611878575081611474565b8251156118885782518084602001fd5b8160405162461bcd60e51b815260040161040a9190611a8a565b60008083601f8401126118b3578182fd5b50813567ffffffffffffffff8111156118ca578182fd5b6020830191508360208260051b85010111156118e557600080fd5b9250929050565b6000602082840312156118fd578081fd5b813561147481611bbd565b6000806000806040858703121561191d578283fd5b843567ffffffffffffffff80821115611934578485fd5b611940888389016118a2565b90965094506020870135915080821115611958578384fd5b50611965878288016118a2565b95989497509550505050565b60008060008060408587031215611986578384fd5b843567ffffffffffffffff80821115611934578586fd5b6000602082840312156119ae578081fd5b81518015158114611474578182fd5b6000602082840312156119ce578081fd5b5035919050565b6000602082840312156119e6578081fd5b5051919050565b600080604083850312156119ff578182fd5b823591506020830135611a1181611bbd565b809150509250929050565b60008060408385031215611a2e578182fd5b50508035926020909101359150565b60008060008060808587031215611a52578384fd5b5050823594602084013594506040840135936060013592509050565b60008251611a80818460208701611b60565b9190910192915050565b6020815260008251806020840152611aa9816040850160208701611b60565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115611b0557611b05611ba7565b500190565b600082611b2557634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611b4457611b44611ba7565b500290565b600082821015611b5b57611b5b611ba7565b500390565b60005b83811015611b7b578181015183820152602001611b63565b838111156115ac5750506000910152565b6000600019821415611ba057611ba0611ba7565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146113f757600080fdfea2646970667358221220506f578855679e2c3c5def984bf58e6bd25c770a243ea7f22048623f42fda5c964736f6c6343000804003360a06040523480156200001157600080fd5b5060405162000fad38038062000fad833981016040819052620000349162000320565b80838381600390805190602001906200004f929190620001c7565b50805162000065906004906020840190620001c7565b50505060008111620000be5760405162461bcd60e51b815260206004820152601560248201527f45524332304361707065643a206361702069732030000000000000000000000060448201526064015b60405180910390fd5b608052620000d93382620000e2602090811b6200047c17901c565b50505062000408565b6001600160a01b0382166200013a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401620000b5565b80600260008282546200014e919062000390565b90915550506001600160a01b038216600090815260208190526040812080548392906200017d90849062000390565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b828054620001d590620003b5565b90600052602060002090601f016020900481019282620001f9576000855562000244565b82601f106200021457805160ff191683800117855562000244565b8280016001018555821562000244579182015b828111156200024457825182559160200191906001019062000227565b506200025292915062000256565b5090565b5b8082111562000252576000815560010162000257565b600082601f8301126200027e578081fd5b81516001600160401b03808211156200029b576200029b620003f2565b604051601f8301601f19908116603f01168101908282118183101715620002c657620002c6620003f2565b81604052838152602092508683858801011115620002e2578485fd5b8491505b83821015620003055785820183015181830184015290820190620002e6565b838211156200031657848385830101525b9695505050505050565b60008060006060848603121562000335578283fd5b83516001600160401b03808211156200034c578485fd5b6200035a878388016200026d565b9450602086015191508082111562000370578384fd5b506200037f868287016200026d565b925050604084015190509250925092565b60008219821115620003b057634e487b7160e01b81526011600452602481fd5b500190565b600181811c90821680620003ca57607f821691505b60208210811415620003ec57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b608051610b8962000424600039600061014b0152610b896000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063395093511161008c57806395d89b411161006657806395d89b41146101c0578063a457c2d7146101c8578063a9059cbb146101db578063dd62ed3e146101ee57600080fd5b8063395093511461016f57806342966c681461018257806370a082311461019757600080fd5b806306fdde03146100d4578063095ea7b3146100f257806318160ddd1461011557806323b872dd14610127578063313ce5671461013a578063355274ea14610149575b600080fd5b6100dc610227565b6040516100e99190610a80565b60405180910390f35b610105610100366004610a3f565b6102b9565b60405190151581526020016100e9565b6002545b6040519081526020016100e9565b610105610135366004610a04565b6102cf565b604051601281526020016100e9565b7f0000000000000000000000000000000000000000000000000000000000000000610119565b61010561017d366004610a3f565b61037e565b610195610190366004610a68565b6103ba565b005b6101196101a53660046109b1565b6001600160a01b031660009081526020819052604090205490565b6100dc6103c7565b6101056101d6366004610a3f565b6103d6565b6101056101e9366004610a3f565b61046f565b6101196101fc3660046109d2565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461023690610b02565b80601f016020809104026020016040519081016040528092919081815260200182805461026290610b02565b80156102af5780601f10610284576101008083540402835291602001916102af565b820191906000526020600020905b81548152906001019060200180831161029257829003601f168201915b5050505050905090565b60006102c633848461055b565b50600192915050565b60006102dc848484610680565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156103665760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b610373853385840361055b565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916102c69185906103b5908690610ad3565b61055b565b6103c4338261084f565b50565b60606004805461023690610b02565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156104585760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161035d565b610465338585840361055b565b5060019392505050565b60006102c6338484610680565b6001600160a01b0382166104d25760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161035d565b80600260008282546104e49190610ad3565b90915550506001600160a01b03821660009081526020819052604081208054839290610511908490610ad3565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0383166105bd5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161035d565b6001600160a01b03821661061e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161035d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166106e45760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161035d565b6001600160a01b0382166107465760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161035d565b6001600160a01b038316600090815260208190526040902054818110156107be5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161035d565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906107f5908490610ad3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161084191815260200190565b60405180910390a350505050565b6001600160a01b0382166108af5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161035d565b6001600160a01b038216600090815260208190526040902054818110156109235760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161035d565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610952908490610aeb565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610673565b80356001600160a01b03811681146109ac57600080fd5b919050565b6000602082840312156109c2578081fd5b6109cb82610995565b9392505050565b600080604083850312156109e4578081fd5b6109ed83610995565b91506109fb60208401610995565b90509250929050565b600080600060608486031215610a18578081fd5b610a2184610995565b9250610a2f60208501610995565b9150604084013590509250925092565b60008060408385031215610a51578182fd5b610a5a83610995565b946020939093013593505050565b600060208284031215610a79578081fd5b5035919050565b6000602080835283518082850152825b81811015610aac57858101830151858201604001528201610a90565b81811115610abd5783604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610ae657610ae6610b3d565b500190565b600082821015610afd57610afd610b3d565b500390565b600181811c90821680610b1657607f821691505b60208210811415610b3757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea26469706673582212206563b3ded1e433b425a684601c84d2f2348d892a16681b8d676885a042efe2d564736f6c63430008040033000000000000000000000000685723b9dc89bdf28ba5f98f9a8c0ac899bd6e7700000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000c31249ba48763df46388ba5c4e7565d62ed4801c00000000000000000000000000000000000000000000000000000000000000174d41592032322044656e61726975732046757475726573000000000000000000000000000000000000000000000000000000000000000000000000000000000944454e2d4d415932320000000000000000000000000000000000000000000000

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000685723b9dc89bdf28ba5f98f9a8c0ac899bd6e7700000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000c31249ba48763df46388ba5c4e7565d62ed4801c00000000000000000000000000000000000000000000000000000000000000174d41592032322044656e61726975732046757475726573000000000000000000000000000000000000000000000000000000000000000000000000000000000944454e2d4d415932320000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _owner (address): 0x685723b9dc89bdf28ba5f98f9a8c0ac899bd6e77
Arg [1] : _name (string): MAY 22 Denarius Futures
Arg [2] : _symbol (string): DEN-MAY22
Arg [3] : _cap (uint256): 100000000000000000000
Arg [4] : _amountForPool (uint256): 2000000000000000000
Arg [5] : _rewardReceiver (address): 0xc31249ba48763df46388ba5c4e7565d62ed4801c

-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 000000000000000000000000685723b9dc89bdf28ba5f98f9a8c0ac899bd6e77
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [3] : 0000000000000000000000000000000000000000000000056bc75e2d63100000
Arg [4] : 0000000000000000000000000000000000000000000000001bc16d674ec80000
Arg [5] : 000000000000000000000000c31249ba48763df46388ba5c4e7565d62ed4801c
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000017
Arg [7] : 4d41592032322044656e61726975732046757475726573000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [9] : 44454e2d4d415932320000000000000000000000000000000000000000000000


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.