Contract 0xDd2F98a97fc2A59b1f0f03DE63B4b41041a339B0

 

Contract Overview

Balance:
0 BNB

BNB Value:
$0.00

Token:
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xcd60f44adfe6fd81a6e9021c95d2f8f9695ab2f64388e5e40f61bf52f5da1e87Approve118484102021-10-17 10:13:4818 hrs 43 mins ago0xd5e64e6d8723fb381e04844b8597678e9aca1eb7 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.000222715
0xb690614858f9de94fd5727aabad54e997f99670917ea08b79ca299ccd038204aApprove118393102021-10-17 2:38:441 day 2 hrs ago0x2bb6e6c1d1a1a6d150150fec91ec786a228f53fe IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.000222715
0xc0b6718b999b460a4e9c803a2388169d99eac11150989122fcfdd52bb86344deApprove118210302021-10-16 11:18:471 day 17 hrs ago0x7f7aac0fa4e511fc74e35062c2efb3867ecd26f0 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.000222715
0x79772a0ec5405ec6a5c86999f7eab1f2bf7a25186f0d4fca4c8ae2c81e450d61Transfer118164782021-10-16 7:29:531 day 21 hrs ago0x8183868a574e621a8bc6252b3e42813887019efd IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.0001903
0x4d34af8579c0814fc33d3858bd5a87e92092fc724ea829c926b0e00566a7465fApprove118164042021-10-16 7:26:111 day 21 hrs ago0x8183868a574e621a8bc6252b3e42813887019efd IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.000311801
0xc78c7ff1b8aedac5868aef1bd6eafca9c72dd80bc1c053ff80bdd8a64a990e90Transfer118163032021-10-16 7:21:081 day 21 hrs ago0x39b80ffb251d3ca7c6977aaeda1f0c2373d32438 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.0001903
0x75c57ee323180b968d2670e883c50a45826cee08f924eb9024ee49ce7356bec0Approve117617742021-10-14 9:45:573 days 19 hrs ago0x40a5b6fa3578b288c9c94d7b5dfe32d9ce240853 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.000222715
0xe834b2de5447c8f3ef41b89a5980d60fecfcb50f5448dd5e2857542b8d9aa72cTransfer117430672021-10-13 18:05:404 days 10 hrs ago0xe9260f246e91494de434dae34967487d050335df IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.00019036
0x20ccaa44634d9d33c87325777e08de593e8a7a3a76b450cd7858a4c77c7b0f8bTransfer117429222021-10-13 17:58:254 days 10 hrs ago0xd94261f6ba6d8a7f738f31cf23203b03c450baf5 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.00019036
0x7a21bc769edc8c6ff60119810424be932eefe543e53361f50580426377e5191eApprove117313202021-10-13 8:05:344 days 20 hrs ago0xf498b280e23877e969fd11f942ebcd1f03398175 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.000222715
0x67fa000b12b8adaa5c071eb28b5eec19e1a95853b479194a2063b5079e864741Approve117296042021-10-13 6:28:004 days 22 hrs ago0x90d8624dc25ade565ddb64f1d51992f9980db5f2 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.000222715
0x81fec1a449846f828451ba12850c901f644cb2d3d86bfb118f05edcb300c5139Approve116906972021-10-11 21:53:246 days 7 hrs ago0x21e33b61ea0f1aab96fe1b7d62d77aae01c79ec6 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.000222715
0x4e16faf9637dd4ee258408df3161f33c6aee211b19527b2a88d870bb3585ad32Approve116752402021-10-11 8:20:196 days 20 hrs ago0xd94261f6ba6d8a7f738f31cf23203b03c450baf5 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.000311801
0x90ca3478f58789ed7a8dbccf99c2ab1b62e922e070086ecb2b00823a3ae1dd4eApprove116681632021-10-11 2:25:177 days 2 hrs ago0x40f94e213ae5aba473c6144bd2f3343cd4892631 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.000222715
0x3f2632ad6cda84e96d6f1c35b806fe3972957798a9df50161720bc4396107d0dApprove116159442021-10-09 6:45:388 days 22 hrs ago0x75d467ec2a758ab387a53b50d96a1f18dbcc5e41 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.000222715
0x53b2f6b45bef41063f4c5e5e69bbf13256741d101fc46be8e9f7223293514b50Transfer115623592021-10-07 10:00:1610 days 18 hrs ago0x769851ab142fad0ea1dc94f441338792e2be81b0 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.00011536
0x1ebbaeb38d265537bd12928a51753d37aceb756998b657106aaa96c8b939866fTransfer115623382021-10-07 9:59:1310 days 18 hrs ago0xa42fd90551d62939172999afec34091cf0372f71 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.00026536
0xf54bfdcc2bc6f1e96d269565efef9315f018b56c1e30d947c0f3f000593a174eApprove115445962021-10-06 19:10:5911 days 9 hrs ago0xd08182c713cb0798b39a60ab4e4c521760581491 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.000222715
0x4be409bf585c93372a97efe982904891ddbe481568972709602cad79b39e116bTransfer115290862021-10-06 6:14:3011 days 22 hrs ago0x769851ab142fad0ea1dc94f441338792e2be81b0 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.00011536
0x99ae4575c538620cd380b4994374eced59fb09cf6623932fb05c29ea990e6c5bTransfer115290742021-10-06 6:13:5411 days 22 hrs ago0xa42fd90551d62939172999afec34091cf0372f71 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.00026536
0x5490bfcaf5e551ce25b6a7dfba916bc65e8c466598204232461aed8958bafb58Transfer114947192021-10-05 1:34:0713 days 3 hrs ago0x769851ab142fad0ea1dc94f441338792e2be81b0 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.00011536
0x494b73ffff9871ffe369e5e87261a1a025509846ee9bbe4ea08a09f9ad541f0dTransfer114947032021-10-05 1:33:1913 days 3 hrs ago0xa42fd90551d62939172999afec34091cf0372f71 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.00026536
0x33dee6d7b0e39fd5e4dc7cb25a5d12c2df96cae729beafdf04c6bc7363b6a4f5Approve114908292021-10-04 22:19:2113 days 6 hrs ago0x9c091c827e5ef1c68f02c7f42a466018009d09de IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.000222715
0x0bc38fda9c54d5b843312e3e103690409f5e46198fb2f52b2a80fb3157ecbfc5Transfer114801112021-10-04 13:22:2713 days 15 hrs ago0x769851ab142fad0ea1dc94f441338792e2be81b0 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.00011536
0x158aec451ed954d3ed1d9814b909c0b07bf7b0fd4ff4f83647f7d3075d0df380Transfer114800902021-10-04 13:21:2413 days 15 hrs ago0xa42fd90551d62939172999afec34091cf0372f71 IN  0xdd2f98a97fc2a59b1f0f03de63b4b41041a339b00 BNB0.00026536
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TigerHuntPoints

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv3 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at BscScan.com on 2021-08-19
*/

/*
SPDX-License-Identifier: GPL-3.0

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░░██████████████████████████████████████████████████████████████████████████████████████████████████████████░░
░░█░░░░░░░░░░░░░░█░░░░░░░░░░░░░░░░░░█░░░░░░░░░░░░░░█░░░░░░░░░░░░███░░░░░░░░░░█░░░░░░░░░░░░░░█░░░░░░░░░░░░░░█░░
░░█░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀▄▀▄▀▄▀▄▀▄▀▄▀░░█░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀▄▀▄▀▄▀░░░░█░░▄▀▄▀▄▀░░█░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀▄▀▄▀▄▀▄▀░░█░░
░░█░░▄▀░░░░░░░░░░█░░░░░░░░░░░░▄▀▄▀░░█░░▄▀░░░░░░▄▀░░█░░▄▀░░░░▄▀▄▀░░█░░░░▄▀░░░░█░░▄▀░░░░░░▄▀░░█░░▄▀░░░░░░░░░░█░░
░░█░░▄▀░░█████████████████░░░░▄▀░░░░█░░▄▀░░██░░▄▀░░█░░▄▀░░██░░▄▀░░███░░▄▀░░███░░▄▀░░██░░▄▀░░█░░▄▀░░█████████░░
░░█░░▄▀░░███████████████░░░░▄▀░░░░███░░▄▀░░██░░▄▀░░█░░▄▀░░██░░▄▀░░███░░▄▀░░███░░▄▀░░░░░░▄▀░░█░░▄▀░░█████████░░
░░█░░▄▀░░█████████████░░░░▄▀░░░░█████░░▄▀░░██░░▄▀░░█░░▄▀░░██░░▄▀░░███░░▄▀░░███░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀░░█████████░░
░░█░░▄▀░░███████████░░░░▄▀░░░░███████░░▄▀░░██░░▄▀░░█░░▄▀░░██░░▄▀░░███░░▄▀░░███░░▄▀░░░░░░▄▀░░█░░▄▀░░█████████░░
░░█░░▄▀░░█████████░░░░▄▀░░░░█████████░░▄▀░░██░░▄▀░░█░░▄▀░░██░░▄▀░░███░░▄▀░░███░░▄▀░░██░░▄▀░░█░░▄▀░░█████████░░
░░█░░▄▀░░░░░░░░░░█░░▄▀▄▀░░░░░░░░░░░░█░░▄▀░░░░░░▄▀░░█░░▄▀░░░░▄▀▄▀░░█░░░░▄▀░░░░█░░▄▀░░██░░▄▀░░█░░▄▀░░░░░░░░░░█░░
░░█░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀▄▀▄▀▄▀▄▀▄▀▄▀░░█░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀▄▀▄▀▄▀░░░░█░░▄▀▄▀▄▀░░█░░▄▀░░██░░▄▀░░█░░▄▀▄▀▄▀▄▀▄▀░░█░░
░░█░░░░░░░░░░░░░░█░░░░░░░░░░░░░░░░░░█░░░░░░░░░░░░░░█░░░░░░░░░░░░███░░░░░░░░░░█░░░░░░██░░░░░░█░░░░░░░░░░░░░░█░░
░░██████████████████████████████████████████████████████████████████████████████████████████████████████████░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░█████╗░░░░█████╗░░░░█████╗░░░░█████╗░░░░█████╗░░░░█████╗░░░░█████╗░░░░█████╗░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░██╔══██╗░░██╔══██╗░░██╔══██╗░░██╔══██╗░░██╔══██╗░░██╔══██╗░░██╔══██╗░░██╔══██╗░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░╚█████╔╝░░╚█████╔╝░░╚█████╔╝░░╚█████╔╝░░╚█████╔╝░░╚█████╔╝░░╚█████╔╝░░╚█████╔╝░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░██╔══██╗░░██╔══██╗░░██╔══██╗░░██╔══██╗░░██╔══██╗░░██╔══██╗░░██╔══██╗░░██╔══██░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░╚█████╔╝░░╚█████╔╝░░╚█████╔╝░░╚█████╔╝░░╚█████╔╝░░╚█████╔╝░░╚█████╔╝░░╚█████╔╝░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░╚════╝░░░░╚════╝░░░░╚════╝░░░░╚════╝░░░░╚════╝░░░░╚════╝░░░░╚════╝░░░░╚════╝░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░░╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋░░
░░╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋┏┓╋╋╋╋╋╋╋╋╋┏┓╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋░░
░░╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋┏━┳━┫┗┓╋╋┏┓┏┳┳━┫┣┳┳┓╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋░░
░░╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋┃╋┃┻┫┏┫╋╋┃┗┫┃┃━┫━┫┃┃╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋░░
░░╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋┣┓┣━┻━┛╋╋┗━┻━┻━┻┻╋┓┃╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋░░
░░╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋┗━┛╋╋╋╋╋╋╋╋╋╋╋╋╋╋┗━┛╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋░░
░░╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

Authored by Plastic Digits
Credit to OpenZeppelin, reflect.finance, split.network, bubbadefi.finance, uniswapv2, olive.cash, pancakeswap,
iron.finance, Wex/WaultSwap, Yearn, minime, Alchemix, and of course my friends at d0rg plus everyone else who
released the truly open source code used in this project.
*/

// File @openzeppelin/contracts/utils/[email protected]

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) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

// File @openzeppelin/contracts/access/[email protected]

//pragma solidity ^0.8.0;

/**
 * @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() {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), 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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(
            newOwner != address(0),
            "Ownable: new owner is the zero address"
        );
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// File @openzeppelin/contracts/token/ERC20/[email protected]

//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 @openzeppelin/contracts/token/ERC20/extensions/[email protected]

//pragma solidity ^0.8.0;

/**
 * @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 @openzeppelin/contracts/token/ERC20/[email protected]

//pragma solidity ^0.8.0;

/**
 * @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 guidelines: functions revert instead
 * of 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 defaut 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"
        );
        _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"
        );
        _approve(_msgSender(), spender, currentAllowance - subtractedValue);

        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is 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"
        );
        _balances[sender] = senderBalance - amount;
        _balances[recipient] += amount;

        emit Transfer(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:
     *
     * - `to` 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);
    }

    /**
     * @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");
        _balances[account] = accountBalance - amount;
        _totalSupply -= amount;

        emit Transfer(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 to 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 {}
}

// File @openzeppelin/contracts/token/ERC20/extensions/[email protected]

//pragma solidity ^0.8.0;

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        uint256 currentAllowance = allowance(account, _msgSender());
        require(
            currentAllowance >= amount,
            "ERC20: burn amount exceeds allowance"
        );
        _approve(account, _msgSender(), currentAllowance - amount);
        _burn(account, amount);
    }
}

// File @openzeppelin/contracts/security/[email protected]

//pragma solidity ^0.8.0;

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

// File @openzeppelin/contracts/token/ERC20/extensions/[email protected]

//pragma solidity ^0.8.0;

/**
 * @dev ERC20 token with pausable token transfers, minting and burning.
 *
 * Useful for scenarios such as preventing trades until the end of an evaluation
 * period, or having an emergency switch for freezing all token transfers in the
 * event of a large bug.
 */
abstract contract ERC20Pausable is ERC20, Pausable {
    /**
     * @dev See {ERC20-_beforeTokenTransfer}.
     *
     * Requirements:
     *
     * - the contract must not be paused.
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, amount);

        require(!paused(), "ERC20Pausable: token transfer while paused");
    }
}

// File @openzeppelin/contracts/utils/[email protected]

//pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant alphabet = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length)
        internal
        pure
        returns (string memory)
    {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = alphabet[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

// File @openzeppelin/contracts/utils/introspection/[email protected]

//pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// File @openzeppelin/contracts/utils/introspection/[email protected]

//pragma solidity ^0.8.0;

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override
        returns (bool)
    {
        return interfaceId == type(IERC165).interfaceId;
    }
}

// File @openzeppelin/contracts/access/[email protected]

//pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    function hasRole(bytes32 role, address account)
        external
        view
        returns (bool);

    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    function grantRole(bytes32 role, address account) external;

    function revokeRole(bytes32 role, address account) external;

    function renounceRole(bytes32 role, address account) external;
}

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(
        bytes32 indexed role,
        bytes32 indexed previousAdminRole,
        bytes32 indexed newAdminRole
    );

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {_setupRole}.
     */
    event RoleGranted(
        bytes32 indexed role,
        address indexed account,
        address indexed sender
    );

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(
        bytes32 indexed role,
        address indexed account,
        address indexed sender
    );

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            interfaceId == type(IAccessControl).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account)
        public
        view
        override
        returns (bool)
    {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account)
        public
        virtual
        override
        onlyRole(getRoleAdmin(role))
    {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account)
        public
        virtual
        override
        onlyRole(getRoleAdmin(role))
    {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account)
        public
        virtual
        override
    {
        require(
            account == _msgSender(),
            "AccessControl: can only renounce roles for self"
        );

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        emit RoleAdminChanged(role, getRoleAdmin(role), adminRole);
        _roles[role].adminRole = adminRole;
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

// File @openzeppelin/contracts/utils/structs/[email protected]

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

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

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = 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)
    {
        require(
            set._values.length > index,
            "EnumerableSet: index out of bounds"
        );
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

// File @openzeppelin/contracts/access/[email protected]

//pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable {
    function getRoleMember(bytes32 role, uint256 index)
        external
        view
        returns (address);

    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerable is
    IAccessControlEnumerable,
    AccessControl
{
    using EnumerableSet for EnumerableSet.AddressSet;

    mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            interfaceId == type(IAccessControlEnumerable).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index)
        public
        view
        override
        returns (address)
    {
        return _roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role)
        public
        view
        override
        returns (uint256)
    {
        return _roleMembers[role].length();
    }

    /**
     * @dev Overload {grantRole} to track enumerable memberships
     */
    function grantRole(bytes32 role, address account) public virtual override {
        super.grantRole(role, account);
        _roleMembers[role].add(account);
    }

    /**
     * @dev Overload {revokeRole} to track enumerable memberships
     */
    function revokeRole(bytes32 role, address account) public virtual override {
        super.revokeRole(role, account);
        _roleMembers[role].remove(account);
    }

    /**
     * @dev Overload {renounceRole} to track enumerable memberships
     */
    function renounceRole(bytes32 role, address account)
        public
        virtual
        override
    {
        super.renounceRole(role, account);
        _roleMembers[role].remove(account);
    }

    /**
     * @dev Overload {_setupRole} to track enumerable memberships
     */
    function _setupRole(bytes32 role, address account)
        internal
        virtual
        override
    {
        super._setupRole(role, account);
        _roleMembers[role].add(account);
    }
}

// File @openzeppelin/contracts/token/ERC20/presets/[email protected]

//pragma solidity ^0.8.0;

/**
 * @dev {ERC20} token, including:
 *
 *  - ability for holders to burn (destroy) their tokens
 *  - a minter role that allows for token minting (creation)
 *  - a pauser role that allows to stop all token transfers
 *
 * This contract uses {AccessControl} to lock permissioned functions using the
 * different roles - head to its documentation for details.
 *
 * The account that deploys the contract will be granted the minter and pauser
 * roles, as well as the default admin role, which will let it grant both minter
 * and pauser roles to other accounts.
 */
contract ERC20PresetMinterPauser is
    Context,
    AccessControlEnumerable,
    ERC20Burnable,
    ERC20Pausable
{
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");

    /**
     * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the
     * account that deploys the contract.
     *
     * See {ERC20-constructor}.
     */
    constructor(string memory name, string memory symbol) ERC20(name, symbol) {
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());

        _setupRole(MINTER_ROLE, _msgSender());
        _setupRole(PAUSER_ROLE, _msgSender());
    }

    /**
     * @dev Creates `amount` new tokens for `to`.
     *
     * See {ERC20-_mint}.
     *
     * Requirements:
     *
     * - the caller must have the `MINTER_ROLE`.
     */
    function mint(address to, uint256 amount) public virtual {
        require(
            hasRole(MINTER_ROLE, _msgSender()),
            "ERC20PresetMinterPauser: must have minter role to mint"
        );
        _mint(to, amount);
    }

    /**
     * @dev Pauses all token transfers.
     *
     * See {ERC20Pausable} and {Pausable-_pause}.
     *
     * Requirements:
     *
     * - the caller must have the `PAUSER_ROLE`.
     */
    function pause() public virtual {
        require(
            hasRole(PAUSER_ROLE, _msgSender()),
            "ERC20PresetMinterPauser: must have pauser role to pause"
        );
        _pause();
    }

    /**
     * @dev Unpauses all token transfers.
     *
     * See {ERC20Pausable} and {Pausable-_unpause}.
     *
     * Requirements:
     *
     * - the caller must have the `PAUSER_ROLE`.
     */
    function unpause() public virtual {
        require(
            hasRole(PAUSER_ROLE, _msgSender()),
            "ERC20PresetMinterPauser: must have pauser role to unpause"
        );
        _unpause();
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual override(ERC20, ERC20Pausable) {
        super._beforeTokenTransfer(from, to, amount);
    }
}

// File @openzeppelin/contracts/utils/[email protected]

//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;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{value: amount}("");
        require(
            success,
            "Address: unable to send value, recipient may have reverted"
        );
    }

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

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

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{value: value}(
            data
        );
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File @openzeppelin/contracts/token/ERC20/utils/[email protected]

