Contract 0xF86E9f86AabD3249BA02Caf0708CdE3E215a2d57 2

Token Contract 
 
 
Txn Hash
Method
Block
From
To
Value
0x2dca5e004f3a4debd2b89d69335f34304dd85aaf514be716d5d65111897555c40x60806040130808132021-08-23 9:43:54469 days 9 hrs agoLegend of Fantasy War: Deployer IN  Create: LFWToken0 Ether0.1006535735.12431752
[ Download CSV Export 

OVERVIEW

DeFi & NFT | Play to Earn 3D turn-based role-playing game .Build a mighty army and lead your team to victory using the unique skills of your heroes and units.

Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LFWToken

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 9 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

        return true;
    }

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

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

        return true;
    }

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

        _beforeTokenTransfer(sender, recipient, amount);

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

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

File 2 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 3 of 9 : ERC20Burnable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

File 4 of 9 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";

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

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

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

File 5 of 9 : ERC20PresetFixedSupply.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../extensions/ERC20Burnable.sol";

/**
 * @dev {ERC20} token, including:
 *
 *  - Preminted initial supply
 *  - Ability for holders to burn (destroy) their tokens
 *  - No access control mechanism (for minting/pausing) and hence no governance
 *
 * This contract uses {ERC20Burnable} to include burn capabilities - head to
 * its documentation for details.
 *
 * _Available since v3.4._
 */
contract ERC20PresetFixedSupply is ERC20Burnable {
    /**
     * @dev Mints `initialSupply` amount of token and transfers them to `owner`.
     *
     * See {ERC20-constructor}.
     */
    constructor(
        string memory name,
        string memory symbol,
        uint256 initialSupply,
        address owner
    ) ERC20(name, symbol) {
        _mint(owner, initialSupply);
    }
}

File 6 of 9 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 7 of 9 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 8 of 9 : LFWToken.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol";
import "./whitelist/LGEWhitelisted.sol";

contract LFWToken is ERC20PresetFixedSupply, LGEWhitelisted {
    constructor()
        ERC20PresetFixedSupply(
            "Legend Fantasy War Token",
            "LFW",
            200000000 * 10**decimals(),
            msg.sender
        )
    {}

    // Hook into openzeppelin's flow to support LP whitelist
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, amount);

        _applyLGEWhitelist(from, to, amount);
    }
}

File 9 of 9 : LGEWhitelisted.sol
// SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";

pragma solidity ^0.8.4;

