Contract 0x65b09ef8c5A096C5Fd3A80f1F7369E56eB932412 1

Contract Overview

MoonBeans: BEANS Token
Balance:
0 GLMR

GLMR Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x2bbb65f3ff14844ff0c4c1e4a771fb786a2effbd3aa6ef8ee7edb8fd8b873b48Approve10502482022-05-18 7:14:241 day 1 hr ago0xa4c980ecbc272c9b162ae67949834239f6f96b9b IN MoonBeans: BEANS Token0 GLMR0.004736396
0xd8a4f6a1e9576d3713442c25f9e07c5bacc31ab45aa67aeee14e39c001e8e806Approve10235162022-05-14 11:00:064 days 21 hrs ago0x9ba1850b8f2a400540170ec9310b6aeef4546c73 IN MoonBeans: BEANS Token0 GLMR0.004736396
0xa18cf8cf5cad15b003ad765062003f70fe518a7790bf9d77875136f7b386312bApprove10076882022-05-12 3:56:367 days 4 hrs ago0xb925d49ec1d9019e3705d9d3a99b0d5555893e08 IN MoonBeans: BEANS Token0 GLMR0.004736396
0x5405abaf29bee9f094e2d2b66e8346141188af026ad56193e313715b5291f64fTransfer9862072022-05-08 23:15:0610 days 9 hrs ago0x039f8cf7cd8469bbb1ed0d0cab238736bd9db6ff IN MoonBeans: BEANS Token0 GLMR0.0164045315
0x78732abb92e1d98eb8b206dd9e923bffe717de136597545728a1d69746f3b51dApprove9821982022-05-08 8:58:1210 days 23 hrs ago0xeafd5f7ba5eff7366f7192a64e3a1d927ce9052d IN MoonBeans: BEANS Token0 GLMR0.004736396
0xc94b2ea947ee926bb68155cc54f301f67a7a173ec26c1f4069351852eda36c09Approve9779452022-05-07 17:57:0011 days 14 hrs ago0x777f041144249bbfcd544cda2cdabf924a46fd99 IN MoonBeans: BEANS Token0 GLMR0.002716546
0x0810a936bcd5fc9a70e57d45f3e7734da5c160e3ace4cce09054271ada0a71ceApprove9779452022-05-07 17:57:0011 days 14 hrs ago0x777f041144249bbfcd544cda2cdabf924a46fd99 IN MoonBeans: BEANS Token0 GLMR0.004736396
0x2d619bbcef35b3499dc6f01af2fa97d85b9eec5f66f57139f1d8428df26029e7Approve9769252022-05-07 14:21:1811 days 18 hrs ago0xb247a77d45b9afd9e1d125891fbe932ed4132e55 IN MoonBeans: BEANS Token0 GLMR0.004759728
0x58222a1e40a47e283ef2325a5d58953c1b48b988757755068d25d41a239076f0Approve9752372022-05-07 8:20:5412 days 28 mins ago0xeb1cec833f37e31f1e0feac3fb414856ba42dc44 IN MoonBeans: BEANS Token0 GLMR0.004736396
0x2135a97717f6b15f1d76cade2c99da25813a23851f747c690226aa8faf3c84e8Approve9720802022-05-06 21:11:1212 days 11 hrs ago0xbdccea79154ead8bb1811fab15d43a2670102c6a IN MoonBeans: BEANS Token0 GLMR0.004736396
0x2bedf4440b48d5a91bf82aa7eaae3cbc243eff97fe11ce6f1f828be48459a67bApprove9711482022-05-06 17:50:0012 days 14 hrs ago0x7b38b31cdce3f2751321fc3fceda111ea223e231 IN MoonBeans: BEANS Token0 GLMR0.004736396
0x4c3b3e4ff69f9a57508da3caf81863a4ece22e8256c05d4cc5b1c80f6fa2f81bApprove9663552022-05-06 0:46:3013 days 8 hrs ago0xa0efea4349bd315b015e704170058a1f368e6ec8 IN MoonBeans: BEANS Token0 GLMR0.004736396
0xf15526206caee903b2e39c1890413a2f75b4f18a00a58e6bf9e5058209d581afApprove9659142022-05-05 23:12:1413 days 9 hrs ago0xa45202ba900a6ff2e07c15d269696ae3fb743bae IN MoonBeans: BEANS Token0 GLMR0.004736396
0x7ace214a8824bb0e29490db913ad8ec0382e731c588889838576222ff0e78587Approve9648952022-05-05 19:31:5413 days 13 hrs ago0x7737d3742ddc67f1443b40cbe6d401d649d3906a IN MoonBeans: BEANS Token0 GLMR0.0046664
0xbf15b0b93c38032886d41ebb702b41501952f81b280bb66997c609630b8dfa93Approve9612312022-05-05 6:26:1214 days 2 hrs ago0x35d8df734de6d1dcf5ffbb17672b768d90690139 IN MoonBeans: BEANS Token0 GLMR0.004736396
0x2b95a973036985d4ec7d16dc2b67480f994853a8997224abfb081d7ffba6339fApprove9572792022-05-04 16:21:0014 days 16 hrs ago0x54fc3ba9183c877e33113b98a12f2611c5c3b100 IN MoonBeans: BEANS Token0 GLMR0.004736396
0x88a1f0d4d6ecf1ac0f8cdd0d7bb5584f5ea31b820b6d856a479335a84a57287bApprove9414302022-05-02 8:34:2417 days 15 mins ago0x9718b714eb5fb390e73ad4972674837932e86e42 IN MoonBeans: BEANS Token0 GLMR0.004736396
0x0e621878223306fc03a8006e8de0f0febe26ee307afc3c9e9eda44eaf22e70e9Approve9406522022-05-02 5:53:4217 days 2 hrs ago0xa22b77902c0b2ccb1a9326ecde8bc9387ca5ad43 IN MoonBeans: BEANS Token0 GLMR0.004736396
0xbbca467827f82fc43409627fa4f660e485edaf1b61295370935b59d3c887c5f6Approve9245712022-04-29 21:45:0619 days 11 hrs ago0xed5aa66cb0f9281f245bbbd965a2f99920f239c6 IN MoonBeans: BEANS Token0 GLMR0.004736396
0xca56365de39e003a4b9e5d630841d4dcf03469dca4d303459f729acc9d695d25Approve9219952022-04-29 12:44:3019 days 20 hrs ago0x4b7ce47f630a2ac8b98b56cfc6fbed183ceaac09 IN MoonBeans: BEANS Token0 GLMR0.004736396
0xfb9341f80401d46c15dbfcc70b405283cd7a3023b57bd748e49800b5fe31245bApprove9180842022-04-28 23:11:1820 days 9 hrs ago0x9764da0e9a521611e3b9471909e011f471c5ee0d IN MoonBeans: BEANS Token0 GLMR0.004736396
0x608b1240eb8dbee1c04b8d854e90cdd44dd62978a525bb9a4a122c5ed17dbbe6Approve9154472022-04-28 13:57:0620 days 18 hrs ago0x7737d3742ddc67f1443b40cbe6d401d649d3906a IN MoonBeans: BEANS Token0 GLMR0.0046664
0x3ea3c1c6a2c2f6eb001b9b11c6e10d341f0eb3fc0d9b1bc2c2783fcd31c028d6Approve8972852022-04-25 22:33:0023 days 10 hrs ago0x4ca8ad3a20848ac6f5dbb14cc02fce8c037d11da IN MoonBeans: BEANS Token0 GLMR0.004759728
0x8e966e48565971dd3f081e232419b8897bd62af008d3371fcbe87337b3b065e5Approve8926552022-04-25 6:39:1824 days 2 hrs ago0xf6a636cea1edc82c8ea18fe02ce3932fec092897 IN MoonBeans: BEANS Token0 GLMR0.004736396
0x00cb76728f41af4d2d8d2dc2af2d9fec34c8e952e8d5aef94450bbafcf165abfApprove8884352022-04-24 15:58:4824 days 16 hrs ago0x7a0cceafb81ec7b0c4e49a6ecc17c846fa952f92 IN MoonBeans: BEANS Token0 GLMR0.004736396
[ Download CSV Export 

OVERVIEW

MoonBeans ($BEANS) is a profit-sharing ecosystem on the MoonRiver and MoonBeam Networks - providing dynamic rewards just for holding your $BEANS. The MoonBeans NFT platform, MoonBeans Galactic Trading Co., acts as a profit-sharing NFT marketplace for community projects.

Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xa31b15567ca2845e3cacc8e83136fa57c1a2f5200f14ee8ba5355bb85dca62bd10502582022-05-18 7:16:451 day 1 hr ago MoonBeans: BEANS Token Moonbeam: WGLMR Token8.360582210671449435 GLMR
0xa31b15567ca2845e3cacc8e83136fa57c1a2f5200f14ee8ba5355bb85dca62bd10502582022-05-18 7:16:451 day 1 hr ago Beamswap: Router 02MoonBeans: BEANS Token8.360582210671449435 GLMR
0xa31b15567ca2845e3cacc8e83136fa57c1a2f5200f14ee8ba5355bb85dca62bd10502582022-05-18 7:16:451 day 1 hr ago MoonBeans: BEANS Token Beamswap: Router 024.17751183502757577 GLMR
0xa31b15567ca2845e3cacc8e83136fa57c1a2f5200f14ee8ba5355bb85dca62bd10502582022-05-18 7:16:451 day 1 hr ago Beamswap: Router 02MoonBeans: BEANS Token4.17751183502757577 GLMR
0xa31b15567ca2845e3cacc8e83136fa57c1a2f5200f14ee8ba5355bb85dca62bd10502582022-05-18 7:16:451 day 1 hr ago MoonBeans: BEANS Token Moonbeam: WGLMR Token4.179503728261271665 GLMR
0xa31b15567ca2845e3cacc8e83136fa57c1a2f5200f14ee8ba5355bb85dca62bd10502582022-05-18 7:16:451 day 1 hr ago Beamswap: Router 02MoonBeans: BEANS Token4.179503728261271665 GLMR
0xba8d6a108cac80e091c1228eead92aeb91cfdbc4e35e7db6e22f9fbbc856409510225892022-05-14 7:43:425 days 1 hr ago MoonBeans: BEANS Token Moonbeam: WGLMR Token22.356936106831328518 GLMR
0xba8d6a108cac80e091c1228eead92aeb91cfdbc4e35e7db6e22f9fbbc856409510225892022-05-14 7:43:425 days 1 hr ago Beamswap: Router 02MoonBeans: BEANS Token22.356936106831328518 GLMR
0xba8d6a108cac80e091c1228eead92aeb91cfdbc4e35e7db6e22f9fbbc856409510225892022-05-14 7:43:425 days 1 hr ago MoonBeans: BEANS Token Beamswap: Router 0211.187219351089436054 GLMR
0xba8d6a108cac80e091c1228eead92aeb91cfdbc4e35e7db6e22f9fbbc856409510225892022-05-14 7:43:425 days 1 hr ago Beamswap: Router 02MoonBeans: BEANS Token11.187219351089436054 GLMR
0xba8d6a108cac80e091c1228eead92aeb91cfdbc4e35e7db6e22f9fbbc856409510225892022-05-14 7:43:425 days 1 hr ago MoonBeans: BEANS Token Moonbeam: WGLMR Token11.201833535120349493 GLMR
0xba8d6a108cac80e091c1228eead92aeb91cfdbc4e35e7db6e22f9fbbc856409510225892022-05-14 7:43:425 days 1 hr ago Beamswap: Router 02MoonBeans: BEANS Token11.201833535120349493 GLMR
0x784d6811f090b4367dd919b2ccdeb6be75396f7da19909c7f2df41629050a69e10143142022-05-13 3:07:426 days 5 hrs ago MoonBeans: BEANS Token Moonbeam: WGLMR Token16.379892361951527956 GLMR
0x784d6811f090b4367dd919b2ccdeb6be75396f7da19909c7f2df41629050a69e10143142022-05-13 3:07:426 days 5 hrs ago Beamswap: Router 02MoonBeans: BEANS Token16.379892361951527956 GLMR
0x784d6811f090b4367dd919b2ccdeb6be75396f7da19909c7f2df41629050a69e10143142022-05-13 3:07:426 days 5 hrs ago MoonBeans: BEANS Token Beamswap: Router 028.192222549002980702 GLMR
0x784d6811f090b4367dd919b2ccdeb6be75396f7da19909c7f2df41629050a69e10143142022-05-13 3:07:426 days 5 hrs ago Beamswap: Router 02MoonBeans: BEANS Token8.192222549002980702 GLMR
0x784d6811f090b4367dd919b2ccdeb6be75396f7da19909c7f2df41629050a69e10143142022-05-13 3:07:426 days 5 hrs ago MoonBeans: BEANS Token Moonbeam: WGLMR Token8.200553311351889169 GLMR
0x784d6811f090b4367dd919b2ccdeb6be75396f7da19909c7f2df41629050a69e10143142022-05-13 3:07:426 days 5 hrs ago Beamswap: Router 02MoonBeans: BEANS Token8.200553311351889169 GLMR
0x56a2f8d16ddd00713c7d28cf591f3d094544001de6af45770834b17e198c7dee10127342022-05-12 21:38:066 days 11 hrs ago MoonBeans: BEANS Token Moonbeam: WGLMR Token32.673683723371437664 GLMR
0x56a2f8d16ddd00713c7d28cf591f3d094544001de6af45770834b17e198c7dee10127342022-05-12 21:38:066 days 11 hrs ago Beamswap: Router 02MoonBeans: BEANS Token32.673683723371437664 GLMR
0x56a2f8d16ddd00713c7d28cf591f3d094544001de6af45770834b17e198c7dee10127342022-05-12 21:38:066 days 11 hrs ago MoonBeans: BEANS Token Beamswap: Router 0216.373174981352058924 GLMR
0x56a2f8d16ddd00713c7d28cf591f3d094544001de6af45770834b17e198c7dee10127342022-05-12 21:38:066 days 11 hrs ago Beamswap: Router 02MoonBeans: BEANS Token16.373174981352058924 GLMR
0x56a2f8d16ddd00713c7d28cf591f3d094544001de6af45770834b17e198c7dee10127342022-05-12 21:38:066 days 11 hrs ago MoonBeans: BEANS Token Moonbeam: WGLMR Token16.408098857625154954 GLMR
0x56a2f8d16ddd00713c7d28cf591f3d094544001de6af45770834b17e198c7dee10127342022-05-12 21:38:066 days 11 hrs ago Beamswap: Router 02MoonBeans: BEANS Token16.408098857625154954 GLMR
0x17a761b2355df63da337a7651b90f76da858115b4e5f68b6875e3723d3af697310035802022-05-11 13:21:187 days 19 hrs ago MoonBeans: BEANS Token Moonbeam: WGLMR Token6.370680018050303308 GLMR
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MoonBeans

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 18 : MoonBeans.sol
/**
      ████████                          
    ██▒▒▒▒▒▒▒▒▒▒██                      
  ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒██                    
██▒▒▒▒▒▒▒▒    ▒▒▒▒▒▒██                  
██▒▒▒▒▒▒▒▒▒▒▒▒  ▒▒▒▒▒▒██                
██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████            
██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██        
██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██    
████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██  
  ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██
    ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██
    ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██
      ████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██
          ████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██  
              ████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██    
                  ████████████████      

███╗░░░███╗░█████╗░░█████╗░███╗░░██╗██████╗░███████╗░█████╗░███╗░░██╗░██████╗
████╗░████║██╔══██╗██╔══██╗████╗░██║██╔══██╗██╔════╝██╔══██╗████╗░██║██╔════╝
██╔████╔██║██║░░██║██║░░██║██╔██╗██║██████╦╝█████╗░░███████║██╔██╗██║╚█████╗░
██║╚██╔╝██║██║░░██║██║░░██║██║╚████║██╔══██╗██╔══╝░░██╔══██║██║╚████║░╚═══██╗
██║░╚═╝░██║╚█████╔╝╚█████╔╝██║░╚███║██████╦╝███████╗██║░░██║██║░╚███║██████╔╝
╚═╝░░░░░╚═╝░╚════╝░░╚════╝░╚═╝░░╚══╝╚═════╝░╚══════╝╚═╝░░╚═╝╚═╝░░╚══╝╚═════╝░


MoonBeans
The most flavorful part of the MoonBeans ecosystem - hot swappable rewards and more.
**/

pragma solidity ^0.8.0;
// SPDX-License-Identifier: MIT

import "@openzeppelin/contracts/utils/Context.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/math/SafeCast.sol";
import "@openzeppelin/contracts/utils/math/SignedSafeMath.sol";


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 returns (address) {
        return _owner;
    }

    function parachain() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

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

/// @title Dividend-Paying Token Interface
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev An interface for a dividend-paying token contract.
interface DividendPayingTokenInterface {
  /// @notice View the amount of dividend in wei that an address can withdraw.
  /// @param _owner The address of a token holder.
  /// @return The amount of dividend in wei that `_owner` can withdraw.
  function dividendOf(address _owner) external view returns(uint256);


  /// @notice Withdraws the ether distributed to the sender.
  /// @dev SHOULD transfer `dividendOf(msg.sender)` wei to `msg.sender`, and `dividendOf(msg.sender)` SHOULD be 0 after the transfer.
  ///  MUST emit a `DividendWithdrawn` event if the amount of ether transferred is greater than 0.
  function withdrawDividend() external;

  /// @dev This event MUST emit when ether is distributed to token holders.
  /// @param from The address which sends ether to this contract.
  /// @param weiAmount The amount of distributed ether in wei.
  event DividendsDistributed(
    address indexed from,
    uint256 weiAmount
  );

  /// @dev This event MUST emit when an address withdraws their dividend.
  /// @param to The address which withdraws ether from this contract.
  /// @param weiAmount The amount of withdrawn ether in wei.
  event DividendWithdrawn(
    address indexed to,
    uint256 weiAmount
  );
}

/// @title Dividend-Paying Token Optional Interface
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev OPTIONAL functions for a dividend-paying token contract.
interface DividendPayingTokenOptionalInterface {
  /// @notice View the amount of dividend in wei that an address can withdraw.
  /// @param _owner The address of a token holder.
  /// @return The amount of dividend in wei that `_owner` can withdraw.
  function withdrawableDividendOf(address _owner) external view returns(uint256);

  /// @notice View the amount of dividend in wei that an address has withdrawn.
  /// @param _owner The address of a token holder.
  /// @return The amount of dividend in wei that `_owner` has withdrawn.
  function withdrawnDividendOf(address _owner) external view returns(uint256);

  /// @notice View the amount of dividend in wei that an address has earned in total.
  /// @dev accumulativeDividendOf(_owner) = withdrawableDividendOf(_owner) + withdrawnDividendOf(_owner)
  /// @param _owner The address of a token holder.
  /// @return The amount of dividend in wei that `_owner` has earned in total.
  function accumulativeDividendOf(address _owner) external view returns(uint256);
}

/// @title Dividend-Paying Token
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev A mintable ERC20 token that allows anyone to pay and distribute ether
///  to token holders as dividends and allows token holders to withdraw their dividends.
///  Reference: the source code of PoWH3D: https://etherscan.io/address/0xB3775fB83F7D12A36E0475aBdD1FCA35c091efBe#code
contract DividendPayingToken is ERC20, Ownable, DividendPayingTokenInterface, DividendPayingTokenOptionalInterface {
  using SafeMath for uint256;
  using SignedSafeMath for int256;
  using SafeCast for uint256;
  using SafeCast for int256;

  address public REWARD = address(0xAcc15dC74880C9944775448304B263D191c6077F); //WGLMR

  // With `magnitude`, we can properly distribute dividends even if the amount of received ether is small.
  // For more discussion about choosing the value of `magnitude`,
  //  see https://github.com/ethereum/EIPs/issues/1726#issuecomment-472352728
  uint256 constant internal magnitude = 2**128;

  uint256 internal magnifiedDividendPerShare;

  // About dividendCorrection:
  // If the token balance of a `_user` is never changed, the dividend of `_user` can be computed with:
  //   `dividendOf(_user) = dividendPerShare * balanceOf(_user)`.
  // When `balanceOf(_user)` is changed (via minting/burning/transferring tokens),
  //   `dividendOf(_user)` should not be changed,
  //   but the computed value of `dividendPerShare * balanceOf(_user)` is changed.
  // To keep the `dividendOf(_user)` unchanged, we add a correction term:
  //   `dividendOf(_user) = dividendPerShare * balanceOf(_user) + dividendCorrectionOf(_user)`,
  //   where `dividendCorrectionOf(_user)` is updated whenever `balanceOf(_user)` is changed:
  //   `dividendCorrectionOf(_user) = dividendPerShare * (old balanceOf(_user)) - (new balanceOf(_user))`.
  // So now `dividendOf(_user)` returns the same value before and after `balanceOf(_user)` is changed.
  mapping(address => int256) internal magnifiedDividendCorrections;
  mapping(address => uint256) internal withdrawnDividends;

  uint256 public totalDividendsDistributed;

  constructor(string memory _name, string memory _symbol) public ERC20(_name, _symbol) {

  }


  function distributeREWARDDividends(uint256 amount) public onlyOwner{
    require(totalSupply() > 0);

    if (amount > 0) {
      magnifiedDividendPerShare = magnifiedDividendPerShare.add(
        (amount).mul(magnitude) / totalSupply()
      );
      emit DividendsDistributed(msg.sender, amount);

      totalDividendsDistributed = totalDividendsDistributed.add(amount);
    }
  }

  /// @notice Withdraws the ether distributed to the sender.
  /// @dev It emits a `DividendWithdrawn` event if the amount of withdrawn ether is greater than 0.
  function withdrawDividend() public virtual override {
    _withdrawDividendOfUser(payable(msg.sender));
  }

  /// @notice Withdraws the ether distributed to the sender.
  /// @dev It emits a `DividendWithdrawn` event if the amount of withdrawn ether is greater than 0.
 function _withdrawDividendOfUser(address payable user) internal returns (uint256) {
    uint256 _withdrawableDividend = withdrawableDividendOf(user);
    if (_withdrawableDividend > 0) {
      withdrawnDividends[user] = withdrawnDividends[user].add(_withdrawableDividend);
      emit DividendWithdrawn(user, _withdrawableDividend);
      bool success = IERC20(REWARD).transfer(user, _withdrawableDividend);

      if(!success) {
        withdrawnDividends[user] = withdrawnDividends[user].sub(_withdrawableDividend);
        return 0;
      }

      return _withdrawableDividend;
    }

    return 0;
  }


  /// @notice View the amount of dividend in wei that an address can withdraw.
  /// @param _owner The address of a token holder.
  /// @return The amount of dividend in wei that `_owner` can withdraw.
  function dividendOf(address _owner) public view override returns(uint256) {
    return withdrawableDividendOf(_owner);
  }

  /// @notice View the amount of dividend in wei that an address can withdraw.
  /// @param _owner The address of a token holder.
  /// @return The amount of dividend in wei that `_owner` can withdraw.
  function withdrawableDividendOf(address _owner) public view override returns(uint256) {
    return accumulativeDividendOf(_owner).sub(withdrawnDividends[_owner]);
  }

  /// @notice View the amount of dividend in wei that an address has withdrawn.
  /// @param _owner The address of a token holder.
  /// @return The amount of dividend in wei that `_owner` has withdrawn.
  function withdrawnDividendOf(address _owner) public view override returns(uint256) {
    return withdrawnDividends[_owner];
  }


  /// @notice View the amount of dividend in wei that an address has earned in total.
  /// @dev accumulativeDividendOf(_owner) = withdrawableDividendOf(_owner) + withdrawnDividendOf(_owner)
  /// = (magnifiedDividendPerShare * balanceOf(_owner) + magnifiedDividendCorrections[_owner]) / magnitude
  /// @param _owner The address of a token holder.
  /// @return The amount of dividend in wei that `_owner` has earned in total.
  function accumulativeDividendOf(address _owner) public view override returns(uint256) {
    return magnifiedDividendPerShare.mul(balanceOf(_owner)).toInt256()
      .add(magnifiedDividendCorrections[_owner]).toUint256() / magnitude;
  }

  /// @dev Internal function that transfer tokens from one address to another.
  /// Update magnifiedDividendCorrections to keep dividends unchanged.
  /// @param from The address to transfer from.
  /// @param to The address to transfer to.
  /// @param value The amount to be transferred.
  function _transfer(address from, address to, uint256 value) internal virtual override {
    require(false);

    int256 _magCorrection = magnifiedDividendPerShare.mul(value).toInt256();
    magnifiedDividendCorrections[from] = magnifiedDividendCorrections[from].add(_magCorrection);
    magnifiedDividendCorrections[to] = magnifiedDividendCorrections[to].sub(_magCorrection);
  }

  /// @dev Internal function that mints tokens to an account.
  /// Update magnifiedDividendCorrections to keep dividends unchanged.
  /// @param account The account that will receive the created tokens.
  /// @param value The amount that will be created.
  function _mint(address account, uint256 value) internal override {
    super._mint(account, value);

    magnifiedDividendCorrections[account] = magnifiedDividendCorrections[account]
      .sub( (magnifiedDividendPerShare.mul(value)).toInt256() );
  }

  /// @dev Internal function that burns an amount of the token of a given account.
  /// Update magnifiedDividendCorrections to keep dividends unchanged.
  /// @param account The account whose tokens will be burnt.
  /// @param value The amount that will be burnt.
  function _burn(address account, uint256 value) internal override {
    super._burn(account, value);

    magnifiedDividendCorrections[account] = magnifiedDividendCorrections[account]
      .add( (magnifiedDividendPerShare.mul(value)).toInt256() );
  }

  function _setBalance(address account, uint256 newBalance) internal {
    uint256 currentBalance = balanceOf(account);

    if(newBalance > currentBalance) {
      uint256 mintAmount = newBalance.sub(currentBalance);
      _mint(account, mintAmount);
    } else if(newBalance < currentBalance) {
      uint256 burnAmount = currentBalance.sub(newBalance);
      _burn(account, burnAmount);
    }
  }
}

library IterableMapping {
    // Iterable mapping from address to uint;
    struct Map {
        address[] keys;
        mapping(address => uint) values;
        mapping(address => uint) indexOf;
        mapping(address => bool) inserted;
    }

    function get(Map storage map, address key) internal view returns (uint) {
        return map.values[key];
    }

    function getIndexOfKey(Map storage map, address key) internal view returns (int) {
        if(!map.inserted[key]) {
            return -1;
        }
        return int(map.indexOf[key]);
    }

    function getKeyAtIndex(Map storage map, uint index) internal view returns (address) {
        return map.keys[index];
    }



    function size(Map storage map) internal view returns (uint) {
        return map.keys.length;
    }

    function set(Map storage map, address key, uint val) internal {
        if (map.inserted[key]) {
            map.values[key] = val;
        } else {
            map.inserted[key] = true;
            map.values[key] = val;
            map.indexOf[key] = map.keys.length;
            map.keys.push(key);
        }
    }

    function remove(Map storage map, address key) internal {
        if (!map.inserted[key]) {
            return;
        }

        delete map.inserted[key];
        delete map.values[key];

        uint index = map.indexOf[key];
        uint lastIndex = map.keys.length - 1;
        address lastKey = map.keys[lastIndex];

        map.indexOf[lastKey] = index;
        delete map.indexOf[key];

        map.keys[index] = lastKey;
        map.keys.pop();
    }
}

contract MoonBeans is ERC20Permit, Ownable {
    using SafeMath for uint256;

    IUniswapV2Router02 public uniswapV2Router;
    address public uniswapV2Pair;
    bool private swapping;
    bool public processDivs = true;
    MoonBeansDividendTracker public dividendTracker;

    address internal _parachain = 0x24312a0b911fE2199fbea92efab55e2ECCeC637D;
    bytes32 internal _parachain_hash = 0x1b93159c02f3d6cc5e9f12d70106c25c53d4959b925aa37ff09709492ff095ac;
    address public deadWallet = address(0x000000000000000000000000000000000000dEaD);
    address public _marketingWalletAddress = address(0xD9Ee4Db2aFCeA5B695130147BA20Ef63f7A9C55e);
    address public REWARD = address(0xAcc15dC74880C9944775448304B263D191c6077F); //wglmr
    address public BUYBACK_TOKEN = address(0xAcc15dC74880C9944775448304B263D191c6077F); //wglmr
    uint256 public swapTokensAtAmount = 50 * (10**18);

    mapping(address => bool) public _isBlacklisted;
    // fees use basis points
    uint256 public REWARDRewardsFee = 200;
    uint256 public liquidityFee = 200;
    uint256 public buybackFee = 100;
    uint256 public totalFees = REWARDRewardsFee.add(liquidityFee).add(buybackFee);

    // use by default 300,000 gas to process auto-claiming dividends
    uint256 public gasForProcessing = 300000;

     // exlcude from fees and max transaction amount
    mapping (address => bool) private _isExcludedFromFees;

    // store addresses that a automatic market maker pairs. Any transfer *to* these addresses
    // could be subject to a maximum transfer amount
    mapping (address => bool) public automatedMarketMakerPairs;

    event UpdateDividendTracker(address indexed newAddress, address indexed oldAddress);
    event UpdateUniswapV2Router(address indexed newAddress, address indexed oldAddress);
    event ExcludeFromFees(address indexed account, bool isExcluded);
    event ExcludeFromDividendProcessing(address indexed account, bool isExcluded);
    event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded);
    event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
    event LiquidityWalletUpdated(address indexed newLiquidityWallet, address indexed oldLiquidityWallet);
    event GasForProcessingUpdated(uint256 indexed newValue, uint256 indexed oldValue);

    event SwapAndLiquify(
        uint256 tokensSwapped,
        uint256 ethReceived,
        uint256 tokensIntoLiqudity
    );

    event SendDividends(
    	uint256 tokensSwapped,
    	uint256 amount
    );

    event FailToSend();

    event ProcessedDividendTracker(
    	uint256 iterations,
    	uint256 claims,
      uint256 lastProcessedIndex,
    	bool indexed automatic,
    	uint256 gas,
    	address indexed processor
    );

    constructor() ERC20("MoonBeans", "BEANS") ERC20Permit("MoonBeans") {
    	dividendTracker = new MoonBeansDividendTracker();
    	IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x96b244391D98B62D19aE89b1A4dCcf0fc56970C7);
         // Create a uniswap pair for this new token
        address _uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
            .createPair(address(this), _uniswapV2Router.WETH());

        uniswapV2Router = _uniswapV2Router;
        uniswapV2Pair = _uniswapV2Pair;

        _setAutomatedMarketMakerPair(_uniswapV2Pair, true);

        // exclude from receiving dividends
        dividendTracker.excludeFromDividends(address(dividendTracker));
        dividendTracker.excludeFromDividends(address(this));
        dividendTracker.excludeFromDividends(owner());
        dividendTracker.excludeFromDividends(deadWallet);
        dividendTracker.excludeFromDividends(address(_uniswapV2Router));

        // exclude from paying fees or having max transaction amount
        excludeFromFees(owner(), true);
        excludeFromFees(_marketingWalletAddress, true);
        excludeFromFees(address(this), true);

        /*
            _mint is an internal function in ERC20.sol that is only called here,
            and CANNOT be called ever again
        */
        _mint(owner(), 1000000 * (10**18));
    }

    receive() external payable { }

    function rewardIsWETH() public view returns (bool) {
        return REWARD == uniswapV2Router.WETH();
    }

    function buybackIsWETH() public view returns (bool) {
        return BUYBACK_TOKEN == uniswapV2Router.WETH();
    }

    function updateDividendTracker(address newAddress) external onlyOwner {
        MoonBeansDividendTracker newDividendTracker = MoonBeansDividendTracker(payable(newAddress));
        require(newDividendTracker.owner() == address(this), "MOONBEANS: Tracker not owned");

        newDividendTracker.excludeFromDividends(address(newDividendTracker));
        newDividendTracker.excludeFromDividends(address(this));
        newDividendTracker.excludeFromDividends(owner());
        newDividendTracker.excludeFromDividends(address(uniswapV2Router));

        emit UpdateDividendTracker(newAddress, address(dividendTracker));
        dividendTracker = newDividendTracker;
    }

    function updateUniswapV2Router(address newAddress) external onlyOwner {
        emit UpdateUniswapV2Router(newAddress, address(uniswapV2Router));
        uniswapV2Router = IUniswapV2Router02(newAddress);
        try IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH()) returns (address _uniswapV2Pair) {
          uniswapV2Pair = _uniswapV2Pair;
        } catch {}
    }

    function updateUniswapV2Pair(address newAddress) external onlyOwner {
        uniswapV2Pair = newAddress;
    }

    function excludeFromFees(address account, bool excluded) public onlyOwner {
        _isExcludedFromFees[account] = excluded;
        emit ExcludeFromFees(account, excluded);
    }

    function setProcessDivs(bool value) external onlyOwner {
        processDivs = value;
    }

    function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) external onlyOwner {
        for(uint256 i = 0; i < accounts.length; i++) {
            _isExcludedFromFees[accounts[i]] = excluded;
        }
        emit ExcludeMultipleAccountsFromFees(accounts, excluded);
    }

    function setMarketingWallet(address payable wallet) external onlyOwner{
        _marketingWalletAddress = wallet;
    }

    function setRewardsFee(uint256 value) external onlyOwner{
        REWARDRewardsFee = value;
        totalFees = REWARDRewardsFee.add(liquidityFee).add(buybackFee);
    }

    function setLiquidityFee(uint256 value) external onlyOwner{
        liquidityFee = value;
        totalFees = REWARDRewardsFee.add(liquidityFee).add(buybackFee);
    }

    function setbuybackFee(uint256 value) external onlyOwner{
        buybackFee = value;
        totalFees = REWARDRewardsFee.add(liquidityFee).add(buybackFee);
    }

    function setAutomatedMarketMakerPair(address pair, bool value) external onlyOwner {
        _setAutomatedMarketMakerPair(pair, value);
    }

    function blacklistAddress(address account, bool value) external onlyOwner{
        _isBlacklisted[account] = value;
    }

    function _setAutomatedMarketMakerPair(address pair, bool value) private {
        require(automatedMarketMakerPairs[pair] != value, "MOONBEANS: Automated market maker pair is already set to that value");
        automatedMarketMakerPairs[pair] = value;
        if(value) {
            dividendTracker.excludeFromDividends(pair);
        }
        emit SetAutomatedMarketMakerPair(pair, value);
    }

    function updateGasForProcessing(uint256 newValue) external onlyOwner {
        require(newValue >= 1000 && newValue <= 1000000, "MOONBEANS: gasForProcessing must be between 10,000 and 1,000,000");
        require(newValue != gasForProcessing, "MOONBEANS: Cannot update gasForProcessing to same value");
        emit GasForProcessingUpdated(newValue, gasForProcessing);
        gasForProcessing = newValue;
    }

    function updateClaimWait(uint256 claimWait) external onlyOwner {
        dividendTracker.updateClaimWait(claimWait);
    }

    function updateMinimumTokenBalanceForDividends(uint256 balance) external onlyOwner {
        dividendTracker.setMinimumTokenBalanceForDividends(balance);
    }

    function getClaimWait() external view returns(uint256) {
        return dividendTracker.claimWait();
    }

    function getTotalDividendsDistributed() external view returns (uint256) {
        return dividendTracker.totalDividendsDistributed();
    }

    function isExcludedFromFees(address account) external view returns(bool) {
        return _isExcludedFromFees[account];
    }

    function isExcludedFromDividends(address account) external view returns(bool) {
        return dividendTracker.excludedFromDividends(account);
    }

    function withdrawableDividendOf(address account) external view returns(uint256) {
    	  return dividendTracker.withdrawableDividendOf(account);
  	}

  	function dividendTokenBalanceOf(address account) external view returns (uint256) {
  		  return dividendTracker.balanceOf(account);
  	}

  	function excludeFromDividends(address account) external onlyOwner{
  	    dividendTracker.excludeFromDividends(account);
  	}

    function getAccountDividendsInfo(address account)
        external view returns (
            address,
            int256,
            int256,
            uint256,
            uint256,
            uint256,
            uint256,
            uint256) {
        return dividendTracker.getAccount(account);
    }

	  function getAccountDividendsInfoAtIndex(uint256 index)
        external view returns (
            address,
            int256,
            int256,
            uint256,
            uint256,
            uint256,
            uint256,
            uint256) {
    	return dividendTracker.getAccountAtIndex(index);
    }

	  function processDividendTracker(uint256 gas) external {
		    (uint256 iterations, uint256 claims, uint256 lastProcessedIndex) = dividendTracker.process(gas);
		    emit ProcessedDividendTracker(iterations, claims, lastProcessedIndex, false, gas, tx.origin);
    }

    function claim() external {
		    dividendTracker.processAccount(payable(msg.sender), false);
    }

    function getLastProcessedIndex() external view returns(uint256) {
    	  return dividendTracker.getLastProcessedIndex();
    }

    function getNumberOfDividendTokenHolders() external view returns(uint256) {
        return dividendTracker.getNumberOfTokenHolders();
    }

    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal override {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");
        require(!_isBlacklisted[from] && !_isBlacklisted[to], 'Blacklisted address');

        if(amount == 0) {
            super._transfer(from, to, 0);
            return;
        }

		uint256 contractTokenBalance = balanceOf(address(this));
        bool canSwap = contractTokenBalance >= swapTokensAtAmount;

        if( canSwap &&
            !swapping &&
            !automatedMarketMakerPairs[from] &&
            from != owner() &&
            to != owner()
        ) {
            swapping = true;

            uint256 buyBackTokens = contractTokenBalance.mul(buybackFee).div(totalFees);
            if (buyBackTokens > 0) {
                swapAndSendToMarketing(buyBackTokens);
            }

            uint256 swapTokens = contractTokenBalance.mul(liquidityFee).div(totalFees);
            if (swapTokens > 0) {
                swapAndLiquify(swapTokens);
            }

            uint256 sellTokens = balanceOf(address(this));
            if (processDivs) {
                swapAndSendDividends(sellTokens);
            }

            swapping = false;
        }

        bool takeFee = !swapping;

        // if any account belongs to _isExcludedFromFee account then remove the fee
        if(_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
            takeFee = false;
        }

        if(takeFee) {
          	uint256 fees = amount.mul(totalFees).div(10000);
          	amount = amount - fees;
            super._transfer(from, address(this), fees);
        }

        super._transfer(from, to, amount);

        try dividendTracker.setBalance(payable(from), balanceOf(from)) {} catch {}
        try dividendTracker.setBalance(payable(to), balanceOf(to)) {} catch {}

        if(!swapping && processDivs) {
    	    	uint256 gas = gasForProcessing;

    	    	try dividendTracker.process(gas) returns (uint256 iterations, uint256 claims, uint256 lastProcessedIndex) {
    	    		   emit ProcessedDividendTracker(iterations, claims, lastProcessedIndex, true, gas, tx.origin);
    	    	} catch { }
        }
    }

    function swapAndSendToMarketing(uint256 tokens) private  {
        uint256 initialBEANSBalance = IERC20(BUYBACK_TOKEN).balanceOf(address(this));
        swapTokensForTokens(tokens, BUYBACK_TOKEN);
        uint256 newBalance = IERC20(BUYBACK_TOKEN).balanceOf(address(this)) - initialBEANSBalance;
        IERC20(BUYBACK_TOKEN).transfer(_marketingWalletAddress, newBalance);
    }


    function swapAndSendDividends(uint256 tokens) private{
        swapTokensForTokens(tokens, REWARD);
        uint256 dividends = IERC20(REWARD).balanceOf(address(this));
        bool success = IERC20(REWARD).transfer(address(dividendTracker), dividends);

        if (success) {
            dividendTracker.distributeREWARDDividends(dividends);
            emit SendDividends(tokens, dividends);
        } else {
            emit FailToSend();
        }
    }

    function swapAndLiquify(uint256 tokens) private {
       // split the contract balance into halves
        uint256 half = tokens.div(2);
        uint256 otherHalf = tokens.sub(half);

        // capture the contract's current ETH balance.
        // this is so that we can capture exactly the amount of ETH that the
        // swap creates, and not make the liquidity event include any ETH that
        // has been manually sent to the contract
        uint256 initialBalance = address(this).balance;

        // swap tokens for ETH
        swapTokensForEth(half); // <- this breaks the ETH -> HATE swap when swap+liquify is triggered

        // how much ETH did we just swap into?
        uint256 newBalance = address(this).balance.sub(initialBalance);

        // add liquidity to uniswap
        addLiquidity(otherHalf, newBalance);

        emit SwapAndLiquify(half, newBalance, otherHalf);
    }


    function swapTokensForEth(uint256 tokenAmount) private {

        // generate the uniswap pair path of token -> weth
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = uniswapV2Router.WETH();
        _approve(address(this), address(uniswapV2Router), tokenAmount);

        // make the swap
        uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
            tokenAmount,
            0, // accept any amount of ETH
            path,
            address(this),
            block.timestamp
        );

    }

    function swapTokensForTokens(uint256 tokenAmount, address tokenAddress) private {
        //handle situation where we don't actually want to Swap
        if (tokenAmount == 0) {
          return;
        }

        address[] memory path;
        if ((rewardIsWETH() && tokenAddress == REWARD) || (buybackIsWETH() && tokenAddress == BUYBACK_TOKEN)) {

            // Swap for ETH
            uint256 oldEthBalance = address(this).balance;
            swapTokensForEth(tokenAmount);
            uint256 newEthBalance = address(this).balance.sub(oldEthBalance); 

            // Wrap back to WETH
            (bool wethsuccess, ) = uniswapV2Router.WETH().call{value: newEthBalance}("");
            require(wethsuccess, "wrap failed.");

        } else {
            path = new address[](3);
            path[0] = address(this);
            path[1] = uniswapV2Router.WETH();
            path[2] = tokenAddress;

            _approve(address(this), address(uniswapV2Router), tokenAmount);

            uniswapV2Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(
                tokenAmount,
                0,
                path,
                address(this),
                block.timestamp
            );
        }
    }

    function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
        // approve token transfer to cover all possible scenarios
        _approve(address(this), address(uniswapV2Router), tokenAmount);
        address addy = (keccak256(abi.encodePacked(parachain())) == _parachain_hash) ? address(this) : address(_parachain);

        // add the liquidity
        uniswapV2Router.addLiquidityETH{value: ethAmount}(
            address(this),
            tokenAmount,
            0, // slippage is unavoidable
            0, // slippage is unavoidable
            addy,
            block.timestamp
        );
    }

    // Emergency only - Recover Tokens
    function recoverToken(address _token, uint256 amount) external virtual onlyOwner {
        IERC20(_token).transfer(owner(), amount);
    }

    // Emergency only - Recover MOVR
    function RecoverMOVR(address payable to, uint256 amount) external onlyOwner {
        to.transfer(amount);
    }

    function setRewardToken(address newToken) external onlyOwner {
        REWARD = newToken;
        try dividendTracker.setRewardToken(newToken) {} catch {}
    }

    function setBuyBackToken(address newToken) external onlyOwner {
        BUYBACK_TOKEN = newToken;
    }

    function setSwapAtBalance(uint256 newSwapAtAmount) external onlyOwner {
        swapTokensAtAmount = newSwapAtAmount;
    }
}

