Contract 0x8a0E3264Da08bf999AfF5a50AabF5d2dc89fab79

Contract Overview

DegenX: Legacy Disburser
Balance:
0 AVAX

AVAX Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x5f63345e11e64857213b0c6f8076e239bde8e93ac36928b9aae1665245f615f6Claim276170172023-03-18 23:20:532 days 5 hrs ago0x0f0f9b5e5247f0c099f3a4ef5e513e633aab97ab IN  DegenX: Legacy Disburser0 AVAX0.015865280225 27.425
0x6a0211fef3f32307dce7c82235e9e25bf5d89415bed501abe8227647ba1db334Claim275977602023-03-18 12:48:592 days 16 hrs ago0x181fd1a2ddd9058b802fb30492b63cfd44d18a97 IN  DegenX: Legacy Disburser0 AVAX0.01614585127 27.91
0x34130efce35558030c040e9c7438192a383c2a42b000ef846b24eeba09f9326dClaim275745852023-03-17 23:46:183 days 5 hrs ago0xc242f2575d62a1a76ce2ef295b8aaf9e19e081b6 IN  DegenX: Legacy Disburser0 AVAX0.016803517527.5
0x6392873288d8b844f71d2f879ff0fd912c13f5c05f62f0c1849f435224b39be2Claim275634422023-03-17 17:35:203 days 11 hrs ago0xe3411de8a85c09bac5d69ecf313c0c9bdabe9707 IN  DegenX: Legacy Disburser0 AVAX0.0153301705 26.5
0x3b227da2afbc5ce7f421ff737dacbaae2f67098c3a222fb61a6ed46c7915da3eClaim275070792023-03-16 9:35:434 days 19 hrs ago0x2b76c4931f7ab8a1b4b45e4440b5852ef15abf10 IN  DegenX: Legacy Disburser0 AVAX0.016803517527.5
0x3a6304302da8b6ae79f3e3e05426f941dda8761fafbfcf39a846fc17d6dc8897Claim273901662023-03-13 15:33:117 days 13 hrs ago0x3e511d157637353ddfe7e66a23f008fe0670ada4 IN  DegenX: Legacy Disburser0 AVAX0.015420513706 26.656168842
0x78d9f4ce6edc9af4a345293d17fc10d80a1bee380173da2f78146ad1b9dd4655Claim273757552023-03-13 7:26:307 days 21 hrs ago0xf6bbd326f4da19a42b181af1c5dd9e066ae437e6 IN  DegenX: Legacy Disburser0 AVAX0.01446242525
0x2c6b8570e061f044ee743031e926121f48a469e85993b0d219e92c2d23332067Claim273092562023-03-11 17:47:579 days 11 hrs ago0x1e02cf5df25f3a0791bd50587713ee13f407fb1e IN  DegenX: Legacy Disburser0 AVAX0.0153301705 26.5
0x58599b8c59fd2fb6d2c543a9e3e2c935ab564c7152fd8a1fd99b5a849ed17968Claim273065922023-03-11 16:19:019 days 12 hrs ago0xca3400a647815ac0a32bb5e2c9a6fb45d76eec81 IN  DegenX: Legacy Disburser0 AVAX0.0161924805 26.5
0xbef0dd85a0e1809d7dd0b1b4a2a518ef4e690ddbe0dfa32eb33f03b1023b8219Claim272979872023-03-11 11:34:509 days 17 hrs ago0x84e53ab91c753ab27b7a937823e5dff06a816be3 IN  DegenX: Legacy Disburser0 AVAX0.015334335678 26.5072
0xf28ee21c2052c4564c403d92a958ee0031fc57a94236eba390b1099b3eef1c25Claim272540132023-03-10 11:37:2310 days 17 hrs ago0xd64644cc3ef6a16665200b044ba1533085402388 IN  DegenX: Legacy Disburser0 AVAX0.015908667527.5
0xe6a88df2e92c5d336c0869cebbfdf8a698f75894e55551c4578ee121d0014116Claim272291772023-03-09 21:40:2711 days 7 hrs ago0xb2572bdbf4779fe481ae9467f6557ddf3fc2b7ce IN  DegenX: Legacy Disburser0 AVAX0.0153301705 26.5
0x9977a39a49ef5f11ae86d7e79017ec991ed1904808b42b1856229814f320a21eClaim272284452023-03-09 21:16:0311 days 7 hrs ago0x0b9c854ecb5d63e8442dcf292b9061304dbfe9b0 IN  DegenX: Legacy Disburser0 AVAX0.015908667527.5
0x358774442e6f239a01fd5eb154c232d3851e30e2a915d2e86215210f82e44417Claim272158052023-03-09 14:11:2011 days 14 hrs ago0x31b4261078c0c660b2d27bd3edd23ecdcdb4fe31 IN  DegenX: Legacy Disburser0 AVAX0.015865280225 27.425
0xfaa8d3282f13c7fc5192c4462c1bb243e134b70f2f9ec4c5aeb02090f3f82e35Claim271930292023-03-09 1:02:0212 days 3 hrs ago0x6c38d7a181a92accad0677bb9d746bf641ce82a3 IN  DegenX: Legacy Disburser0 AVAX0.015908667527.5
0xf62260331f084de5ab864cad1d7e5d1042f68e1b8a27f5fb92b1cd007288e896Claim271881712023-03-08 22:18:2212 days 6 hrs ago0xd442c11f27b61bfce01cb8e8879b0cf5673da17f IN  DegenX: Legacy Disburser0 AVAX0.0164403827.5
0xc7ca90cf932316d01fad7d9ad106f16c1966702c913b827688e3888f84b4eb71Claim271868132023-03-08 21:31:3912 days 7 hrs ago0x99be829d27ee50046f7d5f4ec619de9d59451f01 IN  DegenX: Legacy Disburser0 AVAX0.0168158127.5
0xacb228941d140b4ca580c3b4f8e6b3638c0bf61d926096f87690ea78d69c75d0Claim271866672023-03-08 21:26:3312 days 7 hrs ago0x5bf724b06a8c3dcfc4ef0dfddd599c8472ab794b IN  DegenX: Legacy Disburser0 AVAX0.015908667527.5
0x9e01587ae476ce10fca44bd6f582b5f9cb67d8ff38aad64c71ab35b07c4a1234Claim271866482023-03-08 21:25:5412 days 7 hrs ago0xb769c27f9602476850f9d63fce6c5353797c598f IN  DegenX: Legacy Disburser0 AVAX0.016428087527.5
0xc9da25617ee7cd7167661307cd1435874dbb27e9a08fce297cb387fa03d3bdbcClaim271865522023-03-08 21:22:3812 days 7 hrs ago0x83bc5bef5c888b31333b4db66f0893ce3f254b8a IN  DegenX: Legacy Disburser0 AVAX0.016437790591 26.8818
0x5e4fde8d8a3d43d6e4e71eaeaf860c2318e6d2718d65e5503a4c48ec47792e27Claim271735942023-03-08 14:04:0512 days 14 hrs ago0xb85686c73081f7e0abb86e5357b45cbfe04d3e9b IN  DegenX: Legacy Disburser0 AVAX0.01823945445 29.85
0x6e1be1e6f60f90abcb5830052d3bf6c3d79dbe67ee511277e13d33e914594b74Claim271586032023-03-08 5:22:4212 days 23 hrs ago0x7d4347d98ab607ee191fd18d4e677b3605e92f7c IN  DegenX: Legacy Disburser0 AVAX0.015908667527.5
0xbaf2bde46b903ac053d13c5b466094c0cb7f1ecffc21b79d565c3147f0bd5dc4Claim271543302023-03-08 2:47:0913 days 2 hrs ago0xed086c8f49b4cd31d0de7842ffbae470842dce8d IN  DegenX: Legacy Disburser0 AVAX0.015908667527.5
0xc2467a21c7e03d000bc88c9c6bf5cbf9982b7df32ef73d77f14df7a160b16e86Claim271529532023-03-08 1:59:2013 days 2 hrs ago0xfbf23f877c2dd8ef7847bf4427a2f87d3fa651fc IN  DegenX: Legacy Disburser0 AVAX0.01726813545 29.85
0x7e465aafd23a0c63b3a4f85282763b9bb7a3957d3697750f4ff6017f798cba07Claim271469412023-03-07 22:32:3013 days 6 hrs ago0x93911ad362fcb3af570d02f1a4227f0939d564cc IN  DegenX: Legacy Disburser0 AVAX0.0153301705 26.5
[ Download CSV Export 

OVERVIEW

The DegenX Legacy Disburser is providing DGNX Tokens on behalf of previous project investors. It will payout DGNX over a period of time based on the amount of DGNX holding in ones wallet.

Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DGNXLegacyDisburser

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 11 : DGNXLegacyDisburser.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/token/ERC20/ERC20.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/Address.sol';

import '../interfaces/IDGNXLocker.sol';

contract DGNXLegacyDisburser is ReentrancyGuard, Ownable {
    using SafeERC20 for ERC20;
    using Address for address;
    using SafeMath for uint256;

    address public token;
    address public locker;

    bool public _start = false;

    uint256 public timeInterval; // in seconds
    uint256 public timeStarted; // in seconds
    uint256 public timeIntervalTardyHolder; // in seconds
    uint256 public ppInitial; // percentage points initial payout
    uint256 public ppRecurring; // percentage points recurring payouts

    mapping(address => uint256) public legacyAmounts;
    mapping(address => uint256) public paidOutAmounts;
    mapping(address => uint256) public payouts;
    mapping(address => uint256) public lastPayoutTimestamp;

    address[] private legacyAmountAddresses;

    event AddAddresses(address[] addresses, uint256[] amounts, address sender);
    event StartLegacyDisburser(uint256 timestamp, address sender);
    event StartClaim(uint256 timestamp, address sender, uint256 amount);
    event RecurringClaim(
        uint256 timestamp,
        address sender,
        uint256 amount,
        uint256 currentBalance
    );
    event RemovedTardyHolder(
        uint256 timestamp,
        address sender,
        address tardyHolder,
        uint256 amount
    );

    constructor(
        address _token,
        address _locker,
        uint256 _timeInterval,
        uint256 _timeIntervalTardyHolder,
        uint256 _ppInitial,
        uint256 _ppRecurring
    ) {
        require(
            _token != address(0),
            'DGNXLegacyDisburser::constructor zero address'
        );
        require(
            _locker != address(0),
            'DGNXLegacyDisburser::constructor zero address'
        );
        require(
            _token != _locker,
            'DGNXLegacyDisburser::constructor token and locker same address'
        );
        require(
            _timeInterval > 0,
            'DGNXLegacyDisburser::constructor time interval missing'
        );
        require(
            _timeIntervalTardyHolder > 0,
            'DGNXLegacyDisburser::constructor tardy holder interfal missing'
        );
        require(
            _ppInitial > 0,
            'DGNXLegacyDisburser::constructor wrong initial pp'
        );
        require(
            _ppRecurring > 0,
            'DGNXLegacyDisburser::constructor wrong recurring pp'
        );

        token = _token;
        locker = _locker;
        timeInterval = _timeInterval;
        timeIntervalTardyHolder = _timeIntervalTardyHolder;
        ppInitial = _ppInitial;
        ppRecurring = _ppRecurring;
    }

    modifier _isStarted() {
        require(isStarted(), 'DGNXLegacyDisburser::isStarted not started');
        _;
    }

    modifier _allowedToClaim() {
        require(
            _msgSender() != address(0),
            'DGNXLegacyDisburser::allowedToClaim zero address'
        );
        require(
            legacyAmounts[_msgSender()] > 0,
            'DGNXLegacyDisburser::allowedToClaim not allowed to participate'
        );
        require(
            hasAmountLeft(_msgSender()),
            'DGNXLegacyDisburser::allowedToClaim no amount left'
        );
        _;
    }

    function claimStart() external _isStarted _allowedToClaim {
        require(
            block.timestamp - timeStarted < timeIntervalTardyHolder,
            'DGNXLegacyDisburser::claimStart first claming period is over'
        );
        require(
            paidOutAmounts[_msgSender()] == 0,
            'DGNXLegacyDisburser::claimStart already claimed initial funds'
        );
        uint256 initialPayout = (legacyAmounts[_msgSender()] * ppInitial) / 100;
        require(
            initialPayout <= ERC20(token).balanceOf(address(this)),
            'DGNXLegacyDisburser::claimStart not enough funds claimed initial funds'
        );

        paidOutAmounts[_msgSender()] += initialPayout;
        lastPayoutTimestamp[_msgSender()] = block.timestamp;

        require(
            ERC20(token).transfer(_msgSender(), initialPayout),
            'DGNXLegacyDisburser::claimStart Tx failed'
        );
        emit StartClaim(
            lastPayoutTimestamp[_msgSender()],
            _msgSender(),
            initialPayout
        );
    }

    function claim() external _isStarted _allowedToClaim {
        require(
            paidOutAmounts[_msgSender()] > 0,
            'DGNXLegacyDisburser::claim missing initial claim'
        );

        removeOneTardyHolder();

        (
            uint256 claimable,
            uint256 missedPayouts,
            uint256 currentBalance,
            bool lastClaim
        ) = claimEstimate();

        require(claimable > 0, 'DGNXLegacyDisburser::claimStart not claimable');

        paidOutAmounts[_msgSender()] += claimable;
        payouts[_msgSender()] += missedPayouts;
        lastPayoutTimestamp[_msgSender()] += missedPayouts * timeInterval;

        if (lastClaim) {
            uint256 lockAmount = legacyAmounts[_msgSender()] -
                paidOutAmounts[_msgSender()];
            if (lockAmount > 0) {
                delete legacyAmounts[_msgSender()];
                transferTokensToLocker(lockAmount);
            }
        }

        require(
            ERC20(token).transfer(_msgSender(), claimable),
            'DGNXLegacyDisburser::claimStart Tx failed'
        );

        emit RecurringClaim(
            lastPayoutTimestamp[_msgSender()],
            _msgSender(),
            claimable,
            currentBalance
        );
    }

    function claimEstimate()
        public
        view
        _isStarted
        _allowedToClaim
        returns (
            uint256 claimable,
            uint256 missedPayouts,
            uint256 currentBalance,
            bool lastClaim
        )
    {
        require(
            paidOutAmounts[_msgSender()] > 0,
            'DGNXLegacyDisburser::claimStart missing initial claim'
        );
        uint256 _timeBehind = block.timestamp -
            lastPayoutTimestamp[_msgSender()];
        uint256 _amountLeft = amountLeft(_msgSender());
        currentBalance = ERC20(token).balanceOf(_msgSender());
        missedPayouts =
            (_timeBehind - (_timeBehind % timeInterval)) /
            timeInterval;

        if (missedPayouts > 0) {
            if (payouts[_msgSender()] + missedPayouts >= 24) {
                missedPayouts = 24 - payouts[_msgSender()];
                lastClaim = true;
            }

            uint256 _balance = currentBalance;
            for (uint256 i; i < missedPayouts; i++) {
                _balance += (_balance * ppRecurring) / 100;
            }
            if (_balance - currentBalance > _amountLeft) {
                claimable = _amountLeft;
            } else {
                claimable = _balance - currentBalance;
            }
        }
    }

    function start() external onlyOwner {
        // only once
        require(!_start, 'DGNXLegacyDisburser::start already started');
        _start = true;
        timeStarted = block.timestamp;
        emit StartLegacyDisburser(timeStarted, _msgSender());
    }

    function isStarted() public view returns (bool) {
        return _start;
    }

    function amountLeft(address addr) public view returns (uint256 amount) {
        amount = legacyAmounts[addr];
        if (amount > 0 && paidOutAmounts[addr] > 0) {
            amount = legacyAmounts[addr] - paidOutAmounts[addr];
        }
    }

    function timeLeftUntilNextClaim(address addr)
        public
        view
        returns (uint256 timeLeft)
    {
        if (
            lastPayoutTimestamp[addr] > 0 &&
            lastPayoutTimestamp[addr] + timeInterval > block.timestamp
        ) {
            timeLeft =
                lastPayoutTimestamp[addr] +
                timeInterval -
                block.timestamp;
        }
    }

    function hasAmountLeft(address addr) public view returns (bool) {
        return legacyAmounts[addr] > paidOutAmounts[addr];
    }

    function hasStartedClaiming(address addr) public view returns (bool) {
        return paidOutAmounts[addr] > 0;
    }

    function transferTokensToLocker(uint256 amount) private {
        ERC20(token).safeTransfer(locker, amount);
        IDGNXLocker(locker).sync();
    }

    function addAddresses(address[] memory addresses, uint256[] memory amounts)
        external
        onlyOwner
    {
        require(
            addresses.length == amounts.length,
            'DGNXLegacyDisburser::addBatch not the same length'
        );

        for (uint256 i; i < addresses.length; i++) {
            if (
                legacyAmounts[addresses[i]] == 0 && addresses[i] != address(0)
            ) {
                legacyAmounts[addresses[i]] = amounts[i];
                legacyAmountAddresses.push(addresses[i]);
            }
        }

        emit AddAddresses(addresses, amounts, _msgSender());
    }

    function removeOneTardyHolder() internal {
        if (
            block.timestamp - timeStarted > timeIntervalTardyHolder &&
            legacyAmountAddresses.length > 0
        ) {
            address tardyHolder = address(0);
            uint256 tardyHolderIdx = 0;
            for (
                uint256 i;
                i < legacyAmountAddresses.length && tardyHolder == address(0);
                i++
            ) {
                if (paidOutAmounts[legacyAmountAddresses[i]] == 0) {
                    tardyHolder = legacyAmountAddresses[i];
                    tardyHolderIdx = i;
                }
            }
            if (tardyHolder != address(0)) {
                uint256 transferAmount = legacyAmounts[tardyHolder];
                delete legacyAmounts[tardyHolder];
                delete paidOutAmounts[tardyHolder];
                legacyAmountAddresses[tardyHolderIdx] = legacyAmountAddresses[
                    legacyAmountAddresses.length - 1
                ];
                legacyAmountAddresses.pop();
                require(
                    ERC20(token).transfer(locker, transferAmount),
                    'DGNXLegacyDisburser::removeOneTardyHolder Tx failed'
                );
                IDGNXLocker(locker).sync();

                emit RemovedTardyHolder(
                    block.timestamp,
                    _msgSender(),
                    tardyHolder,
                    transferAmount
                );
            }
        }
    }

    function data()
        external
        view
        returns (
            uint256 claimableAmount,
            uint256 paidOutAmount,
            uint256 totalPayouts,
            uint256 recentClaim
        )
    {
        for (uint256 i; i < legacyAmountAddresses.length; i++) {
            address addr = legacyAmountAddresses[i];
            claimableAmount += legacyAmounts[addr];
            paidOutAmount += paidOutAmounts[addr];
            totalPayouts += payouts[addr];
            if (recentClaim < lastPayoutTimestamp[addr]) {
                recentClaim = lastPayoutTimestamp[addr];
            }
        }
    }
}

File 2 of 11 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 11 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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, allowance(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 = allowance(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 Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * 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 4 of 11 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 5 of 11 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (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 subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

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

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

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

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

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

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

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

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

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

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

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

File 6 of 11 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 7 of 11 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 8 of 11 : IDGNXLocker.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface IDGNXLocker {
    function withdraw(
        address to,
        uint256 amount,
        uint256 proposalId
    ) external;
    function sync() external;
}

File 9 of 11 : 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 10 of 11 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

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

File 11 of 11 : 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);
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_locker","type":"address"},{"internalType":"uint256","name":"_timeInterval","type":"uint256"},{"internalType":"uint256","name":"_timeIntervalTardyHolder","type":"uint256"},{"internalType":"uint256","name":"_ppInitial","type":"uint256"},{"internalType":"uint256","name":"_ppRecurring","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"addresses","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"AddAddresses","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":"timestamp","type":"uint256"},{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"currentBalance","type":"uint256"}],"name":"RecurringClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"tardyHolder","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RemovedTardyHolder","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"StartClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"StartLegacyDisburser","type":"event"},{"inputs":[],"name":"_start","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"addAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"amountLeft","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimEstimate","outputs":[{"internalType":"uint256","name":"claimable","type":"uint256"},{"internalType":"uint256","name":"missedPayouts","type":"uint256"},{"internalType":"uint256","name":"currentBalance","type":"uint256"},{"internalType":"bool","name":"lastClaim","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimStart","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"data","outputs":[{"internalType":"uint256","name":"claimableAmount","type":"uint256"},{"internalType":"uint256","name":"paidOutAmount","type":"uint256"},{"internalType":"uint256","name":"totalPayouts","type":"uint256"},{"internalType":"uint256","name":"recentClaim","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"hasAmountLeft","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"hasStartedClaiming","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastPayoutTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"legacyAmounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"locker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"paidOutAmounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"payouts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ppInitial","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ppRecurring","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"start","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timeInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeIntervalTardyHolder","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"timeLeftUntilNextClaim","outputs":[{"internalType":"uint256","name":"timeLeft","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeStarted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526003805460ff60a01b191690553480156200001e57600080fd5b50604051620024bd380380620024bd8339810160408190526200004191620003ce565b600160005562000051336200035f565b6001600160a01b038616620000b25760405162461bcd60e51b815260206004820152602d60248201526000805160206200249d83398151915260448201526c207a65726f206164647265737360981b60648201526084015b60405180910390fd5b6001600160a01b0385166200010f5760405162461bcd60e51b815260206004820152602d60248201526000805160206200249d83398151915260448201526c207a65726f206164647265737360981b6064820152608401620000a9565b846001600160a01b0316866001600160a01b031603620001875760405162461bcd60e51b815260206004820152603e60248201526000805160206200249d83398151915260448201527f20746f6b656e20616e64206c6f636b65722073616d65206164647265737300006064820152608401620000a9565b60008411620001ee5760405162461bcd60e51b815260206004820152603660248201526000805160206200249d83398151915260448201527f2074696d6520696e74657276616c206d697373696e67000000000000000000006064820152608401620000a9565b60008311620002555760405162461bcd60e51b815260206004820152603e60248201526000805160206200249d83398151915260448201527f20746172647920686f6c64657220696e74657266616c206d697373696e6700006064820152608401620000a9565b60008211620002b05760405162461bcd60e51b815260206004820152603160248201526000805160206200249d83398151915260448201527002077726f6e6720696e697469616c20707607c1b6064820152608401620000a9565b60008111620003175760405162461bcd60e51b815260206004820152603360248201526000805160206200249d83398151915260448201527f2077726f6e6720726563757272696e67207070000000000000000000000000006064820152608401620000a9565b600280546001600160a01b039788166001600160a01b03199182161790915560038054969097169516949094179094556004919091556006556007919091556008556200042b565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b0381168114620003c957600080fd5b919050565b60008060008060008060c08789031215620003e857600080fd5b620003f387620003b1565b95506200040360208801620003b1565b945060408701519350606087015192506080870151915060a087015190509295509295509295565b612062806200043b6000396000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c80639db0c0a2116100de578063ed91a6cb11610097578063f04d688f11610071578063f04d688f1461039c578063f2fde38b146103a4578063fc0c546a146103b7578063fc45bbc8146103ca57600080fd5b8063ed91a6cb14610377578063ee7cab5614610380578063f000b5541461039357600080fd5b80639db0c0a2146102d5578063a8d3a17c1461030b578063be9a655514610336578063c1a35b381461033e578063c313969314610351578063d7b96d4e1461036457600080fd5b806365bcfbe71161014b5780638864fae9116101255780638864fae9146102675780638da5cb5b146102875780638f516438146102ac57806391e0c640146102b557600080fd5b806365bcfbe714610217578063715018a61461023757806373d4a13a1461023f57600080fd5b806286074e14610192578063104732c9146101c55780634e71d92d146101ce57806353ef6781146101d8578063544736e6146101fc578063638f65751461020e575b600080fd5b6101b26101a0366004611a73565b600c6020526000908152604090205481565b6040519081526020015b60405180910390f35b6101b260065481565b6101d66103f4565b005b6003546101ec90600160a01b900460ff1681565b60405190151581526020016101bc565b600354600160a01b900460ff166101ec565b6101b260055481565b6101b2610225366004611a73565b600b6020526000908152604090205481565b6101d661073f565b610247610775565b6040805194855260208501939093529183015260608201526080016101bc565b6101b2610275366004611a73565b60096020526000908152604090205481565b6001546001600160a01b03165b6040516001600160a01b0390911681526020016101bc565b6101b260045481565b6101b26102c3366004611a73565b600a6020526000908152604090205481565b6101ec6102e3366004611a73565b6001600160a01b03166000908152600a60209081526040808320546009909252909120541190565b6101ec610319366004611a73565b6001600160a01b03166000908152600a6020526040902054151590565b6101d6610874565b6101b261034c366004611a73565b61096f565b6101b261035f366004611a73565b6109ea565b600354610294906001600160a01b031681565b6101b260075481565b6101d661038e366004611b64565b610a6b565b6101b260085481565b6101d6610c89565b6101d66103b2366004611a73565b61104a565b600254610294906001600160a01b031681565b6103d26110e5565b60408051948552602085019390935291830152151560608201526080016101bc565b600354600160a01b900460ff166104265760405162461bcd60e51b815260040161041d90611c24565b60405180910390fd5b336104435760405162461bcd60e51b815260040161041d90611c6e565b3360009081526009602052604090205461046f5760405162461bcd60e51b815260040161041d90611cbe565b610478336102e3565b6104945760405162461bcd60e51b815260040161041d90611d1b565b336000908152600a60205260409020546105095760405162461bcd60e51b815260206004820152603060248201527f44474e584c65676163794469736275727365723a3a636c61696d206d6973736960448201526f6e6720696e697469616c20636c61696d60801b606482015260840161041d565b61051161137b565b60008060008061051f6110e5565b93509350935093506000841161057b5760405162461bcd60e51b815260206004820152602d602482015260008051602061200d83398151915260448201526c6e6f7420636c61696d61626c6560981b606482015260840161041d565b336000908152600a60205260408120805486929061059a908490611d83565b9091555050336000908152600b6020526040812080548592906105be908490611d83565b90915550506004546105d09084611d9b565b336000908152600c6020526040812080549091906105ef908490611d83565b9091555050801561064257336000908152600a6020908152604080832054600990925282205461061f9190611dba565b905080156106405733600090815260096020526040812055610640816116d4565b505b6002546001600160a01b031663a9059cbb336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018790526044016020604051808303816000875af11580156106a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c59190611dd1565b6106e15760405162461bcd60e51b815260040161041d90611df3565b336000818152600c60209081526040918290205482519081529081019290925281810186905260608201849052517f1ab7e33c8be9d63330be0057f70d4bb0e5bb8472056cdbf45c69f257815733e79181900360800190a150505050565b6001546001600160a01b031633146107695760405162461bcd60e51b815260040161041d90611e2a565b610773600061175c565b565b60008060008060005b600d5481101561086d576000600d828154811061079d5761079d611e5f565b60009182526020808320909101546001600160a01b031680835260099091526040909120549091506107cf9087611d83565b6001600160a01b0382166000908152600a60205260409020549096506107f59086611d83565b6001600160a01b0382166000908152600b602052604090205490955061081b9085611d83565b6001600160a01b0382166000908152600c602052604090205490945083101561085a576001600160a01b0381166000908152600c602052604090205492505b508061086581611e75565b91505061077e565b5090919293565b6001546001600160a01b0316331461089e5760405162461bcd60e51b815260040161041d90611e2a565b600354600160a01b900460ff161561090b5760405162461bcd60e51b815260206004820152602a60248201527f44474e584c65676163794469736275727365723a3a737461727420616c726561604482015269191e481cdd185c9d195960b21b606482015260840161041d565b6003805460ff60a01b1916600160a01b1790554260058190557f2a755f1e668d3d01d042b367d30f1f477611d0a3253a311cc855c4299c01e6159061094d3390565b604080519283526001600160a01b0390911660208301520160405180910390a1565b6001600160a01b03811660009081526009602052604090205480158015906109ae57506001600160a01b0382166000908152600a602052604090205415155b156109e5576001600160a01b0382166000908152600a60209081526040808320546009909252909120546109e29190611dba565b90505b919050565b6001600160a01b0381166000908152600c602052604081205415801590610a3557506004546001600160a01b0383166000908152600c60205260409020544291610a3391611d83565b115b156109e5576004546001600160a01b0383166000908152600c60205260409020544291610a6191611d83565b6109e29190611dba565b6001546001600160a01b03163314610a955760405162461bcd60e51b815260040161041d90611e2a565b8051825114610b005760405162461bcd60e51b815260206004820152603160248201527f44474e584c65676163794469736275727365723a3a6164644261746368206e6f6044820152700e840e8d0ca40e6c2daca40d8cadccee8d607b1b606482015260840161041d565b60005b8251811015610c495760096000848381518110610b2257610b22611e5f565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020546000148015610b86575060006001600160a01b0316838281518110610b7257610b72611e5f565b60200260200101516001600160a01b031614155b15610c3757818181518110610b9d57610b9d611e5f565b602002602001015160096000858481518110610bbb57610bbb611e5f565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550600d838281518110610bfb57610bfb611e5f565b60209081029190910181015182546001810184556000938452919092200180546001600160a01b0319166001600160a01b039092169190911790555b80610c4181611e75565b915050610b03565b507f71b064ff851940b6c593cc170f706a7fc074b04973b518a0078c47bb8d79ac79828233604051610c7d93929190611e8e565b60405180910390a15050565b600354600160a01b900460ff16610cb25760405162461bcd60e51b815260040161041d90611c24565b33610ccf5760405162461bcd60e51b815260040161041d90611c6e565b33600090815260096020526040902054610cfb5760405162461bcd60e51b815260040161041d90611cbe565b610d04336102e3565b610d205760405162461bcd60e51b815260040161041d90611d1b565b600654600554610d309042611dba565b10610d915760405162461bcd60e51b815260206004820152603c602482015260008051602061200d83398151915260448201527f666972737420636c616d696e6720706572696f64206973206f76657200000000606482015260840161041d565b336000908152600a602052604090205415610e025760405162461bcd60e51b815260206004820152603d602482015260008051602061200d83398151915260448201527f616c726561647920636c61696d656420696e697469616c2066756e6473000000606482015260840161041d565b6000606460075460096000610e143390565b6001600160a01b03166001600160a01b0316815260200190815260200160002054610e3f9190611d9b565b610e499190611f36565b6002546040516370a0823160e01b81523060048201529192506001600160a01b0316906370a0823190602401602060405180830381865afa158015610e92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb69190611f4a565b811115610f285760405162461bcd60e51b8152602060048201526046602482015260008051602061200d83398151915260448201527f6e6f7420656e6f7567682066756e647320636c61696d656420696e697469616c6064820152652066756e647360d01b608482015260a40161041d565b336000908152600a602052604081208054839290610f47908490611d83565b9091555050336000818152600c60209081526040808320429055600254815163a9059cbb60e01b815260048101959095526024850186905290516001600160a01b039091169363a9059cbb93604480830194939283900301908290875af1158015610fb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fda9190611dd1565b610ff65760405162461bcd60e51b815260040161041d90611df3565b336000818152600c602090815260409182902054825190815290810192909252818101839052517f43fa0258ec0e45949624dac1825f13ea6de97616e30732bef8740fb0075565b59181900360600190a150565b6001546001600160a01b031633146110745760405162461bcd60e51b815260040161041d90611e2a565b6001600160a01b0381166110d95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161041d565b6110e28161175c565b50565b6000806000806110ff60035460ff600160a01b9091041690565b61111b5760405162461bcd60e51b815260040161041d90611c24565b336111385760405162461bcd60e51b815260040161041d90611c6e565b336000908152600960205260409020546111645760405162461bcd60e51b815260040161041d90611cbe565b61116d336102e3565b6111895760405162461bcd60e51b815260040161041d90611d1b565b336000908152600a60205260409020546111f15760405162461bcd60e51b8152602060048201526035602482015260008051602061200d8339815191526044820152746d697373696e6720696e697469616c20636c61696d60581b606482015260840161041d565b336000908152600c602052604081205461120b9042611dba565b905060006112183361096f565b6002549091506001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611271573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112959190611f4a565b6004549094506112a58184611f63565b6112af9084611dba565b6112b99190611f36565b9450841561137357336000908152600b60205260409020546018906112df908790611d83565b1061130657336000908152600b60205260409020546112ff906018611dba565b9450600192505b8360005b8681101561134a576064600854836113229190611d9b565b61132c9190611f36565b6113369083611d83565b91508061134281611e75565b91505061130a565b50816113568683611dba565b111561136457819650611371565b61136e8582611dba565b96505b505b505090919293565b60065460055461138b9042611dba565b1180156113995750600d5415155b156107735760008060005b600d54811080156113bc57506001600160a01b038316155b1561144357600a6000600d83815481106113d8576113d8611e5f565b60009182526020808320909101546001600160a01b03168352820192909252604001812054900361143157600d818154811061141657611416611e5f565b6000918252602090912001546001600160a01b031692509050805b8061143b81611e75565b9150506113a4565b506001600160a01b038216156116d0576001600160a01b0382166000908152600960209081526040808320805490849055600a909252822091909155600d805461148f90600190611dba565b8154811061149f5761149f611e5f565b600091825260209091200154600d80546001600160a01b0390921691849081106114cb576114cb611e5f565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600d80548061150a5761150a611f77565b600082815260209020600019908201810180546001600160a01b031916905501905560025460035460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810184905291169063a9059cbb906044016020604051808303816000875af1158015611581573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a59190611dd1565b61160d5760405162461bcd60e51b815260206004820152603360248201527f44474e584c65676163794469736275727365723a3a72656d6f76654f6e6554616044820152721c991e521bdb19195c88151e0819985a5b1959606a1b606482015260840161041d565b600360009054906101000a90046001600160a01b03166001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561165d57600080fd5b505af1158015611671573d6000803e3d6000fd5b505050507ff306c75f1622307213f555c1f74744436eec68bc81e3599eb02266491e36405c4261169e3390565b604080519283526001600160a01b039182166020840152908616908201526060810183905260800160405180910390a1505b5050565b6003546002546116f1916001600160a01b039182169116836117ae565b600360009054906101000a90046001600160a01b03166001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561174157600080fd5b505af1158015611755573d6000803e3d6000fd5b5050505050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611800908490611805565b505050565b600061185a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118d79092919063ffffffff16565b80519091501561180057808060200190518101906118789190611dd1565b6118005760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161041d565b60606118e684846000856118f0565b90505b9392505050565b6060824710156119515760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161041d565b6001600160a01b0385163b6119a85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161041d565b600080866001600160a01b031685876040516119c49190611fbd565b60006040518083038185875af1925050503d8060008114611a01576040519150601f19603f3d011682016040523d82523d6000602084013e611a06565b606091505b5091509150611a16828286611a23565b925050505b949350505050565b60608315611a325750816118e9565b825115611a425782518084602001fd5b8160405162461bcd60e51b815260040161041d9190611fd9565b80356001600160a01b03811681146109e557600080fd5b600060208284031215611a8557600080fd5b6118e982611a5c565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611acd57611acd611a8e565b604052919050565b600067ffffffffffffffff821115611aef57611aef611a8e565b5060051b60200190565b600082601f830112611b0a57600080fd5b81356020611b1f611b1a83611ad5565b611aa4565b82815260059290921b84018101918181019086841115611b3e57600080fd5b8286015b84811015611b595780358352918301918301611b42565b509695505050505050565b60008060408385031215611b7757600080fd5b823567ffffffffffffffff80821115611b8f57600080fd5b818501915085601f830112611ba357600080fd5b81356020611bb3611b1a83611ad5565b82815260059290921b84018101918181019089841115611bd257600080fd5b948201945b83861015611bf757611be886611a5c565b82529482019490820190611bd7565b96505086013592505080821115611c0d57600080fd5b50611c1a85828601611af9565b9150509250929050565b6020808252602a908201527f44474e584c65676163794469736275727365723a3a697353746172746564206e6040820152691bdd081cdd185c9d195960b21b606082015260800190565b60208082526030908201527f44474e584c65676163794469736275727365723a3a616c6c6f776564546f436c60408201526f61696d207a65726f206164647265737360801b606082015260800190565b6020808252603e908201527f44474e584c65676163794469736275727365723a3a616c6c6f776564546f436c60408201527f61696d206e6f7420616c6c6f77656420746f2070617274696369706174650000606082015260800190565b60208082526032908201527f44474e584c65676163794469736275727365723a3a616c6c6f776564546f436c604082015271185a5b481b9bc8185b5bdd5b9d081b19599d60721b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115611d9657611d96611d6d565b500190565b6000816000190483118215151615611db557611db5611d6d565b500290565b600082821015611dcc57611dcc611d6d565b500390565b600060208284031215611de357600080fd5b815180151581146118e957600080fd5b602080825260299082015260008051602061200d833981519152604082015268151e0819985a5b195960ba1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060018201611e8757611e87611d6d565b5060010190565b606080825284519082018190526000906020906080840190828801845b82811015611ed05781516001600160a01b031684529284019290840190600101611eab565b5050508381038285015285518082528683019183019060005b81811015611f0557835183529284019291840191600101611ee9565b50506001600160a01b03861660408601529250611a1b915050565b634e487b7160e01b600052601260045260246000fd5b600082611f4557611f45611f20565b500490565b600060208284031215611f5c57600080fd5b5051919050565b600082611f7257611f72611f20565b500690565b634e487b7160e01b600052603160045260246000fd5b60005b83811015611fa8578181015183820152602001611f90565b83811115611fb7576000848401525b50505050565b60008251611fcf818460208701611f8d565b9190910192915050565b6020815260008251806020840152611ff8816040850160208701611f8d565b601f01601f1916919091016040019291505056fe44474e584c65676163794469736275727365723a3a636c61696d537461727420a26469706673582212202e6ca486cc84b228e76683487c6310517ac3586165650ab5382981ef87ebe1be64736f6c634300080d003344474e584c65676163794469736275727365723a3a636f6e7374727563746f7200000000000000000000000051e48670098173025c477d9aa3f0eff7bf9f78120000000000000000000000002c7d8bb6aba4fff56cddbf9ea47ed270a10098f70000000000000000000000000000000000000000000000000000000000278d00000000000000000000000000000000000000000000000000000000000076a700000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000005

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

00000000000000000000000051e48670098173025c477d9aa3f0eff7bf9f78120000000000000000000000002c7d8bb6aba4fff56cddbf9ea47ed270a10098f70000000000000000000000000000000000000000000000000000000000278d00000000000000000000000000000000000000000000000000000000000076a700000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000005

-----Decoded View---------------
Arg [0] : _token (address): 0x51e48670098173025c477d9aa3f0eff7bf9f7812
Arg [1] : _locker (address): 0x2c7d8bb6aba4fff56cddbf9ea47ed270a10098f7
Arg [2] : _timeInterval (uint256): 2592000
Arg [3] : _timeIntervalTardyHolder (uint256): 7776000
Arg [4] : _ppInitial (uint256): 10
Arg [5] : _ppRecurring (uint256): 5

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 00000000000000000000000051e48670098173025c477d9aa3f0eff7bf9f7812
Arg [1] : 0000000000000000000000002c7d8bb6aba4fff56cddbf9ea47ed270a10098f7
Arg [2] : 0000000000000000000000000000000000000000000000000000000000278d00
Arg [3] : 000000000000000000000000000000000000000000000000000000000076a700
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000005


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.