//pragma solidity ^0.8.0;

/**
 * @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'
        // solhint-disable-next-line max-line-length
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(token.approve.selector, spender, value)
        );
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + 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
            // solhint-disable-next-line max-line-length
            require(
                abi.decode(returndata, (bool)),
                "SafeERC20: ERC20 operation did not succeed"
            );
        }
    }
}

// File contracts/CZFarm.sol

// Authored by Plastic Digits
//pragma solidity ^0.8.4;
contract CZFarm is Context, ERC20PresetMinterPauser, Ownable {
    using SafeERC20 for IERC20;

    constructor() ERC20PresetMinterPauser("CZFarm", "CZF") Ownable() {}

    function recoverERC20(address tokenAddress) external onlyOwner {
        IERC20(tokenAddress).safeTransfer(
            _msgSender(),
            IERC20(tokenAddress).balanceOf(address(this))
        );
    }
}

// File @openzeppelin/contracts/utils/math/[email protected]

//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. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * 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 contracts/CZFarmMaster.sol

// Authored by Plastic Digits
// Credit to Wex/WaultSwap, Synthetix
//pragma solidity ^0.8.4;
contract CZFarmMaster is Ownable {
    using SafeMath for uint256;

    struct UserInfo {
        uint256 amount;
        uint256 rewardDebt;
        uint256 pendingRewards;
    }

    struct PoolInfo {
        IERC20 lpToken;
        uint256 allocPoint;
        uint256 lastRewardBlock;
        uint256 accCzfPerShare;
    }

    CZFarm public czf;
    uint256 public czfPerBlock;

    PoolInfo[] public poolInfo;
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;
    uint256 public totalAllocPoint = 0;
    uint256 public startBlock;

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

    constructor(
        CZFarm _czf,
        uint256 _czfPerBlock,
        uint256 _startBlock
    ) {
        czf = _czf;
        czfPerBlock = _czfPerBlock;
        startBlock = _startBlock;
    }

    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }

    function getMultiplier(uint256 _from, uint256 _to)
        public
        pure
        returns (uint256)
    {
        return _to.sub(_from);
    }

    function add(
        uint256 _allocPoint,
        IERC20 _lpToken,
        bool _withUpdate
    ) public onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardBlock = block.number > startBlock
            ? block.number
            : startBlock;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(
            PoolInfo({
                lpToken: _lpToken,
                allocPoint: _allocPoint,
                lastRewardBlock: lastRewardBlock,
                accCzfPerShare: 0
            })
        );
    }

    function set(
        uint256 _pid,
        uint256 _allocPoint,
        bool _withUpdate
    ) public onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(
            _allocPoint
        );
        poolInfo[_pid].allocPoint = _allocPoint;
    }

    function pendingCzf(uint256 _pid, address _user)
        external
        view
        returns (uint256)
    {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accCzfPerShare = pool.accCzfPerShare;
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            uint256 multiplier = getMultiplier(
                pool.lastRewardBlock,
                block.number
            );
            uint256 czfReward = multiplier
                .mul(czfPerBlock)
                .mul(pool.allocPoint)
                .div(totalAllocPoint);
            accCzfPerShare = accCzfPerShare.add(
                czfReward.mul(1e12).div(lpSupply)
            );
        }
        return
            user.amount.mul(accCzfPerShare).div(1e12).sub(user.rewardDebt).add(
                user.pendingRewards
            );
    }

    function massUpdatePools() public {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            updatePool(pid);
        }
    }

    function updatePool(uint256 _pid) public {
        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 czfReward = multiplier
            .mul(czfPerBlock)
            .mul(pool.allocPoint)
            .div(totalAllocPoint);
        czf.mint(address(this), czfReward);
        pool.accCzfPerShare = pool.accCzfPerShare.add(
            czfReward.mul(1e12).div(lpSupply)
        );
        pool.lastRewardBlock = block.number;
    }

    function deposit(
        uint256 _pid,
        uint256 _amount,
        bool _withdrawRewards
    ) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 pending = user
                .amount
                .mul(pool.accCzfPerShare)
                .div(1e12)
                .sub(user.rewardDebt);

            if (pending > 0) {
                user.pendingRewards = user.pendingRewards.add(pending);

                if (_withdrawRewards) {
                    safeCzfTransfer(msg.sender, user.pendingRewards);
                    emit Claim(msg.sender, _pid, user.pendingRewards);
                    user.pendingRewards = 0;
                }
            }
        }
        if (_amount > 0) {
            require(
                pool.lpToken.transferFrom(
                    address(msg.sender),
                    address(this),
                    _amount
                ),
                "CZFarmMaster: Transfer failed"
            );
            user.amount = user.amount.add(_amount);
        }
        user.rewardDebt = user.amount.mul(pool.accCzfPerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _amount);
    }

    function withdraw(
        uint256 _pid,
        uint256 _amount,
        bool _withdrawRewards
    ) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= _amount, "CZFarmMaster: balance too low");
        updatePool(_pid);
        uint256 pending = user.amount.mul(pool.accCzfPerShare).div(1e12).sub(
            user.rewardDebt
        );
        if (pending > 0) {
            user.pendingRewards = user.pendingRewards.add(pending);

            if (_withdrawRewards) {
                safeCzfTransfer(msg.sender, user.pendingRewards);
                emit Claim(msg.sender, _pid, user.pendingRewards);
                user.pendingRewards = 0;
            }
        }
        if (_amount > 0) {
            user.amount = user.amount.sub(_amount);
            require(
                pool.lpToken.transfer(address(msg.sender), _amount),
                "CZFarmMaster: Transfer failed"
            );
        }
        user.rewardDebt = user.amount.mul(pool.accCzfPerShare).div(1e12);
        emit Withdraw(msg.sender, _pid, _amount);
    }

    function emergencyWithdraw(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(
            pool.lpToken.transfer(address(msg.sender), user.amount),
            "CZFarmMaster: Transfer failed"
        );
        emit EmergencyWithdraw(msg.sender, _pid, user.amount);
        user.amount = 0;
        user.rewardDebt = 0;
        user.pendingRewards = 0;
    }

    function claim(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        uint256 pending = user.amount.mul(pool.accCzfPerShare).div(1e12).sub(
            user.rewardDebt
        );
        if (pending > 0 || user.pendingRewards > 0) {
            user.pendingRewards = user.pendingRewards.add(pending);
            safeCzfTransfer(msg.sender, user.pendingRewards);
            emit Claim(msg.sender, _pid, user.pendingRewards);
            user.pendingRewards = 0;
        }
        user.rewardDebt = user.amount.mul(pool.accCzfPerShare).div(1e12);
    }

    function safeCzfTransfer(address _to, uint256 _amount) internal {
        uint256 czfBal = czf.balanceOf(address(this));
        if (_amount > czfBal) {
            czf.transfer(_to, czfBal);
        } else {
            czf.transfer(_to, _amount);
        }
    }

    function setCzfPerBlock(uint256 _czfPerBlock) public onlyOwner {
        require(_czfPerBlock > 0, "CZFarmMaster: czfPerBlock cannot be 0");
        czfPerBlock = _czfPerBlock;
    }
}

// File @openzeppelin/contracts/security/[email protected]

//pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

// File contracts/CZFarmPool.sol

// Authored by Plastic Digits
// Credit to Olive.cash, Pancakeswap
//pragma solidity ^0.8.4;
contract CZFarmPool is Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    // Whether it is initialized
    bool public isInitialized;

    // Accrued token per share
    uint256 public accTokenPerShare;

    // The timestamp when REWARD mining ends.
    uint256 public timestampEnd;

    // The timestamp when REWARD mining starts.
    uint256 public timestampStart;

    // The timestamp of the last pool update
    uint256 public timestampLast;

    // REWARD tokens created per second.
    uint256 public rewardPerSecond;

    // The precision factor
    uint256 public PRECISION_FACTOR;

    // The reward token
    IERC20 public rewardToken;

    // The staked token
    IERC20 public stakedToken;

    // Info of each user that stakes tokens (stakedToken)
    mapping(address => UserInfo) public userInfo;

    struct UserInfo {
        uint256 amount; // How many staked tokens the user has provided
        uint256 rewardDebt; // Reward debt
    }

    event AdminTokenRecovery(address tokenRecovered, uint256 amount);
    event Deposit(address indexed user, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 amount);
    event NewStartAndEndTimestamps(
        uint256 timestampStart,
        uint256 timestampEnd
    );
    event NewRewardPerSecond(uint256 rewardPerSecpmd);
    event RewardsStop(uint256 timestamp);
    event Withdraw(address indexed user, uint256 amount);

    /*
     * @notice Initialize the contract
     * @param _stakedToken: staked token address
     * @param _rewardToken: reward token address
     * @param _rewardPerSecond: reward per second (in rewardToken)
     * @param _timestampStart: start timestamp
     * @param _timestampEnd: end timestamp
     * @param _poolLimitPerUser: pool limit per user in stakedToken (if any, else 0)
     * @param _admin: admin address with ownership
     */
    function initialize(
        IERC20 _stakedToken,
        IERC20 _rewardToken,
        uint256 _rewardPerSecond,
        uint256 _timestampStart,
        uint256 _timestampEnd,
        address _admin
    ) external {
        require(!isInitialized, "Already initialized");
        isInitialized = true;

        stakedToken = _stakedToken;
        rewardToken = _rewardToken;
        rewardPerSecond = _rewardPerSecond;
        timestampStart = _timestampStart;
        timestampEnd = _timestampEnd;

        PRECISION_FACTOR = uint256(
            10 **
                (uint256(30) -
                    (IERC20Metadata(address(rewardToken)).decimals()))
        );

        // Set the timestampLast as the timestampStart
        timestampLast = timestampStart;

        // Transfer ownership to the admin address who becomes owner of the contract
        transferOwnership(_admin);
    }

    /*
     * @notice Deposit staked tokens and collect reward tokens (if any)
     * @param _amount: amount to withdraw (in rewardToken)
     */
    function deposit(uint256 _amount) external nonReentrant {
        UserInfo storage user = userInfo[msg.sender];

        _updatePool();

        if (user.amount > 0) {
            uint256 pending = (user.amount * accTokenPerShare) /
                PRECISION_FACTOR -
                user.rewardDebt;
            if (pending > 0) {
                rewardToken.safeTransfer(address(msg.sender), pending);
            }
        }

        if (_amount > 0) {
            user.amount = user.amount + _amount;
            stakedToken.safeTransferFrom(
                address(msg.sender),
                address(this),
                _amount
            );
        }

        user.rewardDebt = (user.amount * accTokenPerShare) / PRECISION_FACTOR;

        emit Deposit(msg.sender, _amount);
    }

    /*
     * @notice Withdraw staked tokens and collect reward tokens
     * @param _amount: amount to withdraw (in rewardToken)
     */
    function withdraw(uint256 _amount) external nonReentrant {
        UserInfo storage user = userInfo[msg.sender];
        require(user.amount >= _amount, "Amount to withdraw too high");

        _updatePool();

        uint256 pending = (user.amount * accTokenPerShare) /
            PRECISION_FACTOR -
            user.rewardDebt;

        if (_amount > 0) {
            user.amount = user.amount - _amount;
            stakedToken.safeTransfer(address(msg.sender), _amount);
        }

        if (pending > 0) {
            rewardToken.safeTransfer(address(msg.sender), pending);
        }

        user.rewardDebt = (user.amount * accTokenPerShare) / PRECISION_FACTOR;

        emit Withdraw(msg.sender, _amount);
    }

    /*
     * @notice Withdraw staked tokens without caring about rewards rewards
     * @dev Needs to be for emergency.
     */
    function emergencyWithdraw() external nonReentrant {
        UserInfo storage user = userInfo[msg.sender];
        uint256 amountToTransfer = user.amount;
        user.amount = 0;
        user.rewardDebt = 0;

        if (amountToTransfer > 0) {
            stakedToken.safeTransfer(address(msg.sender), amountToTransfer);
        }

        emit EmergencyWithdraw(msg.sender, user.amount);
    }

    /*
     * @notice Stop rewards
     * @dev Only callable by owner. Needs to be for emergency.
     */
    function emergencyRewardWithdraw(uint256 _amount) external onlyOwner {
        rewardToken.safeTransfer(address(msg.sender), _amount);
    }

    /**
     * @notice It allows the admin to recover wrong tokens sent to the contract
     * @param _tokenAddress: the address of the token to withdraw
     * @param _tokenAmount: the number of tokens to withdraw
     * @dev This function is only callable by admin.
     */
    function recoverWrongTokens(address _tokenAddress, uint256 _tokenAmount)
        external
        onlyOwner
    {
        require(
            _tokenAddress != address(stakedToken),
            "Cannot be staked token"
        );
        require(
            _tokenAddress != address(rewardToken),
            "Cannot be reward token"
        );

        IERC20(_tokenAddress).safeTransfer(address(msg.sender), _tokenAmount);

        emit AdminTokenRecovery(_tokenAddress, _tokenAmount);
    }

    /*
     * @notice Stop rewards
     * @dev Only callable by owner
     */
    function stopReward() external onlyOwner {
        timestampEnd = block.timestamp;
    }

    /*
     * @notice Update reward per second
     * @dev Only callable by owner.
     * @param _rewardPerSecond: the reward per second
     */
    function updateRewardPerSecond(uint256 _rewardPerSecond)
        external
        onlyOwner
    {
        require(block.timestamp < timestampStart, "Pool has started");
        rewardPerSecond = _rewardPerSecond;
        emit NewRewardPerSecond(_rewardPerSecond);
    }

    /**
     * @notice It allows the admin to update start and end timestamps
     * @dev This function is only callable by owner.
     * @param _timestampStart: the new start timestamp
     * @param _timestampEnd: the new end timestamp
     */
    function updateStartAndEndTimestamps(
        uint256 _timestampStart,
        uint256 _timestampEnd
    ) external onlyOwner {
        require(block.timestamp < timestampStart, "Pool has started");
        require(
            _timestampStart < _timestampEnd,
            "New timestampStart must be lower than new end timestamp"
        );
        require(
            block.timestamp < _timestampStart,
            "New timestampStart must be higher than current timestamp"
        );

        timestampStart = _timestampStart;
        timestampEnd = _timestampEnd;

        // Set the timestampLast as the timestampStart
        timestampLast = timestampStart;

        emit NewStartAndEndTimestamps(_timestampStart, _timestampEnd);
    }

    /*
     * @notice View function to see pending reward on frontend.
     * @param _user: user address
     * @return Pending reward for a given user
     */
    function pendingReward(address _user) external view returns (uint256) {
        UserInfo storage user = userInfo[_user];
        uint256 stakedTokenSupply = stakedToken.balanceOf(address(this));
        if (block.timestamp > timestampLast && stakedTokenSupply != 0) {
            uint256 multiplier = _getMultiplier(timestampLast, block.timestamp);
            uint256 cakeReward = multiplier * rewardPerSecond;
            uint256 adjustedTokenPerShare = accTokenPerShare +
                ((cakeReward * PRECISION_FACTOR) / stakedTokenSupply);
            return
                (user.amount * adjustedTokenPerShare) /
                PRECISION_FACTOR -
                user.rewardDebt;
        } else {
            return
                (user.amount * accTokenPerShare) /
                PRECISION_FACTOR -
                user.rewardDebt;
        }
    }

    /*
     * @notice Update reward variables of the given pool to be up-to-date.
     */
    function _updatePool() internal {
        if (block.timestamp <= timestampLast) {
            return;
        }

        uint256 stakedTokenSupply = stakedToken.balanceOf(address(this));

        if (stakedTokenSupply == 0) {
            timestampLast = block.timestamp;
            return;
        }

        uint256 multiplier = _getMultiplier(timestampLast, block.timestamp);
        uint256 cakeReward = multiplier * rewardPerSecond;
        accTokenPerShare =
            accTokenPerShare +
            ((cakeReward * PRECISION_FACTOR) / stakedTokenSupply);
        timestampLast = block.timestamp;
    }

    /*
     * @notice Return reward multiplier over the given _from to _to timestamp.
     * @param _from: timestamp to start
     * @param _to: timestamp to finish
     */
    function _getMultiplier(uint256 _from, uint256 _to)
        internal
        view
        returns (uint256)
    {
        if (_to <= timestampEnd) {
            return _to - _from;
        } else if (_from >= timestampEnd) {
            return 0;
        } else {
            return timestampEnd - _from;
        }
    }

    function czfarmSetStart(uint256 _timestampStart) public onlyOwner {
        require(block.timestamp < timestampStart, "Pool has started");
        timestampStart = _timestampStart;
        timestampEnd = timestampStart + rewardDuration();
        timestampLast = timestampStart;
    }

    function czfarmSetDuration(uint256 _durationSeconds) public onlyOwner {
        require(block.timestamp < timestampStart, "Pool has started");
        timestampEnd = timestampStart + _durationSeconds;
        czfarmUpdateRewardPerSecond();
    }

    function czfarmSetStartAndDuration(
        uint256 _timestampStart,
        uint256 _durationSeconds
    ) public onlyOwner {
        czfarmSetStart(_timestampStart);
        czfarmSetDuration(_durationSeconds);
    }

    function czfarmUpdateRewardPerSecond() public onlyOwner {
        uint256 rewardBal = rewardToken.balanceOf(address(this));
        rewardPerSecond = rewardBal / rewardDuration();
    }

    function rewardDuration() public view returns (uint256) {
        return timestampEnd - timestampStart;
    }
}

// File contracts/CZFarmPoolFactory.sol

// Authored by Plastic Digits
// Credit to Olive.cash
//pragma solidity ^0.8.4;
contract CZFarmPoolFactory is Ownable {
    using SafeERC20 for IERC20;

    event NewCZFarmPool(address indexed pool);

    IERC20 public czfarm;

    constructor(IERC20 _czfarm) Ownable() {
        czfarm = _czfarm;
    }

    function createPool(
        IERC20 token,
        IERC20 reward,
        uint256 rewardPerSecond,
        uint256 startTimestamp,
        uint256 endTimestamp
    ) public {
        bytes memory bytecode = type(CZFarmPool).creationCode;
        bytes32 salt = keccak256(
            abi.encodePacked(token, reward, block.timestamp)
        );
        address pool;

        assembly {
            pool := create2(0, add(bytecode, 32), mload(bytecode), salt)
        }

        CZFarmPool(pool).initialize(
            token,
            reward,
            rewardPerSecond,
            startTimestamp,
            endTimestamp,
            owner()
        );

        emit NewCZFarmPool(address(pool));
    }

    function makeNewFull(
        IERC20 reward,
        uint256 durationSeconds,
        uint256 rewardAmount
    ) public {
        // start after 7 days
        uint256 startBlock = block.timestamp + 1 weeks;
        uint256 endBlock = startBlock + durationSeconds;
        uint256 rewardPerSecond = rewardAmount / durationSeconds;
        createPool(czfarm, reward, rewardPerSecond, startBlock, endBlock);
    }

    function makeNewRequiresRewardPerSecondRecalc(IERC20 reward) external {
        makeNewFull(reward, 30 days, 100 ether);
    }
}

// File contracts/CzodiacToken.sol