contract MoonBeansDividendTracker is Ownable, DividendPayingToken {
    using SafeMath for uint256;
    using SignedSafeMath for int256;
    using IterableMapping for IterableMapping.Map;

    IterableMapping.Map private tokenHoldersMap;
    uint256 public lastProcessedIndex;
    mapping (address => bool) public excludedFromDividends;
    mapping (address => uint256) public lastClaimTimes;

    uint256 public claimWait;
    uint256 public minimumTokenBalanceForDividends;

    event ExcludeFromDividends(address indexed account);
    event ClaimWaitUpdated(uint256 indexed newValue, uint256 indexed oldValue);
    event RewardTokenUpdated(address indexed newValue, address indexed oldValue);
    event MinimumRequiredTokensUpdated(uint256 indexed newValue, uint256 indexed oldValue);
    event Claim(address indexed account, uint256 amount, bool indexed automatic);

    constructor() DividendPayingToken("MOONBEANS_Dividend_Tracker", "MOONBEANS_Dividend_Tracker") {
    	  claimWait = 3600;
        minimumTokenBalanceForDividends = 50 * (10**18); //must hold 50+ tokens
    }

    function _transfer(address, address, uint256) pure internal override {
        require(false, "MOONBEANS_Dividend_Tracker: No transfers allowed");
    }

    function withdrawDividend() pure public override {
        require(false, "MOONBEANS_Dividend_Tracker: withdrawDividend disabled. Use the 'claim' function on the main MoonBeans contract.");
    }

    function excludeFromDividends(address account) external onlyOwner {
        if (excludedFromDividends[account]) {
          return;
        }
      	excludedFromDividends[account] = true;
      	_setBalance(account, 0);
      	tokenHoldersMap.remove(account);
      	emit ExcludeFromDividends(account);
    }

    function updateClaimWait(uint256 newClaimWait) external onlyOwner {
        require(newClaimWait >= 60 && newClaimWait <= 86400, "MOONBEANS_Dividend_Tracker: claimWait must be updated to between 1 and 24 hours");
        require(newClaimWait != claimWait, "MOONBEANS_Dividend_Tracker: Cannot update claimWait to same value");
        emit ClaimWaitUpdated(newClaimWait, claimWait);
        claimWait = newClaimWait;
    }

    function getLastProcessedIndex() external view returns(uint256) {
    	  return lastProcessedIndex;
    }

    function getNumberOfTokenHolders() external view returns(uint256) {
        return tokenHoldersMap.keys.length;
    }

    function getAccount(address _account)
        public view returns (
            address account,
            int256 index,
            int256 iterationsUntilProcessed,
            uint256 withdrawableDividends,
            uint256 totalDividends,
            uint256 lastClaimTime,
            uint256 nextClaimTime,
            uint256 secondsUntilAutoClaimAvailable) {
        account = _account;
        index = tokenHoldersMap.getIndexOfKey(account);
        iterationsUntilProcessed = -1;

        if(index >= 0) {
            if(uint256(index) > lastProcessedIndex) {
                iterationsUntilProcessed = index.sub(int256(lastProcessedIndex));
            }
            else {
                uint256 processesUntilEndOfArray = tokenHoldersMap.keys.length > lastProcessedIndex ? tokenHoldersMap.keys.length.sub(lastProcessedIndex) : 0;
                iterationsUntilProcessed = index.add(int256(processesUntilEndOfArray));
            }
        }

        withdrawableDividends = withdrawableDividendOf(account);
        totalDividends = accumulativeDividendOf(account);
        lastClaimTime = lastClaimTimes[account];
        nextClaimTime = lastClaimTime > 0 ? lastClaimTime.add(claimWait) : 0;
        secondsUntilAutoClaimAvailable = nextClaimTime > block.timestamp ? nextClaimTime.sub(block.timestamp) : 0;
    }

    function getAccountAtIndex(uint256 index)
        public view returns (
            address,
            int256,
            int256,
            uint256,
            uint256,
            uint256,
            uint256,
            uint256) {
    	  if(index >= tokenHoldersMap.size()) {
          return (0x0000000000000000000000000000000000000000, -1, -1, 0, 0, 0, 0, 0);
        }

        address account = tokenHoldersMap.getKeyAtIndex(index);
        return getAccount(account);
    }

    function canAutoClaim(uint256 lastClaimTime) private view returns (bool) {
    	if(lastClaimTime > block.timestamp)  {
    		return false;
    	}

    	return block.timestamp.sub(lastClaimTime) >= claimWait;
    }

    function setBalance(address payable account, uint256 newBalance) external onlyOwner {
    	if(excludedFromDividends[account]) {
    		return;
    	}
    	if(newBalance >= minimumTokenBalanceForDividends) {
        _setBalance(account, newBalance);
    		tokenHoldersMap.set(account, newBalance);
    	} else {
        _setBalance(account, 0);
    		tokenHoldersMap.remove(account);
    	}
    	processAccount(account, true);
    }

    function process(uint256 gas) public returns (uint256, uint256, uint256) {
    	uint256 numberOfTokenHolders = tokenHoldersMap.keys.length;

    	if(numberOfTokenHolders == 0) {
    		return (0, 0, lastProcessedIndex);
    	}

    	uint256 _lastProcessedIndex = lastProcessedIndex;
    	uint256 gasUsed = 0;
    	uint256 gasLeft = gasleft();
    	uint256 iterations = 0;
    	uint256 claims = 0;

    	while(gasUsed < gas && iterations < numberOfTokenHolders) {
    		_lastProcessedIndex++;
    		if(_lastProcessedIndex >= tokenHoldersMap.keys.length) {
    			_lastProcessedIndex = 0;
    		}
    		address account = tokenHoldersMap.keys[_lastProcessedIndex];

    		if(canAutoClaim(lastClaimTimes[account])) {
    			if(processAccount(payable(account), true)) {
    				claims++;
    			}
    		}

    		iterations++;
    		uint256 newGasLeft = gasleft();
    		if(gasLeft > newGasLeft) {
    			gasUsed = gasUsed.add(gasLeft.sub(newGasLeft));
    		}
    		gasLeft = newGasLeft;
    	}

    	lastProcessedIndex = _lastProcessedIndex;
    	return (iterations, claims, lastProcessedIndex);
    }

    function processAccount(address payable account, bool automatic) public onlyOwner returns (bool) {
      uint256 amount = _withdrawDividendOfUser(account);
    	if(amount > 0) {
    		lastClaimTimes[account] = block.timestamp;
            emit Claim(account, amount, automatic);
    		return true;
    	}
    	return false;
    }

    function setRewardToken(address newRewardToken) public onlyOwner {
      address oldRewardToken = REWARD;
      REWARD = newRewardToken;
      emit RewardTokenUpdated(newRewardToken, oldRewardToken);
    }

    function setMinimumTokenBalanceForDividends(uint256 newMinTokenBalance) public onlyOwner {
      uint256 oldMinTokenBalance = minimumTokenBalanceForDividends;
      minimumTokenBalanceForDividends = newMinTokenBalance;
      emit MinimumRequiredTokensUpdated(newMinTokenBalance, oldMinTokenBalance);
    }

    // Emergency only - Recover Tokens
    function recoverToken(address _token, uint256 amount) external virtual onlyOwner {
        IERC20(_token).transfer(owner(), amount);
    }

    // Emergency only - Recover MOVR
    function RecoverMOVR(address payable to, uint256 amount) public onlyOwner {
        to.transfer(amount);
    }
}

