Contract Address Details

0x8c0b6ea89DABA6516df9437a60cA481501781606

Token
Kayen token (KAYEN)
Creator
0x86d36b–5c8897 at 0xa56a43–50a2b1
Balance
0 CHZ ( )
Tokens
Fetching tokens...
Transactions
3,623 Transactions
Transfers
3,382 Transfers
Gas Used
143,059,524
Last Balance Update
29334754
Contract name:
KayenToken




Optimization enabled
true
Compiler version
v0.7.6+commit.7338295f




Optimization runs
200
EVM Version
default




Verified at
2025-01-23T09:31:03.934116Z

Constructor Arguments

0x00000000000000000000000000000000000000000048cab98f1671af580000000000000000000000000000000000000000000000003a3bc7a5ab8e25e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080b714e2dd42611e4dea6bfe2633210bd9191bed

Arg [0] (uint256) : 88000000000000000000000000
Arg [1] (uint256) : 70400000000000000000000000
Arg [2] (uint256) : 0
Arg [3] (address) : 0x80b714e2dd42611e4dea6bfe2633210bd9191bed

              

Contract source code

// Sources flattened with hardhat v2.22.10 https://hardhat.org

// SPDX-License-Identifier: MIT

// File @openzeppelin/contracts/utils/Context.sol@v3.4.0

// Original license: SPDX_License_Identifier: MIT

pragma solidity >=0.6.0 <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 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;
    }
}


// File @openzeppelin/contracts/access/Ownable.sol@v3.4.0

// Original license: SPDX_License_Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () 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;
    }
}


// File @openzeppelin/contracts/math/SafeMath.sol@v3.4.0

// Original license: SPDX_License_Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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


// File @openzeppelin/contracts/token/ERC20/IERC20.sol@v3.4.0

// Original license: SPDX_License_Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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


// File @openzeppelin/contracts/token/ERC20/ERC20.sol@v3.4.0

// Original license: SPDX_License_Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;



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


// File contracts/interfaces/IKayenToken.sol

// Original license: SPDX_License_Identifier: MIT
pragma solidity =0.7.6;

interface IKayenToken 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;
}


// File @openzeppelin/contracts/math/Math.sol@v3.4.0

// Original license: SPDX_License_Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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


// File contracts/tokens/KayenToken.sol

// Original license: SPDX_License_Identifier: MIT
pragma solidity =0.7.6;




/*
 * KAYEN is Kayen's native ERC20 token.
 * It has an hard cap and manages its own emissions and allocations.
 */