//pragma solidity ^0.8.4;
contract CZodiacToken is Context, IERC20, Ownable {
    using SafeMath for uint256;
    using Address for address;

    struct TValues {
        uint256 tTransferAmount;
        uint256 tHolderReward;
        uint256 tBurn;
        uint256 tLpReward;
        uint256 tDevReward;
    }

    struct RValues {
        uint256 rate;
        uint256 rAmount;
        uint256 rTransferAmount;
        uint256 tTransferAmount;
        uint256 rFee;
        uint256 tFee;
        uint256 rBurn;
        uint256 rLpReward;
        uint256 rDevReward;
    }

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

    mapping(address => bool) private _isExcludedFromFee;

    mapping(address => bool) private _isExcluded;
    address[] private _excluded;

    uint256 private constant MAX = ~uint256(0);
    uint256 private _tTotal;
    uint256 private _rTotal;

    string public name;
    string public symbol;
    uint8 public constant decimals = 18;

    bool public globalRewardsEnabled;
    bool public areTransfersEnabled;

    //01.00%
    uint256 private constant _holderRewardBasis = 50;

    //00.30%
    uint256 private constant _burnBasis = 20;

    //00.50%
    uint256 private constant _lpRewardBasis = 150;

    //00.20%
    uint256 private constant _devRewardBasis = 30;

    uint256 private constant _swapBasisRate = 80000;

    //tracks the total amount of token rewarded to liquidity providers
    uint256 public totalLiquidityProviderRewards;

    address public autoFarm;
    IERC20 public immutable prevCzodiac;
    IERC20 public nextCzodiac;

    uint256 public immutable swapStartTimestamp;
    uint256 public immutable swapEndTimestamp;

    event HolderRewardsEvent(uint256 tokenAmount);
    event LPRewardsEvent(uint256 tokenAmount);
    event DevRewardsEvent(uint256 tokenAmount);
    event BurnEvent(uint256 tokenAmount);
    event Creation(
        address _autofarm,
        IERC20 _prevCzodiac,
        string _name,
        string _symbol,
        uint256 _totalSupply,
        uint256 _swapStartTimestamp,
        uint256 _swapEndTimestamp
    );
    event Swap(address _swapper, uint256 _amountToBurn, uint256 _amountToMint);

    constructor(
        address _autoFarm,
        IERC20 _prevCzodiac,
        string memory _name,
        string memory _symbol,
        uint256 _swapStartTimestamp,
        uint256 _swapEndTimestamp
    ) {
        name = _name;
        symbol = _symbol;
        prevCzodiac = _prevCzodiac;
        swapStartTimestamp = _swapStartTimestamp;
        swapEndTimestamp = _swapEndTimestamp;
        autoFarm = _autoFarm;

        if (address(_prevCzodiac) == address(0)) {
            _tTotal = 8 * 10**12 * 10**18;
            _rTotal = (MAX - (MAX % _tTotal));
            _rOwned[_msgSender()] = _rTotal;
            // Do not enable global rewards until the liquidity has been added to prevent low price.
            // Disable transfers except for owner to allow creation of initial liquidity pools safely.
        } else {
            _tTotal = _prevCzodiac.totalSupply().mul(10000).div(_swapBasisRate);
            _rTotal = (MAX - (MAX % _tTotal));
            _rOwned[address(this)] = _rTotal;
            areTransfersEnabled = true;
            globalRewardsEnabled = true;
        }

        //exclude owner, contract, burn address from fee & rewards
        _isExcludedFromFee[owner()] = true;
        _isExcludedFromFee[address(this)] = true;
        _isExcludedFromFee[address(0)] = true;
        _isExcludedFromFee[_autoFarm] = true;

        excludeFromReward(owner());
        excludeFromReward(address(this));
        excludeFromReward(address(0));
        excludeFromReward(_autoFarm);

        emit Creation(
            _autoFarm,
            _prevCzodiac,
            _name,
            _symbol,
            _tTotal,
            _swapStartTimestamp,
            _swapEndTimestamp
        );
    }

    function swapFor(address[] calldata swappers) external onlyOwner {
        for (uint16 i; i < swappers.length; i++) {
            _swap(swappers[i]);
        }
    }

    function swap() external {
        _swap(_msgSender());
    }

    function totalSupply() public view override returns (uint256) {
        return _tTotal;
    }

    function balanceOf(address account) public view override returns (uint256) {
        if (_isExcluded[account]) return _tOwned[account];
        return tokenFromReflection(_rOwned[account]);
    }

    function transfer(address recipient, uint256 amount)
        public
        override
        returns (bool)
    {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    function allowance(address owner, address spender)
        public
        view
        override
        returns (uint256)
    {
        return _allowances[owner][spender];
    }

    function approve(address spender, uint256 amount)
        public
        override
        returns (bool)
    {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public override returns (bool) {
        _transfer(sender, recipient, amount);
        if (_msgSender() != address(nextCzodiac))
            _approve(
                sender,
                _msgSender(),
                _allowances[sender][_msgSender()].sub(
                    amount,
                    "ERC20: transfer amount exceeds allowance"
                )
            );
        return true;
    }

    function increaseAllowance(address spender, uint256 addedValue)
        public
        virtual
        returns (bool)
    {
        _approve(
            _msgSender(),
            spender,
            _allowances[_msgSender()][spender].add(addedValue)
        );
        return true;
    }

    function decreaseAllowance(address spender, uint256 subtractedValue)
        public
        virtual
        returns (bool)
    {
        _approve(
            _msgSender(),
            spender,
            _allowances[_msgSender()][spender].sub(
                subtractedValue,
                "ERC20: decreased allowance below zero"
            )
        );
        return true;
    }

    function isExcludedFromReward(address account) public view returns (bool) {
        return _isExcluded[account];
    }

    function deliver(uint256 tAmount) public {
        address sender = _msgSender();
        require(
            !_isExcluded[sender],
            "Excluded addresses cannot call this function"
        );
        (, RValues memory values) = _getValues(tAmount, true);
        _rOwned[sender] = _rOwned[sender].sub(values.rAmount);
        _rTotal = _rTotal.sub(values.rAmount);
        emit HolderRewardsEvent(tAmount);
    }

    function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
        public
        view
        returns (uint256)
    {
        require(tAmount <= _tTotal, "Amount must be less than supply");
        (, RValues memory values) = _getValues(tAmount, true);
        if (!deductTransferFee) {
            return values.rAmount;
        } else {
            return values.rTransferAmount;
        }
    }

    function tokenFromReflection(uint256 rAmount)
        public
        view
        returns (uint256)
    {
        require(
            rAmount <= _rTotal,
            "Amount must be less than total reflections"
        );
        uint256 currentRate = _getRate();
        return rAmount.div(currentRate);
    }

    function excludeFromReward(address account) public onlyOwner {
        require(!_isExcluded[account], "Account is already excluded");
        if (_rOwned[account] > 0) {
            _tOwned[account] = tokenFromReflection(_rOwned[account]);
        }
        _isExcluded[account] = true;
        _excluded.push(account);
    }

    function includeInReward(address account) external onlyOwner {
        require(_isExcluded[account], "Account is already excluded");
        for (uint256 i = 0; i < _excluded.length; i++) {
            if (_excluded[i] == account) {
                _excluded[i] = _excluded[_excluded.length - 1];
                _tOwned[account] = 0;
                _isExcluded[account] = false;
                _excluded.pop();
                break;
            }
        }
    }

    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) private {
        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);
    }

    function _transfer(
        address from,
        address to,
        uint256 amount
    ) private {
        require(
            areTransfersEnabled || from == owner() || to == owner(),
            "CZodiac: Transfers not yet enabled"
        );
        require(amount > 0, "Transfer amount must be greater than zero");

        //indicates if fee should be deducted from transfer
        bool takeFee = true;

        // if global fees disabled, or if any account belongs to _isExcludedFromFee account then remove the fee
        if (
            _isExcludedFromFee[from] ||
            _isExcludedFromFee[to] ||
            !globalRewardsEnabled
        ) {
            takeFee = false;
        }

        //transfer amount, it will take tax, burn, liquidity fee
        _tokenTransfer(from, to, amount, takeFee);
    }

    //this method is responsible for taking all fee, if takeFee is true
    function _tokenTransfer(
        address sender,
        address recipient,
        uint256 amount,
        bool takeFee
    ) private {
        if (_isExcluded[sender] && !_isExcluded[recipient]) {
            _transferFromExcluded(sender, recipient, amount, takeFee);
        } else if (!_isExcluded[sender] && _isExcluded[recipient]) {
            _transferToExcluded(sender, recipient, amount, takeFee);
        } else if (!_isExcluded[sender] && !_isExcluded[recipient]) {
            _transferStandard(sender, recipient, amount, takeFee);
        } else if (_isExcluded[sender] && _isExcluded[recipient]) {
            _transferBothExcluded(sender, recipient, amount, takeFee);
        } else {
            _transferStandard(sender, recipient, amount, takeFee);
        }
    }

    function _transferStandard(
        address sender,
        address recipient,
        uint256 tAmount,
        bool takeFee
    ) private {
        (TValues memory tValues, RValues memory rValues) = _getValues(
            tAmount,
            takeFee
        );
        _rOwned[sender] = _rOwned[sender].sub(rValues.rAmount);
        _rOwned[recipient] = _rOwned[recipient].add(rValues.rTransferAmount);
        _takeLpAndDevRewards(tValues.tLpReward, tValues.tDevReward);
        _reflectFee(
            rValues.rFee,
            rValues.rBurn,
            tValues.tHolderReward,
            tValues.tBurn
        );
        emit Transfer(sender, recipient, tValues.tTransferAmount);
    }

    function _transferToExcluded(
        address sender,
        address recipient,
        uint256 tAmount,
        bool takeFee
    ) private {
        (TValues memory tValues, RValues memory rValues) = _getValues(
            tAmount,
            takeFee
        );
        _rOwned[sender] = _rOwned[sender].sub(rValues.rAmount);
        _tOwned[recipient] = _tOwned[recipient].add(tValues.tTransferAmount);
        _rOwned[recipient] = _rOwned[recipient].add(rValues.rTransferAmount);
        _takeLpAndDevRewards(tValues.tLpReward, tValues.tDevReward);
        _reflectFee(
            rValues.rFee,
            rValues.rBurn,
            tValues.tHolderReward,
            tValues.tBurn
        );
        emit Transfer(sender, recipient, tValues.tTransferAmount);
    }

    function _transferFromExcluded(
        address sender,
        address recipient,
        uint256 tAmount,
        bool takeFee
    ) private {
        (TValues memory tValues, RValues memory rValues) = _getValues(
            tAmount,
            takeFee
        );
        _tOwned[sender] = _tOwned[sender].sub(tAmount);
        _rOwned[sender] = _rOwned[sender].sub(rValues.rAmount);
        _rOwned[recipient] = _rOwned[recipient].add(rValues.rTransferAmount);
        _takeLpAndDevRewards(tValues.tLpReward, tValues.tDevReward);
        _reflectFee(
            rValues.rFee,
            rValues.rBurn,
            tValues.tHolderReward,
            tValues.tBurn
        );
        emit Transfer(sender, recipient, tValues.tTransferAmount);
    }

    function _transferBothExcluded(
        address sender,
        address recipient,
        uint256 tAmount,
        bool takeFee
    ) private {
        (TValues memory tValues, RValues memory rValues) = _getValues(
            tAmount,
            takeFee
        );
        _tOwned[sender] = _tOwned[sender].sub(tAmount);
        _rOwned[sender] = _rOwned[sender].sub(rValues.rAmount);
        _tOwned[recipient] = _tOwned[recipient].add(tValues.tTransferAmount);
        _rOwned[recipient] = _rOwned[recipient].add(rValues.rTransferAmount);
        _takeLpAndDevRewards(tValues.tLpReward, tValues.tDevReward);
        _reflectFee(
            rValues.rFee,
            rValues.rBurn,
            tValues.tHolderReward,
            tValues.tBurn
        );
        emit Transfer(sender, recipient, tValues.tTransferAmount);
    }

    function _reflectFee(
        uint256 rFee,
        uint256 rBurn,
        uint256 tFee,
        uint256 tBurn
    ) private {
        _rTotal = _rTotal.sub(rFee).sub(rBurn);
        _tTotal = _tTotal.sub(tBurn);
        emit HolderRewardsEvent(tFee);
        emit BurnEvent(tBurn);
    }

    function _getValues(uint256 tAmount, bool takeFee)
        private
        view
        returns (TValues memory tValues, RValues memory rValues)
    {
        tValues = _getTValues(tAmount, takeFee);
        rValues = _getRValues(tAmount, tValues);
    }

    function _getTValues(uint256 tAmount, bool takeFee)
        private
        pure
        returns (TValues memory values)
    {
        values.tHolderReward = takeFee ? calculateHolderReward(tAmount) : 0;
        values.tBurn = takeFee ? calculateBurn(tAmount) : 0;
        values.tLpReward = takeFee ? calculateLpReward(tAmount) : 0;
        values.tDevReward = takeFee ? calculateDevReward(tAmount) : 0;
        values.tTransferAmount = tAmount
            .sub(values.tHolderReward)
            .sub(values.tBurn)
            .sub(values.tLpReward)
            .sub(values.tDevReward);
    }

    function _getRValues(uint256 tAmount, TValues memory tValues)
        private
        view
        returns (RValues memory values)
    {
        values.rate = _getRate();
        values.rAmount = tAmount.mul(values.rate);
        values.rFee = tValues.tHolderReward.mul(values.rate);
        values.rBurn = tValues.tBurn.mul(values.rate);
        values.rLpReward = tValues.tLpReward.mul(values.rate);
        values.rDevReward = tValues.tDevReward.mul(values.rate);
        values.rTransferAmount = values
            .rAmount
            .sub(values.rFee)
            .sub(values.rBurn)
            .sub(values.rLpReward)
            .sub(values.rDevReward);
    }

    function _getRate() private view returns (uint256) {
        (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
        return rSupply.div(tSupply);
    }

    function _getCurrentSupply() private view returns (uint256, uint256) {
        uint256 rSupply = _rTotal;
        uint256 tSupply = _tTotal;
        for (uint256 i = 0; i < _excluded.length; i++) {
            if (
                _rOwned[_excluded[i]] > rSupply ||
                _tOwned[_excluded[i]] > tSupply
            ) return (_rTotal, _tTotal);
            rSupply = rSupply.sub(_rOwned[_excluded[i]]);
            tSupply = tSupply.sub(_tOwned[_excluded[i]]);
        }
        if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);
        return (rSupply, tSupply);
    }

    function _takeLpAndDevRewards(uint256 tLiquidity, uint256 tDevRewards)
        private
    {
        uint256 currentRate = _getRate();

        //take lp providers reward
        uint256 rLiquidity = tLiquidity.mul(currentRate);
        _rOwned[autoFarm] = _rOwned[autoFarm].add(rLiquidity);
        if (_isExcluded[autoFarm])
            _tOwned[autoFarm] = _tOwned[autoFarm].add(tLiquidity);
        emit LPRewardsEvent(tLiquidity);

        //take dev rewards
        uint256 rDevRewards = tDevRewards.mul(currentRate);
        _rOwned[owner()] = _rOwned[owner()].add(rDevRewards);
        if (_isExcluded[owner()])
            _tOwned[owner()] = _tOwned[owner()].add(tDevRewards);
        emit DevRewardsEvent(tDevRewards);
    }

    function _swap(address swapper) private {
        require(
            address(prevCzodiac) != address(0),
            "CzodiacToken: No previous czodiac"
        );
        require(
            block.timestamp >= swapStartTimestamp,
            "CzodiacToken: Swap not yet open"
        );
        require(
            block.timestamp <= swapEndTimestamp,
            "CzodiacToken: Swap closed"
        );
        uint256 amountToBurn = prevCzodiac.balanceOf(swapper);
        require(
            amountToBurn > 0,
            "CzodiacToken: No tokens to swap from previous contract"
        );
        uint256 amountToMint = amountToBurn.mul(10000).div(_swapBasisRate);
        prevCzodiac.transferFrom(swapper, address(this), amountToBurn);
        _transfer(address(this), swapper, amountToMint);
        emit Swap(swapper, amountToBurn, amountToMint);
    }

    function calculateHolderReward(uint256 _amount)
        private
        pure
        returns (uint256)
    {
        return _amount.mul(_holderRewardBasis).div(10**4);
    }

    function calculateBurn(uint256 _amount) private pure returns (uint256) {
        return _amount.mul(_burnBasis).div(10**4);
    }

    function calculateLpReward(uint256 _amount) private pure returns (uint256) {
        return _amount.mul(_lpRewardBasis).div(10**4);
    }

    function calculateDevReward(uint256 _amount)
        private
        pure
        returns (uint256)
    {
        return _amount.mul(_devRewardBasis).div(10**4);
    }

    function isExcludedFromFee(address account) public view returns (bool) {
        return _isExcludedFromFee[account];
    }

    function excludeFromFee(address account) external onlyOwner {
        _isExcludedFromFee[account] = true;
    }

    function includeInFee(address account) external onlyOwner {
        _isExcludedFromFee[account] = false;
    }

    function setNextCzodiac(IERC20 _nextCzodiac) external onlyOwner {
        _isExcludedFromFee[address(_nextCzodiac)];
        nextCzodiac = _nextCzodiac;
    }

    function setGlobalRewardsEnabled(bool _globalRewardsEnabled)
        external
        onlyOwner
    {
        globalRewardsEnabled = _globalRewardsEnabled;
    }

    function setTransfersEnabled(bool _areTransfersEnabled) external onlyOwner {
        areTransfersEnabled = _areTransfersEnabled;
    }

    function setAutoFarm(address _autoFarm) external onlyOwner {
        autoFarm = _autoFarm;
    }

    function withdrawToken(IERC20 _token) external onlyOwner {
        _token.transfer(owner(), _token.balanceOf(address(this)));
    }
}

// File contracts/CZUsd.sol

// Authored by Plastic Digits
//pragma solidity ^0.8.4;
contract CZUsd is Context, ERC20PresetMinterPauser, Ownable {
    using Address for address;

    IERC20 private busd;

    //Backing
    uint256 totalBusdBacking;

    //Withdraws
    mapping(uint256 => Withdraws) private userWithdraws;
    struct Withdraws {
        uint256 request;
        address requester;
        bool isFilled;
    }
    uint256 public totalWithdraws;

    //BUSD Farmer
    address public farmer;

    event WithdrawRequest(address user, uint256 id, uint256 amount);
    event FillRequest(uint256 id);
    event UpdateRewardPerSecond(uint256 valueWad, uint256 period);
    event RewardAdded(uint256 reward);

    constructor(
        string memory _name,
        string memory _symbol,
        address _farmer,
        IERC20 _busd
    ) ERC20PresetMinterPauser(_name, _symbol) Ownable() {
        busd = _busd;
        farmer = _farmer;
    }

    function deposit(uint256 _wadBusd) external {
        require(
            busd.transferFrom(_msgSender(), farmer, _wadBusd),
            "CZUsd: busd transfer failed"
        );
        _mint(_msgSender(), _wadBusd);
    }

    function withdrawRequest(uint256 _wadZusd) external {
        require(
            _wadZusd >= 10 ether,
            "CZUsd: Must request a minimum of 10 zusd"
        );
        _burn(_msgSender(), _wadZusd);
        Withdraws storage withdraws = userWithdraws[totalWithdraws];
        withdraws.request = _wadZusd;
        withdraws.requester = _msgSender();
        totalWithdraws++;
        emit WithdrawRequest(_msgSender(), totalWithdraws - 1, _wadZusd);
        if (busd.balanceOf(address(this)) >= _wadZusd)
            _fillRequest(totalWithdraws - 1, address(this));
    }

    function fillAllRequests() external {
        fillRequests(0, totalWithdraws);
    }

    function fillRequests(uint256 start, uint256 finish) public {
        for (uint256 i; i < finish - start; i++) {
            _fillRequest(i + start, _msgSender());
        }
    }

    function fillSpecificRequest(uint256 _id) external {
        _fillRequest(_id, _msgSender());
    }

    function recoverERC20(address tokenAddress) external onlyOwner {
        require(
            IERC20(tokenAddress).transfer(
                owner(),
                IERC20(tokenAddress).balanceOf(address(this))
            ),
            "CZUsd: Recover failed."
        );
    }

    function setTotalBusdBacking(uint256 _wad) external {
        require(_msgSender() == farmer, "CZUsd: Sender must be farmer");
        totalBusdBacking = _wad;
    }

    function setFarmer(address _farmer) external {
        require(
            _msgSender() == farmer || _msgSender() == owner(),
            "CZUsd: Sender must be farmer"
        );
        farmer = _farmer;
    }

    function totalBusdWithdrawsRequested() public view {
        uint256 total;
        for (uint256 i; i < totalWithdraws; i++) {
            if (!userWithdraws[i].isFilled) total += userWithdraws[i].request;
        }
    }

    function _fillRequest(uint256 _id, address _by) internal {
        Withdraws storage withdraws = userWithdraws[_id];
        if (withdraws.isFilled == true) return;
        withdraws.isFilled = true;
        require(
            busd.transferFrom(_by, withdraws.requester, withdraws.request),
            "CZUsd: busd transfer failed"
        );
        emit FillRequest(_id);
    }
}