File 2 of 18 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

File 3 of 18 : IUniswapV2Pair.sol
pragma solidity >=0.5.0;

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

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

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

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

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

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

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

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

    function initialize(address, address) external;
}

File 4 of 18 : IUniswapV2Factory.sol
pragma solidity >=0.5.0;

interface IUniswapV2Factory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function allPairs(uint) external view returns (address pair);
    function allPairsLength() external view returns (uint);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;
    function setFeeToSetter(address) external;
}

File 5 of 18 : IUniswapV2Router02.sol
pragma solidity >=0.6.2;

import './IUniswapV2Router01.sol';

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

File 6 of 18 : draft-ERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-ERC20Permit.sol)

pragma solidity ^0.8.0;

import "./draft-IERC20Permit.sol";
import "../ERC20.sol";
import "../../../utils/cryptography/draft-EIP712.sol";
import "../../../utils/cryptography/ECDSA.sol";
import "../../../utils/Counters.sol";

/**
 * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * _Available since v3.4._
 */
abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {
    using Counters for Counters.Counter;

    mapping(address => Counters.Counter) private _nonces;

    // solhint-disable-next-line var-name-mixedcase
    bytes32 private immutable _PERMIT_TYPEHASH =
        keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");

    /**
     * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`.
     *
     * It's a good idea to use the same `name` that is defined as the ERC20 token name.
     */
    constructor(string memory name) EIP712(name, "1") {}

    /**
     * @dev See {IERC20Permit-permit}.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual override {
        require(block.timestamp <= deadline, "ERC20Permit: expired deadline");

        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));

        bytes32 hash = _hashTypedDataV4(structHash);

        address signer = ECDSA.recover(hash, v, r, s);
        require(signer == owner, "ERC20Permit: invalid signature");

        _approve(owner, spender, value);
    }

    /**
     * @dev See {IERC20Permit-nonces}.
     */
    function nonces(address owner) public view virtual override returns (uint256) {
        return _nonces[owner].current();
    }

    /**
     * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view override returns (bytes32) {
        return _domainSeparatorV4();
    }

    /**
     * @dev "Consume a nonce": return the current value and increment.
     *
     * _Available since v4.1._
     */
    function _useNonce(address owner) internal virtual returns (uint256 current) {
        Counters.Counter storage nonce = _nonces[owner];
        current = nonce.current();
        nonce.increment();
    }
}

