ETH Price: $1,916.69 (-5.20%)
 

Overview

Max Total Supply

10,000,000 BSX

Holders

18,994

Transfers

-
19 ( 375.00%)

Market

Price

$0.00 @ 0.000000 ETH

Onchain Market Cap

-

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information

Contract Source Code Verified (Exact Match)

Contract Name:
BaseXToken

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 5000 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at basescan.org on 2023-08-17
*/

// SPDX-License-Identifier: MIT
pragma solidity =0.7.6;

/*
 * @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 GSN 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 payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

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

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

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

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

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

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
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) {
        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) {
        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) {
        // 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) {
        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) {
        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) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @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) {
        require(b <= a, "SafeMath: subtraction overflow");
        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) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @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. 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) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        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) {
        require(b > 0, "SafeMath: modulo by zero");
        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) {
        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.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * 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) {
        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) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

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

/**
 * @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 {
    using SafeMath for uint256;

    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) public {
        _name = name_;
        _symbol = symbol_;
        _decimals = 18;
    }

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

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual 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 {_setupDecimals} is
     * called.
     *
     * 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 returns (uint8) {
        return _decimals;
    }

    /**
     * @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);
        _approve(
            sender,
            _msgSender(),
            _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")
        );
        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].add(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) {
        _approve(
            _msgSender(),
            spender,
            _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")
        );
        return true;
    }

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

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

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

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

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

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

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

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

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

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

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal virtual {
        _decimals = decimals_;
    }

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

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

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

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

interface IProtocolToken is IERC20 {
    function lastEmissionTime() external view returns (uint256);

    function claimMasterRewards(uint256 amount) external returns (uint256 effectiveAmount);

    function masterEmissionRate() external view returns (uint256);

    function burn(uint256 amount) external;
}

/*
 * BaseXToken is a native ERC20 token.
 * It has an hard cap and manages its own emissions and allocations.
 */