// File contracts/interfaces/IPairOracle.sol

// Authored by Plastic Digits
// Credit to Iron Finance
//pragma solidity ^0.8.4;

interface IPairOracle {
    function consultTwap(address token, uint256 amountIn)
        external
        view
        returns (uint256 amountOut);

    function consultPair(address token, uint256 amountIn)
        external
        view
        returns (uint256 amountOut);

    function update() external;
}

// File @chainlink/contracts/src/v0.8/interfaces/[email protected]

//pragma solidity ^0.8.0;

interface AggregatorV3Interface {
    function decimals() external view returns (uint8);

    function description() external view returns (string memory);

    function version() external view returns (uint256);

    // getRoundData and latestRoundData should both raise "No data present"
    // if they do not have data to report, instead of returning unset values
    // which could be misinterpreted as actual reported values.
    function getRoundData(uint80 _roundId)
        external
        view
        returns (
            uint80 roundId,
            int256 answer,
            uint256 startedAt,
            uint256 updatedAt,
            uint80 answeredInRound
        );

    function latestRoundData()
        external
        view
        returns (
            uint80 roundId,
            int256 answer,
            uint256 startedAt,
            uint256 updatedAt,
            uint80 answeredInRound
        );
}

// File contracts/PriceConsumer.sol

// Authored by Plastic Digits
////pragma solidity ^0.8.4;
contract PriceConsumer {
    AggregatorV3Interface internal priceFeed;

    constructor(address _priceFeedAggregator) {
        priceFeed = AggregatorV3Interface(_priceFeedAggregator);
    }

    /**
     * Returns the latest price
     */
    function getPrice() public view returns (uint256) {
        (
            ,
            //roundID
            int256 price, //startedAt //timeStamp
            ,
            ,

        ) = //answeredInRound
            priceFeed.latestRoundData();
        require(price > 0, "PriceConsumer: Negative Price.");
        return uint256(price);
    }

    /**
     * Returns the latest price
     */
    function getDecimals() public view returns (uint8) {
        return priceFeed.decimals();
    }
}

// File @openzeppelin/contracts/utils/math/[email protected]

//pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + (((a % 2) + (b % 2)) / 2);
    }
}

// File contracts/CZUsdBorrow.sol

// Authored by Plastic Digits
// Credit to Alchemix
//pragma solidity ^0.8.4;
contract CZUsdBorrow is Context, Ownable, PriceConsumer {
    using SafeERC20 for IERC20;
    using SafeERC20 for IERC20Metadata;
    using SafeERC20 for ERC20PresetMinterPauser;
    using Address for address;

    IERC20Metadata public collateralAsset;
    ERC20PresetMinterPauser public czusd;
    ERC20PresetMinterPauser public czfarm;
    IPairOracle public czfarmCzusdOracle;
    address public strategy;

    uint256 public liquidationDelay;
    uint256 public czFarmMultiplier;
    uint256 public globalBorrowLimit;

    mapping(address => BalanceSheet) public balanceSheets;
    struct BalanceSheet {
        uint256 collateral;
        uint256 czfarm;
        uint256 borrow;
        uint128 seizeTime;
    }

    uint256 public totalCollateral;
    uint256 public totalCzfarm;
    uint256 public totalBorrow;

    constructor(
        ERC20PresetMinterPauser _czusd,
        ERC20PresetMinterPauser _czfarm,
        IERC20Metadata _collateralAsset,
        IPairOracle _czfarmCzusdOracle,
        address _linkUsdPriceFeed,
        address _strategy,
        uint256 _liquidationDelay,
        uint256 _czFarmMultiplier,
        uint256 _globalBorrowLimit
    ) PriceConsumer(_linkUsdPriceFeed) {
        collateralAsset = _collateralAsset;
        czusd = _czusd;
        czfarm = _czfarm;
        czfarmCzusdOracle = _czfarmCzusdOracle;
        liquidationDelay = _liquidationDelay;
        czFarmMultiplier = _czFarmMultiplier;
        globalBorrowLimit = _globalBorrowLimit;
        setStrategy(_strategy);
    }

    function baseCollateralUsdWad(address _for)
        public
        view
        returns (uint256 value)
    {
        return
            (balanceSheets[_for].collateral * getPrice()) / 10**getDecimals();
    }

    function czFarmUsdWad(address _for) public view returns (uint256 value) {
        uint256 czfarmWad = balanceSheets[_for].czfarm;
        return
            Math.min(
                czfarmCzusdOracle.consultPair(address(czfarm), czfarmWad),
                czfarmCzusdOracle.consultTwap(address(czfarm), czfarmWad)
            );
    }

    function totalCollateralUsdWad(address _for)
        public
        view
        returns (uint256 value)
    {
        return czFarmUsdWad(_for) + baseCollateralUsdWad(_for);
    }

    function maxBorrowFromCZFarmMultiplier(address _for)
        public
        view
        returns (uint256 value)
    {
        return czFarmUsdWad(_for) * czFarmMultiplier;
    }

    function maxBorrow(address _for) public view returns (uint256 value) {
        return
            Math.min(
                totalCollateralUsdWad(_for),
                maxBorrowFromCZFarmMultiplier(_for)
            );
    }

    function isInGoodStanding(address _for)
        public
        view
        returns (bool hasGoodStanding)
    {
        return maxBorrow(_for) < balanceSheets[_for].borrow;
    }

    function deposit(uint256 _amount) public {
        depositFor(_msgSender(), _amount);
    }

    function depositCZFarm(uint256 _amount) public {
        depositCZFarmFor(_msgSender(), _amount);
    }

    function borrow(uint256 _amount) public {
        czfarmCzusdOracle.update();
        BalanceSheet storage balanceSheet = balanceSheets[_msgSender()];
        balanceSheet.borrow += _amount;
        czusd.mint(_msgSender(), _amount);
        totalBorrow += _amount;
        require(totalBorrow < globalBorrowLimit, "Borrow exceeds global limit");
        require(
            isInGoodStanding(_msgSender()),
            "Account not in good standing."
        );
    }

    function repay(uint256 _amount) public {
        repayFor(_msgSender(), _amount);
    }

    function withdraw(uint256 _amount) public {
        czfarmCzusdOracle.update();
        BalanceSheet storage balanceSheet = balanceSheets[_msgSender()];
        collateralAsset.safeTransferFrom(
            address(strategy),
            _msgSender(),
            uint256(_amount)
        );
        balanceSheet.collateral -= _amount;
        totalCollateral -= _amount;
        require(
            isInGoodStanding(_msgSender()),
            "Account not in good standing."
        );
    }

    function withdrawCZFarm(uint256 _amount) public {
        czfarmCzusdOracle.update();
        BalanceSheet storage balanceSheet = balanceSheets[_msgSender()];
        czfarm.safeTransferFrom(
            address(strategy),
            _msgSender(),
            uint256(_amount)
        );
        balanceSheet.czfarm -= _amount;
        totalCzfarm -= _amount;
        require(
            isInGoodStanding(_msgSender()),
            "Account not in good standing."
        );
    }

    function depositFor(address _for, uint256 _amount) public {
        czfarmCzusdOracle.update();
        collateralAsset.safeTransferFrom(
            _msgSender(),
            address(strategy),
            uint256(_amount)
        );
        BalanceSheet storage balanceSheet = balanceSheets[_for];
        balanceSheet.collateral += _amount;
        totalCollateral += _amount;
    }

    function depositCZFarmFor(address _for, uint256 _amount) public {
        czfarmCzusdOracle.update();
        czfarm.safeTransferFrom(
            _msgSender(),
            address(strategy),
            uint256(_amount)
        );
        BalanceSheet storage balanceSheet = balanceSheets[_for];
        balanceSheet.czfarm += _amount;
        totalCzfarm += _amount;
    }

    function repayFor(address _for, uint256 _amount) public {
        czfarmCzusdOracle.update();
        czusd.burnFrom(_msgSender(), _amount);
        BalanceSheet storage balanceSheet = balanceSheets[_for];
        balanceSheet.borrow -= _amount;
        totalBorrow -= _amount;
    }

    function seizeStart(address[] calldata _for) external onlyOwner {
        czfarmCzusdOracle.update();
        for (uint256 i; i < _for.length; i++) {
            address acc = _for[i];
            BalanceSheet storage balanceSheet = balanceSheets[acc];
            require(
                !isInGoodStanding(acc),
                "Cannot seize account in good standing"
            );
            balanceSheet.seizeTime = uint128(
                block.timestamp + liquidationDelay
            );
        }
    }

    function seizeCancel(address[] calldata _for) external onlyOwner {
        for (uint256 i; i < _for.length; i++) {
            address acc = _for[i];
            BalanceSheet storage balanceSheet = balanceSheets[acc];
            balanceSheet.seizeTime = 0;
        }
    }

    function seize(address[] calldata _for) external onlyOwner {
        czfarmCzusdOracle.update();
        for (uint256 i; i < _for.length; i++) {
            address acc = _for[i];
            BalanceSheet storage balanceSheet = balanceSheets[acc];
            require(0 < balanceSheet.seizeTime, "Must have warned user");
            require(
                !isInGoodStanding(acc),
                "Cannot seize account in good standing"
            );
            require(
                block.timestamp >= balanceSheet.seizeTime,
                "Must be past seize time"
            );
            totalBorrow -= balanceSheet.borrow;
            totalCzfarm -= balanceSheet.czfarm;
            totalCollateral -= balanceSheet.collateral;
            balanceSheet.seizeTime = 0;
            balanceSheet.collateral = 0;
            balanceSheet.czfarm = 0;
            balanceSheet.borrow = 0;
        }
    }

    function recoverERC20(address tokenAddress) external onlyOwner {
        IERC20(tokenAddress).safeTransfer(
            _msgSender(),
            IERC20(tokenAddress).balanceOf(address(this))
        );
    }

    function setStrategy(address _to) public onlyOwner {
        czfarm.approve(strategy, 0);
        czusd.approve(strategy, 0);
        strategy = _to;
        czfarm.approve(strategy, ~uint256(0));
        czusd.approve(strategy, ~uint256(0));
    }

    function setCzFarmMultiplier(uint256 _to) public onlyOwner {
        czFarmMultiplier = _to;
    }

    function setLiquidationDelay(uint256 _to) public onlyOwner {
        liquidationDelay = _to;
    }

    function setGlobalBorrowLimit(uint256 _to) public onlyOwner {
        globalBorrowLimit = _to;
    }
}

// File contracts/interfaces/IAmmPair.sol

// Authored by Plastic Digits
// Credit to Pancakeswap
//pragma solidity ^0.8.4;

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

    function name() external pure returns (string memory);

    function symbol() external pure returns (string memory);

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

    function nonces(address owner) external view returns (uint256);

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

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

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function factory() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function getReserves()
        external
        view
        returns (
            uint112 reserve0,
            uint112 reserve1,
            uint32 blockTimestampLast
        );

    function price0CumulativeLast() external view returns (uint256);

    function price1CumulativeLast() external view returns (uint256);

    function kLast() external view returns (uint256);

    function mint(address to) external returns (uint256 liquidity);

    function burn(address to)
        external
        returns (uint256 amount0, uint256 amount1);

    function swap(
        uint256 amount0Out,
        uint256 amount1Out,
        address to,
        bytes calldata data
    ) external;

    function skim(address to) external;

    function sync() external;

    function initialize(address, address) external;
}

// File contracts/libs/AmmLibrary.sol

// Authored by Plastic Digits
// Credit to Pancakeswap
//pragma solidity ^0.8.4;
library AmmLibrary {
    // returns sorted token addresses, used to handle return values from pairs sorted in this order
    function sortTokens(address tokenA, address tokenB)
        internal
        pure
        returns (address token0, address token1)
    {
        require(tokenA != tokenB, "AmmLibrary: IDENTICAL_ADDRESSES");
        (token0, token1) = tokenA < tokenB
            ? (tokenA, tokenB)
            : (tokenB, tokenA);
        require(token0 != address(0), "AmmLibrary: ZERO_ADDRESS");
    }

    // calculates the CREATE2 address for a pair without making any external calls
    function pairFor(
        address factory,
        address tokenA,
        address tokenB
    ) internal pure returns (address pair) {
        (address token0, address token1) = sortTokens(tokenA, tokenB);
        pair = address(
            uint160(
                uint256(
                    keccak256(
                        abi.encodePacked(
                            hex"ff",
                            factory,
                            keccak256(abi.encodePacked(token0, token1)),
                            hex"d0d4c4cd0848c93cb4fd1f498d7013ee6bfb25783ea21593d5834f5d250ece66" // init code hash
                        )
                    )
                )
            )
        );
    }

    // fetches and sorts the reserves for a pair
    function getReserves(
        address factory,
        address tokenA,
        address tokenB
    ) internal view returns (uint256 reserveA, uint256 reserveB) {
        (address token0, ) = sortTokens(tokenA, tokenB);
        pairFor(factory, tokenA, tokenB);
        (uint256 reserve0, uint256 reserve1, ) = IAmmPair(
            pairFor(factory, tokenA, tokenB)
        ).getReserves();
        (reserveA, reserveB) = tokenA == token0
            ? (reserve0, reserve1)
            : (reserve1, reserve0);
    }

    // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
    function quote(
        uint256 amountA,
        uint256 reserveA,
        uint256 reserveB
    ) internal pure returns (uint256 amountB) {
        require(amountA > 0, "AmmLibrary: INSUFFICIENT_AMOUNT");
        require(
            reserveA > 0 && reserveB > 0,
            "AmmLibrary: INSUFFICIENT_LIQUIDITY"
        );
        amountB = (amountA * reserveB) / reserveA;
    }

    // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
    function getAmountOut(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) internal pure returns (uint256 amountOut) {
        require(amountIn > 0, "AmmLibrary: INSUFFICIENT_INPUT_AMOUNT");
        require(
            reserveIn > 0 && reserveOut > 0,
            "AmmLibrary: INSUFFICIENT_LIQUIDITY"
        );
        uint256 amountInWithFee = amountIn * 998;
        uint256 numerator = amountInWithFee * reserveOut;
        uint256 denominator = (reserveIn * 1000) + amountInWithFee;
        amountOut = numerator / denominator;
    }

    // given an output amount of an asset and pair reserves, returns a required input amount of the other asset
    function getAmountIn(
        uint256 amountOut,
        uint256 reserveIn,
        uint256 reserveOut
    ) internal pure returns (uint256 amountIn) {
        require(amountOut > 0, "AmmLibrary: INSUFFICIENT_OUTPUT_AMOUNT");
        require(
            reserveIn > 0 && reserveOut > 0,
            "AmmLibrary: INSUFFICIENT_LIQUIDITY"
        );
        uint256 numerator = reserveIn * amountOut * 1000;
        uint256 denominator = (reserveOut - amountOut) * 998;
        amountIn = (numerator / denominator) + 1;
    }

    // performs chained getAmountOut calculations on any number of pairs
    function getAmountsOut(
        address factory,
        uint256 amountIn,
        address[] memory path
    ) internal view returns (uint256[] memory amounts) {
        require(path.length >= 2, "AmmLibrary: INVALID_PATH");
        amounts = new uint256[](path.length);
        amounts[0] = amountIn;
        for (uint256 i; i < path.length - 1; i++) {
            (uint256 reserveIn, uint256 reserveOut) = getReserves(
                factory,
                path[i],
                path[i + 1]
            );
            amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut);
        }
    }

    // performs chained getAmountIn calculations on any number of pairs
    function getAmountsIn(
        address factory,
        uint256 amountOut,
        address[] memory path
    ) internal view returns (uint256[] memory amounts) {
        require(path.length >= 2, "AmmLibrary: INVALID_PATH");
        amounts = new uint256[](path.length);
        amounts[amounts.length - 1] = amountOut;
        for (uint256 i = path.length - 1; i > 0; i--) {
            (uint256 reserveIn, uint256 reserveOut) = getReserves(
                factory,
                path[i - 1],
                path[i]
            );
            amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);
        }
    }
}

// File contracts/libs/FullMath.sol

// Authored by Plastic Digits
// Credit to Uniswap
//pragma solidity ^0.8.4;

// taken from https://medium.com/coinmonks/math-in-solidity-part-3-percents-and-proportions-4db014e080b1
// license is CC-BY-4.0
library FullMath {
    function fullMul(uint256 x, uint256 y)
        internal
        pure
        returns (uint256 l, uint256 h)
    {
        unchecked {
            uint256 mm = mulmod(x, y, ~uint256(0));
            l = x * y;
            h = mm - l;
            if (mm < l) h -= 1;
        }
    }

    function fullDiv(
        uint256 l,
        uint256 h,
        uint256 d
    ) private pure returns (uint256) {
        unchecked {
            uint256 pow2 = d & ~d;
            d /= pow2;
            l /= pow2;
            l += h * ((~pow2) / pow2 + 1);
            uint256 r = 1;
            r *= 2 - d * r;
            r *= 2 - d * r;
            r *= 2 - d * r;
            r *= 2 - d * r;
            r *= 2 - d * r;
            r *= 2 - d * r;
            r *= 2 - d * r;
            r *= 2 - d * r;
            return l * r;
        }
    }

    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 d
    ) internal pure returns (uint256) {
        unchecked {
            (uint256 l, uint256 h) = fullMul(x, y);

            uint256 mm = mulmod(x, y, d);
            if (mm > l) h -= 1;
            l -= mm;

            if (h == 0) return l / d;

            require(h < d, "FullMath: FULLDIV_OVERFLOW");
            return fullDiv(l, h, d);
        }
    }
}

// File contracts/libs/Babylonian.sol

// Authored by Plastic Digits
// Credit to Uniswap
//pragma solidity ^0.8.4;

// computes square roots using the babylonian method
// https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method
library Babylonian {
    // credit for this implementation goes to
    // https://github.com/abdk-consulting/abdk-libraries-solidity/blob/master/ABDKMath64x64.sol#L687
    function sqrt(uint256 x) internal pure returns (uint256) {
        if (x == 0) return 0;
        // this block is equivalent to r = uint256(1) << (BitMath.mostSignificantBit(x) / 2);
        // however that code costs significantly more gas
        uint256 xx = x;
        uint256 r = 1;
        if (xx >= 0x100000000000000000000000000000000) {
            xx >>= 128;
            r <<= 64;
        }
        if (xx >= 0x10000000000000000) {
            xx >>= 64;
            r <<= 32;
        }
        if (xx >= 0x100000000) {
            xx >>= 32;
            r <<= 16;
        }
        if (xx >= 0x10000) {
            xx >>= 16;
            r <<= 8;
        }
        if (xx >= 0x100) {
            xx >>= 8;
            r <<= 4;
        }
        if (xx >= 0x10) {
            xx >>= 4;
            r <<= 2;
        }
        if (xx >= 0x8) {
            r <<= 1;
        }
        r = (r + x / r) >> 1;
        r = (r + x / r) >> 1;
        r = (r + x / r) >> 1;
        r = (r + x / r) >> 1;
        r = (r + x / r) >> 1;
        r = (r + x / r) >> 1;
        r = (r + x / r) >> 1; // Seven iterations should be enough
        uint256 r1 = x / r;
        return (r < r1 ? r : r1);
    }
}

// File contracts/libs/BitMath.sol

// Authored by Plastic Digits
// Credit to Uniswap
//pragma solidity ^0.8.4;