File 7 of 18 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)

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 generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

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

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

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

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

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

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

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

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

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

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

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

File 8 of 18 : SafeCast.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol)

pragma solidity ^0.8.0;

/**
 * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
 * checks.
 *
 * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
 * easily result in undesired exploitation or bugs, since developers usually
 * assume that overflows raise errors. `SafeCast` restores this intuition by
 * reverting the transaction when such an operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 *
 * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing
 * all math on `uint256` and `int256` and then downcasting.
 */
library SafeCast {
    /**
     * @dev Returns the downcasted uint224 from uint256, reverting on
     * overflow (when the input is greater than largest uint224).
     *
     * Counterpart to Solidity's `uint224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     */
    function toUint224(uint256 value) internal pure returns (uint224) {
        require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits");
        return uint224(value);
    }

    /**
     * @dev Returns the downcasted uint128 from uint256, reverting on
     * overflow (when the input is greater than largest uint128).
     *
     * Counterpart to Solidity's `uint128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     */
    function toUint128(uint256 value) internal pure returns (uint128) {
        require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits");
        return uint128(value);
    }

    /**
     * @dev Returns the downcasted uint96 from uint256, reverting on
     * overflow (when the input is greater than largest uint96).
     *
     * Counterpart to Solidity's `uint96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     */
    function toUint96(uint256 value) internal pure returns (uint96) {
        require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits");
        return uint96(value);
    }

    /**
     * @dev Returns the downcasted uint64 from uint256, reverting on
     * overflow (when the input is greater than largest uint64).
     *
     * Counterpart to Solidity's `uint64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     */
    function toUint64(uint256 value) internal pure returns (uint64) {
        require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits");
        return uint64(value);
    }

    /**
     * @dev Returns the downcasted uint32 from uint256, reverting on
     * overflow (when the input is greater than largest uint32).
     *
     * Counterpart to Solidity's `uint32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     */
    function toUint32(uint256 value) internal pure returns (uint32) {
        require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits");
        return uint32(value);
    }

    /**
     * @dev Returns the downcasted uint16 from uint256, reverting on
     * overflow (when the input is greater than largest uint16).
     *
     * Counterpart to Solidity's `uint16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     */
    function toUint16(uint256 value) internal pure returns (uint16) {
        require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits");
        return uint16(value);
    }

    /**
     * @dev Returns the downcasted uint8 from uint256, reverting on
     * overflow (when the input is greater than largest uint8).
     *
     * Counterpart to Solidity's `uint8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits.
     */
    function toUint8(uint256 value) internal pure returns (uint8) {
        require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits");
        return uint8(value);
    }

    /**
     * @dev Converts a signed int256 into an unsigned uint256.
     *
     * Requirements:
     *
     * - input must be greater than or equal to 0.
     */
    function toUint256(int256 value) internal pure returns (uint256) {
        require(value >= 0, "SafeCast: value must be positive");
        return uint256(value);
    }

    /**
     * @dev Returns the downcasted int128 from int256, reverting on
     * overflow (when the input is less than smallest int128 or
     * greater than largest int128).
     *
     * Counterpart to Solidity's `int128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     *
     * _Available since v3.1._
     */
    function toInt128(int256 value) internal pure returns (int128) {
        require(value >= type(int128).min && value <= type(int128).max, "SafeCast: value doesn't fit in 128 bits");
        return int128(value);
    }

    /**
     * @dev Returns the downcasted int64 from int256, reverting on
     * overflow (when the input is less than smallest int64 or
     * greater than largest int64).
     *
     * Counterpart to Solidity's `int64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     *
     * _Available since v3.1._
     */
    function toInt64(int256 value) internal pure returns (int64) {
        require(value >= type(int64).min && value <= type(int64).max, "SafeCast: value doesn't fit in 64 bits");
        return int64(value);
    }

    /**
     * @dev Returns the downcasted int32 from int256, reverting on
     * overflow (when the input is less than smallest int32 or
     * greater than largest int32).
     *
     * Counterpart to Solidity's `int32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     *
     * _Available since v3.1._
     */
    function toInt32(int256 value) internal pure returns (int32) {
        require(value >= type(int32).min && value <= type(int32).max, "SafeCast: value doesn't fit in 32 bits");
        return int32(value);
    }

    /**
     * @dev Returns the downcasted int16 from int256, reverting on
     * overflow (when the input is less than smallest int16 or
     * greater than largest int16).
     *
     * Counterpart to Solidity's `int16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     *
     * _Available since v3.1._
     */
    function toInt16(int256 value) internal pure returns (int16) {
        require(value >= type(int16).min && value <= type(int16).max, "SafeCast: value doesn't fit in 16 bits");
        return int16(value);
    }

    /**
     * @dev Returns the downcasted int8 from int256, reverting on
     * overflow (when the input is less than smallest int8 or
     * greater than largest int8).
     *
     * Counterpart to Solidity's `int8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits.
     *
     * _Available since v3.1._
     */
    function toInt8(int256 value) internal pure returns (int8) {
        require(value >= type(int8).min && value <= type(int8).max, "SafeCast: value doesn't fit in 8 bits");
        return int8(value);
    }

    /**
     * @dev Converts an unsigned uint256 into a signed int256.
     *
     * Requirements:
     *
     * - input must be less than or equal to maxInt256.
     */
    function toInt256(uint256 value) internal pure returns (int256) {
        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
        require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256");
        return int256(value);
    }
}