contract KayenToken is Ownable, ERC20("Kayen token", "KAYEN"), IKayenToken {
  using SafeMath for uint256;

  uint256 public constant MAX_EMISSION_RATE = 5 ether;
  uint256 public constant MAX_SUPPLY_LIMIT = 88000000 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 15%)
  uint256 public farmingAllocation = 50; // = 50%
  uint256 public legacyAllocation; // V1 holders allocation

  address public masterAddress;
  address public treasuryAddress;

  address public constant BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD;

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

    elasticMaxSupply = maxSupply_;
    emissionRate = initialEmissionRate;
    treasuryAddress = treasuryAddress_;

    _mint(msg.sender, initialSupply);
  }


  /********************************************/
  /****************** EVENTS ******************/
  /********************************************/

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

  /***********************************************/
  /****************** MODIFIERS ******************/
  /***********************************************/

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


  /**************************************************/
  /****************** PUBLIC VIEWS ******************/
  /**************************************************/

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

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

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


  /*****************************************************************/
  /******************  EXTERNAL PUBLIC FUNCTIONS  ******************/
  /*****************************************************************/

  /**
   * @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 kayen by sending it to BURN_ADDRESS
   */
  function burn(uint256 amount) external override {
    _transfer(msg.sender, BURN_ADDRESS, amount);
  }

  /*****************************************************************/
  /****************** EXTERNAL OWNABLE FUNCTIONS  ******************/
  /*****************************************************************/

  /**
   * @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_, uint256 legacyAllocation_) external onlyOwner {
    // apply emissions before changes
    emitAllocations();

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

    // set new allocations
    farmingAllocation = farmingAllocation_;
    legacyAllocation = legacyAllocation_;

    emit UpdateAllocations(farmingAllocation_, legacyAllocation_, treasuryAllocation());
  }

  /**
   * @dev Updates kayen emission rate per second
   *
   * Must only be called by the owner
   */
  function updateEmissionRate(uint256 emissionRate_) external onlyOwner {
    require(emissionRate_ <= MAX_EMISSION_RATE, "updateEmissionRate: can't exceed maximum");

    // apply emissions before changes
    emitAllocations();

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

  /**
   * @dev Updates kayen 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 treasuryAddress_) external onlyOwner {
    require(treasuryAddress_ != address(0), "updateTreasuryAddress: invalid address");

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


  /********************************************************/
  /****************** INTERNAL FUNCTIONS ******************/
  /********************************************************/

  /**
   * @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 ABI

[{"type":"constructor","inputs":[{"type":"uint256","name":"maxSupply_","internalType":"uint256"},{"type":"uint256","name":"initialSupply","internalType":"uint256"},{"type":"uint256","name":"initialEmissionRate","internalType":"uint256"},{"type":"address","name":"treasuryAddress_","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"ALLOCATION_PRECISION","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"BURN_ADDRESS","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAX_EMISSION_RATE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAX_SUPPLY_LIMIT","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"burn","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"effectiveAmount","internalType":"uint256"}],"name":"claimMasterRewards","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"decreaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"subtractedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"elasticMaxSupply","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"emissionRate","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"emitAllocations","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"farmingAllocation","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"increaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"addedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initializeEmissionStart","inputs":[{"type":"uint256","name":"startTime","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initializeMasterAddress","inputs":[{"type":"address","name":"masterAddress_","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastEmissionTime","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"legacyAllocation","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"masterAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"masterAllocation","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"masterEmissionRate","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"masterReserve","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"recipient","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"address","name":"recipient","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"treasuryAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"treasuryAllocation","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateAllocations","inputs":[{"type":"uint256","name":"farmingAllocation_","internalType":"uint256"},{"type":"uint256","name":"legacyAllocation_","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateEmissionRate","inputs":[{"type":"uint256","name":"emissionRate_","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateMaxSupply","inputs":[{"type":"uint256","name":"maxSupply_","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateTreasuryAddress","inputs":[{"type":"address","name":"treasuryAddress_","internalType":"address"}]},{"type":"event","name":"AllocationsDistributed","inputs":[{"type":"uint256","name":"masterShare","indexed":false},{"type":"uint256","name":"treasuryShare","indexed":false}],"anonymous":false},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","indexed":true},{"type":"address","name":"spender","indexed":true},{"type":"uint256","name":"value","indexed":false}],"anonymous":false},{"type":"event","name":"ClaimMasterRewards","inputs":[{"type":"uint256","name":"amount","indexed":false}],"anonymous":false},{"type":"event","name":"InitializeEmissionStart","inputs":[{"type":"uint256","name":"startTime","indexed":false}],"anonymous":false},{"type":"event","name":"InitializeMasterAddress","inputs":[{"type":"address","name":"masterAddress","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","indexed":true},{"type":"address","name":"newOwner","indexed":true}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","indexed":true},{"type":"address","name":"to","indexed":true},{"type":"uint256","name":"value","indexed":false}],"anonymous":false},{"type":"event","name":"UpdateAllocations","inputs":[{"type":"uint256","name":"farmingAllocation","indexed":false},{"type":"uint256","name":"legacyAllocation","indexed":false},{"type":"uint256","name":"treasuryAllocation","indexed":false}],"anonymous":false},{"type":"event","name":"UpdateEmissionRate","inputs":[{"type":"uint256","name":"previousEmissionRate","indexed":false},{"type":"uint256","name":"newEmissionRate","indexed":false}],"anonymous":false},{"type":"event","name":"UpdateMaxSupply","inputs":[{"type":"uint256","name":"previousMaxSupply","indexed":false},{"type":"uint256","name":"newMaxSupply","indexed":false}],"anonymous":false},{"type":"event","name":"UpdateTreasuryAddress","inputs":[{"type":"address","name":"previousTreasuryAddress","indexed":false},{"type":"address","name":"newTreasuryAddress","indexed":false}],"anonymous":false}]
            

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106102315760003560e01c80637813570511610130578063c5f956af116100b8578063ed424fd01161007c578063ed424fd0146105a5578063f103b433146105ad578063f2fde38b146105ca578063fc1852fb146105f0578063fccc28131461060d57610231565b8063c5f956af14610557578063c68bb4c51461055f578063d365a08e14610567578063dd62ed3e1461056f578063e4ef9dce1461059d57610231565b806395d89b41116100ff57806395d89b41146104cc57806396afc450146104d4578063a457c2d7146104dc578063a9059cbb14610508578063b71144a41461053457610231565b8063781357051461045d578063841e45611461047a5780638da5cb5b146104a05780638f88bba3146104c457610231565b806339509351116101be5780634f3147ba116101825780634f3147ba146103f9578063617d11261461040157806367c0f2781461040957806370a082311461042f578063715018a61461045557610231565b8063395093511461039857806339eb4189146103c457806342966c68146103cc578063436cc3d6146103e9578063439af45e146103f157610231565b80630ba84cd2116102055780630ba84cd21461031557806318160ddd1461033457806323b872dd1461033c57806327dede2d14610372578063313ce5671461037a57610231565b80624fbf6b146102365780630495d11c1461025057806306fdde0314610258578063095ea7b3146102d5575b600080fd5b61023e610615565b60408051918252519081900360200190f35b61023e61061a565b610260610620565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561029a578181015183820152602001610282565b50505050905090810190601f1680156102c75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610301600480360360408110156102eb57600080fd5b506001600160a01b0381351690602001356106b6565b604080519115158252519081900360200190f35b6103326004803603602081101561032b57600080fd5b50356106d4565b005b61023e6107c7565b6103016004803603606081101561035257600080fd5b506001600160a01b038135811691602081013590911690604001356107cd565b61023e610854565b61038261085a565b6040805160ff9092168252519081900360200190f35b610301600480360360408110156103ae57600080fd5b506001600160a01b038135169060200135610863565b61023e6108b1565b610332600480360360208110156103e257600080fd5b50356108e6565b61023e6108f6565b61023e610902565b61023e610908565b61023e61091d565b6103326004803603602081101561041f57600080fd5b50356001600160a01b031661092c565b61023e6004803603602081101561044557600080fd5b50356001600160a01b0316610a6f565b610332610a8e565b61023e6004803603602081101561047357600080fd5b5035610b3a565b6103326004803603602081101561049057600080fd5b50356001600160a01b0316610c06565b6104a8610d17565b604080516001600160a01b039092168252519081900360200190f35b61023e610d26565b610260610d2c565b61023e610d8d565b610301600480360360408110156104f257600080fd5b506001600160a01b038135169060200135610d93565b6103016004803603604081101561051e57600080fd5b506001600160a01b038135169060200135610dfb565b6103326004803603604081101561054a57600080fd5b5080359060200135610e0f565b6104a8610f1e565b61023e610f2d565b6104a8610f46565b61023e6004803603604081101561058557600080fd5b506001600160a01b0381358116916020013516610f55565b610332610f80565b61023e6110b8565b610332600480360360208110156105c357600080fd5b50356110be565b610332600480360360208110156105e057600080fd5b50356001600160a01b03166111f2565b6103326004803603602081101561060657600080fd5b50356112f4565b6104a861142b565b606481565b600c5481565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106ac5780601f10610681576101008083540402835291602001916106ac565b820191906000526020600020905b81548152906001019060200180831161068f57829003601f168201915b5050505050905090565b60006106ca6106c3611492565b8484611496565b5060015b92915050565b6106dc611492565b6001600160a01b03166106ed610d17565b6001600160a01b031614610736576040805162461bcd60e51b81526020600482018190526024820152600080516020611b41833981519152604482015290519081900360640190fd5b674563918244f4000081111561077d5760405162461bcd60e51b8152600401808060200182810382526028815260200180611c0c6028913960400191505060405180910390fd5b610785610f80565b600854604080519182526020820183905280517f16b9091836a63537907593ebc3a80f3528891f3575b10f58ad7dd9c29fd0d44f9281900390910190a1600855565b60035490565b60006107da848484611582565b61084a846107e6611492565b61084585604051806060016040528060288152602001611b19602891396001600160a01b038a16600090815260026020526040812090610824611492565b6001600160a01b0316815260208101919091526040016000205491906116df565b611496565b5060019392505050565b600a5481565b60065460ff1690565b60006106ca610870611492565b846108458560026000610881611492565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490611431565b60006108e160646108db6108d2600c54600b5461143190919063ffffffff16565b60085490611776565b906117cf565b905090565b6108f33361dead83611582565b50565b674563918244f4000081565b60095481565b60006108e1610915610f2d565b606490611836565b6a48cab98f1671af5800000081565b610934611492565b6001600160a01b0316610945610d17565b6001600160a01b03161461098e576040805162461bcd60e51b81526020600482018190526024820152600080516020611b41833981519152604482015290519081900360640190fd5b600d546001600160a01b0316156109d65760405162461bcd60e51b8152600401808060200182810382526033815260200180611bd96033913960400191505060405180910390fd5b6001600160a01b038116610a1b5760405162461bcd60e51b815260040180806020018281038252603b815260200180611abd603b913960400191505060405180910390fd5b600d80546001600160a01b0383166001600160a01b0319909116811790915560408051918252517fcba13eb1e65d2c1588ce6d10f862f4535cc67855c3f31e3d2732f8fb6b5317b29181900360200190a150565b6001600160a01b0381166000908152600160205260409020545b919050565b610a96611492565b6001600160a01b0316610aa7610d17565b6001600160a01b031614610af0576040805162461bcd60e51b81526020600482018190526024820152600080516020611b41833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600d546000906001600160a01b03163314610b865760405162461bcd60e51b8152600401808060200182810382526024815260200180611c346024913960400191505060405180910390fd5b610b8e610f80565b610b9a600a5483611893565b905080610ba657610a89565b600a54610bb39082611836565b600a55600d54610bce9030906001600160a01b031683611582565b6040805182815290517f45102e9ef2c4f14fd9f3e8510c4bb2ad67fe498584602f26647da23039f125319181900360200190a1919050565b610c0e611492565b6001600160a01b0316610c1f610d17565b6001600160a01b031614610c68576040805162461bcd60e51b81526020600482018190526024820152600080516020611b41833981519152604482015290519081900360640190fd5b6001600160a01b038116610cad5760405162461bcd60e51b8152600401808060200182810382526026815260200180611a586026913960400191505060405180910390fd5b600e54604080516001600160a01b039283168152918316602083015280517f5634a90413b79beba6c5f37aa8f19d1aee84a5320ff20ac7bd1ac63280867d5c9281900390910190a1600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b600b5481565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106ac5780601f10610681576101008083540402835291602001916106ac565b60085481565b60006106ca610da0611492565b8461084585604051806060016040528060258152602001611c936025913960026000610dca611492565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906116df565b60006106ca610e08611492565b8484611582565b610e17611492565b6001600160a01b0316610e28610d17565b6001600160a01b031614610e71576040805162461bcd60e51b81526020600482018190526024820152600080516020611b41833981519152604482015290519081900360640190fd5b610e79610f80565b6000610e858383611431565b90506064811115610ec75760405162461bcd60e51b815260040180806020018281038252602f815260200180611b86602f913960400191505060405180910390fd5b600b839055600c8290557fa4a1bde80c0d4ba37d1bd0feec135fb515a9def4e8baee90221348069946b86c8383610efc610908565b60408051938452602084019290925282820152519081900360600190a1505050565b600e546001600160a01b031681565b60006108e1600c54600b5461143190919063ffffffff16565b600d546001600160a01b031681565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6000610f8a6107c7565b90506000610f966118a9565b600954600754919250908183111580610fad575081155b15610fbb57505050506110b6565b8381111580610fca5750600854155b15610fda575050600955506110b6565b600854600090610ff490610fee8686611836565b90611776565b90506110008582611431565b821015611014576110118286611836565b90505b600061102d60646108db611026610f2d565b8590611776565b9050600061103b8383611836565b6009879055600a549091506110509083611431565b600a5561105d30836118ad565b600e54611073906001600160a01b0316826118ad565b604080518381526020810183905281517f26c155e7637ca49a34c19c7f8cb8533322897de0808134df1a98f71557111684929181900390910190a1505050505050505b565b60075481565b6110c6611492565b6001600160a01b03166110d7610d17565b6001600160a01b031614611120576040805162461bcd60e51b81526020600482018190526024820152600080516020611b41833981519152604482015290519081900360640190fd5b6111286107c7565b8110156111665760405162461bcd60e51b815260040180806020018281038252603f815260200180611a7e603f913960400191505060405180910390fd5b6a48cab98f1671af580000008111156111b05760405162461bcd60e51b8152600401808060200182810382526022815260200180611a106022913960400191505060405180910390fd5b600754604080519182526020820183905280517f6a84334bf6663b783f2bbfcaf459b2cbc73570cf346a46d9e6a0f290fcf3ebfc9281900390910190a1600755565b6111fa611492565b6001600160a01b031661120b610d17565b6001600160a01b031614611254576040805162461bcd60e51b81526020600482018190526024820152600080516020611b41833981519152604482015290519081900360640190fd5b6001600160a01b0381166112995760405162461bcd60e51b81526004018080602001828103825260268152602001806119c86026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6112fc611492565b6001600160a01b031661130d610d17565b6001600160a01b031614611356576040805162461bcd60e51b81526020600482018190526024820152600080516020611b41833981519152604482015290519081900360640190fd5b600954156113955760405162461bcd60e51b815260040180806020018281038252603b815260200180611c58603b913960400191505060405180910390fd5b8061139e6118a9565b106113f0576040805162461bcd60e51b815260206004820181905260248201527f696e697469616c697a65456d697373696f6e53746172743a20696e76616c6964604482015290519081900360640190fd5b60098190556040805182815290517f10e116be9bb4f621259f592ccd7e00d783e796535f2a5f3bc91a79da0fc3456d9181900360200190a150565b61dead81565b60008282018381101561148b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b3390565b6001600160a01b0383166114db5760405162461bcd60e51b8152600401808060200182810382526024815260200180611bb56024913960400191505060405180910390fd5b6001600160a01b0382166115205760405162461bcd60e51b81526004018080602001828103825260228152602001806119ee6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166115c75760405162461bcd60e51b8152600401808060200182810382526025815260200180611b616025913960400191505060405180910390fd5b6001600160a01b03821661160c5760405162461bcd60e51b81526004018080602001828103825260238152602001806119a56023913960400191505060405180910390fd5b61161783838361199f565b61165481604051806060016040528060268152602001611a32602691396001600160a01b03861660009081526001602052604090205491906116df565b6001600160a01b0380851660009081526001602052604080822093909355908416815220546116839082611431565b6001600160a01b0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561176e5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561173357818101518382015260200161171b565b50505050905090810190601f1680156117605780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082611785575060006106ce565b8282028284828161179257fe5b041461148b5760405162461bcd60e51b8152600401808060200182810382526021815260200180611af86021913960400191505060405180910390fd5b6000808211611825576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161182e57fe5b049392505050565b60008282111561188d576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008183106118a2578161148b565b5090919050565b4290565b6001600160a01b038216611908576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6119146000838361199f565b6003546119219082611431565b6003556001600160a01b0382166000908152600160205260409020546119479082611431565b6001600160a01b03831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f20616464726573737570646174654d6178537570706c793a20696e76616c6964206d6178537570706c7945524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63657570646174655472656173757279416464726573733a20696e76616c696420616464726573737570646174654d6178537570706c793a2063616e2774206265206c6f776572207468616e2063757272656e742063697263756c6174696e6720737570706c79696e697469616c697a654d6173746572416464726573733a206d617374657220696e697469616c697a656420746f207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657245524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373757064617465416c6c6f636174696f6e733a20746f74616c20616c6c6f636174696f6e20697320746f6f206869676845524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373696e697469616c697a654d6173746572416464726573733a206d617374657220616c726561647920696e697469616c697a6564757064617465456d697373696f6e526174653a2063616e277420657863656564206d6178696d756d4b6179656e546f6b656e3a2063616c6c6572206973206e6f7420746865206d6173746572696e697469616c697a65456d697373696f6e53746172743a20656d697373696f6e20737461727420616c726561647920696e697469616c697a656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220d3611e62cb84217502dfef90cf4b13e911d81a2b0a9312b142220339fbd7d8c564736f6c63430007060033