/// @title BitMath
/// @dev This library provides functionality for computing bit properties of an unsigned integer
library BitMath {
    /// @notice Returns the index of the most significant bit of the number,
    ///     where the least significant bit is at index 0 and the most significant bit is at index 255
    /// @dev The function satisfies the property:
    ///     x >= 2**mostSignificantBit(x) and x < 2**(mostSignificantBit(x)+1)
    /// @param x the value for which to compute the most significant bit, must be greater than 0
    /// @return r the index of the most significant bit
    function mostSignificantBit(uint256 x) internal pure returns (uint8 r) {
        require(x > 0);

        if (x >= 0x100000000000000000000000000000000) {
            x >>= 128;
            r += 128;
        }
        if (x >= 0x10000000000000000) {
            x >>= 64;
            r += 64;
        }
        if (x >= 0x100000000) {
            x >>= 32;
            r += 32;
        }
        if (x >= 0x10000) {
            x >>= 16;
            r += 16;
        }
        if (x >= 0x100) {
            x >>= 8;
            r += 8;
        }
        if (x >= 0x10) {
            x >>= 4;
            r += 4;
        }
        if (x >= 0x4) {
            x >>= 2;
            r += 2;
        }
        if (x >= 0x2) r += 1;
    }

    /// @notice Returns the index of the least significant bit of the number,
    ///     where the least significant bit is at index 0 and the most significant bit is at index 255
    /// @dev The function satisfies the property:
    ///     (x & 2**leastSignificantBit(x)) != 0 and (x & (2**(leastSignificantBit(x)) - 1)) == 0)
    /// @param x the value for which to compute the least significant bit, must be greater than 0
    /// @return r the index of the least significant bit
    function leastSignificantBit(uint256 x) internal pure returns (uint8 r) {
        require(x > 0);

        r = 255;
        if (x & type(uint128).max > 0) {
            r -= 128;
        } else {
            x >>= 128;
        }
        if (x & type(uint64).max > 0) {
            r -= 64;
        } else {
            x >>= 64;
        }
        if (x & type(uint32).max > 0) {
            r -= 32;
        } else {
            x >>= 32;
        }
        if (x & type(uint16).max > 0) {
            r -= 16;
        } else {
            x >>= 16;
        }
        if (x & type(uint8).max > 0) {
            r -= 8;
        } else {
            x >>= 8;
        }
        if (x & 0xf > 0) {
            r -= 4;
        } else {
            x >>= 4;
        }
        if (x & 0x3 > 0) {
            r -= 2;
        } else {
            x >>= 2;
        }
        if (x & 0x1 > 0) r -= 1;
    }
}

// File contracts/libs/FixedPoint.sol

// Authored by Plastic Digits
// Credit to Uniswap
//pragma solidity ^0.8.4;
// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
library FixedPoint {
    // range: [0, 2**112 - 1]
    // resolution: 1 / 2**112
    struct uq112x112 {
        uint224 _x;
    }

    // range: [0, 2**144 - 1]
    // resolution: 1 / 2**112
    struct uq144x112 {
        uint256 _x;
    }

    uint8 public constant RESOLUTION = 112;
    uint256 public constant Q112 = 0x10000000000000000000000000000; // 2**112
    uint256 private constant Q224 =
        0x100000000000000000000000000000000000000000000000000000000; // 2**224
    uint256 private constant LOWER_MASK = 0xffffffffffffffffffffffffffff; // decimal of UQ*x112 (lower 112 bits)

    // encode a uint112 as a UQ112x112
    function encode(uint112 x) internal pure returns (uq112x112 memory) {
        return uq112x112(uint224(x) << RESOLUTION);
    }

    // encodes a uint144 as a UQ144x112
    function encode144(uint144 x) internal pure returns (uq144x112 memory) {
        return uq144x112(uint256(x) << RESOLUTION);
    }

    // decode a UQ112x112 into a uint112 by truncating after the radix point
    function decode(uq112x112 memory self) internal pure returns (uint112) {
        return uint112(self._x >> RESOLUTION);
    }

    // decode a UQ144x112 into a uint144 by truncating after the radix point
    function decode144(uq144x112 memory self) internal pure returns (uint144) {
        return uint144(self._x >> RESOLUTION);
    }

    // multiply a UQ112x112 by a uint, returning a UQ144x112
    // reverts on overflow
    function mul(uq112x112 memory self, uint256 y)
        internal
        pure
        returns (uq144x112 memory)
    {
        uint256 z = 0;
        require(
            y == 0 || (z = self._x * y) / y == self._x,
            "FixedPoint::mul: overflow"
        );
        return uq144x112(z);
    }

    // multiply a UQ112x112 by an int and decode, returning an int
    // reverts on overflow
    function muli(uq112x112 memory self, int256 y)
        internal
        pure
        returns (int256)
    {
        uint256 z = FullMath.mulDiv(self._x, uint256(y < 0 ? -y : y), Q112);
        require(z < 2**255, "FixedPoint::muli: overflow");
        return y < 0 ? -int256(z) : int256(z);
    }

    // multiply a UQ112x112 by a UQ112x112, returning a UQ112x112
    // lossy
    function muluq(uq112x112 memory self, uq112x112 memory other)
        internal
        pure
        returns (uq112x112 memory)
    {
        if (self._x == 0 || other._x == 0) {
            return uq112x112(0);
        }
        uint112 upper_self = uint112(self._x >> RESOLUTION); // * 2^0
        uint112 lower_self = uint112(self._x & LOWER_MASK); // * 2^-112
        uint112 upper_other = uint112(other._x >> RESOLUTION); // * 2^0
        uint112 lower_other = uint112(other._x & LOWER_MASK); // * 2^-112

        // partial products
        uint224 upper = uint224(upper_self) * upper_other; // * 2^0
        uint224 lower = uint224(lower_self) * lower_other; // * 2^-224
        uint224 uppers_lowero = uint224(upper_self) * lower_other; // * 2^-112
        uint224 uppero_lowers = uint224(upper_other) * lower_self; // * 2^-112

        // so the bit shift does not overflow
        require(upper <= ~uint112(0), "FixedPoint::muluq: upper overflow");

        // this cannot exceed 256 bits, all values are 224 bits
        uint256 sum = uint256(upper << RESOLUTION) +
            uppers_lowero +
            uppero_lowers +
            (lower >> RESOLUTION);

        // so the cast does not overflow
        require(sum <= ~uint224(0), "FixedPoint::muluq: sum overflow");

        return uq112x112(uint224(sum));
    }

    // divide a UQ112x112 by a UQ112x112, returning a UQ112x112
    function divuq(uq112x112 memory self, uq112x112 memory other)
        internal
        pure
        returns (uq112x112 memory)
    {
        require(other._x > 0, "FixedPoint::divuq: division by zero");
        if (self._x == other._x) {
            return uq112x112(uint224(Q112));
        }
        if (self._x <= ~uint144(0)) {
            uint256 value = (uint256(self._x) << RESOLUTION) / other._x;
            require(value <= ~uint224(0), "FixedPoint::divuq: overflow");
            return uq112x112(uint224(value));
        }

        uint256 result = FullMath.mulDiv(Q112, self._x, other._x);
        require(result <= ~uint224(0), "FixedPoint::divuq: overflow");
        return uq112x112(uint224(result));
    }

    // returns a UQ112x112 which represents the ratio of the numerator to the denominator
    // can be lossy
    function fraction(uint256 numerator, uint256 denominator)
        internal
        pure
        returns (uq112x112 memory)
    {
        require(denominator > 0, "FixedPoint::fraction: division by zero");
        if (numerator == 0) return FixedPoint.uq112x112(0);

        if (numerator <= ~uint144(0)) {
            uint256 result = (numerator << RESOLUTION) / denominator;
            require(result <= ~uint224(0), "FixedPoint::fraction: overflow");
            return uq112x112(uint224(result));
        } else {
            uint256 result = FullMath.mulDiv(numerator, Q112, denominator);
            require(result <= ~uint224(0), "FixedPoint::fraction: overflow");
            return uq112x112(uint224(result));
        }
    }

    // take the reciprocal of a UQ112x112
    // reverts on overflow
    // lossy
    function reciprocal(uq112x112 memory self)
        internal
        pure
        returns (uq112x112 memory)
    {
        require(self._x != 0, "FixedPoint::reciprocal: reciprocal of zero");
        require(self._x != 1, "FixedPoint::reciprocal: overflow");
        return uq112x112(uint224(Q224 / self._x));
    }

    // square root of a UQ112x112
    // lossy between 0/1 and 40 bits
    function sqrt(uq112x112 memory self)
        internal
        pure
        returns (uq112x112 memory)
    {
        if (self._x <= ~uint144(0)) {
            return uq112x112(uint224(Babylonian.sqrt(uint256(self._x) << 112)));
        }

        uint8 safeShiftBits = 255 - BitMath.mostSignificantBit(self._x);
        safeShiftBits -= safeShiftBits % 2;
        return
            uq112x112(
                uint224(
                    Babylonian.sqrt(uint256(self._x) << safeShiftBits) <<
                        ((112 - safeShiftBits) / 2)
                )
            );
    }
}

// File contracts/LockedSale.sol

// Authored by Plastic Digits
//pragma solidity ^0.8.4;
contract LockedSale is Context, Ownable {
    using Address for address;
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    uint256 public startTime;
    uint256 public endTime;
    uint256 public minPurchase;
    uint256 public maxPurchase;
    uint256 public maxSaleSize;
    uint256 public tokensForSale;

    IERC20 token;

    bool public whitelistRequired = true;

    uint256 public totalBuyers;
    uint256 public totalPurchases;

    mapping(address => bool) public _isWhitelisted;
    mapping(address => uint256) public deposits;
    mapping(address => uint256) public buyerIndex;
    address[] public buyers;

    uint256 public distributedCount;

    event SetState(
        uint256 _startTime,
        uint256 _endTime,
        uint256 _minPurchase,
        uint256 _maxPurchase,
        uint256 _tokensForSale,
        IERC20 _token
    );

    event Whitelist(address _buyer);
    event Unwhitelist(address _buyer);
    event Deposit(address _buyer, uint256 _value);

    constructor(
        uint256 _startTime,
        uint256 _endTime,
        uint256 _minPurchase,
        uint256 _maxPurchase,
        uint256 _tokensForSale,
        uint256 _maxSaleSize,
        IERC20 _token
    ) Ownable() {
        setState(
            _startTime,
            _endTime,
            _minPurchase,
            _maxPurchase,
            _tokensForSale,
            _maxSaleSize,
            _token
        );
    }

    receive() external payable {
        _deposit(_msgSender());
    }

    function setState(
        uint256 _startTime,
        uint256 _endTime,
        uint256 _minPurchase,
        uint256 _maxPurchase,
        uint256 _tokensForSale,
        uint256 _maxSaleSize,
        IERC20 _token
    ) public onlyOwner {
        require(_startTime < _endTime, "LockedSale: Start must be before end.");
        require(
            _minPurchase < _maxPurchase,
            "LockedSale: Minimum purchase must be less than or equal to maximum purchase."
        );

        startTime = _startTime;
        endTime = _endTime;
        minPurchase = _minPurchase;
        maxPurchase = _maxPurchase;
        tokensForSale = _tokensForSale;
        maxSaleSize = _maxSaleSize;
        token = _token;

        emit SetState(
            _startTime,
            _endTime,
            _minPurchase,
            _maxPurchase,
            _tokensForSale,
            _token
        );
    }

    function setWhitelistRequired(bool _value) external onlyOwner {
        whitelistRequired = _value;
    }

    function isWhitelisted(address _buyer) public view returns (bool) {
        if (!whitelistRequired) return true;
        return _isWhitelisted[_buyer];
    }

    function getState()
        external
        view
        returns (
            uint256 _startTime,
            uint256 _endTime,
            uint256 _minPurchase,
            uint256 _maxPurchase,
            uint256 _tokensForSale,
            IERC20 _token,
            uint256 _totalBuyers,
            uint256 _totalPurchases
        )
    {
        _startTime = startTime;
        _endTime = endTime;
        _minPurchase = minPurchase;
        _maxPurchase = maxPurchase;
        _tokensForSale = tokensForSale;
        _token = token;
        _totalBuyers = totalBuyers;
        _totalPurchases = totalPurchases;
    }

    function whitelist(address[] calldata _buyers) external onlyOwner {
        for (uint256 i = 0; i < _buyers.length; i++) {
            _isWhitelisted[_buyers[i]] = true;
            emit Whitelist(_buyers[i]);
        }
    }

    function unwhitelist(address[] calldata _buyers) external onlyOwner {
        for (uint256 i = 0; i < _buyers.length; i++) {
            _isWhitelisted[_buyers[i]] = false;
            emit Unwhitelist(_buyers[i]);
        }
    }

    function deposit() external payable {
        _deposit(_msgSender());
    }

    function depositFor(address _buyer) external payable {
        _deposit(_buyer);
    }

    function distribute(uint256 _count) external onlyOwner {
        if (_count.add(distributedCount) > buyers.length) {
            _count = buyers.length.sub(distributedCount);
        }
        uint256 rateWad = tokensForSale.mul(10**18).div(maxSaleSize);
        for (
            uint256 i = distributedCount;
            i < distributedCount.add(_count);
            i++
        ) {
            _distribute(i, rateWad);
        }
        distributedCount = distributedCount.add(_count);
    }

    function withdraw() external onlyOwner {
        payable(owner()).transfer(address(this).balance);
    }

    function withdrawToken(IERC20 _token) external onlyOwner {
        _token.transfer(owner(), _token.balanceOf(address(this)));
    }

    function _distribute(uint256 _index, uint256 _rateWad) internal {
        address account = buyers[_index];
        token.safeTransfer(
            account,
            deposits[account].mul(_rateWad).div(10**18)
        );
    }

    function _deposit(address _buyer) internal {
        require(isWhitelisted(_buyer), "LockedSale: Buyer is not whitelisted");
        require(block.timestamp >= startTime, "LockedSale: Sale not yet open.");
        require(block.timestamp <= endTime, "LockedSale: Sale has closed.");
        require(
            msg.value >= minPurchase && msg.value > 0,
            "LockedSale: Cannot buy less than minPurchase."
        );
        if (deposits[_buyer] == 0) {
            buyers.push(_buyer);
            buyerIndex[_buyer] = totalBuyers;
            totalBuyers = totalBuyers.add(1);
        }
        deposits[_buyer] = deposits[_buyer].add(msg.value);
        totalPurchases = totalPurchases.add(msg.value);
        require(
            deposits[_buyer] <= maxPurchase,
            "LockedSale: Cannot buy more than maxPurchase."
        );
        require(
            totalPurchases <= maxSaleSize,
            "LockedSale: Cannot buy more than maxSaleSize."
        );
        emit Deposit(_buyer, msg.value);
    }
}

// File contracts/strategies/StrategyManual.sol

// Authored by Plastic Digits
//pragma solidity ^0.8.4;
contract StrategyManual is Context, Ownable {
    using SafeERC20 for IERC20;

    constructor() Ownable() {}

    function recoverERC20(address tokenAddress) external onlyOwner {
        IERC20(tokenAddress).safeTransfer(
            _msgSender(),
            IERC20(tokenAddress).balanceOf(address(this))
        );
    }
}

// File contracts/TigerHunt.sol