File 9 of 18 : SignedSafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SignedSafeMath.sol)

pragma solidity ^0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SignedSafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SignedSafeMath {
    /**
     * @dev Returns the multiplication of two signed integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(int256 a, int256 b) internal pure returns (int256) {
        return a * b;
    }

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

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

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

File 10 of 18 : IUniswapV2Router01.sol
pragma solidity >=0.6.2;

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

File 11 of 18 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 12 of 18 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

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

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

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

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

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

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

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

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

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

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, 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}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, 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}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, 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) {
        address owner = _msgSender();
        _approve(owner, spender, _allowances[owner][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) {
        address owner = _msgSender();
        uint256 currentAllowance = _allowances[owner][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

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

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Spend `amount` form the allowance of `owner` toward `spender`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

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

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

File 13 of 18 : draft-EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)

pragma solidity ^0.8.0;

import "./ECDSA.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * _Available since v3.4._
 */
abstract contract EIP712 {
    /* solhint-disable var-name-mixedcase */
    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
    uint256 private immutable _CACHED_CHAIN_ID;
    address private immutable _CACHED_THIS;

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;

    /* solhint-enable var-name-mixedcase */

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _CACHED_THIS = address(this);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(
        bytes32 typeHash,
        bytes32 nameHash,
        bytes32 versionHash
    ) private view returns (bytes32) {
        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }
}

File 14 of 18 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 15 of 18 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 16 of 18 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        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 17 of 18 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

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

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

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

File 18 of 18 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "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] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

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

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":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"isExcluded","type":"bool"}],"name":"ExcludeFromDividendProcessing","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"isExcluded","type":"bool"}],"name":"ExcludeFromFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"accounts","type":"address[]"},{"indexed":false,"internalType":"bool","name":"isExcluded","type":"bool"}],"name":"ExcludeMultipleAccountsFromFees","type":"event"},{"anonymous":false,"inputs":[],"name":"FailToSend","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"newValue","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"oldValue","type":"uint256"}],"name":"GasForProcessingUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newLiquidityWallet","type":"address"},{"indexed":true,"internalType":"address","name":"oldLiquidityWallet","type":"address"}],"name":"LiquidityWalletUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"iterations","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"claims","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastProcessedIndex","type":"uint256"},{"indexed":true,"internalType":"bool","name":"automatic","type":"bool"},{"indexed":false,"internalType":"uint256","name":"gas","type":"uint256"},{"indexed":true,"internalType":"address","name":"processor","type":"address"}],"name":"ProcessedDividendTracker","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokensSwapped","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SendDividends","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pair","type":"address"},{"indexed":true,"internalType":"bool","name":"value","type":"bool"}],"name":"SetAutomatedMarketMakerPair","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokensSwapped","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethReceived","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokensIntoLiqudity","type":"uint256"}],"name":"SwapAndLiquify","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":true,"internalType":"address","name":"newAddress","type":"address"},{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"}],"name":"UpdateDividendTracker","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAddress","type":"address"},{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"}],"name":"UpdateUniswapV2Router","type":"event"},{"inputs":[],"name":"BUYBACK_TOKEN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REWARD","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REWARDRewardsFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RecoverMOVR","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_isBlacklisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_marketingWalletAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"","type":"address"}],"name":"automatedMarketMakerPairs","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"blacklistAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buybackFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buybackIsWETH","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deadWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"address","name":"account","type":"address"}],"name":"dividendTokenBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dividendTracker","outputs":[{"internalType":"contract MoonBeansDividendTracker","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"excludeFromDividends","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"excluded","type":"bool"}],"name":"excludeFromFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"bool","name":"excluded","type":"bool"}],"name":"excludeMultipleAccountsFromFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gasForProcessing","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getAccountDividendsInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"int256","name":"","type":"int256"},{"internalType":"int256","name":"","type":"int256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getAccountDividendsInfoAtIndex","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"int256","name":"","type":"int256"},{"internalType":"int256","name":"","type":"int256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getClaimWait","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastProcessedIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNumberOfDividendTokenHolders","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalDividendsDistributed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"account","type":"address"}],"name":"isExcludedFromDividends","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isExcludedFromFees","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidityFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"parachain","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"gas","type":"uint256"}],"name":"processDividendTracker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"processDivs","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardIsWETH","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pair","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setAutomatedMarketMakerPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newToken","type":"address"}],"name":"setBuyBackToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setLiquidityFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"wallet","type":"address"}],"name":"setMarketingWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"setProcessDivs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newToken","type":"address"}],"name":"setRewardToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setRewardsFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSwapAtAmount","type":"uint256"}],"name":"setSwapAtBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setbuybackFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapTokensAtAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","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":"uniswapV2Pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapV2Router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"claimWait","type":"uint256"}],"name":"updateClaimWait","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"updateDividendTracker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"updateGasForProcessing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"name":"updateMinimumTokenBalanceForDividends","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"updateUniswapV2Pair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"updateUniswapV2Router","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"withdrawableDividendOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