contract BaseXToken is Ownable, ERC20("BaseX", "BSX"), IProtocolToken {
    using SafeMath for uint256;

    uint256 public constant MAX_SUPPLY_LIMIT = 10_000_000 ether;
    uint256 public elasticMaxSupply; // Once deployed, controlled through governance only
    uint256 public emissionRate; // Token emission per second

    uint256 public override lastEmissionTime;
    uint256 public masterReserve; // Pending rewards for the master

    uint256 public constant ALLOCATION_PRECISION = 100;
    // Allocations emitted over time. When < 100%, the rest is minted into the treasury (default 50%)
    uint256 public farmingAllocation = 50; // = 50%

    address public masterAddress;
    address public treasuryAddress;

    address public constant BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD;

    // ========================================= //
    // ================ EVENTS ================= //
    // ========================================= //

    event ClaimMasterRewards(uint256 amount);
    event AllocationsDistributed(uint256 masterShare, uint256 treasuryShare);
    event InitializeMasterAddress(address masterAddress);
    event InitializeEmissionStart(uint256 startTime);
    event UpdateAllocations(uint256 farmingAllocation, uint256 treasuryAllocation);
    event UpdateEmissionRate(uint256 previousEmissionRate, uint256 newEmissionRate);
    event UpdateMaxSupply(uint256 previousMaxSupply, uint256 newMaxSupply);
    event UpdateTreasuryAddress(address previousTreasuryAddress, address newTreasuryAddress);

    // ========================================= //
    // ================ MODIFIER =============== //
    // ========================================= //

    /*
     * @dev Throws error if called by any account other than the master
     */
    modifier onlyMaster() {
        require(msg.sender == masterAddress, "BaseXToken: caller is not the master");
        _;
    }

    constructor(uint256 maxSupply, uint256 initialSupply, uint256 initialEmissionRate, address treasury) {
        require(maxSupply <= MAX_SUPPLY_LIMIT, "invalid initial maxSupply");
        require(initialSupply < maxSupply, "invalid initial supply");
        require(treasury != address(0), "invalid treasury address");

        elasticMaxSupply = maxSupply;
        emissionRate = initialEmissionRate;
        treasuryAddress = treasury;

        _mint(treasury, initialSupply);
    }

    // ========================================== //
    // =============== PUBLIC VIEW ============== //
    // ========================================== //

    /**
     * @dev Returns total master allocation
     */
    function masterAllocation() public view returns (uint256) {
        return farmingAllocation;
    }

    /**
     * @dev Returns master emission rate
     */
    function masterEmissionRate() public view override returns (uint256) {
        return emissionRate.mul(farmingAllocation).div(ALLOCATION_PRECISION);
    }

    /**
     * @dev Returns treasury allocation
     */
    function treasuryAllocation() public view returns (uint256) {
        return uint256(ALLOCATION_PRECISION).sub(masterAllocation());
    }

    // ================================================== //
    // ================ EXTERNAL PUBLIC ================= //
    // ================================================== //

    /**
     * @dev Mint rewards and distribute it between master and treasury
     *
     * Treasury share is directly minted to the treasury address
     * Master incentives are minted into this contract and claimed later by the master contract
     */
    function emitAllocations() public {
        uint256 circulatingSupply = totalSupply();
        uint256 currentBlockTimestamp = _currentBlockTimestamp();

        uint256 _lastEmissionTime = lastEmissionTime; // gas saving
        uint256 _maxSupply = elasticMaxSupply; // gas saving

        // if already up to date or not started
        if (currentBlockTimestamp <= _lastEmissionTime || _lastEmissionTime == 0) {
            return;
        }

        // if max supply is already reached or emissions deactivated
        if (_maxSupply <= circulatingSupply || emissionRate == 0) {
            lastEmissionTime = currentBlockTimestamp;
            return;
        }

        uint256 newEmissions = currentBlockTimestamp.sub(_lastEmissionTime).mul(emissionRate);

        // cap new emissions if exceeding max supply
        if (_maxSupply < circulatingSupply.add(newEmissions)) {
            newEmissions = _maxSupply.sub(circulatingSupply);
        }

        // calculate master and treasury shares from new emissions
        uint256 masterShare = newEmissions.mul(masterAllocation()).div(ALLOCATION_PRECISION);
        // sub to avoid rounding errors
        uint256 treasuryShare = newEmissions.sub(masterShare);

        lastEmissionTime = currentBlockTimestamp;

        // add master shares to its claimable reserve
        masterReserve = masterReserve.add(masterShare);
        // mint shares
        _mint(address(this), masterShare);
        _mint(treasuryAddress, treasuryShare);

        emit AllocationsDistributed(masterShare, treasuryShare);
    }

    /**
     * @dev Sends to Master contract the asked "amount" from masterReserve
     *
     * Can only be called by the MasterContract
     */
    function claimMasterRewards(uint256 amount) external override onlyMaster returns (uint256 effectiveAmount) {
        // update emissions
        emitAllocations();

        // cap asked amount with available reserve
        effectiveAmount = Math.min(masterReserve, amount);

        // if no rewards to transfer
        if (effectiveAmount == 0) {
            return effectiveAmount;
        }

        // remove claimed rewards from reserve and transfer to master
        masterReserve = masterReserve.sub(effectiveAmount);
        _transfer(address(this), masterAddress, effectiveAmount);
        emit ClaimMasterRewards(effectiveAmount);
    }

    /**
     * @dev Burns "amount" of BaseXToken by sending it to BURN_ADDRESS
     */
    function burn(uint256 amount) external override {
        _transfer(msg.sender, BURN_ADDRESS, amount);
    }

    // ========================================== //
    // ================ OWNABLE ================= //
    // ========================================== //

    /**
     * @dev Setup Master contract address
     *
     * Can only be initialized once
     * Must only be called by the owner
     */
    function initializeMasterAddress(address masterAddress_) external onlyOwner {
        require(masterAddress == address(0), "initializeMasterAddress: master already initialized");
        require(masterAddress_ != address(0), "initializeMasterAddress: master initialized to zero address");

        masterAddress = masterAddress_;
        emit InitializeMasterAddress(masterAddress_);
    }

    /**
     * @dev Set emission start time
     *
     * Can only be initialized once
     * Must only be called by the owner
     */
    function initializeEmissionStart(uint256 startTime) external onlyOwner {
        require(lastEmissionTime == 0, "initializeEmissionStart: emission start already initialized");
        require(_currentBlockTimestamp() < startTime, "initializeEmissionStart: invalid");

        lastEmissionTime = startTime;
        emit InitializeEmissionStart(startTime);
    }

    /**
     * @dev Updates emission allocations between farming incentives, legacy holders and treasury (remaining share)
     *
     * Must only be called by the owner
     */
    function updateAllocations(uint256 farmingAllocation_) external onlyOwner {
        // apply emissions before changes
        emitAllocations();

        // total sum of allocations can't be > 100%
        uint256 totalAllocationsSet = farmingAllocation_;
        require(totalAllocationsSet <= 100, "updateAllocations: total allocation is too high");

        // set new allocations
        farmingAllocation = farmingAllocation_;

        emit UpdateAllocations(farmingAllocation_, treasuryAllocation());
    }

    /**
     * @dev Updates BaseXToken emission rate per second
     *
     * Must only be called by the owner
     */
    function updateEmissionRate(uint256 emissionRate_) external onlyOwner {
        // apply emissions before changes
        emitAllocations();

        emit UpdateEmissionRate(emissionRate, emissionRate_);
        emissionRate = emissionRate_;
    }

    /**
     * @dev Updates BaseXToken max supply
     *
     * Must only be called by the owner
     */
    function updateMaxSupply(uint256 maxSupply) external onlyOwner {
        require(maxSupply >= totalSupply(), "updateMaxSupply: can't be lower than current circulating supply");
        require(maxSupply <= MAX_SUPPLY_LIMIT, "updateMaxSupply: invalid maxSupply");

        emit UpdateMaxSupply(elasticMaxSupply, maxSupply);
        elasticMaxSupply = maxSupply;
    }

    /**
     * @dev Updates treasury address
     *
     * Must only be called by owner
     */
    function updateTreasuryAddress(address treasury) external onlyOwner {
        require(treasury != address(0), "updateTreasuryAddress: invalid address");

        emit UpdateTreasuryAddress(treasuryAddress, treasury);
        treasuryAddress = treasury;
    }

    // =========================================== //
    // ================ INTERNAL ================= //
    // =========================================== //

    /**
     * @dev Utility function to get the current block timestamp
     */
    function _currentBlockTimestamp() internal view virtual returns (uint256) {
        /* solhint-disable not-rely-on-time */
        return block.timestamp;
    }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"initialSupply","type":"uint256"},{"internalType":"uint256","name":"initialEmissionRate","type":"uint256"},{"internalType":"address","name":"treasury","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"masterShare","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"treasuryShare","type":"uint256"}],"name":"AllocationsDistributed","type":"event"},{"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":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ClaimMasterRewards","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"InitializeEmissionStart","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"masterAddress","type":"address"}],"name":"InitializeMasterAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"farmingAllocation","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"treasuryAllocation","type":"uint256"}],"name":"UpdateAllocations","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousEmissionRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newEmissionRate","type":"uint256"}],"name":"UpdateEmissionRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousMaxSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMaxSupply","type":"uint256"}],"name":"UpdateMaxSupply","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousTreasuryAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newTreasuryAddress","type":"address"}],"name":"UpdateTreasuryAddress","type":"event"},{"inputs":[],"name":"ALLOCATION_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BURN_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint256","name":"amount","type":"uint256"}],"name":"claimMasterRewards","outputs":[{"internalType":"uint256","name":"effectiveAmount","type":"uint256"}],"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":"elasticMaxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emissionRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emitAllocations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"farmingAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"initializeEmissionStart","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"masterAddress_","type":"address"}],"name":"initializeMasterAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastEmissionTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterEmissionRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","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":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasuryAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"farmingAllocation_","type":"uint256"}],"name":"updateAllocations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"emissionRate_","type":"uint256"}],"name":"updateEmissionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxSupply","type":"uint256"}],"name":"updateMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"treasury","type":"address"}],"name":"updateTreasuryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526032600b553480156200001657600080fd5b50604051620021f6380380620021f6833981810160405260808110156200003c57600080fd5b508051602080830151604080850151606090950151815180830183526005815264084c2e6cab60db1b8186015282518084019093526003835262084a6b60eb1b948301949094529394919391929060006200009662000268565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000f5906004906020850190620003e6565b5080516200010b906005906020840190620003e6565b50506006805460ff19166012179055506a084595161401484a0000008411156200017c576040805162461bcd60e51b815260206004820152601960248201527f696e76616c696420696e697469616c206d6178537570706c7900000000000000604482015290519081900360640190fd5b838310620001d1576040805162461bcd60e51b815260206004820152601660248201527f696e76616c696420696e697469616c20737570706c7900000000000000000000604482015290519081900360640190fd5b6001600160a01b0381166200022d576040805162461bcd60e51b815260206004820152601860248201527f696e76616c696420747265617375727920616464726573730000000000000000604482015290519081900360640190fd5b60078490556008829055600d80546001600160a01b0319166001600160a01b0383161790556200025e81846200026c565b5050505062000492565b3390565b6001600160a01b038216620002c8576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b620002d6600083836200037f565b620002f2816003546200038460201b620014e01790919060201c565b6003556001600160a01b03821660009081526001602090815260409091205462000327918390620014e062000384821b17901c565b6001600160a01b03831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b505050565b600082820183811015620003df576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200041e576000855562000469565b82601f106200043957805160ff191683800117855562000469565b8280016001018555821562000469579182015b82811115620004695782518255916020019190600101906200044c565b50620004779291506200047b565b5090565b5b808211156200047757600081556001016200047c565b611d5480620004a26000396000f3fe608060405234801561001057600080fd5b506004361061025b5760003560e01c8063841e456111610145578063c68bb4c5116100bd578063ed424fd01161008c578063f2fde38b11610071578063f2fde38b146105de578063fc1852fb14610604578063fccc2813146106215761025b565b8063ed424fd0146105b9578063f103b433146105c15761025b565b8063c68bb4c514610573578063d365a08e1461057b578063dd62ed3e14610583578063e4ef9dce146105b15761025b565b806395d89b4111610114578063a457c2d7116100f9578063a457c2d714610513578063a9059cbb1461053f578063c5f956af1461056b5761025b565b806395d89b411461050357806396afc4501461050b5761025b565b8063841e4561146104945780638c562457146104ba5780638da5cb5b146104d75780638f88bba3146104fb5761025b565b806339eb4189116101d8578063617d1126116101a757806370a082311161018c57806370a0823114610449578063715018a61461046f57806378135705146104775761025b565b8063617d11261461041b57806367c0f278146104235761025b565b806339eb4189146103e657806342966c68146103ee578063439af45e1461040b5780634f3147ba146104135761025b565b806318160ddd1161022f57806327dede2d1161021457806327dede2d14610394578063313ce5671461039c57806339509351146103ba5761025b565b806318160ddd1461035657806323b872dd1461035e5761025b565b80624fbf6b1461026057806306fdde031461027a578063095ea7b3146102f75780630ba84cd214610337575b600080fd5b610268610629565b60408051918252519081900360200190f35b61028261062e565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bc5781810151838201526020016102a4565b50505050905090810190601f1680156102e95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103236004803603604081101561030d57600080fd5b506001600160a01b0381351690602001356106e2565b604080519115158252519081900360200190f35b6103546004803603602081101561034d57600080fd5b5035610700565b005b6102686107be565b6103236004803603606081101561037457600080fd5b506001600160a01b038135811691602081013590911690604001356107c4565b61026861084b565b6103a4610851565b6040805160ff9092168252519081900360200190f35b610323600480360360408110156103d057600080fd5b506001600160a01b03813516906020013561085a565b6102686108a8565b6103546004803603602081101561040457600080fd5b50356108d1565b6102686108e1565b6102686108e7565b6102686108fc565b6103546004803603602081101561043957600080fd5b50356001600160a01b031661090b565b6102686004803603602081101561045f57600080fd5b50356001600160a01b0316610a78565b610354610a97565b6102686004803603602081101561048d57600080fd5b5035610b6d565b610354600480360360208110156104aa57600080fd5b50356001600160a01b0316610c39565b610354600480360360208110156104d057600080fd5b5035610d74565b6104df610e7c565b604080516001600160a01b039092168252519081900360200190f35b610268610e8b565b610282610e91565b610268610f10565b6103236004803603604081101561052957600080fd5b506001600160a01b038135169060200135610f16565b6103236004803603604081101561055557600080fd5b506001600160a01b038135169060200135610f7e565b6104df610f92565b610268610fa1565b6104df610fa7565b6102686004803603604081101561059957600080fd5b506001600160a01b0381358116916020013516610fb6565b610354610fe1565b610268611119565b610354600480360360208110156105d757600080fd5b503561111f565b610354600480360360208110156105f457600080fd5b50356001600160a01b0316611265565b6103546004803603602081101561061a57600080fd5b5035611391565b6104df6114da565b606481565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106d85780601f106106ad576101008083540402835291602001916106d8565b820191906000526020600020905b8154815290600101906020018083116106bb57829003601f168201915b5050505050905090565b60006106f66106ef611541565b8484611545565b5060015b92915050565b610708611541565b6001600160a01b0316610719610e7c565b6001600160a01b031614610774576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61077c610fe1565b600854604080519182526020820183905280517f16b9091836a63537907593ebc3a80f3528891f3575b10f58ad7dd9c29fd0d44f9281900390910190a1600855565b60035490565b60006107d1848484611631565b610841846107dd611541565b61083c85604051806060016040528060288152602001611bec602891396001600160a01b038a1660009081526002602052604081209061081b611541565b6001600160a01b03168152602081019190915260400160002054919061178e565b611545565b5060019392505050565b600a5481565b60065460ff1690565b60006106f6610867611541565b8461083c8560026000610878611541565b6001600160a01b03908116825260208083019390935260409182016000908120918c1681529252902054906114e0565b60006108cc60646108c6600b5460085461182590919063ffffffff16565b9061187e565b905090565b6108de3361dead83611631565b50565b60095481565b60006108cc6108f4610fa1565b6064906118e5565b6a084595161401484a00000081565b610913611541565b6001600160a01b0316610924610e7c565b6001600160a01b03161461097f576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600c546001600160a01b0316156109c75760405162461bcd60e51b8152600401808060200182810382526033815260200180611c8c6033913960400191505060405180910390fd5b6001600160a01b038116610a0c5760405162461bcd60e51b815260040180806020018281038252603b815260200180611b90603b913960400191505060405180910390fd5b600c80546001600160a01b0383167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915560408051918252517fcba13eb1e65d2c1588ce6d10f862f4535cc67855c3f31e3d2732f8fb6b5317b29181900360200190a150565b6001600160a01b0381166000908152600160205260409020545b919050565b610a9f611541565b6001600160a01b0316610ab0610e7c565b6001600160a01b031614610b0b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b600c546000906001600160a01b03163314610bb95760405162461bcd60e51b8152600401808060200182810382526024815260200180611ae16024913960400191505060405180910390fd5b610bc1610fe1565b610bcd600a5483611942565b905080610bd957610a92565b600a54610be690826118e5565b600a55600c54610c019030906001600160a01b031683611631565b6040805182815290517f45102e9ef2c4f14fd9f3e8510c4bb2ad67fe498584602f26647da23039f125319181900360200190a1919050565b610c41611541565b6001600160a01b0316610c52610e7c565b6001600160a01b031614610cad576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610cf25760405162461bcd60e51b8152600401808060200182810382526026815260200180611b2b6026913960400191505060405180910390fd5b600d54604080516001600160a01b039283168152918316602083015280517f5634a90413b79beba6c5f37aa8f19d1aee84a5320ff20ac7bd1ac63280867d5c9281900390910190a1600d80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b610d7c611541565b6001600160a01b0316610d8d610e7c565b6001600160a01b031614610de8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610df0610fe1565b806064811115610e315760405162461bcd60e51b815260040180806020018281038252602f815260200180611c39602f913960400191505060405180910390fd5b600b8290557fb1bc322c959dd23e6f87515e39a687bed073fbe1e93bd977fe8ecae3852c14ba82610e606108e7565b6040805192835260208301919091528051918290030190a15050565b6000546001600160a01b031690565b600b5481565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106d85780601f106106ad576101008083540402835291602001916106d8565b60085481565b60006106f6610f23611541565b8461083c85604051806060016040528060258152602001611cfa6025913960026000610f4d611541565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919061178e565b60006106f6610f8b611541565b8484611631565b600d546001600160a01b031681565b600b5490565b600c546001600160a01b031681565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6000610feb6107be565b90506000610ff7611958565b60095460075491925090818311158061100e575081155b1561101c5750505050611117565b838111158061102b5750600854155b1561103b57505060095550611117565b6008546000906110559061104f86866118e5565b90611825565b905061106185826114e0565b8210156110755761107282866118e5565b90505b600061108e60646108c6611087610fa1565b8590611825565b9050600061109c83836118e5565b6009879055600a549091506110b190836114e0565b600a556110be308361195c565b600d546110d4906001600160a01b03168261195c565b604080518381526020810183905281517f26c155e7637ca49a34c19c7f8cb8533322897de0808134df1a98f71557111684929181900390910190a1505050505050505b565b60075481565b611127611541565b6001600160a01b0316611138610e7c565b6001600160a01b031614611193576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61119b6107be565b8110156111d95760405162461bcd60e51b815260040180806020018281038252603f815260200180611b51603f913960400191505060405180910390fd5b6a084595161401484a0000008111156112235760405162461bcd60e51b8152600401808060200182810382526022815260200180611abf6022913960400191505060405180910390fd5b600754604080519182526020820183905280517f6a84334bf6663b783f2bbfcaf459b2cbc73570cf346a46d9e6a0f290fcf3ebfc9281900390910190a1600755565b61126d611541565b6001600160a01b031661127e610e7c565b6001600160a01b0316146112d9576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811661131e5760405162461bcd60e51b8152600401808060200182810382526026815260200180611a776026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b611399611541565b6001600160a01b03166113aa610e7c565b6001600160a01b031614611405576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600954156114445760405162461bcd60e51b815260040180806020018281038252603b815260200180611cbf603b913960400191505060405180910390fd5b8061144d611958565b1061149f576040805162461bcd60e51b815260206004820181905260248201527f696e697469616c697a65456d697373696f6e53746172743a20696e76616c6964604482015290519081900360640190fd5b60098190556040805182815290517f10e116be9bb4f621259f592ccd7e00d783e796535f2a5f3bc91a79da0fc3456d9181900360200190a150565b61dead81565b60008282018381101561153a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b3390565b6001600160a01b03831661158a5760405162461bcd60e51b8152600401808060200182810382526024815260200180611c686024913960400191505060405180910390fd5b6001600160a01b0382166115cf5760405162461bcd60e51b8152600401808060200182810382526022815260200180611a9d6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166116765760405162461bcd60e51b8152600401808060200182810382526025815260200180611c146025913960400191505060405180910390fd5b6001600160a01b0382166116bb5760405162461bcd60e51b8152600401808060200182810382526023815260200180611a546023913960400191505060405180910390fd5b6116c6838383611a4e565b61170381604051806060016040528060268152602001611b05602691396001600160a01b038616600090815260016020526040902054919061178e565b6001600160a01b03808516600090815260016020526040808220939093559084168152205461173290826114e0565b6001600160a01b0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561181d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156117e25781810151838201526020016117ca565b50505050905090810190601f16801561180f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082611834575060006106fa565b8282028284828161184157fe5b041461153a5760405162461bcd60e51b8152600401808060200182810382526021815260200180611bcb6021913960400191505060405180910390fd5b60008082116118d4576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816118dd57fe5b049392505050565b60008282111561193c576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000818310611951578161153a565b5090919050565b4290565b6001600160a01b0382166119b7576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6119c360008383611a4e565b6003546119d090826114e0565b6003556001600160a01b0382166000908152600160205260409020546119f690826114e0565b6001600160a01b03831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f20616464726573737570646174654d6178537570706c793a20696e76616c6964206d6178537570706c794261736558546f6b656e3a2063616c6c6572206973206e6f7420746865206d617374657245524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63657570646174655472656173757279416464726573733a20696e76616c696420616464726573737570646174654d6178537570706c793a2063616e2774206265206c6f776572207468616e2063757272656e742063697263756c6174696e6720737570706c79696e697469616c697a654d6173746572416464726573733a206d617374657220696e697469616c697a656420746f207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373757064617465416c6c6f636174696f6e733a20746f74616c20616c6c6f636174696f6e20697320746f6f206869676845524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373696e697469616c697a654d6173746572416464726573733a206d617374657220616c726561647920696e697469616c697a6564696e697469616c697a65456d697373696f6e53746172743a20656d697373696f6e20737461727420616c726561647920696e697469616c697a656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220ce3cbec8ba89e627493411d4f9f7001291551540ab26a504e43fdd65127f487864736f6c63430007060033000000000000000000000000000000000000000000084595161401484a00000000000000000000000000000000000000000000000000b1e07dc231427d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000af1823bacd8edda3b815180a61f8741fa4abc6dd

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061025b5760003560e01c8063841e456111610145578063c68bb4c5116100bd578063ed424fd01161008c578063f2fde38b11610071578063f2fde38b146105de578063fc1852fb14610604578063fccc2813146106215761025b565b8063ed424fd0146105b9578063f103b433146105c15761025b565b8063c68bb4c514610573578063d365a08e1461057b578063dd62ed3e14610583578063e4ef9dce146105b15761025b565b806395d89b4111610114578063a457c2d7116100f9578063a457c2d714610513578063a9059cbb1461053f578063c5f956af1461056b5761025b565b806395d89b411461050357806396afc4501461050b5761025b565b8063841e4561146104945780638c562457146104ba5780638da5cb5b146104d75780638f88bba3146104fb5761025b565b806339eb4189116101d8578063617d1126116101a757806370a082311161018c57806370a0823114610449578063715018a61461046f57806378135705146104775761025b565b8063617d11261461041b57806367c0f278146104235761025b565b806339eb4189146103e657806342966c68146103ee578063439af45e1461040b5780634f3147ba146104135761025b565b806318160ddd1161022f57806327dede2d1161021457806327dede2d14610394578063313ce5671461039c57806339509351146103ba5761025b565b806318160ddd1461035657806323b872dd1461035e5761025b565b80624fbf6b1461026057806306fdde031461027a578063095ea7b3146102f75780630ba84cd214610337575b600080fd5b610268610629565b60408051918252519081900360200190f35b61028261062e565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bc5781810151838201526020016102a4565b50505050905090810190601f1680156102e95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103236004803603604081101561030d57600080fd5b506001600160a01b0381351690602001356106e2565b604080519115158252519081900360200190f35b6103546004803603602081101561034d57600080fd5b5035610700565b005b6102686107be565b6103236004803603606081101561037457600080fd5b506001600160a01b038135811691602081013590911690604001356107c4565b61026861084b565b6103a4610851565b6040805160ff9092168252519081900360200190f35b610323600480360360408110156103d057600080fd5b506001600160a01b03813516906020013561085a565b6102686108a8565b6103546004803603602081101561040457600080fd5b50356108d1565b6102686108e1565b6102686108e7565b6102686108fc565b6103546004803603602081101561043957600080fd5b50356001600160a01b031661090b565b6102686004803603602081101561045f57600080fd5b50356001600160a01b0316610a78565b610354610a97565b6102686004803603602081101561048d57600080fd5b5035610b6d565b610354600480360360208110156104aa57600080fd5b50356001600160a01b0316610c39565b610354600480360360208110156104d057600080fd5b5035610d74565b6104df610e7c565b604080516001600160a01b039092168252519081900360200190f35b610268610e8b565b610282610e91565b610268610f10565b6103236004803603604081101561052957600080fd5b506001600160a01b038135169060200135610f16565b6103236004803603604081101561055557600080fd5b506001600160a01b038135169060200135610f7e565b6104df610f92565b610268610fa1565b6104df610fa7565b6102686004803603604081101561059957600080fd5b506001600160a01b0381358116916020013516610fb6565b610354610fe1565b610268611119565b610354600480360360208110156105d757600080fd5b503561111f565b610354600480360360208110156105f457600080fd5b50356001600160a01b0316611265565b6103546004803603602081101561061a57600080fd5b5035611391565b6104df6114da565b606481565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106d85780601f106106ad576101008083540402835291602001916106d8565b820191906000526020600020905b8154815290600101906020018083116106bb57829003601f168201915b5050505050905090565b60006106f66106ef611541565b8484611545565b5060015b92915050565b610708611541565b6001600160a01b0316610719610e7c565b6001600160a01b031614610774576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61077c610fe1565b600854604080519182526020820183905280517f16b9091836a63537907593ebc3a80f3528891f3575b10f58ad7dd9c29fd0d44f9281900390910190a1600855565b60035490565b60006107d1848484611631565b610841846107dd611541565b61083c85604051806060016040528060288152602001611bec602891396001600160a01b038a1660009081526002602052604081209061081b611541565b6001600160a01b03168152602081019190915260400160002054919061178e565b611545565b5060019392505050565b600a5481565b60065460ff1690565b60006106f6610867611541565b8461083c8560026000610878611541565b6001600160a01b03908116825260208083019390935260409182016000908120918c1681529252902054906114e0565b60006108cc60646108c6600b5460085461182590919063ffffffff16565b9061187e565b905090565b6108de3361dead83611631565b50565b60095481565b60006108cc6108f4610fa1565b6064906118e5565b6a084595161401484a00000081565b610913611541565b6001600160a01b0316610924610e7c565b6001600160a01b03161461097f576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600c546001600160a01b0316156109c75760405162461bcd60e51b8152600401808060200182810382526033815260200180611c8c6033913960400191505060405180910390fd5b6001600160a01b038116610a0c5760405162461bcd60e51b815260040180806020018281038252603b815260200180611b90603b913960400191505060405180910390fd5b600c80546001600160a01b0383167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915560408051918252517fcba13eb1e65d2c1588ce6d10f862f4535cc67855c3f31e3d2732f8fb6b5317b29181900360200190a150565b6001600160a01b0381166000908152600160205260409020545b919050565b610a9f611541565b6001600160a01b0316610ab0610e7c565b6001600160a01b031614610b0b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b600c546000906001600160a01b03163314610bb95760405162461bcd60e51b8152600401808060200182810382526024815260200180611ae16024913960400191505060405180910390fd5b610bc1610fe1565b610bcd600a5483611942565b905080610bd957610a92565b600a54610be690826118e5565b600a55600c54610c019030906001600160a01b031683611631565b6040805182815290517f45102e9ef2c4f14fd9f3e8510c4bb2ad67fe498584602f26647da23039f125319181900360200190a1919050565b610c41611541565b6001600160a01b0316610c52610e7c565b6001600160a01b031614610cad576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610cf25760405162461bcd60e51b8152600401808060200182810382526026815260200180611b2b6026913960400191505060405180910390fd5b600d54604080516001600160a01b039283168152918316602083015280517f5634a90413b79beba6c5f37aa8f19d1aee84a5320ff20ac7bd1ac63280867d5c9281900390910190a1600d80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b610d7c611541565b6001600160a01b0316610d8d610e7c565b6001600160a01b031614610de8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610df0610fe1565b806064811115610e315760405162461bcd60e51b815260040180806020018281038252602f815260200180611c39602f913960400191505060405180910390fd5b600b8290557fb1bc322c959dd23e6f87515e39a687bed073fbe1e93bd977fe8ecae3852c14ba82610e606108e7565b6040805192835260208301919091528051918290030190a15050565b6000546001600160a01b031690565b600b5481565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106d85780601f106106ad576101008083540402835291602001916106d8565b60085481565b60006106f6610f23611541565b8461083c85604051806060016040528060258152602001611cfa6025913960026000610f4d611541565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919061178e565b60006106f6610f8b611541565b8484611631565b600d546001600160a01b031681565b600b5490565b600c546001600160a01b031681565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6000610feb6107be565b90506000610ff7611958565b60095460075491925090818311158061100e575081155b1561101c5750505050611117565b838111158061102b5750600854155b1561103b57505060095550611117565b6008546000906110559061104f86866118e5565b90611825565b905061106185826114e0565b8210156110755761107282866118e5565b90505b600061108e60646108c6611087610fa1565b8590611825565b9050600061109c83836118e5565b6009879055600a549091506110b190836114e0565b600a556110be308361195c565b600d546110d4906001600160a01b03168261195c565b604080518381526020810183905281517f26c155e7637ca49a34c19c7f8cb8533322897de0808134df1a98f71557111684929181900390910190a1505050505050505b565b60075481565b611127611541565b6001600160a01b0316611138610e7c565b6001600160a01b031614611193576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61119b6107be565b8110156111d95760405162461bcd60e51b815260040180806020018281038252603f815260200180611b51603f913960400191505060405180910390fd5b6a084595161401484a0000008111156112235760405162461bcd60e51b8152600401808060200182810382526022815260200180611abf6022913960400191505060405180910390fd5b600754604080519182526020820183905280517f6a84334bf6663b783f2bbfcaf459b2cbc73570cf346a46d9e6a0f290fcf3ebfc9281900390910190a1600755565b61126d611541565b6001600160a01b031661127e610e7c565b6001600160a01b0316146112d9576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811661131e5760405162461bcd60e51b8152600401808060200182810382526026815260200180611a776026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b611399611541565b6001600160a01b03166113aa610e7c565b6001600160a01b031614611405576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600954156114445760405162461bcd60e51b815260040180806020018281038252603b815260200180611cbf603b913960400191505060405180910390fd5b8061144d611958565b1061149f576040805162461bcd60e51b815260206004820181905260248201527f696e697469616c697a65456d697373696f6e53746172743a20696e76616c6964604482015290519081900360640190fd5b60098190556040805182815290517f10e116be9bb4f621259f592ccd7e00d783e796535f2a5f3bc91a79da0fc3456d9181900360200190a150565b61dead81565b60008282018381101561153a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b3390565b6001600160a01b03831661158a5760405162461bcd60e51b8152600401808060200182810382526024815260200180611c686024913960400191505060405180910390fd5b6001600160a01b0382166115cf5760405162461bcd60e51b8152600401808060200182810382526022815260200180611a9d6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166116765760405162461bcd60e51b8152600401808060200182810382526025815260200180611c146025913960400191505060405180910390fd5b6001600160a01b0382166116bb5760405162461bcd60e51b8152600401808060200182810382526023815260200180611a546023913960400191505060405180910390fd5b6116c6838383611a4e565b61170381604051806060016040528060268152602001611b05602691396001600160a01b038616600090815260016020526040902054919061178e565b6001600160a01b03808516600090815260016020526040808220939093559084168152205461173290826114e0565b6001600160a01b0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561181d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156117e25781810151838201526020016117ca565b50505050905090810190601f16801561180f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082611834575060006106fa565b8282028284828161184157fe5b041461153a5760405162461bcd60e51b8152600401808060200182810382526021815260200180611bcb6021913960400191505060405180910390fd5b60008082116118d4576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816118dd57fe5b049392505050565b60008282111561193c576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000818310611951578161153a565b5090919050565b4290565b6001600160a01b0382166119b7576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6119c360008383611a4e565b6003546119d090826114e0565b6003556001600160a01b0382166000908152600160205260409020546119f690826114e0565b6001600160a01b03831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f20616464726573737570646174654d6178537570706c793a20696e76616c6964206d6178537570706c794261736558546f6b656e3a2063616c6c6572206973206e6f7420746865206d617374657245524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63657570646174655472656173757279416464726573733a20696e76616c696420616464726573737570646174654d6178537570706c793a2063616e2774206265206c6f776572207468616e2063757272656e742063697263756c6174696e6720737570706c79696e697469616c697a654d6173746572416464726573733a206d617374657220696e697469616c697a656420746f207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373757064617465416c6c6f636174696f6e733a20746f74616c20616c6c6f636174696f6e20697320746f6f206869676845524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373696e697469616c697a654d6173746572416464726573733a206d617374657220616c726561647920696e697469616c697a6564696e697469616c697a65456d697373696f6e53746172743a20656d697373696f6e20737461727420616c726561647920696e697469616c697a656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220ce3cbec8ba89e627493411d4f9f7001291551540ab26a504e43fdd65127f487864736f6c63430007060033

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