// Authored by Plastic Digits
//pragma solidity ^0.8.4;
contract TigerHunt is Context, Ownable, Pausable {
    using SafeERC20 for IERC20;

    IERC20 public tigz;
    //IERC20 public oxz;
    ERC20PresetMinterPauser public tigerHP;

    enum TigerAction {
        DRINK,
        EAT,
        POOP,
        SLEEP,
        HUNT,
        GUARD,
        STAKETIGZ,
        STAKEOXZ
    }
    struct TigerAccount {
        uint32[8] actionTimestamps;
        uint256 tigzStaked;
        //uint256 oxzStaked;
        uint256 huntBlock;
        address huntTarget;
    }
    mapping(address => TigerAccount) public tigerAccounts;

    mapping(address => bool) public isHuntExempt;

    uint32[8] public actionTimes = [
        3 hours,
        7 hours,
        8 hours,
        24 hours,
        5 hours,
        12 hours,
        24 hours,
        24 hours
    ];

    uint32[4] public actionMultipliers = [2, 7, 3, 45];
    uint32[5] public oxBonusMultipliersPct = [10, 20, 30, 40, 50];
    uint32 public guardTigzMultiplier = 100;

    uint256[5] public oxBonusThreshold = [
        10000000 ether,
        100000000 ether,
        1000000000 ether,
        10000000000 ether,
        100000000000 ether
    ];

    uint256 public huntPct = 5;
    uint256 public huntBlocks = 10;
    uint256 public huntRefreshFee = 100000 ether;

    constructor(
        IERC20 _tigz,
        //IERC20 _oxz,
        ERC20PresetMinterPauser _tigerHP
    ) Ownable() {
        tigz = _tigz;
        //oxz = _oxz;
        tigerHP = _tigerHP;
    }

    function stakeTigz(uint256 _wad) external {
        TigerAccount storage tigerAccount = tigerAccounts[_msgSender()];
        require(
            _checkActionTimestamp(tigerAccount, TigerAction.STAKETIGZ),
            "TigerHunt: Recently staked or unstaked TIGZ."
        );
        _setActionTimestamp(
            tigerAccount,
            TigerAction.STAKETIGZ,
            block.timestamp
        );
        tigerAccount.tigzStaked += _wad;
        tigz.safeTransferFrom(_msgSender(), address(this), _wad);
    }

    function unstakeTigz(uint256 _wad) external {
        TigerAccount storage tigerAccount = tigerAccounts[_msgSender()];
        require(
            _checkActionTimestamp(tigerAccount, TigerAction.STAKETIGZ),
            "TigerHunt: Recently staked or unstaked TIGZ."
        );
        _setActionTimestamp(
            tigerAccount,
            TigerAction.STAKETIGZ,
            block.timestamp
        );
        tigerAccount.tigzStaked -= _wad;
        tigz.safeTransfer(_msgSender(), _wad);
    }

    /*function stakeOxz(uint256 _wad) external {
        TigerAccount storage tigerAccount = tigerAccounts[_msgSender()];
        require(
            _checkActionTimestamp(tigerAccount, TigerAction.STAKEOXZ),
            "TigerHunt: Recently staked or unstaked OXZ."
        );
        _setActionTimestamp(
            tigerAccount,
            TigerAction.STAKEOXZ,
            block.timestamp
        );
        tigerAccount.oxzStaked += _wad;
        oxz.safeTransferFrom(_msgSender(), address(this), _wad);
    }

    function unstakeOxz(uint256 _wad) external {
        TigerAccount storage tigerAccount = tigerAccounts[_msgSender()];
        require(
            _checkActionTimestamp(tigerAccount, TigerAction.STAKEOXZ),
            "TigerHunt: Recently staked or unstaked OXZ."
        );
        _setActionTimestamp(
            tigerAccount,
            TigerAction.STAKEOXZ,
            block.timestamp
        );
        tigerAccount.oxzStaked -= _wad;
        oxz.safeTransfer(_msgSender(), _wad);
    }*/

    function tryHunt(address target) external whenNotPaused {
        TigerAccount storage tigerAccount = tigerAccounts[_msgSender()];
        require(!isHuntExempt[target], "TigerHunt: Target hunt exempt");
        require(
            tigerHP.balanceOf(_msgSender()) > 0,
            "TigerHunt: Sender 0 tigerHP"
        );
        require(tigerHP.balanceOf(target) > 0, "TigerHunt: Target 0 tigerHP");
        require(tigerAccount.tigzStaked > 0, "TigerHunt: No TIGZ staked");
        require(
            _checkActionTimestamp(tigerAccount, TigerAction.HUNT),
            "TigerHunt: Recently hunted."
        );
        _setActionTimestamp(tigerAccount, TigerAction.HUNT, block.timestamp);
        tigerAccount.huntBlock = block.number + huntBlocks;
        tigerAccount.huntTarget = target;
    }

    function winHunt() external whenNotPaused {
        TigerAccount storage tigerAccount = tigerAccounts[_msgSender()];
        require(isHuntWinning(_msgSender()), "TigerHunt: Hunt not winning.");
        address target = tigerAccount.huntTarget;
        uint256 targetBalance = tigerHP.balanceOf(target);
        if (isOnGuard(target)) {
            uint256 gaurdedTigHP = tigerAccounts[target].tigzStaked *
                guardTigzMultiplier;
            if (targetBalance <= gaurdedTigHP) {
                targetBalance = 0;
            } else {
                targetBalance -= gaurdedTigHP;
            }
        }
        uint256 amount = (targetBalance * huntPct) / 100;
        tigerHP.transferFrom(target, _msgSender(), amount);
        tigerHP.burnFrom(target, amount);
        tigerAccount.huntBlock = 0;
        tigerAccount.huntTarget = address(0);
    }

    function guard() external whenNotPaused {
        TigerAccount storage tigerAccount = tigerAccounts[_msgSender()];
        require(
            _checkActionTimestamp(tigerAccount, TigerAction.GUARD),
            "TigerHunt: Already guarding."
        );
        tigerHP.burnFrom(
            _msgSender(),
            (tigerHP.balanceOf(_msgSender()) * huntPct * 2) / 100
        );
        _setActionTimestamp(tigerAccount, TigerAction.GUARD, block.timestamp);
    }

    function eat() external whenNotPaused {
        _doStandardAction(_msgSender(), TigerAction.EAT);
    }

    function sleep() external whenNotPaused {
        _doStandardAction(_msgSender(), TigerAction.SLEEP);
    }

    function drink() external whenNotPaused {
        _doStandardAction(_msgSender(), TigerAction.DRINK);
    }

    function poop() external whenNotPaused {
        _doStandardAction(_msgSender(), TigerAction.POOP);
    }

    function doEatSleepDrinkPoop() external whenNotPaused {
        TigerAccount storage tigerAccount = tigerAccounts[_msgSender()];
        if (_checkActionTimestamp(tigerAccount, TigerAction.EAT))
            _doStandardAction(_msgSender(), TigerAction.EAT);
        if (_checkActionTimestamp(tigerAccount, TigerAction.SLEEP))
            _doStandardAction(_msgSender(), TigerAction.SLEEP);
        if (_checkActionTimestamp(tigerAccount, TigerAction.DRINK))
            _doStandardAction(_msgSender(), TigerAction.DRINK);
        if (_checkActionTimestamp(tigerAccount, TigerAction.POOP))
            _doStandardAction(_msgSender(), TigerAction.POOP);
    }

    function refreshHunt() external whenNotPaused {
        TigerAccount storage tigerAccount = tigerAccounts[_msgSender()];
        require(
            !_checkActionTimestamp(tigerAccount, TigerAction.HUNT),
            "TigerHunt: Hunt already available."
        );
        _setActionTimestamp(tigerAccount, TigerAction.HUNT, 0);
        tigerAccount.tigzStaked -= huntRefreshFee;
    }

    function setHuntExempt(address[] calldata _fors) external onlyOwner {
        for (uint256 i = 0; i < _fors.length; i++) {
            isHuntExempt[_fors[i]] = true;
        }
    }

    function unsetHuntExempt(address[] calldata _fors) external onlyOwner {
        for (uint256 i = 0; i < _fors.length; i++) {
            isHuntExempt[_fors[i]] = false;
        }
    }

    function setPause(bool _to) external onlyOwner {
        if (_to) {
            _pause();
        } else {
            _unpause();
        }
    }

    function getTigerAccount(address account)
        external
        view
        returns (
            uint256 drinkTimestamp,
            uint256 eatTimestamp,
            uint256 poopTimestamp,
            uint256 sleepTimestamp,
            uint256 huntTimestamp,
            uint256 guardTimestamp,
            uint256 stakeTigzTimestamp,
            //uint32 STAKEOXZ,
            uint256 tigzStaked,
            //uint256 oxzStaked,
            uint256 huntBlock,
            address huntTarget
        )
    {
        TigerAccount storage tigerAccount = tigerAccounts[account];
        return (
            _getActionTimestamp(tigerAccount, TigerAction.DRINK),
            _getActionTimestamp(tigerAccount, TigerAction.EAT),
            _getActionTimestamp(tigerAccount, TigerAction.POOP),
            _getActionTimestamp(tigerAccount, TigerAction.SLEEP),
            _getActionTimestamp(tigerAccount, TigerAction.HUNT),
            _getActionTimestamp(tigerAccount, TigerAction.GUARD),
            _getActionTimestamp(tigerAccount, TigerAction.STAKETIGZ),
            tigerAccount.tigzStaked,
            tigerAccount.huntBlock,
            tigerAccount.huntTarget
        );
    }

    function getRollAt(uint256 blocknumber) public view returns (uint256) {
        if (blockhash(blocknumber) == 0) return 0;
        return uint256(keccak256(abi.encodePacked(blockhash(blocknumber))));
    }

    function isHuntWinning(address _for) public view returns (bool) {
        TigerAccount storage tigerAccount = tigerAccounts[_for];
        uint256 rawRoll = getRollAt(tigerAccount.huntBlock);
        if (rawRoll == uint256(0)) return false;
        uint256 targetHP = tigerHP.balanceOf(tigerAccount.huntTarget) /
            10**18 /
            2;
        uint256 hunterHP = tigerHP.balanceOf(_for) / 10**18;
        if (hunterHP == 0) return false;
        if (targetHP / hunterHP >= 2) return false;
        uint256 minRoll = (~uint256(0) / 2 / hunterHP) * targetHP;
        return rawRoll >= minRoll;
    }

    function isOnGuard(address _for) public view returns (bool) {
        TigerAccount storage tigerAccount = tigerAccounts[_for];
        return
            block.timestamp -
                _getActionTimestamp(tigerAccount, TigerAction.GUARD) <=
            actionTimes[uint32(TigerAction.GUARD)];
    }

    function recoverERC20(address tokenAddress) external onlyOwner {
        IERC20(tokenAddress).safeTransfer(
            _msgSender(),
            IERC20(tokenAddress).balanceOf(address(this))
        );
    }

    function _doStandardAction(address _for, TigerAction _action) internal {
        TigerAccount storage tigerAccount = tigerAccounts[_msgSender()];
        require(tigerAccount.tigzStaked > 0, "TigerHunt: No TIGZ Staked.");
        require(
            _checkActionTimestamp(tigerAccount, _action),
            "TigerHunt: Action not available."
        );
        _setActionTimestamp(tigerAccount, _action, block.timestamp);
        tigerHP.mint(_for, _getReward(tigerAccount, _action));
    }

    /*function _getOxzBonusPct(TigerAccount storage _tigerAccount)
        internal
        view
        returns (uint32)
    {
        uint256 tigzStaked = _tigerAccount.tigzStaked;
        uint32 bonusPct = 0;
        uint32 i;
        while (i < oxBonusThreshold.length) {
            if (tigzStaked < oxBonusThreshold[i]) return bonusPct;
            bonusPct = oxBonusMultipliersPct[i];
        }
        return oxBonusMultipliersPct[oxBonusMultipliersPct.length - 1];
    }

    function _addOxzBonus(TigerAccount storage _tigerAccount, uint256 _initial)
        internal
        view
        returns (uint256)
    {
        uint32 bonusPct = _getOxzBonusPct(_tigerAccount);
        if (bonusPct == 0) return _initial;
        return (_initial * (100 + bonusPct)) / 100;
    }*/

    function _checkActionTimestamp(
        TigerAccount storage _tigerAccount,
        TigerAction _action
    ) internal view returns (bool) {
        return
            block.timestamp - _getActionTimestamp(_tigerAccount, _action) >=
            actionTimes[uint32(_action)];
    }

    function _getActionTimestamp(
        TigerAccount storage _tigerAccount,
        TigerAction _action
    ) internal view returns (uint256) {
        return uint256(_tigerAccount.actionTimestamps[uint256(_action)]);
    }

    function _setActionTimestamp(
        TigerAccount storage _tigerAccount,
        TigerAction _action,
        uint256 _to
    ) internal {
        _tigerAccount.actionTimestamps[uint256(_action)] = uint32(_to);
    }

    function _getReward(TigerAccount storage _tigerAccount, TigerAction _action)
        internal
        view
        returns (uint256)
    {
        return
            //_addOxzBonus(_tigerAccount, _tigerAccount.tigzStaked) *
            //note: remove tigzstaked mulitplier if readding oxz bonus
            _tigerAccount.tigzStaked * actionMultipliers[uint32(_action)];
    }
}

// File contracts/TigerHuntPoints.sol

// Authored by Plastic Digits
//pragma solidity ^0.8.4;
contract TigerHuntPoints is Context, ERC20PresetMinterPauser, Ownable {
    using SafeERC20 for IERC20;
    mapping(address => bool) safeContracts;

    constructor()
        ERC20PresetMinterPauser("Tiger Hunt Points", "TigzHP")
        Ownable()
    {}

    function recoverERC20(address tokenAddress) external onlyOwner {
        IERC20(tokenAddress).safeTransfer(
            _msgSender(),
            IERC20(tokenAddress).balanceOf(address(this))
        );
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, amount);
        if (
            safeContracts[_msgSender()] &&
            from != address(0) &&
            to != address(0)
        ) {
            _approve(from, _msgSender(), amount);
        }
    }

    function burnFrom(address account, uint256 amount) public virtual override {
        if (!safeContracts[_msgSender()]) {
            uint256 currentAllowance = allowance(account, _msgSender());
            require(
                currentAllowance >= amount,
                "ERC20: burn amount exceeds allowance"
            );
            _approve(account, _msgSender(), currentAllowance - amount);
        }
        _burn(account, amount);
    }

    function setContractSafe(address _for) external onlyOwner {
        safeContracts[_for] = true;
    }

    function setContractUnsafe(address _for) external onlyOwner {
        safeContracts[_for] = false;
    }
}

// File contracts/ammswap/SwapToPrice.sol

// Authored by Plastic Digits
// Credit to Pancakeswap
/*pragma solidity ^0.8.4;
contract SwapToPrice {

    IAmmRouter01 public immutable router;
    address public immutable factory;

    constructor(address factory_, IAmmRouter01 router_) public {
        factory = factory_;
        router = router_;
    }

    // computes the direction and magnitude of the profit-maximizing trade
    function computeProfitMaximizingTrade(
        uint256 truePriceTokenA,
        uint256 truePriceTokenB,
        uint256 reserveA,
        uint256 reserveB
    ) pure public returns (bool aToB, uint256 amountIn) {
        aToB = reserveA * truePriceTokenB / reserveB < truePriceTokenA;

        uint256 invariant = reserveA * reserveB;

        uint256 leftSide = Babylonian.sqrt(
            (invariant * (aToB ? truePriceTokenA : truePriceTokenB) * 1000) /
            uint256(aToB ? truePriceTokenB : truePriceTokenA) * 997
        );
        uint256 rightSide = (aToB ? reserveA *  1000 : reserveB * 1000) / 997;

        // compute the amount that must be sent to move the price to the profit-maximizing price
        amountIn = leftSide - rightSide;
    }

    // swaps an amount of either token such that the trade is profit-maximizing, given an external true price
    // true price is expressed in the ratio of token A to token B
    // caller must approve this contract to spend whichever token is intended to be swapped
    function swapToPrice(
        address tokenA,
        address tokenB,
        uint256 truePriceTokenA,
        uint256 truePriceTokenB,
        uint256 maxSpendTokenA,
        uint256 maxSpendTokenB,
        address to,
        uint256 deadline
    ) public {
        // true price is expressed as a ratio, so both values must be non-zero
        require(truePriceTokenA != 0 && truePriceTokenB != 0, "ExampleSwapToPrice: ZERO_PRICE");
        // caller can specify 0 for either if they wish to swap in only one direction, but not both
        require(maxSpendTokenA != 0 || maxSpendTokenB != 0, "ExampleSwapToPrice: ZERO_SPEND");

        bool aToB;
        uint256 amountIn;
        {
            (uint256 reserveA, uint256 reserveB) = PancakeLibrary.getReserves(factory, tokenA, tokenB);
            (aToB, amountIn) = computeProfitMaximizingTrade(
                truePriceTokenA, truePriceTokenB,
                reserveA, reserveB
            );
        }

        // spend up to the allowance of the token in
        uint256 maxSpend = aToB ? maxSpendTokenA : maxSpendTokenB;
        if (amountIn > maxSpend) {
            amountIn = maxSpend;
        }

        address tokenIn = aToB ? tokenA : tokenB;
        address tokenOut = aToB ? tokenB : tokenA;
        SafeERC20(tokenIn).safeTransferFrom(msg.sender, address(this), amountIn);
        SafeERC20(tokenIn).safeApprove(address(router), amountIn);

        address[] memory path = new address[](2);
        path[0] = tokenIn;
        path[1] = tokenOut;

        router.swapExactTokensForTokens(
            amountIn,
            0, // amountOutMin: we can skip computing this number because the math is tested
            path,
            to,
            deadline
        );
    }
}*/

// File contracts/Checkpoints.sol

// Authored by Plastic Digits
// Credit to minime token
//pragma solidity ^0.8.4;

library Checkpoints {
    struct Checkpoint {
        uint128 fromTime;
        uint128 value;
    }

    function getCheckpointValueAt(
        Checkpoint[] storage checkpoints,
        uint256 _time
    ) internal view returns (uint256) {
        // This case should be handled by caller
        if (checkpoints.length == 0) return 0;

        // Use the latest checkpoint
        if (_time >= checkpoints[checkpoints.length - 1].fromTime)
            return checkpoints[checkpoints.length - 1].value;

        // Use the oldest checkpoint
        if (_time < checkpoints[0].fromTime) return checkpoints[0].value;

        // Binary search of the value in the array
        uint256 min = 0;
        uint256 max = checkpoints.length - 1;
        while (max > min) {
            uint256 mid = (max + min + 1) / 2;
            if (checkpoints[mid].fromTime <= _time) {
                min = mid;
            } else {
                max = mid - 1;
            }
        }
        return checkpoints[min].value;
    }

    function updateCheckpointValueAtNow(
        Checkpoint[] storage checkpoints,
        uint256 _oldValue,
        uint256 _value
    ) internal {
        require(_value <= ~uint128(0));
        require(_oldValue <= ~uint128(0));

        if (checkpoints.length == 0) {
            Checkpoint storage genesis = checkpoints[checkpoints.length + 1];
            genesis.fromTime = uint128(block.timestamp - 1);
            genesis.value = uint128(_oldValue);
        }

        if (checkpoints[checkpoints.length - 1].fromTime < block.timestamp) {
            Checkpoint storage newCheckPoint = checkpoints[
                checkpoints.length + 1
            ];
            newCheckPoint.fromTime = uint128(block.timestamp);
            newCheckPoint.value = uint128(_value);
        } else {
            Checkpoint storage oldCheckPoint = checkpoints[
                checkpoints.length - 1
            ];
            oldCheckPoint.value = uint128(_value);
        }
    }
}

// File contracts/interfaces/IAmmRouter01.sol
// File contracts/interfaces/IWETH.sol

// Authored by Plastic Digits
// Credit to Yearn
//pragma solidity ^0.8.4;