contract LGEWhitelisted is Context {
    using SafeMath for uint256;

    struct WhitelistRound {
        uint256 duration;
        uint256 amountMax;
        mapping(address => bool) addresses;
        mapping(address => uint256) purchased;
    }

    WhitelistRound[] public _lgeWhitelistRounds;

    uint256 public _lgeTimestamp;
    address public _lgePairAddress;

    address public _whitelister;

    event WhitelisterTransferred(
        address indexed previousWhitelister,
        address indexed newWhitelister
    );

    constructor() {
        _whitelister = _msgSender();
    }

    modifier onlyWhitelister() {
        require(_whitelister == _msgSender(), "Caller is not the whitelister");
        _;
    }

    function renounceWhitelister() external onlyWhitelister {
        emit WhitelisterTransferred(_whitelister, address(0));
        _whitelister = address(0);
    }

    function transferWhitelister(address newWhitelister)
        external
        onlyWhitelister
    {
        _transferWhitelister(newWhitelister);
    }

    function _transferWhitelister(address newWhitelister) internal {
        require(
            newWhitelister != address(0),
            "New whitelister is the zero address"
        );
        emit WhitelisterTransferred(_whitelister, newWhitelister);
        _whitelister = newWhitelister;
    }

    /*
     * createLGEWhitelist - Call this after initial Token Generation Event (TGE)
     *
     * pairAddress - address generated from createPair() event on DEX
     * durations - array of durations (seconds) for each whitelist rounds
     * amountsMax - array of max amounts (TOKEN decimals) for each whitelist round
     *
     */

    function createLGEWhitelist(
        address pairAddress,
        uint256[] calldata durations,
        uint256[] calldata amountsMax
    ) external onlyWhitelister {
        require(durations.length == amountsMax.length, "Invalid whitelist(s)");

        _lgePairAddress = pairAddress;

        if (durations.length > 0) {
            delete _lgeWhitelistRounds;

            for (uint256 i = 0; i < durations.length; i++) {
                WhitelistRound storage wlRound = _lgeWhitelistRounds.push();

                wlRound.duration = durations[i];
                wlRound.amountMax = amountsMax[i];
            }
        }
    }

    /*
     * modifyLGEWhitelistAddresses - Define what addresses are included/excluded from a whitelist round
     *
     * index - 0-based index of round to modify whitelist
     * duration - period in seconds from LGE event or previous whitelist round
     * amountMax - max amount (TOKEN decimals) for each whitelist round
     *
     */

    function modifyLGEWhitelist(
        uint256 index,
        uint256 duration,
        uint256 amountMax,
        address[] calldata addresses,
        bool enabled
    ) external onlyWhitelister {
        require(index < _lgeWhitelistRounds.length, "Invalid index");
        require(amountMax > 0, "Invalid amountMax");

        if (duration != _lgeWhitelistRounds[index].duration)
            _lgeWhitelistRounds[index].duration = duration;

        if (amountMax != _lgeWhitelistRounds[index].amountMax)
            _lgeWhitelistRounds[index].amountMax = amountMax;

        for (uint256 i = 0; i < addresses.length; i++) {
            _lgeWhitelistRounds[index].addresses[addresses[i]] = enabled;
        }
    }

    /*
     *  getLGEWhitelistRound
     *
     *  returns:
     *
     *  1. whitelist round number ( 0 = no active round now )
     *  2. duration, in seconds, current whitelist round is active for
     *  3. timestamp current whitelist round closes at
     *  4. maximum amount a whitelister can purchase in this round
     *  5. is caller whitelisted
     *  6. how much caller has purchased in current whitelist round
     *
     */

    function getLGEWhitelistRound()
        public
        view
        returns (
            uint256,
            uint256,
            uint256,
            uint256,
            bool,
            uint256
        )
    {
        if (_lgeTimestamp > 0) {
            uint256 wlCloseTimestampLast = _lgeTimestamp;

            for (uint256 i = 0; i < _lgeWhitelistRounds.length; i++) {
                WhitelistRound storage wlRound = _lgeWhitelistRounds[i];

                wlCloseTimestampLast = wlCloseTimestampLast.add(
                    wlRound.duration
                );
                if (block.timestamp <= wlCloseTimestampLast)
                    return (
                        i.add(1),
                        wlRound.duration,
                        wlCloseTimestampLast,
                        wlRound.amountMax,
                        wlRound.addresses[_msgSender()],
                        wlRound.purchased[_msgSender()]
                    );
            }
        }

        return (0, 0, 0, 0, false, 0);
    }

    /*
     * _applyLGEWhitelist - internal function to be called initially before any transfers
     *
     */

    function _applyLGEWhitelist(
        address sender,
        address recipient,
        uint256 amount
    ) internal {
        if (_lgePairAddress == address(0) || _lgeWhitelistRounds.length == 0)
            return;

        if (
            _lgeTimestamp == 0 &&
            sender != _lgePairAddress &&
            recipient == _lgePairAddress &&
            amount > 0
        ) _lgeTimestamp = block.timestamp;

        if (sender == _lgePairAddress && recipient != _lgePairAddress) {
            //buying

            (uint256 wlRoundNumber, , , , , ) = getLGEWhitelistRound();

            if (wlRoundNumber > 0) {
                WhitelistRound storage wlRound = _lgeWhitelistRounds[
                    wlRoundNumber.sub(1)
                ];

                require(
                    wlRound.addresses[recipient],
                    "LGE - Buyer is not whitelisted"
                );

                uint256 amountRemaining = 0;

                if (wlRound.purchased[recipient] < wlRound.amountMax)
                    amountRemaining = wlRound.amountMax.sub(
                        wlRound.purchased[recipient]
                    );

                require(
                    amount <= amountRemaining,
                    "LGE - Amount exceeds whitelist maximum"
                );
                wlRound.purchased[recipient] = wlRound.purchased[recipient].add(
                    amount
                );
            }
        }
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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":"previousWhitelister","type":"address"},{"indexed":true,"internalType":"address","name":"newWhitelister","type":"address"}],"name":"WhitelisterTransferred","type":"event"},{"inputs":[],"name":"_lgePairAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_lgeTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_lgeWhitelistRounds","outputs":[{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"amountMax","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_whitelister","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":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pairAddress","type":"address"},{"internalType":"uint256[]","name":"durations","type":"uint256[]"},{"internalType":"uint256[]","name":"amountsMax","type":"uint256[]"}],"name":"createLGEWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getLGEWhitelistRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bool","name":"","type":"bool"},{"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":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"amountMax","type":"uint256"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"modifyLGEWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceWhitelister","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newWhitelister","type":"address"}],"name":"transferWhitelister","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040518060400160405280601881526020017f4c6567656e642046616e746173792057617220546f6b656e00000000000000008152506040518060400160405280600381526020017f4c465700000000000000000000000000000000000000000000000000000000008152506200008e6200015060201b60201c565b600a6200009c919062000c3f565b630bebc200620000ad919062000d7c565b3383838160039080519060200190620000c8929190620009bd565b508060049080519060200190620000e1929190620009bd565b505050620000f681836200015960201b60201c565b505050506200010a620002d260201b60201c565b600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062000fbf565b60006012905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620001cc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001c39062000b37565b60405180910390fd5b620001e060008383620002da60201b60201c565b8060026000828254620001f4919062000b87565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546200024b919062000b87565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620002b2919062000b59565b60405180910390a3620002ce600083836200030a60201b60201c565b5050565b600033905090565b620002f28383836200030f60201b620013691760201c565b620003058383836200031460201b60201c565b505050565b505050565b505050565b600073ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806200037757506000600580549050145b156200038357620007c4565b6000600654148015620003e45750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156200043e5750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80156200044b5750600081115b156200045957426006819055505b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015620005055750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15620007c35760006200051d620007c960201b60201c565b505050505090506000811115620007c157600060056200054d6001846200098d60201b6200136e1790919060201c565b8154811062000585577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906004020190508060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1662000626576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200061d9062000b15565b60405180910390fd5b600081600101548260030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015620006d857620006d58260030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483600101546200098d60201b6200136e1790919060201c565b90505b808411156200071e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620007159062000af3565b60405180910390fd5b62000779848360030160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054620009a560201b620013841790919060201c565b8260030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050505b505b5b505050565b600080600080600080600060065411156200096f576000600654905060005b6005805490508110156200096c5760006005828154811062000833577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060040201905062000861816000015484620009a560201b620013841790919060201c565b9250824211620009555762000886600183620009a560201b620013841790919060201c565b8160000154848360010154846002016000620008a7620002d260201b60201c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1685600301600062000905620002d260201b60201c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205498509850985098509850985050505062000985565b508080620009639062000e65565b915050620007e8565b50505b6000806000806000809550955095509550955095505b909192939495565b600081836200099d919062000ddd565b905092915050565b60008183620009b5919062000b87565b905092915050565b828054620009cb9062000e2f565b90600052602060002090601f016020900481019282620009ef576000855562000a3b565b82601f1062000a0a57805160ff191683800117855562000a3b565b8280016001018555821562000a3b579182015b8281111562000a3a57825182559160200191906001019062000a1d565b5b50905062000a4a919062000a4e565b5090565b5b8082111562000a6957600081600090555060010162000a4f565b5090565b600062000a7c60268362000b76565b915062000a898262000f1e565b604082019050919050565b600062000aa3601e8362000b76565b915062000ab08262000f6d565b602082019050919050565b600062000aca601f8362000b76565b915062000ad78262000f96565b602082019050919050565b62000aed8162000e18565b82525050565b6000602082019050818103600083015262000b0e8162000a6d565b9050919050565b6000602082019050818103600083015262000b308162000a94565b9050919050565b6000602082019050818103600083015262000b528162000abb565b9050919050565b600060208201905062000b70600083018462000ae2565b92915050565b600082825260208201905092915050565b600062000b948262000e18565b915062000ba18362000e18565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111562000bd95762000bd862000eb3565b5b828201905092915050565b6000808291508390505b600185111562000c365780860481111562000c0e5762000c0d62000eb3565b5b600185161562000c1e5780820291505b808102905062000c2e8562000f11565b945062000bee565b94509492505050565b600062000c4c8262000e18565b915062000c598362000e22565b925062000c887fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848462000c90565b905092915050565b60008262000ca2576001905062000d75565b8162000cb2576000905062000d75565b816001811462000ccb576002811462000cd65762000d0c565b600191505062000d75565b60ff84111562000ceb5762000cea62000eb3565b5b8360020a91508482111562000d055762000d0462000eb3565b5b5062000d75565b5060208310610133831016604e8410600b841016171562000d465782820a90508381111562000d405762000d3f62000eb3565b5b62000d75565b62000d55848484600162000be4565b9250905081840481111562000d6f5762000d6e62000eb3565b5b81810290505b9392505050565b600062000d898262000e18565b915062000d968362000e18565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161562000dd25762000dd162000eb3565b5b828202905092915050565b600062000dea8262000e18565b915062000df78362000e18565b92508282101562000e0d5762000e0c62000eb3565b5b828203905092915050565b6000819050919050565b600060ff82169050919050565b6000600282049050600182168062000e4857607f821691505b6020821081141562000e5f5762000e5e62000ee2565b5b50919050565b600062000e728262000e18565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141562000ea85762000ea762000eb3565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60008160011c9050919050565b7f4c4745202d20416d6f756e7420657863656564732077686974656c697374206d60008201527f6178696d756d0000000000000000000000000000000000000000000000000000602082015250565b7f4c4745202d204275796572206973206e6f742077686974656c69737465640000600082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6130018062000fcf6000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c8063532f1fed116100b8578063a457c2d71161007c578063a457c2d714610356578063a77cac7a14610386578063a9059cbb146103b7578063d5215d11146103e7578063da91b76e14610405578063dd62ed3e1461042357610142565b8063532f1fed146102c657806370a08231146102e257806379cc67901461031257806395d89b411461032e5780639ad3a7ba1461034c57610142565b80632e15e5c71161010a5780632e15e5c714610206578063313ce56714610222578063395093511461024057806342966c681461027057806344ade3c51461028c57806349448898146102a857610142565b806306fdde0314610147578063095ea7b31461016557806318160ddd146101955780631b29b0cd146101b357806323b872dd146101d6575b600080fd5b61014f610453565b60405161015c91906125eb565b60405180910390f35b61017f600480360381019061017a91906121f6565b6104e5565b60405161018c91906125d0565b60405180910390f35b61019d610503565b6040516101aa919061282d565b60405180910390f35b6101bb61050d565b6040516101cd96959493929190612871565b60405180910390f35b6101f060048036038101906101eb919061211e565b6106ab565b6040516101fd91906125d0565b60405180910390f35b610220600480360381019061021b91906120b9565b6107a3565b005b61022a610846565b60405161023791906128d2565b60405180910390f35b61025a600480360381019061025591906121f6565b61084f565b60405161026791906125d0565b60405180910390f35b61028a60048036038101906102859190612232565b6108fb565b005b6102a660048036038101906102a1919061225b565b61090f565b005b6102b0610c8d565b6040516102bd91906125b5565b60405180910390f35b6102e060048036038101906102db919061216d565b610cb3565b005b6102fc60048036038101906102f791906120b9565b610ecc565b604051610309919061282d565b60405180910390f35b61032c600480360381019061032791906121f6565b610f14565b005b610336610f8f565b60405161034391906125eb565b60405180910390f35b610354611021565b005b610370600480360381019061036b91906121f6565b611179565b60405161037d91906125d0565b60405180910390f35b6103a0600480360381019061039b9190612232565b611264565b6040516103ae929190612848565b60405180910390f35b6103d160048036038101906103cc91906121f6565b611298565b6040516103de91906125d0565b60405180910390f35b6103ef6112b6565b6040516103fc91906125b5565b60405180910390f35b61040d6112dc565b60405161041a919061282d565b60405180910390f35b61043d600480360381019061043891906120e2565b6112e2565b60405161044a919061282d565b60405180910390f35b60606003805461046290612a1b565b80601f016020809104026020016040519081016040528092919081815260200182805461048e90612a1b565b80156104db5780601f106104b0576101008083540402835291602001916104db565b820191906000526020600020905b8154815290600101906020018083116104be57829003601f168201915b5050505050905090565b60006104f96104f261139a565b84846113a2565b6001905092915050565b6000600254905090565b6000806000806000806000600654111561068d576000600654905060005b60058054905081101561068a57600060058281548110610574577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060040201905061059b81600001548461138490919063ffffffff16565b9250824211610676576105b860018361138490919063ffffffff16565b81600001548483600101548460020160006105d161139a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1685600301600061062761139a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549850985098509850985098505050506106a3565b50808061068290612a4d565b91505061052b565b50505b6000806000806000809550955095509550955095505b909192939495565b60006106b884848461156d565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061070361139a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610783576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077a906126cd565b60405180910390fd5b6107978561078f61139a565b8584036113a2565b60019150509392505050565b6107ab61139a565b73ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461083a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610831906127ed565b60405180910390fd5b610843816117ee565b50565b60006012905090565b60006108f161085c61139a565b84846001600061086a61139a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546108ec9190612909565b6113a2565b6001905092915050565b61090c61090661139a565b8261191e565b50565b61091761139a565b73ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099d906127ed565b60405180910390fd5b60058054905086106109ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e49061266d565b60405180910390fd5b60008411610a30576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a279061272d565b60405180910390fd5b60058681548110610a6a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060040201600001548514610ad3578460058781548110610abd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060040201600001819055505b60058681548110610b0d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060040201600101548414610b76578360058781548110610b60577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060040201600101819055505b60005b83839050811015610c84578160058881548110610bbf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600402016002016000868685818110610c0b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050602002016020810190610c2091906120b9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610c7c90612a4d565b915050610b79565b50505050505050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610cbb61139a565b73ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d41906127ed565b60405180910390fd5b818190508484905014610d92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d89906127cd565b60405180910390fd5b84600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000848490501115610ec55760056000610ded9190611f9b565b60005b84849050811015610ec357600060056001816001815401808255809150500390600052602060002090600402019050858583818110610e58577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201358160000181905550838383818110610ea0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201358160010181905550508080610ebb90612a4d565b915050610df0565b505b5050505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000610f2783610f2261139a565b6112e2565b905081811015610f6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f639061270d565b60405180910390fd5b610f8083610f7861139a565b8484036113a2565b610f8a838361191e565b505050565b606060048054610f9e90612a1b565b80601f0160208091040260200160405190810160405280929190818152602001828054610fca90612a1b565b80156110175780601f10610fec57610100808354040283529160200191611017565b820191906000526020600020905b815481529060010190602001808311610ffa57829003601f168201915b5050505050905090565b61102961139a565b73ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110af906127ed565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f4e78506f3260e366dc9440ee0b4eca2d03aa91536b7605deb90e873d3fc4e5b460405160405180910390a36000600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000806001600061118861139a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015611245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161123c9061280d565b60405180910390fd5b61125961125061139a565b858584036113a2565b600191505092915050565b6005818154811061127457600080fd5b90600052602060002090600402016000915090508060000154908060010154905082565b60006112ac6112a561139a565b848461156d565b6001905092915050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b505050565b6000818361137c919061295f565b905092915050565b600081836113929190612909565b905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611412576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611409906127ad565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611482576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114799061264d565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611560919061282d565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156115dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115d49061276d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561164d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116449061260d565b60405180910390fd5b611658838383611af5565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156116de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d59061268d565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546117719190612909565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516117d5919061282d565b60405180910390a36117e8848484611b10565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561185e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118559061278d565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f4e78506f3260e366dc9440ee0b4eca2d03aa91536b7605deb90e873d3fc4e5b460405160405180910390a380600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561198e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119859061274d565b60405180910390fd5b61199a82600083611af5565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611a20576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a179061262d565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160026000828254611a77919061295f565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611adc919061282d565b60405180910390a3611af083600084611b10565b505050565b611b00838383611369565b611b0b838383611b15565b505050565b505050565b600073ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611b7757506000600580549050145b15611b8157611f96565b6000600654148015611be15750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611c3a5750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b8015611c465750600081115b15611c5357426006819055505b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611cfe5750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611f95576000611d0d61050d565b505050505090506000811115611f935760006005611d3560018461136e90919063ffffffff16565b81548110611d6c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906004020190508060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611e0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e01906126ed565b60405180910390fd5b600081600101548260030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015611eb457611eb18260030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836001015461136e90919063ffffffff16565b90505b80841115611ef7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eee906126ad565b60405180910390fd5b611f4b848360030160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461138490919063ffffffff16565b8260030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050505b505b5b505050565b5080546000825560040290600052602060002090810190611fbc9190611fbf565b50565b5b80821115611fe257600080820160009055600182016000905550600401611fc0565b5090565b600081359050611ff581612f86565b92915050565b60008083601f84011261200d57600080fd5b8235905067ffffffffffffffff81111561202657600080fd5b60208301915083602082028301111561203e57600080fd5b9250929050565b60008083601f84011261205757600080fd5b8235905067ffffffffffffffff81111561207057600080fd5b60208301915083602082028301111561208857600080fd5b9250929050565b60008135905061209e81612f9d565b92915050565b6000813590506120b381612fb4565b92915050565b6000602082840312156120cb57600080fd5b60006120d984828501611fe6565b91505092915050565b600080604083850312156120f557600080fd5b600061210385828601611fe6565b925050602061211485828601611fe6565b9150509250929050565b60008060006060848603121561213357600080fd5b600061214186828701611fe6565b935050602061215286828701611fe6565b9250506040612163868287016120a4565b9150509250925092565b60008060008060006060868803121561218557600080fd5b600061219388828901611fe6565b955050602086013567ffffffffffffffff8111156121b057600080fd5b6121bc88828901612045565b9450945050604086013567ffffffffffffffff8111156121db57600080fd5b6121e788828901612045565b92509250509295509295909350565b6000806040838503121561220957600080fd5b600061221785828601611fe6565b9250506020612228858286016120a4565b9150509250929050565b60006020828403121561224457600080fd5b6000612252848285016120a4565b91505092915050565b60008060008060008060a0878903121561227457600080fd5b600061228289828a016120a4565b965050602061229389828a016120a4565b95505060406122a489828a016120a4565b945050606087013567ffffffffffffffff8111156122c157600080fd5b6122cd89828a01611ffb565b935093505060806122e089828a0161208f565b9150509295509295509295565b6122f681612993565b82525050565b612305816129a5565b82525050565b6000612316826128ed565b61232081856128f8565b93506123308185602086016129e8565b61233981612af4565b840191505092915050565b60006123516023836128f8565b915061235c82612b05565b604082019050919050565b60006123746022836128f8565b915061237f82612b54565b604082019050919050565b60006123976022836128f8565b91506123a282612ba3565b604082019050919050565b60006123ba600d836128f8565b91506123c582612bf2565b602082019050919050565b60006123dd6026836128f8565b91506123e882612c1b565b604082019050919050565b60006124006026836128f8565b915061240b82612c6a565b604082019050919050565b60006124236028836128f8565b915061242e82612cb9565b604082019050919050565b6000612446601e836128f8565b915061245182612d08565b602082019050919050565b60006124696024836128f8565b915061247482612d31565b604082019050919050565b600061248c6011836128f8565b915061249782612d80565b602082019050919050565b60006124af6021836128f8565b91506124ba82612da9565b604082019050919050565b60006124d26025836128f8565b91506124dd82612df8565b604082019050919050565b60006124f56023836128f8565b915061250082612e47565b604082019050919050565b60006125186024836128f8565b915061252382612e96565b604082019050919050565b600061253b6014836128f8565b915061254682612ee5565b602082019050919050565b600061255e601d836128f8565b915061256982612f0e565b602082019050919050565b60006125816025836128f8565b915061258c82612f37565b604082019050919050565b6125a0816129d1565b82525050565b6125af816129db565b82525050565b60006020820190506125ca60008301846122ed565b92915050565b60006020820190506125e560008301846122fc565b92915050565b60006020820190508181036000830152612605818461230b565b905092915050565b6000602082019050818103600083015261262681612344565b9050919050565b6000602082019050818103600083015261264681612367565b9050919050565b600060208201905081810360008301526126668161238a565b9050919050565b60006020820190508181036000830152612686816123ad565b9050919050565b600060208201905081810360008301526126a6816123d0565b9050919050565b600060208201905081810360008301526126c6816123f3565b9050919050565b600060208201905081810360008301526126e681612416565b9050919050565b6000602082019050818103600083015261270681612439565b9050919050565b600060208201905081810360008301526127268161245c565b9050919050565b600060208201905081810360008301526127468161247f565b9050919050565b60006020820190508181036000830152612766816124a2565b9050919050565b60006020820190508181036000830152612786816124c5565b9050919050565b600060208201905081810360008301526127a6816124e8565b9050919050565b600060208201905081810360008301526127c68161250b565b9050919050565b600060208201905081810360008301526127e68161252e565b9050919050565b6000602082019050818103600083015261280681612551565b9050919050565b6000602082019050818103600083015261282681612574565b9050919050565b60006020820190506128426000830184612597565b92915050565b600060408201905061285d6000830185612597565b61286a6020830184612597565b9392505050565b600060c0820190506128866000830189612597565b6128936020830188612597565b6128a06040830187612597565b6128ad6060830186612597565b6128ba60808301856122fc565b6128c760a0830184612597565b979650505050505050565b60006020820190506128e760008301846125a6565b92915050565b600081519050919050565b600082825260208201905092915050565b6000612914826129d1565b915061291f836129d1565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561295457612953612a96565b5b828201905092915050565b600061296a826129d1565b9150612975836129d1565b92508282101561298857612987612a96565b5b828203905092915050565b600061299e826129b1565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015612a065780820151818401526020810190506129eb565b83811115612a15576000848401525b50505050565b60006002820490506001821680612a3357607f821691505b60208210811415612a4757612a46612ac5565b5b50919050565b6000612a58826129d1565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612a8b57612a8a612a96565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f496e76616c696420696e64657800000000000000000000000000000000000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f4c4745202d20416d6f756e7420657863656564732077686974656c697374206d60008201527f6178696d756d0000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f4c4745202d204275796572206973206e6f742077686974656c69737465640000600082015250565b7f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f7760008201527f616e636500000000000000000000000000000000000000000000000000000000602082015250565b7f496e76616c696420616d6f756e744d6178000000000000000000000000000000600082015250565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f4e65772077686974656c697374657220697320746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f496e76616c69642077686974656c697374287329000000000000000000000000600082015250565b7f43616c6c6572206973206e6f74207468652077686974656c6973746572000000600082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b612f8f81612993565b8114612f9a57600080fd5b50565b612fa6816129a5565b8114612fb157600080fd5b50565b612fbd816129d1565b8114612fc857600080fd5b5056fea2646970667358221220390c51b5e609bad3374d89704869bcfb4195468ecc8a999c812909c2f5c5f6f664736f6c63430008040033

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.