000000000000000000000000000000000000000000084595161401484a00000000000000000000000000000000000000000000000000b1e07dc231427d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000af1823bacd8edda3b815180a61f8741fa4abc6dd

-----Decoded View---------------
Arg [0] : maxSupply (uint256): 10000000000000000000000000
Arg [1] : initialSupply (uint256): 840000000000000000000000
Arg [2] : initialEmissionRate (uint256): 0
Arg [3] : treasury (address): 0xAF1823bACd8EDDA3b815180a61F8741fA4aBc6Dd

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000084595161401484a000000
Arg [1] : 00000000000000000000000000000000000000000000b1e07dc231427d000000
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : 000000000000000000000000af1823bacd8edda3b815180a61f8741fa4abc6dd


Deployed Bytecode Sourcemap

25511:9931:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25963:50;;;:::i;:::-;;;;;;;;;;;;;;;;15323:91;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17469:169;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;17469:169:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;33903:253;;;;;;;;;;;;;;;;-1:-1:-1;33903:253:0;;:::i;:::-;;16422:108;;;:::i;18120:371::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;18120:371:0;;;;;;;;;;;;;;;;;:::i;25892:28::-;;;:::i;16266:91::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;18900:218;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;18900:218:0;;;;;;;;:::i;28374:156::-;;;:::i;31717:110::-;;;;;;;;;;;;;;;;-1:-1:-1;31717:110:0;;:::i;25845:40::-;;;:::i;28597:139::-;;;:::i;25623:59::-;;;:::i;32146:395::-;;;;;;;;;;;;;;;;-1:-1:-1;32146:395:0;-1:-1:-1;;;;;32146:395:0;;:::i;16593:127::-;;;;;;;;;;;;;;;;-1:-1:-1;16593:127:0;-1:-1:-1;;;;;16593:127:0;;:::i;2624:148::-;;;:::i;30956:663::-;;;;;;;;;;;;;;;;-1:-1:-1;30956:663:0;;:::i;34755:263::-;;;;;;;;;;;;;;;;-1:-1:-1;34755:263:0;-1:-1:-1;;;;;34755:263:0;;:::i;33247:524::-;;;;;;;;;;;;;;;;-1:-1:-1;33247:524:0;;:::i;1973:87::-;;;:::i;:::-;;;;-1:-1:-1;;;;;1973:87:0;;;;;;;;;;;;;;26123:37;;;:::i;15533:95::-;;;:::i;25780:27::-;;;:::i;19621:319::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;19621:319:0;;;;;;;;:::i;16933:175::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;16933:175:0;;;;;;;;:::i;26213:30::-;;;:::i;28205:101::-;;;:::i;26178:28::-;;;:::i;17171:151::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;17171:151:0;;;;;;;;;;:::i;29193:1604::-;;;:::i;25689:31::-;;;:::i;34274:372::-;;;;;;;;;;;;;;;;-1:-1:-1;34274:372:0;;:::i;2927:244::-;;;;;;;;;;;;;;;;-1:-1:-1;2927:244:0;-1:-1:-1;;;;;2927:244:0;;:::i;32690:366::-;;;;;;;;;;;;;;;;-1:-1:-1;32690:366:0;;:::i;26252:81::-;;;:::i;25963:50::-;26010:3;25963:50;:::o;15323:91::-;15401:5;15394:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15368:13;;15394:12;;15401:5;;15394:12;;15401:5;15394:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15323:91;:::o;17469:169::-;17552:4;17569:39;17578:12;:10;:12::i;:::-;17592:7;17601:6;17569:8;:39::i;:::-;-1:-1:-1;17626:4:0;17469:169;;;;;:::o;33903:253::-;2204:12;:10;:12::i;:::-;-1:-1:-1;;;;;2193:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2193:23:0;;2185:68;;;;;-1:-1:-1;;;2185:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34027:17:::1;:15;:17::i;:::-;34081:12;::::0;34062:47:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;;;;;;;::::1;34120:12;:28:::0;33903:253::o;16422:108::-;16510:12;;16422:108;:::o;18120:371::-;18226:4;18243:36;18253:6;18261:9;18272:6;18243:9;:36::i;:::-;18290:171;18313:6;18334:12;:10;:12::i;:::-;18361:89;18399:6;18361:89;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;18361:19:0;;;;;;:11;:19;;;;;;18381:12;:10;:12::i;:::-;-1:-1:-1;;;;;18361:33:0;;;;;;;;;;;;-1:-1:-1;18361:33:0;;;:89;:37;:89::i;:::-;18290:8;:171::i;:::-;-1:-1:-1;18479:4:0;18120:371;;;;;:::o;25892:28::-;;;;:::o;16266:91::-;16340:9;;;;16266:91;:::o;18900:218::-;18988:4;19005:83;19014:12;:10;:12::i;:::-;19028:7;19037:50;19076:10;19037:11;:25;19049:12;:10;:12::i;:::-;-1:-1:-1;;;;;19037:25:0;;;;;;;;;;;;;;;;;-1:-1:-1;19037:25:0;;;:34;;;;;;;;;;;:38;:50::i;28374:156::-;28434:7;28461:61;26010:3;28461:35;28478:17;;28461:12;;:16;;:35;;;;:::i;:::-;:39;;:61::i;:::-;28454:68;;28374:156;:::o;31717:110::-;31776:43;31786:10;26291:42;31812:6;31776:9;:43::i;:::-;31717:110;:::o;25845:40::-;;;;:::o;28597:139::-;28648:7;28675:53;28709:18;:16;:18::i;:::-;26010:3;;28675:33;:53::i;25623:59::-;25666:16;25623:59;:::o;32146:395::-;2204:12;:10;:12::i;:::-;-1:-1:-1;;;;;2193:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2193:23:0;;2185:68;;;;;-1:-1:-1;;;2185:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32241:13:::1;::::0;-1:-1:-1;;;;;32241:13:0::1;:27:::0;32233:91:::1;;;;-1:-1:-1::0;;;32233:91:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;32343:28:0;::::1;32335:100;;;;-1:-1:-1::0;;;32335:100:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32448:13;:30:::0;;-1:-1:-1;;;;;32448:30:0;::::1;::::0;;;::::1;::::0;::::1;::::0;;;32494:39:::1;::::0;;;;;;::::1;::::0;;;;::::1;::::0;;::::1;32146:395:::0;:::o;16593:127::-;-1:-1:-1;;;;;16694:18:0;;16667:7;16694:18;;;:9;:18;;;;;;16593:127;;;;:::o;2624:148::-;2204:12;:10;:12::i;:::-;-1:-1:-1;;;;;2193:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2193:23:0;;2185:68;;;;;-1:-1:-1;;;2185:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2731:1:::1;2715:6:::0;;2694:40:::1;::::0;-1:-1:-1;;;;;2715:6:0;;::::1;::::0;2694:40:::1;::::0;2731:1;;2694:40:::1;2762:1;2745:19:::0;;;::::1;::::0;;2624:148::o;30956:663::-;27394:13;;31038:23;;-1:-1:-1;;;;;27394:13:0;27380:10;:27;27372:76;;;;-1:-1:-1;;;27372:76:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31103:17:::1;:15;:17::i;:::-;31203:31;31212:13;;31227:6;31203:8;:31::i;:::-;31185:49:::0;-1:-1:-1;31289:20:0;31285:75:::1;;31326:22;;31285:75;31459:13;::::0;:34:::1;::::0;31477:15;31459:17:::1;:34::i;:::-;31443:13;:50:::0;31529:13:::1;::::0;31504:56:::1;::::0;31522:4:::1;::::0;-1:-1:-1;;;;;31529:13:0::1;31544:15:::0;31504:9:::1;:56::i;:::-;31576:35;::::0;;;;;;;::::1;::::0;;;;::::1;::::0;;::::1;30956:663:::0;;;:::o;34755:263::-;2204:12;:10;:12::i;:::-;-1:-1:-1;;;;;2193:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2193:23:0;;2185:68;;;;;-1:-1:-1;;;2185:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;34842:22:0;::::1;34834:73;;;;-1:-1:-1::0;;;34834:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34947:15;::::0;34925:48:::1;::::0;;-1:-1:-1;;;;;34947:15:0;;::::1;34925:48:::0;;;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;34984:15;:26:::0;;;::::1;-1:-1:-1::0;;;;;34984:26:0;;;::::1;::::0;;;::::1;::::0;;34755:263::o;33247:524::-;2204:12;:10;:12::i;:::-;-1:-1:-1;;;;;2193:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2193:23:0;;2185:68;;;;;-1:-1:-1;;;2185:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33375:17:::1;:15;:17::i;:::-;33488:18:::0;33548:3:::1;33525:26:::0;::::1;;33517:86;;;;-1:-1:-1::0;;;33517:86:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33648:17;:38:::0;;;33704:59:::1;33668:18:::0;33742:20:::1;:18;:20::i;:::-;33704:59;::::0;;;;;::::1;::::0;::::1;::::0;;;;;;;;;;;;::::1;2264:1;33247:524:::0;:::o;1973:87::-;2019:7;2046:6;-1:-1:-1;;;;;2046:6:0;1973:87;:::o;26123:37::-;;;;:::o;15533:95::-;15613:7;15606:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15580:13;;15606:14;;15613:7;;15606:14;;15613:7;15606:14;;;;;;;;;;;;;;;;;;;;;;;;25780:27;;;;:::o;19621:319::-;19714:4;19731:179;19754:12;:10;:12::i;:::-;19781:7;19803:96;19842:15;19803:96;;;;;;;;;;;;;;;;;:11;:25;19815:12;:10;:12::i;:::-;-1:-1:-1;;;;;19803:25:0;;;;;;;;;;;;;;;;;-1:-1:-1;19803:25:0;;;:34;;;;;;;;;;;:96;:38;:96::i;16933:175::-;17019:4;17036:42;17046:12;:10;:12::i;:::-;17060:9;17071:6;17036:9;:42::i;26213:30::-;;;-1:-1:-1;;;;;26213:30:0;;:::o;28205:101::-;28281:17;;28205:101;:::o;26178:28::-;;;-1:-1:-1;;;;;26178:28:0;;:::o;17171:151::-;-1:-1:-1;;;;;17287:18:0;;;17260:7;17287:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;17171:151::o;29193:1604::-;29238:25;29266:13;:11;:13::i;:::-;29238:41;;29290:29;29322:24;:22;:24::i;:::-;29387:16;;29449;;29290:56;;-1:-1:-1;29387:16:0;29545:42;;;;;:68;;-1:-1:-1;29591:22:0;;29545:68;29541:107;;;29630:7;;;;;;29541:107;29748:17;29734:10;:31;;:52;;;-1:-1:-1;29769:12:0;;:17;29734:52;29730:146;;;-1:-1:-1;;29803:16:0;:40;-1:-1:-1;29858:7:0;;29730:146;29960:12;;29888:20;;29911:62;;:44;:21;29937:17;29911:25;:44::i;:::-;:48;;:62::i;:::-;29888:85;-1:-1:-1;30057:35:0;:17;29888:85;30057:21;:35::i;:::-;30044:10;:48;30040:129;;;30124:33;:10;30139:17;30124:14;:33::i;:::-;30109:48;;30040:129;30249:19;30271:62;26010:3;30271:36;30288:18;:16;:18::i;:::-;30271:12;;:16;:36::i;:62::-;30249:84;-1:-1:-1;30385:21:0;30409:29;:12;30249:84;30409:16;:29::i;:::-;30451:16;:40;;;30575:13;;30385:53;;-1:-1:-1;30575:30:0;;30593:11;30575:17;:30::i;:::-;30559:13;:46;30640:33;30654:4;30661:11;30640:5;:33::i;:::-;30690:15;;30684:37;;-1:-1:-1;;;;;30690:15:0;30707:13;30684:5;:37::i;:::-;30739:50;;;;;;;;;;;;;;;;;;;;;;;;;29193:1604;;;;;;;;:::o;25689:31::-;;;;:::o;34274:372::-;2204:12;:10;:12::i;:::-;-1:-1:-1;;;;;2193:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2193:23:0;;2185:68;;;;;-1:-1:-1;;;2185:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34369:13:::1;:11;:13::i;:::-;34356:9;:26;;34348:102;;;;-1:-1:-1::0;;;34348:102:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25666:16;34469:9;:29;;34461:76;;;;-1:-1:-1::0;;;34461:76:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34571:16;::::0;34555:44:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;;;;;;;::::1;34610:16;:28:::0;34274:372::o;2927:244::-;2204:12;:10;:12::i;:::-;-1:-1:-1;;;;;2193:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2193:23:0;;2185:68;;;;;-1:-1:-1;;;2185:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3016:22:0;::::1;3008:73;;;;-1:-1:-1::0;;;3008:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3118:6;::::0;;3097:38:::1;::::0;-1:-1:-1;;;;;3097:38:0;;::::1;::::0;3118:6;::::1;::::0;3097:38:::1;::::0;::::1;3146:6;:17:::0;;;::::1;-1:-1:-1::0;;;;;3146:17:0;;;::::1;::::0;;;::::1;::::0;;2927:244::o;32690:366::-;2204:12;:10;:12::i;:::-;-1:-1:-1;;;;;2193:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2193:23:0;;2185:68;;;;;-1:-1:-1;;;2185:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32780:16:::1;::::0;:21;32772:93:::1;;;;-1:-1:-1::0;;;32772:93:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32911:9;32884:24;:22;:24::i;:::-;:36;32876:81;;;::::0;;-1:-1:-1;;;32876:81:0;;::::1;;::::0;::::1;::::0;;;;;;;::::1;::::0;;;;;;;;;;;;;::::1;;32970:16;:28:::0;;;33014:34:::1;::::0;;;;;;;::::1;::::0;;;;::::1;::::0;;::::1;32690:366:::0;:::o;26252:81::-;26291:42;26252:81;:::o;5882:179::-;5940:7;5972:5;;;5996:6;;;;5988:46;;;;;-1:-1:-1;;;5988:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;6052:1;5882:179;-1:-1:-1;;;5882:179:0:o;603:106::-;691:10;603:106;:::o;22818:346::-;-1:-1:-1;;;;;22920:19:0;;22912:68;;;;-1:-1:-1;;;22912:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;22999:21:0;;22991:68;;;;-1:-1:-1;;;22991:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;23072:18:0;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;23124:32;;;;;;;;;;;;;;;;;22818:346;;;:::o;20430:539::-;-1:-1:-1;;;;;20536:20:0;;20528:70;;;;-1:-1:-1;;;20528:70:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;20617:23:0;;20609:71;;;;-1:-1:-1;;;20609:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20693:47;20714:6;20722:9;20733:6;20693:20;:47::i;:::-;20773:71;20795:6;20773:71;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;20773:17:0;;;;;;:9;:17;;;;;;;:71;:21;:71::i;:::-;-1:-1:-1;;;;;20753:17:0;;;;;;;:9;:17;;;;;;:91;;;;20878:20;;;;;;;:32;;20903:6;20878:24;:32::i;:::-;-1:-1:-1;;;;;20855:20:0;;;;;;;:9;:20;;;;;;;;;:55;;;;20926:35;;;;;;;20855:20;;20926:35;;;;;;;;;;;;;20430:539;;;:::o;8709:166::-;8795:7;8831:12;8823:6;;;;8815:29;;;;-1:-1:-1;;;8815:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;8862:5:0;;;8709:166::o;6761:220::-;6819:7;6843:6;6839:20;;-1:-1:-1;6858:1:0;6851:8;;6839:20;6882:5;;;6886:1;6882;:5;:1;6906:5;;;;;:10;6898:56;;;;-1:-1:-1;;;6898:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7459:153;7517:7;7549:1;7545;:5;7537:44;;;;;-1:-1:-1;;;7537:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;7603:1;7599;:5;;;;;;;7459:153;-1:-1:-1;;;7459:153:0:o;6344:158::-;6402:7;6435:1;6430;:6;;6422:49;;;;;-1:-1:-1;;;6422:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6489:5:0;;;6344:158::o;24642:106::-;24700:7;24731:1;24727;:5;:13;;24739:1;24727:13;;;-1:-1:-1;24735:1:0;;24720:20;-1:-1:-1;24642:106:0:o;35276:163::-;35416:15;35276:163;:::o;21251:378::-;-1:-1:-1;;;;;21335:21:0;;21327:65;;;;;-1:-1:-1;;;21327:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;21405:49;21434:1;21438:7;21447:6;21405:20;:49::i;:::-;21482:12;;:24;;21499:6;21482:16;:24::i;:::-;21467:12;:39;-1:-1:-1;;;;;21538:18:0;;;;;;:9;:18;;;;;;:30;;21561:6;21538:22;:30::i;:::-;-1:-1:-1;;;;;21517:18:0;;;;;;:9;:18;;;;;;;;:51;;;;21584:37;;;;;;;21517:18;;;;21584:37;;;;;;;;;;21251:378;;:::o;24197:91::-;;;;:::o

Swarm Source

ipfs://ce3cbec8ba89e627493411d4f9f7001291551540ab26a504e43fdd65127f4878
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.