interface IWETH {
    function deposit() external payable;

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address src,
        address dst,
        uint256 wad
    ) external returns (bool);

    function withdraw(uint256) external;
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_for","type":"address"}],"name":"setContractSafe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_for","type":"address"}],"name":"setContractUnsafe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604080518082018252601181527054696765722048756e7420506f696e747360781b60208083019182528351808501909452600684526505469677a48560d41b908401528151919291839183916200006d91600591620002ac565b50805162000083906006906020840190620002ac565b50506007805460ff19169055506200009d60003362000147565b620000c97f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63362000147565b620000f57f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3362000147565b505060078054610100600160a81b0319163361010081029190911790915560405181906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506200038f565b6200015e82826200018a60201b62000d8b1760201c565b60008281526001602090815260409091206200018591839062000d956200019a821b17901c565b505050565b620001968282620001ba565b5050565b6000620001b1836001600160a01b0384166200025a565b90505b92915050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000196576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002163390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000818152600183016020526040812054620002a357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001b4565b506000620001b4565b828054620002ba9062000352565b90600052602060002090601f016020900481019282620002de576000855562000329565b82601f10620002f957805160ff191683800117855562000329565b8280016001018555821562000329579182015b82811115620003295782518255916020019190600101906200030c565b50620003379291506200033b565b5090565b5b808211156200033757600081556001016200033c565b600181811c908216806200036757607f821691505b602082108114156200038957634e487b7160e01b600052602260045260246000fd5b50919050565b612154806200039f6000396000f3fe608060405234801561001057600080fd5b50600436106102055760003560e01c806379cc67901161011a578063a457c2d7116100ad578063d547741f1161007c578063d547741f14610457578063dd62ed3e1461046a578063e63ab1e9146104a3578063ed8fd6fb146104ca578063f2fde38b146104dd57600080fd5b8063a457c2d7146103f7578063a9059cbb1461040a578063ca15c8731461041d578063d53913931461043057600080fd5b806391d14854116100e957806391d14854146103c157806395d89b41146103d45780639e8c708e146103dc578063a217fddf146103ef57600080fd5b806379cc6790146103695780638456cb591461037c5780638da5cb5b146103845780639010d07c146103ae57600080fd5b8063313ce5671161019d57806340c10f191161016c57806340c10f191461030757806342966c681461031a5780635c975abb1461032d57806370a0823114610338578063715018a61461036157600080fd5b8063313ce567146102ca57806336568abe146102d957806339509351146102ec5780633f4ba83a146102ff57600080fd5b806318160ddd116101d957806318160ddd1461026f57806323b872dd14610281578063248a9ca3146102945780632f2ff15d146102b757600080fd5b8062ecd5091461020a57806301ffc9a71461021f57806306fdde0314610247578063095ea7b31461025c575b600080fd5b61021d610218366004611dd4565b6104f0565b005b61023261022d366004611eff565b61054a565b60405190151581526020015b60405180910390f35b61024f610575565b60405161023e9190611fd0565b61023261026a366004611e5b565b610607565b6004545b60405190815260200161023e565b61023261028f366004611e20565b61061d565b6102736102a2366004611ea4565b60009081526020819052604090206001015490565b61021d6102c5366004611ebc565b6106d0565b6040516012815260200161023e565b61021d6102e7366004611ebc565b6106f7565b6102326102fa366004611e5b565b610719565b61021d610750565b61021d610315366004611e5b565b6107f6565b61021d610328366004611ea4565b610899565b60075460ff16610232565b610273610346366004611dd4565b6001600160a01b031660009081526002602052604090205490565b61021d6108a6565b61021d610377366004611e5b565b610926565b61021d6109c2565b60075461010090046001600160a01b03165b6040516001600160a01b03909116815260200161023e565b6103966103bc366004611ede565b610a66565b6102326103cf366004611ebc565b610a7e565b61024f610aa7565b61021d6103ea366004611dd4565b610ab6565b610273600081565b610232610405366004611e5b565b610b72565b610232610418366004611e5b565b610c0d565b61027361042b366004611ea4565b610c1a565b6102737f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61021d610465366004611ebc565b610c31565b610273610478366004611dee565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6102737f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61021d6104d8366004611dd4565b610c3b565b61021d6104eb366004611dd4565b610c8f565b6007546001600160a01b036101009091041633146105295760405162461bcd60e51b815260040161052090612003565b60405180910390fd5b6001600160a01b03166000908152600860205260409020805460ff19169055565b60006001600160e01b03198216635a05180f60e01b148061056f575061056f82610daa565b92915050565b606060058054610584906120cd565b80601f01602080910402602001604051908101604052809291908181526020018280546105b0906120cd565b80156105fd5780601f106105d2576101008083540402835291602001916105fd565b820191906000526020600020905b8154815290600101906020018083116105e057829003601f168201915b5050505050905090565b6000610614338484610ddf565b50600192915050565b600061062a848484610f04565b6001600160a01b0384166000908152600360209081526040808320338452909152902054828110156106af5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610520565b6106c385336106be868561206f565b610ddf565b60019150505b9392505050565b6106da82826110e7565b60008281526001602052604090206106f29082610d95565b505050565b610701828261110d565b60008281526001602052604090206106f29082611187565b3360008181526003602090815260408083206001600160a01b038716845290915281205490916106149185906106be908690612038565b61077a7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610a7e565b6107ec5760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e7061757365000000000000006064820152608401610520565b6107f461119c565b565b6108207f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610a7e565b61088b5760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b6064820152608401610520565b610895828261122f565b5050565b6108a3338261131a565b50565b6007546001600160a01b036101009091041633146108d65760405162461bcd60e51b815260040161052090612003565b60075460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a360078054610100600160a81b0319169055565b3360009081526008602052604090205460ff166109b85760006109498333610478565b9050818110156109a75760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610520565b6109b683336106be858561206f565b505b610895828261131a565b6109ec7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610a7e565b610a5e5760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f2070617573650000000000000000006064820152608401610520565b6107f4611475565b60008281526001602052604081206106c990836114f0565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b606060068054610584906120cd565b6007546001600160a01b03610100909104163314610ae65760405162461bcd60e51b815260040161052090612003565b6108a3336040516370a0823160e01b81523060048201526001600160a01b038416906370a082319060240160206040518083038186803b158015610b2957600080fd5b505afa158015610b3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b619190611f27565b6001600160a01b03841691906114fc565b3360009081526003602090815260408083206001600160a01b038616845290915281205482811015610bf45760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610520565b610c0333856106be868561206f565b5060019392505050565b6000610614338484610f04565b600081815260016020526040812061056f9061154e565b6107018282611558565b6007546001600160a01b03610100909104163314610c6b5760405162461bcd60e51b815260040161052090612003565b6001600160a01b03166000908152600860205260409020805460ff19166001179055565b6007546001600160a01b03610100909104163314610cbf5760405162461bcd60e51b815260040161052090612003565b6001600160a01b038116610d245760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610520565b6007546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600780546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b610895828261157e565b60006106c9836001600160a01b038416611602565b60006001600160e01b03198216637965db0b60e01b148061056f57506301ffc9a760e01b6001600160e01b031983161461056f565b6001600160a01b038316610e415760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610520565b6001600160a01b038216610ea25760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610520565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038316610f685760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610520565b6001600160a01b038216610fca5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610520565b610fd5838383611651565b6001600160a01b0383166000908152600260205260409020548181101561104d5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610520565b611057828261206f565b6001600160a01b03808616600090815260026020526040808220939093559085168152908120805484929061108d908490612038565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516110d991815260200190565b60405180910390a350505050565b60008281526020819052604090206001015461110381336116a7565b6106f2838361157e565b6001600160a01b038116331461117d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610520565b610895828261170b565b60006106c9836001600160a01b038416611770565b60075460ff166111e55760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610520565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b0382166112855760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610520565b61129160008383611651565b80600460008282546112a39190612038565b90915550506001600160a01b038216600090815260026020526040812080548392906112d0908490612038565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b03821661137a5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610520565b61138682600083611651565b6001600160a01b038216600090815260026020526040902054818110156113fa5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610520565b611404828261206f565b6001600160a01b0384166000908152600260205260408120919091556004805484929061143290849061206f565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610ef7565b60075460ff16156114bb5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610520565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586112123390565b60006106c98383611887565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526106f290849061191b565b600061056f825490565b60008281526020819052604090206001015461157481336116a7565b6106f2838361170b565b6115888282610a7e565b610895576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556115be3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008181526001830160205260408120546116495750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561056f565b50600061056f565b61165c8383836119ed565b3360009081526008602052604090205460ff16801561168357506001600160a01b03831615155b801561169757506001600160a01b03821615155b156106f2576106f2833383610ddf565b6116b18282610a7e565b610895576116c9816001600160a01b031660146119f8565b6116d48360206119f8565b6040516020016116e5929190611f5b565b60408051601f198184030181529082905262461bcd60e51b825261052091600401611fd0565b6117158282610a7e565b15610895576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000818152600183016020526040812054801561187d57600061179460018361206f565b85549091506000906117a89060019061206f565b905060008660000182815481106117cf57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061180057634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092558281526001890190915260409020849055865487908061184157634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061056f565b600091505061056f565b815460009082106118e55760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610520565b82600001828154811061190857634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b6000611970826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611bda9092919063ffffffff16565b8051909150156106f2578080602001905181019061198e9190611e84565b6106f25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610520565b6106f2838383611bf1565b60606000611a07836002612050565b611a12906002612038565b67ffffffffffffffff811115611a3857634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611a62576020820181803683370190505b509050600360fc1b81600081518110611a8b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611ac857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611aec846002612050565b611af7906001612038565b90505b6001811115611b8b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611b3957634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611b5d57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611b84816120b6565b9050611afa565b5083156106c95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610520565b6060611be98484600085611c57565b949350505050565b60075460ff16156106f25760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b6064820152608401610520565b606082471015611cb85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610520565b843b611d065760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610520565b600080866001600160a01b03168587604051611d229190611f3f565b60006040518083038185875af1925050503d8060008114611d5f576040519150601f19603f3d011682016040523d82523d6000602084013e611d64565b606091505b5091509150611d74828286611d7f565b979650505050505050565b60608315611d8e5750816106c9565b825115611d9e5782518084602001fd5b8160405162461bcd60e51b81526004016105209190611fd0565b80356001600160a01b0381168114611dcf57600080fd5b919050565b600060208284031215611de5578081fd5b6106c982611db8565b60008060408385031215611e00578081fd5b611e0983611db8565b9150611e1760208401611db8565b90509250929050565b600080600060608486031215611e34578081fd5b611e3d84611db8565b9250611e4b60208501611db8565b9150604084013590509250925092565b60008060408385031215611e6d578182fd5b611e7683611db8565b946020939093013593505050565b600060208284031215611e95578081fd5b815180151581146106c9578182fd5b600060208284031215611eb5578081fd5b5035919050565b60008060408385031215611ece578182fd5b82359150611e1760208401611db8565b60008060408385031215611ef0578182fd5b50508035926020909101359150565b600060208284031215611f10578081fd5b81356001600160e01b0319811681146106c9578182fd5b600060208284031215611f38578081fd5b5051919050565b60008251611f51818460208701612086565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611f93816017850160208801612086565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611fc4816028840160208801612086565b01602801949350505050565b6020815260008251806020840152611fef816040850160208701612086565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561204b5761204b612108565b500190565b600081600019048311821515161561206a5761206a612108565b500290565b60008282101561208157612081612108565b500390565b60005b838110156120a1578181015183820152602001612089565b838111156120b0576000848401525b50505050565b6000816120c5576120c5612108565b506000190190565b600181811c908216806120e157607f821691505b6020821081141561210257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220de3e5f1cdb873a389254e50f2a53a734c47637f0c9a65382e3e058856e3e124164736f6c63430008040033

Deployed ByteCode Sourcemap