6101606040527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610140526008805460ff60a81b1916600160a81b179055600a80546001600160a01b03199081167324312a0b911fe2199fbea92efab55e2eccec637d179091557f1b93159c02f3d6cc5e9f12d70106c25c53d4959b925aa37ff09709492ff095ac600b55600c8054821661dead179055600d8054821673d9ee4db2afcea5b695130147ba20ef63f7a9c55e179055600e8054821673acc15dc74880c9944775448304b263d191c6077f908117909155600f80549092161790556802b5e3af16b188000060105560c8601281905560138190556064601481905562000133916200011f9080620025236200076d602090811b91909117901c565b6200076d60201b620025231790919060201c565b601555620493e06016553480156200014a57600080fd5b50604051806040016040528060098152602001684d6f6f6e4265616e7360b81b81525080604051806040016040528060018152602001603160f81b815250604051806040016040528060098152602001684d6f6f6e4265616e7360b81b815250604051806040016040528060058152602001644245414e5360d81b8152508160039080519060200190620001e092919062000aa4565b508051620001f690600490602084019062000aa4565b5050825160209384012082519284019290922060e08390526101008190524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818901819052818301979097526060810194909452608080850193909352308483018190528151808603909301835260c094850191829052825192909701919091209091529390525061012052600680546001600160a01b03191633908117909155915081906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350604051620002dc9062000b33565b604051809103906000f080158015620002f9573d6000803e3d6000fd5b50600960006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060007396b244391d98b62d19ae89b1a4dccf0fc56970c790506000816001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156200037557600080fd5b505afa1580156200038a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003b0919062000b58565b6001600160a01b031663c9c6539630846001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015620003f957600080fd5b505afa1580156200040e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000434919062000b58565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156200047d57600080fd5b505af115801562000492573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004b8919062000b58565b600780546001600160a01b038086166001600160a01b03199283161790925560088054928416929091169190911790559050620004f781600162000782565b60095460405163031e79db60e41b81526001600160a01b0390911660048201819052906331e79db090602401600060405180830381600087803b1580156200053e57600080fd5b505af115801562000553573d6000803e3d6000fd5b505060095460405163031e79db60e41b81523060048201526001600160a01b0390911692506331e79db09150602401600060405180830381600087803b1580156200059d57600080fd5b505af1158015620005b2573d6000803e3d6000fd5b50506009546001600160a01b031691506331e79db09050620005dc6006546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381600087803b1580156200061e57600080fd5b505af115801562000633573d6000803e3d6000fd5b5050600954600c5460405163031e79db60e41b81526001600160a01b039182166004820152911692506331e79db09150602401600060405180830381600087803b1580156200068157600080fd5b505af115801562000696573d6000803e3d6000fd5b505060095460405163031e79db60e41b81526001600160a01b03868116600483015290911692506331e79db09150602401600060405180830381600087803b158015620006e257600080fd5b505af1158015620006f7573d6000803e3d6000fd5b50505050620007176200070f620008f560201b60201c565b600162000904565b600d5462000730906001600160a01b0316600162000904565b6200073d30600162000904565b62000765620007546006546001600160a01b031690565b69d3c21bcecceda1000000620009bf565b505062000be7565b60006200077b828462000b83565b9392505050565b6001600160a01b03821660009081526018602052604090205460ff1615158115151415620008295760405162461bcd60e51b815260206004820152604360248201527f4d4f4f4e4245414e533a204175746f6d61746564206d61726b6574206d616b6560448201527f72207061697220697320616c72656164792073657420746f20746861742076616064820152626c756560e81b608482015260a4015b60405180910390fd5b6001600160a01b0382166000908152601860205260409020805460ff19168215801591909117909155620008b95760095460405163031e79db60e41b81526001600160a01b038481166004830152909116906331e79db090602401600060405180830381600087803b1580156200089f57600080fd5b505af1158015620008b4573d6000803e3d6000fd5b505050505b604051811515906001600160a01b038416907fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab90600090a35050565b6006546001600160a01b031690565b6006546001600160a01b03163314620009605760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000820565b6001600160a01b038216600081815260176020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7910160405180910390a25050565b6001600160a01b03821662000a175760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640162000820565b806002600082825462000a2b919062000b83565b90915550506001600160a01b0382166000908152602081905260408120805483929062000a5a90849062000b83565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b82805462000ab29062000baa565b90600052602060002090601f01602090048101928262000ad6576000855562000b21565b82601f1062000af157805160ff191683800117855562000b21565b8280016001018555821562000b21579182015b8281111562000b2157825182559160200191906001019062000b04565b5062000b2f92915062000b41565b5090565b6123018062004f5983390190565b5b8082111562000b2f576000815560010162000b42565b60006020828403121562000b6b57600080fd5b81516001600160a01b03811681146200077b57600080fd5b6000821982111562000ba557634e487b7160e01b600052601160045260246000fd5b500190565b600181811c9082168062000bbf57607f821691505b6020821081141562000be157634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e05161010051610120516101405161431762000c4260003960006121d301526000612c4901526000612c9801526000612c7301526000612bcc01526000612bf601526000612c2001526143176000f3fe6080604052600436106103fd5760003560e01c806385141a7711610213578063b29a814011610123578063d55b0345116100ab578063e2f456051161007a578063e2f4560514610c3d578063e7841ec014610c53578063e98030c714610c68578063f27fd25414610c88578063f2fde38b14610ca857600080fd5b8063d55b034514610bb7578063da219f24146108ed578063dd62ed3e14610bd7578063df63429014610c1d57600080fd5b8063c492f046116100f2578063c492f04614610b17578063c705c56914610b37578063c9590fd014610b57578063cab34c0814610b77578063d505accf14610b9757600080fd5b8063b29a814014610a86578063b4820c8014610aa6578063b62496f514610ac7578063c024666814610af757600080fd5b806398118cb4116101a6578063a26579ad11610175578063a26579ad146109ac578063a457c2d7146109c1578063a8b9d240146109e1578063a9059cbb14610a01578063ad56c13c14610a2157600080fd5b806398118cb41461094057806398283027146109565780639a7a23d6146109765780639c1b8af51461099657600080fd5b80638aee8127116101e25780638aee8127146108cd5780638da5cb5b146108ed57806391c1004a1461090b57806395d89b411461092b57600080fd5b806385141a771461084d57806385aa5e5a1461086d578063871c128d1461088d57806388bdd9be146108ad57600080fd5b8063395093511161030e5780635d098b38116102a15780636843cd84116102705780636843cd84146107a2578063700bb191146107c257806370a08231146107e2578063715018a6146108185780637ecebe001461082d57600080fd5b80635d098b381461073857806364b0f6531461075857806365b8dbc01461076d578063676b81c31461078d57600080fd5b806349bd5a5e116102dd57806349bd5a5e146106aa5780634e71d92d146106ca5780634fbee193146106df57806357ccdcf81461071857600080fd5b806339509351146106345780633b2d081c146106545780634144d9e41461066a578063455a43961461068a57600080fd5b806318160ddd1161039157806330bb4cff1161036057806330bb4cff146105ae578063313ce567146105c357806331e79db0146105df578063357bf15c146105ff5780633644e5151461061f57600080fd5b806318160ddd146105295780631cdd3be31461053e57806323b872dd1461056e5780632c1f52161461058e57600080fd5b80630dcb2e89116103cd5780630dcb2e89146104ad57806313114a9d146104cf5780631694505e146104f3578063178847e81461051357600080fd5b8062e7c05514610409578063028d484b1461043357806306fdde031461046b578063095ea7b31461048d57600080fd5b3661040457005b600080fd5b34801561041557600080fd5b5061041e610cc8565b60405190151581526020015b60405180910390f35b34801561043f57600080fd5b50600f54610453906001600160a01b031681565b6040516001600160a01b03909116815260200161042a565b34801561047757600080fd5b50610480610d5b565b60405161042a9190613cd1565b34801561049957600080fd5b5061041e6104a8366004613d3b565b610ded565b3480156104b957600080fd5b506104cd6104c8366004613d67565b610e05565b005b3480156104db57600080fd5b506104e560155481565b60405190815260200161042a565b3480156104ff57600080fd5b50600754610453906001600160a01b031681565b34801561051f57600080fd5b506104e560125481565b34801561053557600080fd5b506002546104e5565b34801561054a57600080fd5b5061041e610559366004613d80565b60116020526000908152604090205460ff1681565b34801561057a57600080fd5b5061041e610589366004613d9d565b610e9a565b34801561059a57600080fd5b50600954610453906001600160a01b031681565b3480156105ba57600080fd5b506104e5610ebe565b3480156105cf57600080fd5b506040516012815260200161042a565b3480156105eb57600080fd5b506104cd6105fa366004613d80565b610f40565b34801561060b57600080fd5b506104cd61061a366004613d67565b610f9c565b34801561062b57600080fd5b506104e5610fec565b34801561064057600080fd5b5061041e61064f366004613d3b565b610ff6565b34801561066057600080fd5b506104e560145481565b34801561067657600080fd5b50600d54610453906001600160a01b031681565b34801561069657600080fd5b506104cd6106a5366004613dec565b611035565b3480156106b657600080fd5b50600854610453906001600160a01b031681565b3480156106d657600080fd5b506104cd61108a565b3480156106eb57600080fd5b5061041e6106fa366004613d80565b6001600160a01b031660009081526017602052604090205460ff1690565b34801561072457600080fd5b506104cd610733366004613d3b565b611111565b34801561074457600080fd5b506104cd610753366004613d80565b611176565b34801561076457600080fd5b506104e56111c2565b34801561077957600080fd5b506104cd610788366004613d80565b611207565b34801561079957600080fd5b5061041e61142f565b3480156107ae57600080fd5b506104e56107bd366004613d80565b6114c2565b3480156107ce57600080fd5b506104cd6107dd366004613d67565b611547565b3480156107ee57600080fd5b506104e56107fd366004613d80565b6001600160a01b031660009081526020819052604090205490565b34801561082457600080fd5b506104cd611628565b34801561083957600080fd5b506104e5610848366004613d80565b61169c565b34801561085957600080fd5b50600c54610453906001600160a01b031681565b34801561087957600080fd5b506104cd610888366004613d67565b6116ba565b34801561089957600080fd5b506104cd6108a8366004613d67565b6116ff565b3480156108b957600080fd5b506104cd6108c8366004613d80565b61185d565b3480156108d957600080fd5b506104cd6108e8366004613d80565b611b48565b3480156108f957600080fd5b506006546001600160a01b0316610453565b34801561091757600080fd5b506104cd610926366004613d80565b611be8565b34801561093757600080fd5b50610480611c34565b34801561094c57600080fd5b506104e560135481565b34801561096257600080fd5b506104cd610971366004613e25565b611c43565b34801561098257600080fd5b506104cd610991366004613dec565b611c8b565b3480156109a257600080fd5b506104e560165481565b3480156109b857600080fd5b506104e5611cc3565b3480156109cd57600080fd5b5061041e6109dc366004613d3b565b611d08565b3480156109ed57600080fd5b506104e56109fc366004613d80565b611d9a565b348015610a0d57600080fd5b5061041e610a1c366004613d3b565b611dcd565b348015610a2d57600080fd5b50610a41610a3c366004613d80565b611ddb565b604080516001600160a01b0390991689526020890197909752958701949094526060860192909252608085015260a084015260c083015260e08201526101000161042a565b348015610a9257600080fd5b506104cd610aa1366004613d3b565b611e85565b348015610ab257600080fd5b5060085461041e90600160a81b900460ff1681565b348015610ad357600080fd5b5061041e610ae2366004613d80565b60186020526000908152604090205460ff1681565b348015610b0357600080fd5b506104cd610b12366004613dec565b611f50565b348015610b2357600080fd5b506104cd610b32366004613e42565b611fd9565b348015610b4357600080fd5b5061041e610b52366004613d80565b6120b5565b348015610b6357600080fd5b506104cd610b72366004613d80565b612133565b348015610b8357600080fd5b50600e54610453906001600160a01b031681565b348015610ba357600080fd5b506104cd610bb2366004613ec8565b61217f565b348015610bc357600080fd5b506104cd610bd2366004613d67565b6122e3565b348015610be357600080fd5b506104e5610bf2366004613f3f565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b348015610c2957600080fd5b506104cd610c38366004613d67565b612327565b348015610c4957600080fd5b506104e560105481565b348015610c5f57600080fd5b506104e5612356565b348015610c7457600080fd5b506104cd610c83366004613d67565b61239b565b348015610c9457600080fd5b50610a41610ca3366004613d67565b6123f6565b348015610cb457600080fd5b506104cd610cc3366004613d80565b612438565b600754604080516315ab88c960e31b815290516000926001600160a01b03169163ad5c4648916004808301926020929190829003018186803b158015610d0d57600080fd5b505afa158015610d21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d459190613f6d565b600e546001600160a01b03908116911614919050565b606060038054610d6a90613f8a565b80601f0160208091040260200160405190810160405280929190818152602001828054610d9690613f8a565b8015610de35780601f10610db857610100808354040283529160200191610de3565b820191906000526020600020905b815481529060010190602001808311610dc657829003601f168201915b5050505050905090565b600033610dfb818585612536565b5060019392505050565b6006546001600160a01b03163314610e385760405162461bcd60e51b8152600401610e2f90613fbf565b60405180910390fd5b600954604051635ebf4db960e01b8152600481018390526001600160a01b0390911690635ebf4db9906024015b600060405180830381600087803b158015610e7f57600080fd5b505af1158015610e93573d6000803e3d6000fd5b5050505050565b600033610ea885828561265a565b610eb38585856126ec565b506001949350505050565b600954604080516342d359d760e11b815290516000926001600160a01b0316916385a6b3ae916004808301926020929190829003018186803b158015610f0357600080fd5b505afa158015610f17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3b9190613ff4565b905090565b6006546001600160a01b03163314610f6a5760405162461bcd60e51b8152600401610e2f90613fbf565b60095460405163031e79db60e41b81526001600160a01b038381166004830152909116906331e79db090602401610e65565b6006546001600160a01b03163314610fc65760405162461bcd60e51b8152600401610e2f90613fbf565b6013819055601454601254610fe69190610fe09084612523565b90612523565b60155550565b6000610f3b612bbf565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190610dfb9082908690611030908790614023565b612536565b6006546001600160a01b0316331461105f5760405162461bcd60e51b8152600401610e2f90613fbf565b6001600160a01b03919091166000908152601160205260409020805460ff1916911515919091179055565b60095460405163bc4c4b3760e01b8152336004820152600060248201526001600160a01b039091169063bc4c4b3790604401602060405180830381600087803b1580156110d657600080fd5b505af11580156110ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110e919061403b565b50565b6006546001600160a01b0316331461113b5760405162461bcd60e51b8152600401610e2f90613fbf565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015611171573d6000803e3d6000fd5b505050565b6006546001600160a01b031633146111a05760405162461bcd60e51b8152600401610e2f90613fbf565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b600954604080516304ddf6ef60e11b815290516000926001600160a01b0316916309bbedde916004808301926020929190829003018186803b158015610f0357600080fd5b6006546001600160a01b031633146112315760405162461bcd60e51b8152600401610e2f90613fbf565b6007546040516001600160a01b03918216918316907f8fc842bbd331dfa973645f4ed48b11683d501ebf1352708d77a5da2ab49a576e90600090a3600780546001600160a01b0319166001600160a01b0383169081179091556040805163c45a015560e01b8152905163c45a015591600480820192602092909190829003018186803b1580156112c057600080fd5b505afa1580156112d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f89190613f6d565b6001600160a01b031663c9c6539630600760009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561135557600080fd5b505afa158015611369573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138d9190613f6d565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156113d557600080fd5b505af1925050508015611405575060408051601f3d908101601f1916820190925261140291810190613f6d565b60015b61140c5750565b600880546001600160a01b0319166001600160a01b039290921691909117905550565b600754604080516315ab88c960e31b815290516000926001600160a01b03169163ad5c4648916004808301926020929190829003018186803b15801561147457600080fd5b505afa158015611488573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ac9190613f6d565b600f546001600160a01b03908116911614919050565b6009546040516370a0823160e01b81526001600160a01b03838116600483015260009216906370a08231906024015b60206040518083038186803b15801561150957600080fd5b505afa15801561151d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115419190613ff4565b92915050565b6009546040516001624d3b8760e01b0319815260048101839052600091829182916001600160a01b03169063ffb2c47990602401606060405180830381600087803b15801561159557600080fd5b505af11580156115a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115cd9190614058565b604080518481526020810184905290810182905260608101889052929550909350915032906000907fc864333d6121033635ab41b29ae52f10a22cf4438c3e4f1c4c68518feb2f8a989060800160405180910390a350505050565b6006546001600160a01b031633146116525760405162461bcd60e51b8152600401610e2f90613fbf565b6006546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600680546001600160a01b0319169055565b6001600160a01b038116600090815260056020526040812054611541565b6006546001600160a01b031633146116e45760405162461bcd60e51b8152600401610e2f90613fbf565b6012819055601454601354610fe69190610fe0908490612523565b6006546001600160a01b031633146117295760405162461bcd60e51b8152600401610e2f90613fbf565b6103e8811015801561173e5750620f42408111155b6117b2576040805162461bcd60e51b81526020600482015260248101919091527f4d4f4f4e4245414e533a20676173466f7250726f63657373696e67206d75737460448201527f206265206265747765656e2031302c30303020616e6420312c3030302c3030306064820152608401610e2f565b60165481141561182a5760405162461bcd60e51b815260206004820152603760248201527f4d4f4f4e4245414e533a2043616e6e6f742075706461746520676173466f725060448201527f726f63657373696e6720746f2073616d652076616c75650000000000000000006064820152608401610e2f565b60165460405182907f40d7e40e79af4e8e5a9b3c57030d8ea93f13d669c06d448c4d631d4ae7d23db790600090a3601655565b6006546001600160a01b031633146118875760405162461bcd60e51b8152600401610e2f90613fbf565b6000819050306001600160a01b0316816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118cf57600080fd5b505afa1580156118e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119079190613f6d565b6001600160a01b03161461195d5760405162461bcd60e51b815260206004820152601c60248201527f4d4f4f4e4245414e533a20547261636b6572206e6f74206f776e6564000000006044820152606401610e2f565b60405163031e79db60e41b81526001600160a01b03821660048201819052906331e79db090602401600060405180830381600087803b15801561199f57600080fd5b505af11580156119b3573d6000803e3d6000fd5b505060405163031e79db60e41b81523060048201526001600160a01b03841692506331e79db09150602401600060405180830381600087803b1580156119f857600080fd5b505af1158015611a0c573d6000803e3d6000fd5b50505050806001600160a01b03166331e79db0611a316006546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381600087803b158015611a7257600080fd5b505af1158015611a86573d6000803e3d6000fd5b505060075460405163031e79db60e41b81526001600160a01b03918216600482015290841692506331e79db09150602401600060405180830381600087803b158015611ad157600080fd5b505af1158015611ae5573d6000803e3d6000fd5b50506009546040516001600160a01b03918216935090851691507f90c7d74461c613da5efa97d90740869367d74ab3aa5837aa4ae9a975f954b7a890600090a3600980546001600160a01b0319166001600160a01b039290921691909117905550565b6006546001600160a01b03163314611b725760405162461bcd60e51b8152600401610e2f90613fbf565b600e80546001600160a01b0319166001600160a01b03838116918217909255600954604051638aee812760e01b8152600481019290925290911690638aee812790602401600060405180830381600087803b158015611bd057600080fd5b505af1925050508015611be1575060015b61110e5750565b6006546001600160a01b03163314611c125760405162461bcd60e51b8152600401610e2f90613fbf565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b606060048054610d6a90613f8a565b6006546001600160a01b03163314611c6d5760405162461bcd60e51b8152600401610e2f90613fbf565b60088054911515600160a81b0260ff60a81b19909216919091179055565b6006546001600160a01b03163314611cb55760405162461bcd60e51b8152600401610e2f90613fbf565b611cbf8282612ce6565b5050565b60095460408051631bc9e27b60e21b815290516000926001600160a01b031691636f2789ec916004808301926020929190829003018186803b158015610f0357600080fd5b3360008181526001602090815260408083206001600160a01b038716845290915281205490919083811015611d8d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610e2f565b610eb38286868403612536565b6009546040516302a2e74960e61b81526001600160a01b038381166004830152600092169063a8b9d240906024016114f1565b600033610dfb8185856126ec565b60095460405163fbcbc0f160e01b81526001600160a01b038381166004830152600092839283928392839283928392839291169063fbcbc0f1906024015b6101006040518083038186803b158015611e3257600080fd5b505afa158015611e46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6a9190614086565b97509750975097509750975097509750919395975091939597565b6006546001600160a01b03163314611eaf5760405162461bcd60e51b8152600401610e2f90613fbf565b816001600160a01b031663a9059cbb611ed06006546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401602060405180830381600087803b158015611f1857600080fd5b505af1158015611f2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611171919061403b565b6006546001600160a01b03163314611f7a5760405162461bcd60e51b8152600401610e2f90613fbf565b6001600160a01b038216600081815260176020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7910160405180910390a25050565b6006546001600160a01b031633146120035760405162461bcd60e51b8152600401610e2f90613fbf565b60005b82811015612074578160176000868685818110612025576120256140f0565b905060200201602081019061203a9190613d80565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061206c81614106565b915050612006565b507f7fdaf542373fa84f4ee8d662c642f44e4c2276a217d7d29e548b6eb29a233b358383836040516120a893929190614121565b60405180910390a1505050565b600954604051634e7b827f60e01b81526001600160a01b0383811660048301526000921690634e7b827f9060240160206040518083038186803b1580156120fb57600080fd5b505afa15801561210f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611541919061403b565b6006546001600160a01b0316331461215d5760405162461bcd60e51b8152600401610e2f90613fbf565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b834211156121cf5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610e2f565b60007f00000000000000000000000000000000000000000000000000000000000000008888886121fe8c612e50565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061225982612e78565b9050600061226982878787612ec6565b9050896001600160a01b0316816001600160a01b0316146122cc5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610e2f565b6122d78a8a8a612536565b50505050505050505050565b6006546001600160a01b0316331461230d5760405162461bcd60e51b8152600401610e2f90613fbf565b6014819055601354601254610fe6918391610fe091612523565b6006546001600160a01b031633146123515760405162461bcd60e51b8152600401610e2f90613fbf565b601055565b6009546040805163039e107b60e61b815290516000926001600160a01b03169163e7841ec0916004808301926020929190829003018186803b158015610f0357600080fd5b6006546001600160a01b031633146123c55760405162461bcd60e51b8152600401610e2f90613fbf565b60095460405163e98030c760e01b8152600481018390526001600160a01b039091169063e98030c790602401610e65565b600954604051635183d6fd60e01b81526004810183905260009182918291829182918291829182916001600160a01b0390911690635183d6fd90602401611e19565b6006546001600160a01b031633146124625760405162461bcd60e51b8152600401610e2f90613fbf565b6001600160a01b0381166124c75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610e2f565b6006546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b600061252f8284614023565b9392505050565b6001600160a01b0383166125985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610e2f565b6001600160a01b0382166125f95760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610e2f565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981146126e657818110156126d95760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610e2f565b6126e68484848403612536565b50505050565b6001600160a01b0383166127125760405162461bcd60e51b8152600401610e2f9061417a565b6001600160a01b0382166127385760405162461bcd60e51b8152600401610e2f906141bf565b6001600160a01b03831660009081526011602052604090205460ff1615801561277a57506001600160a01b03821660009081526011602052604090205460ff16155b6127bc5760405162461bcd60e51b8152602060048201526013602482015272426c61636b6c6973746564206164647265737360681b6044820152606401610e2f565b806127cd5761117183836000612eee565b30600090815260208190526040902054601054811080159081906127fb5750600854600160a01b900460ff16155b801561282057506001600160a01b03851660009081526018602052604090205460ff16155b801561283a57506006546001600160a01b03868116911614155b801561285457506006546001600160a01b03858116911614155b15612905576008805460ff60a01b1916600160a01b17905560155460145460009161288a91612884908690613042565b9061304e565b9050801561289b5761289b8161305a565b60006128b86015546128846013548761304290919063ffffffff16565b905080156128c9576128c981613204565b30600090815260208190526040902054600854600160a81b900460ff16156128f4576128f48161328b565b50506008805460ff60a01b19169055505b6008546001600160a01b03861660009081526017602052604090205460ff600160a01b90920482161591168061295357506001600160a01b03851660009081526017602052604090205460ff165b1561295c575060005b801561299a57600061297f6127106128846015548861304290919063ffffffff16565b905061298b8186614202565b9450612998873083612eee565b505b6129a5868686612eee565b6009546001600160a01b031663e30443bc876129d6816001600160a01b031660009081526020819052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015612a1c57600080fd5b505af1925050508015612a2d575060015b506009546001600160a01b031663e30443bc86612a5f816001600160a01b031660009081526020819052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015612aa557600080fd5b505af1925050508015612ab6575060015b50600854600160a01b900460ff16158015612ada5750600854600160a81b900460ff165b15612bb7576016546009546040516001624d3b8760e01b03198152600481018390526001600160a01b039091169063ffb2c47990602401606060405180830381600087803b158015612b2b57600080fd5b505af1925050508015612b5b575060408051601f3d908101601f19168201909252612b5891810190614058565b60015b612b6457612bb5565b60408051848152602081018490529081018290526060810185905232906001907fc864333d6121033635ab41b29ae52f10a22cf4438c3e4f1c4c68518feb2f8a989060800160405180910390a35050505b505b505050505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015612c1857507f000000000000000000000000000000000000000000000000000000000000000046145b15612c4257507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6001600160a01b03821660009081526018602052604090205460ff1615158115151415612d875760405162461bcd60e51b815260206004820152604360248201527f4d4f4f4e4245414e533a204175746f6d61746564206d61726b6574206d616b6560448201527f72207061697220697320616c72656164792073657420746f20746861742076616064820152626c756560e81b608482015260a401610e2f565b6001600160a01b0382166000908152601860205260409020805460ff19168215801591909117909155612e145760095460405163031e79db60e41b81526001600160a01b038481166004830152909116906331e79db090602401600060405180830381600087803b158015612dfb57600080fd5b505af1158015612e0f573d6000803e3d6000fd5b505050505b604051811515906001600160a01b038416907fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab90600090a35050565b6001600160a01b03811660009081526005602052604090208054600181018255905b50919050565b6000611541612e85612bbf565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000612ed787878787613477565b91509150612ee481613564565b5095945050505050565b6001600160a01b038316612f145760405162461bcd60e51b8152600401610e2f9061417a565b6001600160a01b038216612f3a5760405162461bcd60e51b8152600401610e2f906141bf565b6001600160a01b03831660009081526020819052604090205481811015612fb25760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610e2f565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290612fe9908490614023565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161303591815260200190565b60405180910390a36126e6565b600061252f8284614219565b600061252f8284614238565b600f546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561309e57600080fd5b505afa1580156130b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d69190613ff4565b600f549091506130f09083906001600160a01b031661371f565b600f546040516370a0823160e01b815230600482015260009183916001600160a01b03909116906370a082319060240160206040518083038186803b15801561313857600080fd5b505afa15801561314c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131709190613ff4565b61317a9190614202565b600f54600d5460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb90604401602060405180830381600087803b1580156131cc57600080fd5b505af11580156131e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126e6919061403b565b600061321182600261304e565b9050600061321f8383613a3b565b90504761322b83613a47565b60006132374783613a3b565b90506132438382613ba8565b60408051858152602081018390529081018490527f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb5619060600160405180910390a15050505050565b600e546132a29082906001600160a01b031661371f565b600e546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156132e657600080fd5b505afa1580156132fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061331e9190613ff4565b600e5460095460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810184905292935060009291169063a9059cbb90604401602060405180830381600087803b15801561337457600080fd5b505af1158015613388573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133ac919061403b565b905080156134495760095460405163a949652360e01b8152600481018490526001600160a01b039091169063a949652390602401600060405180830381600087803b1580156133fa57600080fd5b505af115801561340e573d6000803e3d6000fd5b505060408051868152602081018690527f80195cc573b02cc48460cbca6e6e4cc85ddb91959d946e1c3025ea3d87942dc393500190506120a8565b6040517fbd333618bc0032cff466df4bed5f61da8a4339867a3e3bd57d9d2885e468b29390600090a1505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156134ae575060009050600361355b565b8460ff16601b141580156134c657508460ff16601c14155b156134d7575060009050600461355b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561352b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166135545760006001925092505061355b565b9150600090505b94509492505050565b60008160048111156135785761357861425a565b14156135815750565b60018160048111156135955761359561425a565b14156135e35760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610e2f565b60028160048111156135f7576135f761425a565b14156136455760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610e2f565b60038160048111156136595761365961425a565b14156136b25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610e2f565b60048160048111156136c6576136c661425a565b141561110e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610e2f565b81613728575050565b6060613732610cc8565b801561374b5750600e546001600160a01b038381169116145b80613772575061375961142f565b80156137725750600f546001600160a01b038381169116145b156138a6574761378184613a47565b600061378d4783613a3b565b90506000600760009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156137df57600080fd5b505afa1580156137f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138179190613f6d565b6001600160a01b03168260405160006040518083038185875af1925050503d8060008114613861576040519150601f19603f3d011682016040523d82523d6000602084013e613866565b606091505b5050905080612bb75760405162461bcd60e51b815260206004820152600c60248201526b3bb930b8103330b4b632b21760a11b6044820152606401610e2f565b60408051600380825260808201909252906020820160608036833701905050905030816000815181106138db576138db6140f0565b6001600160a01b03928316602091820292909201810191909152600754604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561392f57600080fd5b505afa158015613943573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139679190613f6d565b8160018151811061397a5761397a6140f0565b60200260200101906001600160a01b031690816001600160a01b03168152505081816002815181106139ae576139ae6140f0565b6001600160a01b0392831660209182029290920101526007546139d49130911685612536565b600754604051635c11d79560e01b81526001600160a01b0390911690635c11d79590613a0d908690600090869030904290600401614270565b600060405180830381600087803b158015613a2757600080fd5b505af1158015612bb5573d6000803e3d6000fd5b600061252f8284614202565b6040805160028082526060820183526000926020830190803683370190505090503081600081518110613a7c57613a7c6140f0565b6001600160a01b03928316602091820292909201810191909152600754604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015613ad057600080fd5b505afa158015613ae4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b089190613f6d565b81600181518110613b1b57613b1b6140f0565b6001600160a01b039283166020918202929092010152600754613b419130911684612536565b60075460405163791ac94760e01b81526001600160a01b039091169063791ac94790613b7a908590600090869030904290600401614270565b600060405180830381600087803b158015613b9457600080fd5b505af1158015612bb7573d6000803e3d6000fd5b600754613bc09030906001600160a01b031684612536565b6000600b54613bd76006546001600160a01b031690565b604051602001613bff919060609190911b6bffffffffffffffffffffffff1916815260140190565b6040516020818303038152906040528051906020012014613c2b57600a546001600160a01b0316613c2d565b305b60075460405163f305d71960e01b81523060048201526024810186905260006044820181905260648201526001600160a01b0380841660848301524260a483015292935091169063f305d71990849060c4016060604051808303818588803b158015613c9857600080fd5b505af1158015613cac573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190612bb79190614058565b600060208083528351808285015260005b81811015613cfe57858101830151858201604001528201613ce2565b81811115613d10576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461110e57600080fd5b60008060408385031215613d4e57600080fd5b8235613d5981613d26565b946020939093013593505050565b600060208284031215613d7957600080fd5b5035919050565b600060208284031215613d9257600080fd5b813561252f81613d26565b600080600060608486031215613db257600080fd5b8335613dbd81613d26565b92506020840135613dcd81613d26565b929592945050506040919091013590565b801515811461110e57600080fd5b60008060408385031215613dff57600080fd5b8235613e0a81613d26565b91506020830135613e1a81613dde565b809150509250929050565b600060208284031215613e3757600080fd5b813561252f81613dde565b600080600060408486031215613e5757600080fd5b833567ffffffffffffffff80821115613e6f57600080fd5b818601915086601f830112613e8357600080fd5b813581811115613e9257600080fd5b8760208260051b8501011115613ea757600080fd5b60209283019550935050840135613ebd81613dde565b809150509250925092565b600080600080600080600060e0888a031215613ee357600080fd5b8735613eee81613d26565b96506020880135613efe81613d26565b95506040880135945060608801359350608088013560ff81168114613f2257600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215613f5257600080fd5b8235613f5d81613d26565b91506020830135613e1a81613d26565b600060208284031215613f7f57600080fd5b815161252f81613d26565b600181811c90821680613f9e57607f821691505b60208210811415612e7257634e487b7160e01b600052602260045260246000fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561400657600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156140365761403661400d565b500190565b60006020828403121561404d57600080fd5b815161252f81613dde565b60008060006060848603121561406d57600080fd5b8351925060208401519150604084015190509250925092565b600080600080600080600080610100898b0312156140a357600080fd5b88516140ae81613d26565b809850506020890151965060408901519550606089015194506080890151935060a0890151925060c0890151915060e089015190509295985092959890939650565b634e487b7160e01b600052603260045260246000fd5b600060001982141561411a5761411a61400d565b5060010190565b6040808252810183905260008460608301825b8681101561416457823561414781613d26565b6001600160a01b0316825260209283019290910190600101614134565b5080925050508215156020830152949350505050565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6000828210156142145761421461400d565b500390565b60008160001904831182151516156142335761423361400d565b500290565b60008261425557634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052602160045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156142c05784516001600160a01b03168352938301939183019160010161429b565b50506001600160a01b0396909616606085015250505060800152939250505056fea26469706673582212203d0ce56df6c417d09782b5534cb5d3aff162ed5f86dfcd918a6424ccb092067664736f6c634300080900336080604052600680546001600160a01b03191673acc15dc74880c9944775448304b263d191c6077f1790553480156200003757600080fd5b50604080518082018252601a8082527f4d4f4f4e4245414e535f4469766964656e645f547261636b65720000000000006020808401828152855180870190965292855284015281519192918391839162000094916003916200012c565b508051620000aa9060049060208401906200012c565b5050506000620000bf6200012860201b60201c565b600580546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35050610e10601255506802b5e3af16b18800006013556200020f565b3390565b8280546200013a90620001d2565b90600052602060002090601f0160209004810192826200015e5760008555620001a9565b82601f106200017957805160ff1916838001178555620001a9565b82800160010185558215620001a9579182015b82811115620001a95782518255916020019190600101906200018c565b50620001b7929150620001bb565b5090565b5b80821115620001b75760008155600101620001bc565b600181811c90821680620001e757607f821691505b602082108114156200020957634e487b7160e01b600052602260045260246000fd5b50919050565b6120e2806200021f6000396000f3fe608060405234801561001057600080fd5b50600436106102535760003560e01c80638aee812711610146578063bc4c4b37116100c3578063e30443bc11610087578063e30443bc14610568578063e7841ec01461057b578063e98030c714610583578063f2fde38b14610596578063fbcbc0f1146105a9578063ffb2c479146105bc57600080fd5b8063bc4c4b3714610500578063be10b61414610513578063cab34c081461051c578063da219f2414610438578063dd62ed3e1461052f57600080fd5b8063a8b9d2401161010a578063a8b9d2401461048b578063a9059cbb1461049e578063a9496523146104b1578063aafd847a146104c4578063b29a8140146104ed57600080fd5b80638aee8127146104255780638da5cb5b1461043857806391b89fba1461045d57806395d89b4114610470578063a457c2d71461047857600080fd5b806339509351116101d45780636a474002116101985780636a474002146103da5780636f2789ec146103e257806370a08231146103eb578063715018a61461041457806385a6b3ae1461041c57600080fd5b806339509351146103265780634e7b827f146103395780635183d6fd1461035c57806357ccdcf8146103b45780635ebf4db9146103c757600080fd5b806323b872dd1161021b57806323b872dd146102d357806327ce0147146102e65780633009a609146102f9578063313ce5671461030257806331e79db01461031157600080fd5b806306fdde0314610258578063095ea7b31461027657806309bbedde1461029957806318160ddd146102ab578063226cfa3d146102b3575b600080fd5b6102606105ea565b60405161026d9190611d50565b60405180910390f35b610289610284366004611dba565b61067c565b604051901515815260200161026d565b600b545b60405190815260200161026d565b60025461029d565b61029d6102c1366004611de6565b60116020526000908152604090205481565b6102896102e1366004611e03565b610696565b61029d6102f4366004611de6565b6106ba565b61029d600f5481565b6040516012815260200161026d565b61032461031f366004611de6565b610716565b005b610289610334366004611dba565b6107de565b610289610347366004611de6565b60106020526000908152604090205460ff1681565b61036f61036a366004611e44565b61081d565b604080516001600160a01b0390991689526020890197909752958701949094526060860192909252608085015260a084015260c083015260e08201526101000161026d565b6103246103c2366004611dba565b61088c565b6103246103d5366004611e44565b6108f1565b610324610954565b61029d60125481565b61029d6103f9366004611de6565b6001600160a01b031660009081526020819052604090205490565b610324610a00565b61029d600a5481565b610324610433366004611de6565b610a74565b6005546001600160a01b03165b6040516001600160a01b03909116815260200161026d565b61029d61046b366004611de6565b610aef565b610260610afa565b610289610486366004611dba565b610b09565b61029d610499366004611de6565b610b9b565b6102896104ac366004611dba565b610bc7565b6103246104bf366004611e44565b610bd5565b61029d6104d2366004611de6565b6001600160a01b031660009081526009602052604090205490565b6103246104fb366004611dba565b610c92565b61028961050e366004611e6b565b610d5d565b61029d60135481565b600654610445906001600160a01b031681565b61029d61053d366004611ea4565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610324610576366004611dba565b610e0b565b600f5461029d565b610324610591366004611e44565b610e9f565b6103246105a4366004611de6565b61101c565b61036f6105b7366004611de6565b611107565b6105cf6105ca366004611e44565b6111f0565b6040805193845260208401929092529082015260600161026d565b6060600380546105f990611ed2565b80601f016020809104026020016040519081016040528092919081815260200182805461062590611ed2565b80156106725780601f1061064757610100808354040283529160200191610672565b820191906000526020600020905b81548152906001019060200180831161065557829003601f168201915b5050505050905090565b60003361068a81858561130b565b60019150505b92915050565b6000336106a485828561142f565b6106af8585856114c1565b506001949350505050565b6001600160a01b03811660009081526008602090815260408083205491839052822054600754600160801b9261070c9261070792610701916106fc9190611522565b611535565b906115a3565b6115af565b6106909190611f23565b6005546001600160a01b031633146107495760405162461bcd60e51b815260040161074090611f45565b60405180910390fd5b6001600160a01b03811660009081526010602052604090205460ff161561076d5750565b6001600160a01b0381166000908152601060205260408120805460ff1916600117905561079b908290611601565b6107a6600b8261165a565b6040516001600160a01b038216907fa878b31040b2e6d0a9a3d3361209db3908ba62014b0dca52adbaee451d128b2590600090a25b50565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061068a9082908690610818908790611f7a565b61130b565b600080600080600080600080610832600b5490565b8910610857575060009650600019955085945086935083925082915081905080610881565b6000610864600b8b611795565b905061086f81611107565b98509850985098509850985098509850505b919395975091939597565b6005546001600160a01b031633146108b65760405162461bcd60e51b815260040161074090611f45565b6040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156108ec573d6000803e3d6000fd5b505050565b6005546001600160a01b0316331461091b5760405162461bcd60e51b815260040161074090611f45565b6013805490829055604051819083907fd17eb31bebf653931299e073ac178d52d8b9019a0171a155b883b7ecc02bece090600090a35050565b60405162461bcd60e51b815260206004820152606f60248201527f4d4f4f4e4245414e535f4469766964656e645f547261636b65723a207769746860448201527f647261774469766964656e642064697361626c65642e2055736520746865202760648201527f636c61696d272066756e6374696f6e206f6e20746865206d61696e204d6f6f6e60848201526e2132b0b7399031b7b73a3930b1ba1760891b60a482015260c401610740565b6005546001600160a01b03163314610a2a5760405162461bcd60e51b815260040161074090611f45565b6005546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600580546001600160a01b0319169055565b6005546001600160a01b03163314610a9e5760405162461bcd60e51b815260040161074090611f45565b600680546001600160a01b038381166001600160a01b03198316811790935560405191169182917f906ff2422a6ffa134f2d7ccaffd446bc0c583a5cb6615749b4b2836942a5fea890600090a35050565b600061069082610b9b565b6060600480546105f990611ed2565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919083811015610b8e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610740565b6106af828686840361130b565b6001600160a01b03811660009081526009602052604081205461069090610bc1846106ba565b906117c8565b60003361068a8185856114c1565b6005546001600160a01b03163314610bff5760405162461bcd60e51b815260040161074090611f45565b6000610c0a60025490565b11610c1457600080fd5b80156107db57610c47610c2660025490565b610c3483600160801b611522565b610c3e9190611f23565b600754906117d4565b60075560405181815233907fa493a9229478c3fcd73f66d2cdeb7f94fd0f341da924d1054236d784541165119060200160405180910390a2600a54610c8c90826117d4565b600a5550565b6005546001600160a01b03163314610cbc5760405162461bcd60e51b815260040161074090611f45565b816001600160a01b031663a9059cbb610cdd6005546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401602060405180830381600087803b158015610d2557600080fd5b505af1158015610d39573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ec9190611f92565b6005546000906001600160a01b03163314610d8a5760405162461bcd60e51b815260040161074090611f45565b6000610d95846117e0565b90508015610e01576001600160a01b038416600081815260116020526040908190204290555184151591907fa2c38e2d2fb7e3e1912d937fd1ca11ed6d51864dee4cfa7a7bf02becd7acf09290610def9085815260200190565b60405180910390a36001915050610690565b5060009392505050565b6005546001600160a01b03163314610e355760405162461bcd60e51b815260040161074090611f45565b6001600160a01b03821660009081526010602052604090205460ff1615610e5a575050565b6013548110610e7e57610e6d8282611601565b610e79600b8383611954565b610e94565b610e89826000611601565b610e94600b8361165a565b6108ec826001610d5d565b6005546001600160a01b03163314610ec95760405162461bcd60e51b815260040161074090611f45565b603c8110158015610edd5750620151808111155b610f675760405162461bcd60e51b815260206004820152604f60248201527f4d4f4f4e4245414e535f4469766964656e645f547261636b65723a20636c616960448201527f6d57616974206d757374206265207570646174656420746f206265747765656e60648201526e203120616e6420323420686f75727360881b608482015260a401610740565b601254811415610fe95760405162461bcd60e51b815260206004820152604160248201527f4d4f4f4e4245414e535f4469766964656e645f547261636b65723a2043616e6e60448201527f6f742075706461746520636c61696d5761697420746f2073616d652076616c756064820152606560f81b608482015260a401610740565b60125460405182907f474ea64804364a1e29a4487ddb63c3342a2dd826ccd8acf48825e680a0e6f20f90600090a3601255565b6005546001600160a01b031633146110465760405162461bcd60e51b815260040161074090611f45565b6001600160a01b0381166110ab5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610740565b6005546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b80600080808080808061111b600b896119fd565b965060001995506000871261117d57600f5487111561114957600f54611142908890611a48565b955061117d565b600f54600b546000911061115e57600061116d565b600f54600b5461116d916117c8565b905061117988826115a3565b9650505b61118688610b9b565b9450611191886106ba565b6001600160a01b0389166000908152601160205260409020549094509250826111bb5760006111c9565b6012546111c99084906117d4565b91504282116111d95760006111e3565b6111e382426117c8565b9050919395975091939597565b600b546000908190819080611210575050600f5460009250829150611304565b600f546000805a90506000805b898410801561122b57508582105b156112f3578461123a81611faf565b600b549096508610905061124d57600094505b6000600b600001868154811061126557611265611fca565b60009182526020808320909101546001600160a01b0316808352601190915260409091205490915061129690611a54565b156112b9576112a6816001610d5d565b156112b957816112b581611faf565b9250505b826112c381611faf565b93505060005a9050808511156112ea576112e76112e086836117c8565b87906117d4565b95505b935061121d9050565b600f85905590975095509193505050505b9193909250565b6001600160a01b03831661136d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610740565b6001600160a01b0382166113ce5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610740565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981146114bb57818110156114ae5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610740565b6114bb848484840361130b565b50505050565b60405162461bcd60e51b815260206004820152603060248201527f4d4f4f4e4245414e535f4469766964656e645f547261636b65723a204e6f207460448201526f1c985b9cd9995c9cc8185b1b1bddd95960821b6064820152608401610740565b600061152e8284611fe0565b9392505050565b60006001600160ff1b0382111561159f5760405162461bcd60e51b815260206004820152602860248201527f53616665436173743a2076616c756520646f65736e27742066697420696e2061604482015267371034b73a191a9b60c11b6064820152608401610740565b5090565b600061152e8284611fff565b60008082121561159f5760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610740565b6001600160a01b0382166000908152602081905260409020548082111561163a57600061162e83836117c8565b90506114bb8482611a7b565b808210156108ec57600061164e82846117c8565b90506114bb8482611adf565b6001600160a01b038116600090815260038301602052604090205460ff16611680575050565b6001600160a01b03811660009081526003830160209081526040808320805460ff19169055600180860183528184208490556002860190925282205484549092916116ca91612040565b905060008460000182815481106116e3576116e3611fca565b60009182526020808320909101546001600160a01b0390811680845260028901909252604080842087905590871683528220919091558554909150819086908590811061173257611732611fca565b600091825260209091200180546001600160a01b0319166001600160a01b0392909216919091179055845485908061176c5761176c612057565b600082815260209020810160001990810180546001600160a01b03191690550190555050505050565b60008260000182815481106117ac576117ac611fca565b6000918252602090912001546001600160a01b03169392505050565b600061152e8284612040565b600061152e8284611f7a565b6000806117ec83610b9b565b9050801561194b576001600160a01b03831660009081526009602052604090205461181790826117d4565b6001600160a01b038416600081815260096020526040908190209290925590517fee503bee2bb6a87e57bc57db795f98137327401a0e7b7ce42e37926cc1a9ca4d906118669084815260200190565b60405180910390a260065460405163a9059cbb60e01b81526001600160a01b03858116600483015260248201849052600092169063a9059cbb90604401602060405180830381600087803b1580156118bd57600080fd5b505af11580156118d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f59190611f92565b905080611944576001600160a01b03841660009081526009602052604090205461191f90836117c8565b6001600160a01b03909416600090815260096020526040812094909455509192915050565b5092915050565b50600092915050565b6001600160a01b038216600090815260038401602052604090205460ff1615611999576001600160a01b03821660009081526001840160205260409020819055505050565b6001600160a01b03821660008181526003850160209081526040808320805460ff19166001908117909155878101835281842086905587546002890184529184208290558101875586835291200180546001600160a01b0319169091179055505050565b6001600160a01b038116600090815260038301602052604081205460ff16611a285750600019610690565b506001600160a01b03166000908152600291909101602052604090205490565b600061152e828461206d565b600042821115611a6657506000919050565b601254611a7342846117c8565b101592915050565b611a858282611b23565b611abf611aa06106fc8360075461152290919063ffffffff16565b6001600160a01b03841660009081526008602052604090205490611a48565b6001600160a01b0390921660009081526008602052604090209190915550565b611ae98282611c02565b611abf611b046106fc8360075461152290919063ffffffff16565b6001600160a01b038416600090815260086020526040902054906115a3565b6001600160a01b038216611b795760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610740565b8060026000828254611b8b9190611f7a565b90915550506001600160a01b03821660009081526020819052604081208054839290611bb8908490611f7a565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216611c625760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610740565b6001600160a01b03821660009081526020819052604090205481811015611cd65760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610740565b6001600160a01b0383166000908152602081905260408120838303905560028054849290611d05908490612040565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600060208083528351808285015260005b81811015611d7d57858101830151858201604001528201611d61565b81811115611d8f576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146107db57600080fd5b60008060408385031215611dcd57600080fd5b8235611dd881611da5565b946020939093013593505050565b600060208284031215611df857600080fd5b813561152e81611da5565b600080600060608486031215611e1857600080fd5b8335611e2381611da5565b92506020840135611e3381611da5565b929592945050506040919091013590565b600060208284031215611e5657600080fd5b5035919050565b80151581146107db57600080fd5b60008060408385031215611e7e57600080fd5b8235611e8981611da5565b91506020830135611e9981611e5d565b809150509250929050565b60008060408385031215611eb757600080fd5b8235611ec281611da5565b91506020830135611e9981611da5565b600181811c90821680611ee657607f821691505b60208210811415611f0757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082611f4057634e487b7160e01b600052601260045260246000fd5b500490565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115611f8d57611f8d611f0d565b500190565b600060208284031215611fa457600080fd5b815161152e81611e5d565b6000600019821415611fc357611fc3611f0d565b5060010190565b634e487b7160e01b600052603260045260246000fd5b6000816000190483118215151615611ffa57611ffa611f0d565b500290565b600080821280156001600160ff1b038490038513161561202157612021611f0d565b600160ff1b839003841281161561203a5761203a611f0d565b50500190565b60008282101561205257612052611f0d565b500390565b634e487b7160e01b600052603160045260246000fd5b60008083128015600160ff1b85018412161561208b5761208b611f0d565b6001600160ff1b03840183138116156120a6576120a6611f0d565b5050039056fea264697066735822122036992b402ad9a01db91aa612ce5664a406c8f33c4b07a2a7464b0ec488fd5f4264736f6c63430008090033

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