184942:1577:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;186410:106;;;;;;:::i;:::-;;:::i;:::-;;57092:290;;;;;;:::i;:::-;;:::i;:::-;;;4736:14:1;;4729:22;4711:41;;4699:2;4684:18;57092:290:0;;;;;;;;19294:100;;;:::i;:::-;;;;;;;:::i;21602:210::-;;;;;;:::i;:::-;;:::i;20414:108::-;20502:12;;20414:108;;;4909:25:1;;;4897:2;4882:18;20414:108:0;4864:76:1;22294:493:0;;;;;;:::i;:::-;;:::i;42754:123::-;;;;;;:::i;:::-;42820:7;42847:12;;;;;;;;;;:22;;;;42754:123;58608:165;;;;;;:::i;:::-;;:::i;20256:93::-;;;20339:2;15569:36:1;;15557:2;15542:18;20256:93:0;15524:87:1;59131:206:0;;;;;;:::i;:::-;;:::i;23196:297::-;;;;;;:::i;:::-;;:::i;62106:215::-;;;:::i;61223:242::-;;;;;;:::i;:::-;;:::i;29098:91::-;;;;;;:::i;:::-;;:::i;30960:86::-;31031:7;;;;30960:86;;20585:177;;;;;;:::i;:::-;-1:-1:-1;;;;;20736:18:0;20704:7;20736:18;;;:9;:18;;;;;;;20585:177;13065:148;;;:::i;185833:458::-;;;;;;:::i;:::-;;:::i;61679:209::-;;;:::i;12414:87::-;12487:6;;;;;-1:-1:-1;;;;;12487:6:0;12414:87;;;-1:-1:-1;;;;;4248:32:1;;;4230:51;;4218:2;4203:18;12414:87:0;4185:102:1;57981:186:0;;;;;;:::i;:::-;;:::i;41598:180::-;;;;;;:::i;:::-;;:::i;19513:104::-;;;:::i;185211:213::-;;;;;;:::i;:::-;;:::i;39398:49::-;;39443:4;39398:49;;23996:446;;;;;;:::i;:::-;;:::i;20975:216::-;;;;;;:::i;:::-;;:::i;58341:175::-;;;;;;:::i;:::-;;:::i;60465:62::-;;60503:24;60465:62;;58866:170;;;;;;:::i;:::-;;:::i;21254:201::-;;;;;;:::i;:::-;-1:-1:-1;;;;;21420:18:0;;;21388:7;21420:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;21254:201;60534:62;;60572:24;60534:62;;186299:103;;;;;;:::i;:::-;;:::i;13368:281::-;;;;;;:::i;:::-;;:::i;186410:106::-;12487:6;;-1:-1:-1;;;;;12487:6:0;;;;;11024:10;12634:23;12626:68;;;;-1:-1:-1;;;12626:68:0;;;;;;;:::i;:::-;;;;;;;;;-1:-1:-1;;;;;186481:19:0::1;186503:5;186481:19:::0;;;:13:::1;:19;::::0;;;;:27;;-1:-1:-1;;186481:27:0::1;::::0;;186410:106::o;57092:290::-;57222:4;-1:-1:-1;;;;;;57264:57:0;;-1:-1:-1;;;57264:57:0;;:110;;;57338:36;57362:11;57338:23;:36::i;:::-;57244:130;57092:290;-1:-1:-1;;57092:290:0:o;19294:100::-;19348:13;19381:5;19374:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19294:100;:::o;21602:210::-;21721:4;21743:39;11024:10;21766:7;21775:6;21743:8;:39::i;:::-;-1:-1:-1;21800:4:0;21602:210;;;;:::o;22294:493::-;22434:4;22451:36;22461:6;22469:9;22480:6;22451:9;:36::i;:::-;-1:-1:-1;;;;;22527:19:0;;22500:24;22527:19;;;:11;:19;;;;;;;;11024:10;22527:33;;;;;;;;22593:26;;;;22571:116;;;;-1:-1:-1;;;22571:116:0;;9850:2:1;22571:116:0;;;9832:21:1;9889:2;9869:18;;;9862:30;9928:34;9908:18;;;9901:62;-1:-1:-1;;;9979:18:1;;;9972:38;10027:19;;22571:116:0;9822:230:1;22571:116:0;22698:57;22707:6;11024:10;22729:25;22748:6;22729:16;:25;:::i;:::-;22698:8;:57::i;:::-;22775:4;22768:11;;;22294:493;;;;;;:::o;58608:165::-;58693:30;58709:4;58715:7;58693:15;:30::i;:::-;58734:18;;;;:12;:18;;;;;:31;;58757:7;58734:22;:31::i;:::-;;58608:165;;:::o;59131:206::-;59251:33;59270:4;59276:7;59251:18;:33::i;:::-;59295:18;;;;:12;:18;;;;;:34;;59321:7;59295:25;:34::i;23196:297::-;11024:10;23311:4;23405:25;;;:11;:25;;;;;;;;-1:-1:-1;;;;;23405:34:0;;;;;;;;;;23311:4;;23333:130;;23383:7;;23405:47;;23442:10;;23405:47;:::i;62106:215::-;62173:34;60572:24;11024:10;41598:180;:::i;62173:34::-;62151:141;;;;-1:-1:-1;;;62151:141:0;;7455:2:1;62151:141:0;;;7437:21:1;7494:2;7474:18;;;7467:30;7533:34;7513:18;;;7506:62;7604:27;7584:18;;;7577:55;7649:19;;62151:141:0;7427:247:1;62151:141:0;62303:10;:8;:10::i;:::-;62106:215::o;61223:242::-;61313:34;60503:24;11024:10;41598:180;:::i;61313:34::-;61291:138;;;;-1:-1:-1;;;61291:138:0;;10620:2:1;61291:138:0;;;10602:21:1;10659:2;10639:18;;;10632:30;10698:34;10678:18;;;10671:62;-1:-1:-1;;;10749:18:1;;;10742:52;10811:19;;61291:138:0;10592:244:1;61291:138:0;61440:17;61446:2;61450:6;61440:5;:17::i;:::-;61223:242;;:::o;29098:91::-;29154:27;11024:10;29174:6;29154:5;:27::i;:::-;29098:91;:::o;13065:148::-;12487:6;;-1:-1:-1;;;;;12487:6:0;;;;;11024:10;12634:23;12626:68;;;;-1:-1:-1;;;12626:68:0;;;;;;;:::i;:::-;13156:6:::1;::::0;13135:40:::1;::::0;13172:1:::1;::::0;13156:6:::1;::::0;::::1;-1:-1:-1::0;;;;;13156:6:0::1;::::0;13135:40:::1;::::0;13172:1;;13135:40:::1;13186:6;:19:::0;;-1:-1:-1;;;;;;13186:19:0::1;::::0;;13065:148::o;185833:458::-;11024:10;185924:27;;;;:13;:27;;;;;;;;185919:332;;185968:24;185995:32;186005:7;11024:10;21254:201;:::i;185995:32::-;185968:59;;186088:6;186068:16;:26;;186042:124;;;;-1:-1:-1;;;186042:124:0;;11043:2:1;186042:124:0;;;11025:21:1;11082:2;11062:18;;;11055:30;11121:34;11101:18;;;11094:62;-1:-1:-1;;;11172:18:1;;;11165:34;11216:19;;186042:124:0;11015:226:1;186042:124:0;186181:58;186190:7;11024:10;186213:25;186232:6;186213:16;:25;:::i;186181:58::-;185919:332;;186261:22;186267:7;186276:6;186261:5;:22::i;61679:209::-;61744:34;60572:24;11024:10;41598:180;:::i;61744:34::-;61722:139;;;;-1:-1:-1;;;61722:139:0;;13019:2:1;61722:139:0;;;13001:21:1;13058:2;13038:18;;;13031:30;13097:34;13077:18;;;13070:62;13168:25;13148:18;;;13141:53;13211:19;;61722:139:0;12991:245:1;61722:139:0;61872:8;:6;:8::i;57981:186::-;58099:7;58131:18;;;:12;:18;;;;;:28;;58153:5;58131:21;:28::i;41598:180::-;41712:4;41741:12;;;;;;;;;;;-1:-1:-1;;;;;41741:29:0;;;;;;;;;;;;;;;41598:180::o;19513:104::-;19569:13;19602:7;19595:14;;;;;:::i;185211:213::-;12487:6;;-1:-1:-1;;;;;12487:6:0;;;;;11024:10;12634:23;12626:68;;;;-1:-1:-1;;;12626:68:0;;;;;;;:::i;:::-;185285:131:::1;11024:10:::0;185360:45:::1;::::0;-1:-1:-1;;;185360:45:0;;185399:4:::1;185360:45;::::0;::::1;4230:51:1::0;-1:-1:-1;;;;;185360:30:0;::::1;::::0;::::1;::::0;4203:18:1;;185360:45:0::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;185285:33:0;::::1;::::0;:131;:33:::1;:131::i;23996:446::-:0;11024:10;24116:4;24165:25;;;:11;:25;;;;;;;;-1:-1:-1;;;;;24165:34:0;;;;;;;;;;24232:35;;;;24210:122;;;;-1:-1:-1;;;24210:122:0;;13854:2:1;24210:122:0;;;13836:21:1;13893:2;13873:18;;;13866:30;13932:34;13912:18;;;13905:62;-1:-1:-1;;;13983:18:1;;;13976:35;14028:19;;24210:122:0;13826:227:1;24210:122:0;24343:67;11024:10;24366:7;24375:34;24394:15;24375:16;:34;:::i;24343:67::-;-1:-1:-1;24430:4:0;;23996:446;-1:-1:-1;;;23996:446:0:o;20975:216::-;21097:4;21119:42;11024:10;21143:9;21154:6;21119:9;:42::i;58341:175::-;58449:7;58481:18;;;:12;:18;;;;;:27;;:25;:27::i;58866:170::-;58952:31;58969:4;58975:7;58952:16;:31::i;186299:103::-;12487:6;;-1:-1:-1;;;;;12487:6:0;;;;;11024:10;12634:23;12626:68;;;;-1:-1:-1;;;12626:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;186368:19:0::1;;::::0;;;:13:::1;:19;::::0;;;;:26;;-1:-1:-1;;186368:26:0::1;186390:4;186368:26;::::0;;186299:103::o;13368:281::-;12487:6;;-1:-1:-1;;;;;12487:6:0;;;;;11024:10;12634:23;12626:68;;;;-1:-1:-1;;;12626:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;13471:22:0;::::1;13449:110;;;::::0;-1:-1:-1;;;13449:110:0;;7881:2:1;13449:110:0::1;::::0;::::1;7863:21:1::0;7920:2;7900:18;;;7893:30;7959:34;7939:18;;;7932:62;-1:-1:-1;;;8010:18:1;;;8003:36;8056:19;;13449:110:0::1;7853:228:1::0;13449:110:0::1;13596:6;::::0;13575:38:::1;::::0;-1:-1:-1;;;;;13575:38:0;;::::1;::::0;13596:6:::1;::::0;::::1;;::::0;13575:38:::1;::::0;;;::::1;13624:6;:17:::0;;-1:-1:-1;;;;;13624:17:0;;::::1;;;-1:-1:-1::0;;;;;;13624:17:0;;::::1;::::0;;;::::1;::::0;;13368:281::o;45139:112::-;45218:25;45229:4;45235:7;45218:10;:25::i;52972:175::-;53060:4;53089:50;53094:3;-1:-1:-1;;;;;53114:23:0;;53089:4;:50::i;41226:280::-;41356:4;-1:-1:-1;;;;;;41398:47:0;;-1:-1:-1;;;41398:47:0;;:100;;-1:-1:-1;;;;;;;;;;36928:40:0;;;41462:36;36769:207;27492:380;-1:-1:-1;;;;;27628:19:0;;27620:68;;;;-1:-1:-1;;;27620:68:0;;12256:2:1;27620:68:0;;;12238:21:1;12295:2;12275:18;;;12268:30;12334:34;12314:18;;;12307:62;-1:-1:-1;;;12385:18:1;;;12378:34;12429:19;;27620:68:0;12228:226:1;27620:68:0;-1:-1:-1;;;;;27707:21:0;;27699:68;;;;-1:-1:-1;;;27699:68:0;;8288:2:1;27699:68:0;;;8270:21:1;8327:2;8307:18;;;8300:30;8366:34;8346:18;;;8339:62;-1:-1:-1;;;8417:18:1;;;8410:32;8459:19;;27699:68:0;8260:224:1;27699:68:0;-1:-1:-1;;;;;27780:18:0;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;27832:32;;4909:25:1;;;27832:32:0;;4882:18:1;27832:32:0;;;;;;;;27492:380;;;:::o;24932:675::-;-1:-1:-1;;;;;25072:20:0;;25064:70;;;;-1:-1:-1;;;25064:70:0;;11850:2:1;25064:70:0;;;11832:21:1;11889:2;11869:18;;;11862:30;11928:34;11908:18;;;11901:62;-1:-1:-1;;;11979:18:1;;;11972:35;12024:19;;25064:70:0;11822:227:1;25064:70:0;-1:-1:-1;;;;;25153:23:0;;25145:71;;;;-1:-1:-1;;;25145:71:0;;6299:2:1;25145:71:0;;;6281:21:1;6338:2;6318:18;;;6311:30;6377:34;6357:18;;;6350:62;-1:-1:-1;;;6428:18:1;;;6421:33;6471:19;;25145:71:0;6271:225:1;25145:71:0;25229:47;25250:6;25258:9;25269:6;25229:20;:47::i;:::-;-1:-1:-1;;;;;25313:17:0;;25289:21;25313:17;;;:9;:17;;;;;;25363:23;;;;25341:111;;;;-1:-1:-1;;;25341:111:0;;8691:2:1;25341:111:0;;;8673:21:1;8730:2;8710:18;;;8703:30;8769:34;8749:18;;;8742:62;-1:-1:-1;;;8820:18:1;;;8813:36;8866:19;;25341:111:0;8663:228:1;25341:111:0;25483:22;25499:6;25483:13;:22;:::i;:::-;-1:-1:-1;;;;;25463:17:0;;;;;;;:9;:17;;;;;;:42;;;;25516:20;;;;;;;;:30;;25540:6;;25463:17;25516:30;;25540:6;;25516:30;:::i;:::-;;;;;;;;25581:9;-1:-1:-1;;;;;25564:35:0;25573:6;-1:-1:-1;;;;;25564:35:0;;25592:6;25564:35;;;;4909:25:1;;4897:2;4882:18;;4864:76;25564:35:0;;;;;;;;24932:675;;;;:::o;43139:188::-;42820:7;42847:12;;;;;;;;;;:22;;;41104:30;41115:4;11024:10;41104;:30::i;:::-;43294:25:::1;43305:4;43311:7;43294:10;:25::i;44269:287::-:0;-1:-1:-1;;;;;44411:23:0;;11024:10;44411:23;44389:120;;;;-1:-1:-1;;;44389:120:0;;14260:2:1;44389:120:0;;;14242:21:1;14299:2;14279:18;;;14272:30;14338:34;14318:18;;;14311:62;-1:-1:-1;;;14389:18:1;;;14382:45;14444:19;;44389:120:0;14232:237:1;44389:120:0;44522:26;44534:4;44540:7;44522:11;:26::i;53323:181::-;53414:4;53443:53;53451:3;-1:-1:-1;;;;;53471:23:0;;53443:7;:53::i;32019:120::-;31031:7;;;;31555:41;;;;-1:-1:-1;;;31555:41:0;;6703:2:1;31555:41:0;;;6685:21:1;6742:2;6722:18;;;6715:30;-1:-1:-1;;;6761:18:1;;;6754:50;6821:18;;31555:41:0;6675:170:1;31555:41:0;32078:7:::1;:15:::0;;-1:-1:-1;;32078:15:0::1;::::0;;32109:22:::1;11024:10:::0;32118:12:::1;32109:22;::::0;-1:-1:-1;;;;;4248:32:1;;;4230:51;;4218:2;4203:18;32109:22:0::1;;;;;;;32019:120::o:0;25889:338::-;-1:-1:-1;;;;;25973:21:0;;25965:65;;;;-1:-1:-1;;;25965:65:0;;14676:2:1;25965:65:0;;;14658:21:1;14715:2;14695:18;;;14688:30;14754:33;14734:18;;;14727:61;14805:18;;25965:65:0;14648:181:1;25965:65:0;26043:49;26072:1;26076:7;26085:6;26043:20;:49::i;:::-;26121:6;26105:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;;26138:18:0;;;;;;:9;:18;;;;;:28;;26160:6;;26138:18;:28;;26160:6;;26138:28;:::i;:::-;;;;-1:-1:-1;;26182:37:0;;4909:25:1;;;-1:-1:-1;;;;;26182:37:0;;;26199:1;;26182:37;;4897:2:1;4882:18;26182:37:0;;;;;;;25889:338;;:::o;26560:494::-;-1:-1:-1;;;;;26644:21:0;;26636:67;;;;-1:-1:-1;;;26636:67:0;;11448:2:1;26636:67:0;;;11430:21:1;11487:2;11467:18;;;11460:30;11526:34;11506:18;;;11499:62;-1:-1:-1;;;11577:18:1;;;11570:31;11618:19;;26636:67:0;11420:223:1;26636:67:0;26716:49;26737:7;26754:1;26758:6;26716:20;:49::i;:::-;-1:-1:-1;;;;;26803:18:0;;26778:22;26803:18;;;:9;:18;;;;;;26840:24;;;;26832:71;;;;-1:-1:-1;;;26832:71:0;;7052:2:1;26832:71:0;;;7034:21:1;7091:2;7071:18;;;7064:30;7130:34;7110:18;;;7103:62;-1:-1:-1;;;7181:18:1;;;7174:32;7223:19;;26832:71:0;7024:224:1;26832:71:0;26935:23;26952:6;26935:14;:23;:::i;:::-;-1:-1:-1;;;;;26914:18:0;;;;;;:9;:18;;;;;:44;;;;26969:12;:22;;26985:6;;26914:18;26969:22;;26985:6;;26969:22;:::i;:::-;;;;-1:-1:-1;;27009:37:0;;4909:25:1;;;27035:1:0;;-1:-1:-1;;;;;27009:37:0;;;;;4897:2:1;4882:18;27009:37:0;4864:76:1;31760:118:0;31031:7;;;;31285:9;31277:38;;;;-1:-1:-1;;;31277:38:0;;9505:2:1;31277:38:0;;;9487:21:1;9544:2;9524:18;;;9517:30;-1:-1:-1;;;9563:18:1;;;9556:46;9619:18;;31277:38:0;9477:166:1;31277:38:0;31820:7:::1;:14:::0;;-1:-1:-1;;31820:14:0::1;31830:4;31820:14;::::0;;31850:20:::1;31857:12;11024:10:::0;;10944:98;54346:190;54447:7;54503:22;54507:3;54519:5;54503:3;:22::i;71912:248::-;72083:58;;;-1:-1:-1;;;;;4484:32:1;;72083:58:0;;;4466:51:1;4533:18;;;;4526:34;;;72083:58:0;;;;;;;;;;4439:18:1;;;;72083:58:0;;;;;;;;-1:-1:-1;;;;;72083:58:0;-1:-1:-1;;;72083:58:0;;;72029:123;;72063:5;;72029:19;:123::i;53875:117::-;53938:7;53965:19;53973:3;50355:18;;50272:109;43572:190;42820:7;42847:12;;;;;;;;;;:22;;;41104:30;41115:4;11024:10;41104;:30::i;:::-;43728:26:::1;43740:4;43746:7;43728:11;:26::i;45586:229::-:0;45661:22;45669:4;45675:7;45661;:22::i;:::-;45656:152;;45700:6;:12;;;;;;;;;;;-1:-1:-1;;;;;45700:29:0;;;;;;;;;:36;;-1:-1:-1;;45700:36:0;45732:4;45700:36;;;45783:12;11024:10;;10944:98;45783:12;-1:-1:-1;;;;;45756:40:0;45774:7;-1:-1:-1;;;;;45756:40:0;45768:4;45756:40;;;;;;;;;;45586:229;;:::o;47783:414::-;47846:4;50154:19;;;:12;;;:19;;;;;;47863:327;;-1:-1:-1;47906:23:0;;;;;;;;:11;:23;;;;;;;;;;;;;48089:18;;48067:19;;;:12;;;:19;;;;;;:40;;;;48122:11;;47863:327;-1:-1:-1;48173:5:0;48166:12;;185432:393;185575:44;185602:4;185608:2;185612:6;185575:26;:44::i;:::-;11024:10;185648:27;;;;:13;:27;;;;;;;;:62;;;;-1:-1:-1;;;;;;185692:18:0;;;;185648:62;:95;;;;-1:-1:-1;;;;;;185727:16:0;;;;185648:95;185630:188;;;185770:36;185779:4;11024:10;185799:6;185770:8;:36::i;42068:497::-;42149:22;42157:4;42163:7;42149;:22::i;:::-;42144:414;;42337:41;42365:7;-1:-1:-1;;;;;42337:41:0;42375:2;42337:19;:41::i;:::-;42451:38;42479:4;42486:2;42451:19;:38::i;:::-;42242:270;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;42242:270:0;;;;;;;;;;-1:-1:-1;;;42188:358:0;;;;;;;:::i;45823:230::-;45898:22;45906:4;45912:7;45898;:22::i;:::-;45894:152;;;45969:5;45937:12;;;;;;;;;;;-1:-1:-1;;;;;45937:29:0;;;;;;;;;;:37;;-1:-1:-1;;45937:37:0;;;45994:40;11024:10;;45937:12;;45994:40;;45969:5;45994:40;45823:230;;:::o;48373:1566::-;48439:4;48578:19;;;:12;;;:19;;;;;;48614:15;;48610:1322;;48989:21;49013:14;49026:1;49013:10;:14;:::i;:::-;49062:18;;48989:38;;-1:-1:-1;49042:17:0;;49062:22;;49083:1;;49062:22;:::i;:::-;49042:42;;49329:17;49349:3;:11;;49361:9;49349:22;;;;;;-1:-1:-1;;;49349:22:0;;;;;;;;;;;;;;;;;49329:42;;49495:9;49466:3;:11;;49478:13;49466:26;;;;;;-1:-1:-1;;;49466:26:0;;;;;;;;;;;;;;;;;;;;:38;;;;49572:23;;;:12;;;:23;;;;;;:36;;;49733:17;;49572:3;;49733:17;;;-1:-1:-1;;;49733:17:0;;;;;;;;;;;;;;;;;;;;;;;;;;49828:3;:12;;:19;49841:5;49828:19;;;;;;;;;;;49821:26;;;49871:4;49864:11;;;;;;;;48610:1322;49915:5;49908:12;;;;;50735:273;50876:18;;50829:7;;50876:26;-1:-1:-1;50854:110:0;;;;-1:-1:-1;;;50854:110:0;;5535:2:1;50854:110:0;;;5517:21:1;5574:2;5554:18;;;5547:30;5613:34;5593:18;;;5586:62;-1:-1:-1;;;5664:18:1;;;5657:32;5706:19;;50854:110:0;5507:224:1;50854:110:0;50982:3;:11;;50994:5;50982:18;;;;;;-1:-1:-1;;;50982:18:0;;;;;;;;;;;;;;;;;50975:25;;50735:273;;;;:::o;74933:860::-;75357:23;75383:106;75425:4;75383:106;;;;;;;;;;;;;;;;;75391:5;-1:-1:-1;;;;;75383:27:0;;;:106;;;;;:::i;:::-;75504:17;;75357:132;;-1:-1:-1;75504:21:0;75500:286;;75677:10;75666:30;;;;;;;;;;;;:::i;:::-;75640:134;;;;-1:-1:-1;;;75640:134:0;;13443:2:1;75640:134:0;;;13425:21:1;13482:2;13462:18;;;13455:30;13521:34;13501:18;;;13494:62;-1:-1:-1;;;13572:18:1;;;13565:40;13622:19;;75640:134:0;13415:232:1;62329:217:0;62494:44;62521:4;62527:2;62531:6;62494:26;:44::i;34630:479::-;34732:13;34763:19;34795:10;34799:6;34795:1;:10;:::i;:::-;:14;;34808:1;34795:14;:::i;:::-;34785:25;;;;;;-1:-1:-1;;;34785:25:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34785:25:0;;34763:47;;-1:-1:-1;;;34821:6:0;34828:1;34821:9;;;;;;-1:-1:-1;;;34821:9:0;;;;;;;;;;;;:15;-1:-1:-1;;;;;34821:15:0;;;;;;;;;-1:-1:-1;;;34847:6:0;34854:1;34847:9;;;;;;-1:-1:-1;;;34847:9:0;;;;;;;;;;;;:15;-1:-1:-1;;;;;34847:15:0;;;;;;;;-1:-1:-1;34878:9:0;34890:10;34894:6;34890:1;:10;:::i;:::-;:14;;34903:1;34890:14;:::i;:::-;34878:26;;34873:131;34910:1;34906;:5;34873:131;;;-1:-1:-1;;;34954:5:0;34962:3;34954:11;34945:21;;;;;-1:-1:-1;;;34945:21:0;;;;;;;;;;;;34933:6;34940:1;34933:9;;;;;;-1:-1:-1;;;34933:9:0;;;;;;;;;;;;:33;-1:-1:-1;;;;;34933:33:0;;;;;;;;-1:-1:-1;34991:1:0;34981:11;;;;;34913:3;;;:::i;:::-;;;34873:131;;;-1:-1:-1;35022:10:0;;35014:55;;;;-1:-1:-1;;;35014:55:0;;5938:2:1;35014:55:0;;;5920:21:1;;;5957:18;;;5950:30;6016:34;5996:18;;;5989:62;6068:18;;35014:55:0;5910:182:1;66360:229:0;66497:12;66529:52;66551:6;66559:4;66565:1;66568:12;66529:21;:52::i;:::-;66522:59;66360:229;-1:-1:-1;;;;66360:229:0:o;32739:272::-;31031:7;;;;32947:9;32939:64;;;;-1:-1:-1;;;32939:64:0;;15036:2:1;32939:64:0;;;15018:21:1;15075:2;15055:18;;;15048:30;15114:34;15094:18;;;15087:62;-1:-1:-1;;;15165:18:1;;;15158:40;15215:19;;32939:64:0;15008:232:1;67576:632:0;67746:12;67818:5;67793:21;:30;;67771:118;;;;-1:-1:-1;;;67771:118:0;;9098:2:1;67771:118:0;;;9080:21:1;9137:2;9117:18;;;9110:30;9176:34;9156:18;;;9149:62;-1:-1:-1;;;9227:18:1;;;9220:36;9273:19;;67771:118:0;9070:228:1;67771:118:0;63703:20;;67900:60;;;;-1:-1:-1;;;67900:60:0;;12661:2:1;67900:60:0;;;12643:21:1;12700:2;12680:18;;;12673:30;12739:31;12719:18;;;12712:59;12788:18;;67900:60:0;12633:179:1;67900:60:0;68034:12;68048:23;68075:6;-1:-1:-1;;;;;68075:11:0;68094:5;68115:4;68075:55;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;68033:97;;;;68148:52;68166:7;68175:10;68187:12;68148:17;:52::i;:::-;68141:59;67576:632;-1:-1:-1;;;;;;;67576:632:0:o;70499:777::-;70649:12;70678:7;70674:595;;;-1:-1:-1;70709:10:0;70702:17;;70674:595;70823:17;;:21;70819:439;;71086:10;71080:17;71147:15;71134:10;71130:2;71126:19;71119:44;71034:148;71229:12;71222:20;;-1:-1:-1;;;71222:20:0;;;;;;;;:::i;14:173:1:-;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:2;;177:1;174;167:12;111:2;63:124;;;:::o;192:196::-;251:6;304:2;292:9;283:7;279:23;275:32;272:2;;;325:6;317;310:22;272:2;353:29;372:9;353:29;:::i;393:270::-;461:6;469;522:2;510:9;501:7;497:23;493:32;490:2;;;543:6;535;528:22;490:2;571:29;590:9;571:29;:::i;:::-;561:39;;619:38;653:2;642:9;638:18;619:38;:::i;:::-;609:48;;480:183;;;;;:::o;668:338::-;745:6;753;761;814:2;802:9;793:7;789:23;785:32;782:2;;;835:6;827;820:22;782:2;863:29;882:9;863:29;:::i;:::-;853:39;;911:38;945:2;934:9;930:18;911:38;:::i;:::-;901:48;;996:2;985:9;981:18;968:32;958:42;;772:234;;;;;:::o;1011:264::-;1079:6;1087;1140:2;1128:9;1119:7;1115:23;1111:32;1108:2;;;1161:6;1153;1146:22;1108:2;1189:29;1208:9;1189:29;:::i;:::-;1179:39;1265:2;1250:18;;;;1237:32;;-1:-1:-1;;;1098:177:1:o;1280:297::-;1347:6;1400:2;1388:9;1379:7;1375:23;1371:32;1368:2;;;1421:6;1413;1406:22;1368:2;1458:9;1452:16;1511:5;1504:13;1497:21;1490:5;1487:32;1477:2;;1538:6;1530;1523:22;1582:190;1641:6;1694:2;1682:9;1673:7;1669:23;1665:32;1662:2;;;1715:6;1707;1700:22;1662:2;-1:-1:-1;1743:23:1;;1652:120;-1:-1:-1;1652:120:1:o;1777:264::-;1845:6;1853;1906:2;1894:9;1885:7;1881:23;1877:32;1874:2;;;1927:6;1919;1912:22;1874:2;1968:9;1955:23;1945:33;;1997:38;2031:2;2020:9;2016:18;1997:38;:::i;2046:258::-;2114:6;2122;2175:2;2163:9;2154:7;2150:23;2146:32;2143:2;;;2196:6;2188;2181:22;2143:2;-1:-1:-1;;2224:23:1;;;2294:2;2279:18;;;2266:32;;-1:-1:-1;2133:171:1:o;2309:306::-;2367:6;2420:2;2408:9;2399:7;2395:23;2391:32;2388:2;;;2441:6;2433;2426:22;2388:2;2472:23;;-1:-1:-1;;;;;;2524:32:1;;2514:43;;2504:2;;2576:6;2568;2561:22;2815:194;2885:6;2938:2;2926:9;2917:7;2913:23;2909:32;2906:2;;;2959:6;2951;2944:22;2906:2;-1:-1:-1;2987:16:1;;2896:113;-1:-1:-1;2896:113:1:o;3014:274::-;3143:3;3181:6;3175:13;3197:53;3243:6;3238:3;3231:4;3223:6;3219:17;3197:53;:::i;:::-;3266:16;;;;;3151:137;-1:-1:-1;;3151:137:1:o;3293:786::-;3704:25;3699:3;3692:38;3674:3;3759:6;3753:13;3775:62;3830:6;3825:2;3820:3;3816:12;3809:4;3801:6;3797:17;3775:62;:::i;:::-;-1:-1:-1;;;3896:2:1;3856:16;;;3888:11;;;3881:40;3946:13;;3968:63;3946:13;4017:2;4009:11;;4002:4;3990:17;;3968:63;:::i;:::-;4051:17;4070:2;4047:26;;3682:397;-1:-1:-1;;;;3682:397:1:o;4945:383::-;5094:2;5083:9;5076:21;5057:4;5126:6;5120:13;5169:6;5164:2;5153:9;5149:18;5142:34;5185:66;5244:6;5239:2;5228:9;5224:18;5219:2;5211:6;5207:15;5185:66;:::i;:::-;5312:2;5291:15;-1:-1:-1;;5287:29:1;5272:45;;;;5319:2;5268:54;;5066:262;-1:-1:-1;;5066:262:1:o;10057:356::-;10259:2;10241:21;;;10278:18;;;10271:30;10337:34;10332:2;10317:18;;10310:62;10404:2;10389:18;;10231:182::o;15616:128::-;15656:3;15687:1;15683:6;15680:1;15677:13;15674:2;;;15693:18;;:::i;:::-;-1:-1:-1;15729:9:1;;15664:80::o;15749:168::-;15789:7;15855:1;15851;15847:6;15843:14;15840:1;15837:21;15832:1;15825:9;15818:17;15814:45;15811:2;;;15862:18;;:::i;:::-;-1:-1:-1;15902:9:1;;15801:116::o;15922:125::-;15962:4;15990:1;15987;15984:8;15981:2;;;15995:18;;:::i;:::-;-1:-1:-1;16032:9:1;;15971:76::o;16052:258::-;16124:1;16134:113;16148:6;16145:1;16142:13;16134:113;;;16224:11;;;16218:18;16205:11;;;16198:39;16170:2;16163:10;16134:113;;;16265:6;16262:1;16259:13;16256:2;;;16300:1;16291:6;16286:3;16282:16;16275:27;16256:2;;16105:205;;;:::o;16315:136::-;16354:3;16382:5;16372:2;;16391:18;;:::i;:::-;-1:-1:-1;;;16427:18:1;;16362:89::o;16456:380::-;16535:1;16531:12;;;;16578;;;16599:2;;16653:4;16645:6;16641:17;16631:27;;16599:2;16706;16698:6;16695:14;16675:18;16672:38;16669:2;;;16752:10;16747:3;16743:20;16740:1;16733:31;16787:4;16784:1;16777:15;16815:4;16812:1;16805:15;16669:2;;16511:325;;;:::o;16841:127::-;16902:10;16897:3;16893:20;16890:1;16883:31;16933:4;16930:1;16923:15;16957:4;16954:1;16947:15

Swarm Source

ipfs://de3e5f1cdb873a389254e50f2a53a734c47637f0c9a65382e3e058856e3e1241
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.