Contract 0x940920386550c8Bfdd5F0dC685c23A6148e8cD38

 

Contract Overview

Balance:
0 MATIC

MATIC Value:
$0.00

Token:
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x94e325cdd980001f442500ad26c8c2df8c7590aa022eb9e369e2a9b093e6e8f8Enter319985212022-08-17 14:56:1649 days 22 hrs ago0x003873fc1ea728a8553f46b1f516effa6336f61f IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.00557752017288.741947975
0xa873940091eeec12efa59f3d5d47675a0a634f4bf99753c6a4ea112aaa6420caLeave318644512022-08-14 2:17:0253 days 11 hrs ago0x8c3f13cd991dbb27242c323ca8bde583e23b326c IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.002273910025 31.437558244
0x7f5d0107a0975127624d526ee8a54c7098b5963940bcccaf70794d4bab949730Enter316456212022-08-08 4:31:3159 days 9 hrs ago0x003873fc1ea728a8553f46b1f516effa6336f61f IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.002128507743 33.8724
0x72c8705616ffbf2d7139297553a527dafea844d9a3719835db5a893cac33cbb0Leave314961422022-08-04 3:37:3863 days 10 hrs ago0x8d7a429b0b6284806bcd50809c52ba60e849a0f4 IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.00165693 30.000000014
0x30dd31750aed9f1ccf405475e7faa3a0d68acc1eac275896383813bdbdf6057bEnter308107612022-07-17 4:42:3681 days 9 hrs ago0x003873fc1ea728a8553f46b1f516effa6336f61f IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.002398170001 30.000000016
0x195f172635942d6a0f812f4c1182cbfb6a52b752cd65d29d9c27637e575ef12dLeave291794642022-06-05 3:05:46123 days 10 hrs ago0x9bdbdb4a8f7f816c87a67f5281484ed902c6b942 IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.0033952305 61.5
0x8f16f31f15cff03e057f1632bf4680b5909113db97eea1c10922306181a6b5b0Leave288418982022-05-27 18:11:12131 days 19 hrs ago0x1aa0c004b09589fd8d03660d04269b8e95c7670e IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.003982238819 55.064904379
0xa3ad28c09657faaa1fc75369526922b1225c48157a84d67066d6bed399089c1bLeave281245172022-05-09 20:15:23149 days 17 hrs ago0x964b2c3df9f29ded421ab05974306255f20a1f98 IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.048779272112 674.277706384
0x8044fd4ead254ac6aa27af2408135cab57d36e1a70ec56ff346a0031b5f8711aEnter267059092022-04-03 18:52:07185 days 18 hrs ago0xf5f3dfc2aa33002c59f4c2cc211cc6ee940f2d9c IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.002447582753 30.618130749
0xbe214ab4766f2f1a2f126476c0c56fc74f8a972df93613827ef35f5896997b81Leave257025802022-03-07 22:36:12212 days 15 hrs ago0xdff6dd355fb2e216f6f6511f4f61363caf3144e7 IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.001762070199 31.903644691
0x5b31eee529d8dffbc5658173f250642a18dd9304f36b00c459bcfc586aab48b1Enter255654782022-03-04 9:10:29216 days 4 hrs ago0x7036bb83d9425ca6dc35dce7b2a70439b30e0a50 IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.001920045644 30.554999992
0x7cdce1a4a8a55e74a901b4933c008af917556a5f1ff99449e0408f274e5edc21Leave255343502022-03-03 14:03:46216 days 23 hrs ago0x63857d9cc3a02f3cf4bc8538f40741603ac0e168 IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.00224226131
0x69de373b705a94bffc95293092a98a1ad6feec85d08d8f037228a660586e274dLeave254312072022-02-28 19:16:00219 days 18 hrs ago0x621f0408b6e01d1e6fdda5a3b8df5b511892a43d IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.002184577054 30.202500372
0xc2a5dffca868c7ec0ffb67f28a563d64ea7196189d72c69caa3041c9849f8807Enter253978952022-02-27 21:02:10220 days 16 hrs ago0x7036bb83d9425ca6dc35dce7b2a70439b30e0a50 IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.003629889353 57.764912772
0x3724292b67c3edceaba20b4e9d92a491776f497993ca20f9ea6fe609cf053c08Leave253298012022-02-25 18:26:42222 days 19 hrs ago0xb15d1318bfeda7c8336368ffe5950ed179de3b21 IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.00238942705833.034619437
0xf81634c2a817e478a4782d38c31270e0002eebe0f5c58ca7c5751ce2fa1b239dEnter252976522022-02-24 18:03:06223 days 19 hrs ago0x7036bb83d9425ca6dc35dce7b2a70439b30e0a50 IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.005104444761 75.465999822
0x38dcc4d3d470f8f467bcd670d88c12ed5e216dbfd9b0010f6ea08a3c4adbf6d2Leave252385682022-02-22 19:38:57225 days 18 hrs ago0x5f5130215a9be6b34a986fab0679a61dbba1bddc IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.002333592047 32.262681939
0x52e852f61357fb0a7d89279168e876665d682ccdb3a94ea2e4b3d6e03ca4a4f3Enter250613862022-02-17 21:25:50230 days 16 hrs ago0x7036bb83d9425ca6dc35dce7b2a70439b30e0a50 IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.002044068292 32.528657239
0xd0cdbed4bc2d6a982bed7ee41e751f02579ff2a9ed404615d5aa00403d782ef7Enter250040872022-02-16 9:06:54232 days 4 hrs ago0xf05f5d4ad1b3fd5ad57ba5ca386d0db2e8b317aa IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.00490473654 78.022629211
0x9ee3fee4c6bf2bfc25fc0738f3f25a65705fb0a0b91fc253f3c5ee1e868683ebLeave250002242022-02-16 6:33:17232 days 7 hrs ago0x7495f82f53f151decf4fe96eabae4f395ae3e2c8 IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.002877081137 39.770000382
0x941523a713d2fa20e1ce714cc6eca3d36a0079e02f8227971a2a387c909ae12bEnter249751802022-02-15 15:16:42232 days 22 hrs ago0x7036bb83d9425ca6dc35dce7b2a70439b30e0a50 IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.002017600668 32.107459836
0x2721e19159ed8fcfe35e0c9aedd2354b35ec3b9a76f781b8b23ec014d0e1461aEnter247493292022-02-09 20:53:37238 days 16 hrs ago0x7036bb83d9425ca6dc35dce7b2a70439b30e0a50 IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.002102907131 33.46499995
0xda551dc912ba3a8f0a6b9d3c4ba316c956bedb47a4aa47ec1b1cc159226dae80Enter246988482022-02-08 14:46:18239 days 23 hrs ago0xac6642f63a42f046e47e2236379b90270806e847 IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.00240717694530.108153063
0xf3c0fcfc1a9eda6f64e91b0d05b3f677f340521655250b1212c75843a250a6fbEnter246946812022-02-08 12:08:45240 days 1 hr ago0xf05f5d4ad1b3fd5ad57ba5ca386d0db2e8b317aa IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.00196790625 31.304682414
0x9a7c24ad5d89d4b6dd00ac7113b459ef24eaf05b59e554ed7c80e8ecf3dfd3bdEnter246732182022-02-07 22:56:53240 days 14 hrs ago0x7036bb83d9425ca6dc35dce7b2a70439b30e0a50 IN  0x940920386550c8bfdd5f0dc685c23a6148e8cd380 MATIC0.001851777355 29.468599998
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
YGNStaker

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 10 : YGNStaker.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./libraries/NativeMetaTransaction.sol";
import "./libraries/ContextMixin.sol";

// YGNStaker is the coolest staker in defi space. You come in with some YGN, and leave with more! The longer you stay, the more YGN you get.

// This contract handles swapping to and from xYGN
contract YGNStaker is ERC20("YGNStaker", "xYGN"), ContextMixin, NativeMetaTransaction, Ownable {
    using SafeMath for uint256;
    IERC20 public ygn;

    // Define the YGN token contract
    constructor(IERC20 _ygn) {
        _initializeEIP712("YGNStaker");
        ygn = _ygn;
    }

    function updateYGN(IERC20 _ygn) external onlyOwner {
        ygn = _ygn;
    }

    function _msgSender() internal view override returns (address payable sender) {
        return ContextMixin.msgSender();
    }

    function getXYGNAmount(uint256 _ygnAmount) public view returns (uint256 xYGNAmount) {
        // Gets the amount of YGN locked in the contract
        uint256 totalYGN = ygn.balanceOf(address(this));
        // Gets the amount of xYGN in existence
        uint256 totalShares = totalSupply();
        // If no xYGN exists, return amount
        if (totalShares == 0 || totalYGN == 0) {
            xYGNAmount = _ygnAmount;
        }
        // Calculate the amount of xYGN the YGN is worth. The ratio will change overtime, as xYGN is burned/minted and YGN deposited + gained from fees / withdrawn.
        else {
            xYGNAmount = _ygnAmount.mul(totalShares).div(totalYGN);
        }
    }

    function enterFor(address _account, uint256 _amount) external {
        enterInternal(_account, _amount);
    }

    function enter(uint256 _amount) external {
        enterInternal(msg.sender, _amount);
    }

    function enterInternal(address _account, uint256 _amount) internal {
        // Gets the amount of YGN locked in the contract
        uint256 totalYGN = ygn.balanceOf(address(this));
        // Gets the amount of xYGN in existence
        uint256 totalShares = totalSupply();
        // If no xYGN exists, mint it 1:1 to the amount put in
        if (totalShares == 0 || totalYGN == 0) {
            _mint(_account, _amount);
        }
        // Calculate and mint the amount of xYGN the YGN is worth. The ratio will change overtime, as xYGN is burned/minted and YGN deposited + gained from fees / withdrawn.
        else {
            uint256 what = _amount.mul(totalShares).div(totalYGN);
            _mint(_account, what);
        }
        // Lock the YGN in the contract
        require(ygn.transferFrom(_msgSender(), address(this), _amount), "Transfer of YGN failed");
    }

    // Leave the staker. Claim back your YGNs.
    // Unlocks the staked + gained YGN and burns xYGN
    function leave(uint256 _share) external {
        // Gets the amount of xYGN in existence
        uint256 totalShares = totalSupply();
        // Calculates the amount of YGN the xYGN is worth
        uint256 what = _share.mul(ygn.balanceOf(address(this))).div(totalShares);
        _burn(_msgSender(), _share);
        require(ygn.transfer(_msgSender(), what), "Transfer of YGN failed");
    }
}

File 2 of 10 : IERC20.sol
// 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 3 of 10 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../../utils/Context.sol";
import "./IERC20.sol";
import "../../math/SafeMath.sol";

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

pragma solidity >=0.6.0 <0.8.0;

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () 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 6 of 10 : NativeMetaTransaction.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.6;

import "./EIP712Base.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";

contract NativeMetaTransaction is EIP712Base {
    using SafeMath for uint256;
    bytes32 private constant META_TRANSACTION_TYPEHASH =
        keccak256(bytes("MetaTransaction(uint256 nonce,address from,bytes functionSignature)"));
    event MetaTransactionExecuted(
        address userAddress,
        address payable relayerAddress,
        bytes functionSignature
    );
    mapping(address => uint256) nonces;

    /*
     * Meta transaction structure.
     * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas
     * He should call the desired function directly in that case.
     */
    struct MetaTransaction {
        uint256 nonce;
        address from;
        bytes functionSignature;
    }

    function executeMetaTransaction(
        address userAddress,
        bytes memory functionSignature,
        bytes32 sigR,
        bytes32 sigS,
        uint8 sigV
    ) public payable returns (bytes memory) {
        MetaTransaction memory metaTx = MetaTransaction({
            nonce: nonces[userAddress],
            from: userAddress,
            functionSignature: functionSignature
        });

        require(verify(userAddress, metaTx, sigR, sigS, sigV), "Signer and signature do not match");

        // increase nonce for user (to avoid re-use)
        nonces[userAddress] = nonces[userAddress].add(1);

        emit MetaTransactionExecuted(userAddress, msg.sender, functionSignature);

        // Append userAddress and relayer address at the end to extract it from calling context
        (bool success, bytes memory returnData) = address(this).call(
            abi.encodePacked(functionSignature, userAddress)
        );
        require(success, "Function call not successful");

        return returnData;
    }

    function hashMetaTransaction(MetaTransaction memory metaTx) internal pure returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    META_TRANSACTION_TYPEHASH,
                    metaTx.nonce,
                    metaTx.from,
                    keccak256(metaTx.functionSignature)
                )
            );
    }

    function getNonce(address user) public view returns (uint256 nonce) {
        nonce = nonces[user];
    }

    function verify(
        address signer,
        MetaTransaction memory metaTx,
        bytes32 sigR,
        bytes32 sigS,
        uint8 sigV
    ) internal view returns (bool) {
        require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER");
        return
            signer == ecrecover(toTypedMessageHash(hashMetaTransaction(metaTx)), sigV, sigR, sigS);
    }
}

File 7 of 10 : ContextMixin.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.6;

abstract contract ContextMixin {
    function msgSender() internal view returns (address payable sender) {
        if (msg.sender == address(this)) {
            bytes memory array = msg.data;
            uint256 index = msg.data.length;
            assembly {
                // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.
                sender := and(mload(add(array, index)), 0xffffffffffffffffffffffffffffffffffffffff)
            }
        } else {
            sender = msg.sender;
        }
        return sender;
    }
}

File 8 of 10 : Context.sol
// 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 9 of 10 : EIP712Base.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.6;

import "./Initializable.sol";

contract EIP712Base is Initializable {
    struct EIP712Domain {
        string name;
        string version;
        address verifyingContract;
        uint256 chainId;
    }

    string public constant ERC712_VERSION = "1";

    bytes32 internal constant EIP712_DOMAIN_TYPEHASH =
        keccak256(
            bytes(
                "EIP712Domain(string name,string version,address verifyingContract,uint256 chainId)"
            )
        );
    bytes32 internal domainSeperator;

    // supposed to be called once while initializing.
    // one of the contractsa that inherits this contract follows proxy pattern
    // so it is not possible to do this in a constructor
    function _initializeEIP712(string memory name) internal initializer {
        _setDomainSeperator(name);
    }

    function _setDomainSeperator(string memory name) internal {
        domainSeperator = keccak256(
            abi.encode(
                EIP712_DOMAIN_TYPEHASH,
                keccak256(bytes(name)),
                keccak256(bytes(ERC712_VERSION)),
                address(this),
                getChainId()
            )
        );
    }

    function getDomainSeperator() public view returns (bytes32) {
        return domainSeperator;
    }

    function getChainId() public pure returns (uint256) {
        uint256 id;
        assembly {
            id := chainid()
        }
        return id;
    }

    /**
     * Accept message hash and returns hash message in EIP712 compatible form
     * So that it can be used to recover signer from signature signed using EIP712 formatted data
     * https://eips.ethereum.org/EIPS/eip-712
     * "\\x19" makes the encoding deterministic
     * "\\x01" is the version byte to make it compatible to EIP-191
     */
    function toTypedMessageHash(bytes32 messageHash) internal view returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash));
    }
}

File 10 of 10 : Initializable.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.6;

contract Initializable {
    bool inited = false;

    modifier initializer() {
        require(!inited, "already inited");
        _;
        inited = true;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_ygn","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","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"},{"inputs":[],"name":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"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":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"enter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"enterFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_ygnAmount","type":"uint256"}],"name":"getXYGNAmount","outputs":[{"internalType":"uint256","name":"xYGNAmount","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":"_share","type":"uint256"}],"name":"leave","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"contract IERC20","name":"_ygn","type":"address"}],"name":"updateYGN","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ygn","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60806040526005805461ff00191690553480156200001c57600080fd5b506040516200220f3803806200220f833981810160405260208110156200004257600080fd5b505160408051808201825260098152682ca3a729ba30b5b2b960b91b6020828101918252835180850190945260048452633c2ca3a760e11b90840152815191929162000091916003916200030f565b508051620000a79060049060208401906200030f565b50506005805460ff19166012179055506000620000c362000162565b600880546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506040805180820190915260098152682ca3a729ba30b5b2b960b91b60208201526200013c906200017f565b600980546001600160a01b0319166001600160a01b0392909216919091179055620003bb565b600062000179620001eb60201b6200119d1760201c565b90505b90565b600554610100900460ff1615620001ce576040805162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481a5b9a5d195960921b604482015290519081900360640190fd5b620001d98162000249565b506005805461ff001916610100179055565b6000333014156200024457600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506200017c9050565b503390565b604051806080016040528060528152602001620021bd6052913980516020918201208251838301206040805180820190915260018152603160f81b930192909252907fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc630620002b76200030b565b60405160200180868152602001858152602001848152602001836001600160a01b03168152602001828152602001955050505050506040516020818303038152906040528051906020012060068190555050565b4690565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928262000347576000855562000392565b82601f106200036257805160ff191683800117855562000392565b8280016001018555821562000392579182015b828111156200039257825182559160200191906001019062000375565b50620003a0929150620003a4565b5090565b5b80821115620003a05760008155600101620003a5565b611df280620003cb6000396000f3fe6080604052600436106101665760003560e01c806367dfd4c9116100d1578063a47f07c01161008a578063c334d3e211610064578063c334d3e2146105ea578063dd62ed3e14610614578063f2fde38b1461064f578063f66f780b1461068257610166565b8063a47f07c01461054e578063a59f3e0c14610587578063a9059cbb146105b157610166565b806367dfd4c91461047757806370a08231146104a3578063715018a6146104d65780638da5cb5b146104eb57806395d89b4114610500578063a457c2d71461051557610166565b806323b872dd1161012357806323b872dd146103575780632d0335ab1461039a578063313ce567146103cd5780633408e470146103f8578063395093511461040d57806351cb5d511461044657610166565b806306fdde031461016b578063095ea7b3146101f55780630c53c51c146102425780630f7e59701461030657806318160ddd1461031b57806320379ee514610342575b600080fd5b34801561017757600080fd5b506101806106b5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101ba5781810151838201526020016101a2565b50505050905090810190601f1680156101e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561020157600080fd5b5061022e6004803603604081101561021857600080fd5b506001600160a01b03813516906020013561074c565b604080519115158252519081900360200190f35b610180600480360360a081101561025857600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561028357600080fd5b82018360208201111561029557600080fd5b803590602001918460018302840111640100000000831117156102b757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550508235935050506020810135906040013560ff1661076a565b34801561031257600080fd5b50610180610a6c565b34801561032757600080fd5b50610330610a89565b60408051918252519081900360200190f35b34801561034e57600080fd5b50610330610a8f565b34801561036357600080fd5b5061022e6004803603606081101561037a57600080fd5b506001600160a01b03813581169160208101359091169060400135610a95565b3480156103a657600080fd5b50610330600480360360208110156103bd57600080fd5b50356001600160a01b0316610b1c565b3480156103d957600080fd5b506103e2610b37565b6040805160ff9092168252519081900360200190f35b34801561040457600080fd5b50610330610b40565b34801561041957600080fd5b5061022e6004803603604081101561043057600080fd5b506001600160a01b038135169060200135610b44565b34801561045257600080fd5b5061045b610b92565b604080516001600160a01b039092168252519081900360200190f35b34801561048357600080fd5b506104a16004803603602081101561049a57600080fd5b5035610ba1565b005b3480156104af57600080fd5b50610330600480360360208110156104c657600080fd5b50356001600160a01b0316610d2d565b3480156104e257600080fd5b506104a1610d48565b3480156104f757600080fd5b5061045b610e06565b34801561050c57600080fd5b50610180610e15565b34801561052157600080fd5b5061022e6004803603604081101561053857600080fd5b506001600160a01b038135169060200135610e76565b34801561055a57600080fd5b506104a16004803603604081101561057157600080fd5b506001600160a01b038135169060200135610ede565b34801561059357600080fd5b506104a1600480360360208110156105aa57600080fd5b5035610eec565b3480156105bd57600080fd5b5061022e600480360360408110156105d457600080fd5b506001600160a01b038135169060200135610ef9565b3480156105f657600080fd5b506103306004803603602081101561060d57600080fd5b5035610f0d565b34801561062057600080fd5b506103306004803603604081101561063757600080fd5b506001600160a01b0381358116916020013516610fc7565b34801561065b57600080fd5b506104a16004803603602081101561067257600080fd5b50356001600160a01b0316610ff2565b34801561068e57600080fd5b506104a1600480360360208110156106a557600080fd5b50356001600160a01b0316611107565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107415780601f1061071657610100808354040283529160200191610741565b820191906000526020600020905b81548152906001019060200180831161072457829003601f168201915b505050505090505b90565b60006107606107596111f9565b8484611208565b5060015b92915050565b60408051606081810183526001600160a01b038816600081815260076020908152908590205484528301529181018690526107a887828787876112f4565b6107e35760405162461bcd60e51b8152600401808060200182810382526021815260200180611d0d6021913960400191505060405180910390fd5b6001600160a01b0387166000908152600760205260409020546108079060016113ce565b60076000896001600160a01b03166001600160a01b03168152602001908152602001600020819055507f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87338860405180846001600160a01b03168152602001836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b838110156108af578181015183820152602001610897565b50505050905090810190601f1680156108dc5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a1600080306001600160a01b0316888a6040516020018083805190602001908083835b6020831061092c5780518252601f19909201916020918201910161090d565b6001836020036101000a038019825116818451168082178552505050505050905001826001600160a01b031660601b8152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106109a25780518252601f199092019160209182019101610983565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610a04576040519150601f19603f3d011682016040523d82523d6000602084013e610a09565b606091505b509150915081610a60576040805162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c00000000604482015290519081900360640190fd5b98975050505050505050565b604051806040016040528060018152602001603160f81b81525081565b60025490565b60065490565b6000610aa284848461142f565b610b1284610aae6111f9565b610b0d85604051806060016040528060288152602001611ce5602891396001600160a01b038a16600090815260016020526040812090610aec6111f9565b6001600160a01b03168152602081019190915260400160002054919061158a565b611208565b5060019392505050565b6001600160a01b031660009081526007602052604090205490565b60055460ff1690565b4690565b6000610760610b516111f9565b84610b0d8560016000610b626111f9565b6001600160a01b03908116825260208083019390935260409182016000908120918c1681529252902054906113ce565b6009546001600160a01b031681565b6000610bab610a89565b600954604080516370a0823160e01b81523060048201529051929350600092610c3f928592610c39926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610c0657600080fd5b505afa158015610c1a573d6000803e3d6000fd5b505050506040513d6020811015610c3057600080fd5b50518690611621565b9061167a565b9050610c52610c4c6111f9565b846116e1565b6009546001600160a01b031663a9059cbb610c6b6111f9565b836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610cb257600080fd5b505af1158015610cc6573d6000803e3d6000fd5b505050506040513d6020811015610cdc57600080fd5b5051610d28576040805162461bcd60e51b8152602060048201526016602482015275151c985b9cd9995c881bd9881651d38819985a5b195960521b604482015290519081900360640190fd5b505050565b6001600160a01b031660009081526020819052604090205490565b610d506111f9565b6001600160a01b0316610d61610e06565b6001600160a01b031614610dbc576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6008546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600880546001600160a01b0319169055565b6008546001600160a01b031690565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107415780601f1061071657610100808354040283529160200191610741565b6000610760610e836111f9565b84610b0d85604051806060016040528060258152602001611d986025913960016000610ead6111f9565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919061158a565b610ee882826117dd565b5050565b610ef633826117dd565b50565b6000610760610f066111f9565b848461142f565b600954604080516370a0823160e01b8152306004820152905160009283926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b158015610f5d57600080fd5b505afa158015610f71573d6000803e3d6000fd5b505050506040513d6020811015610f8757600080fd5b505190506000610f95610a89565b9050801580610fa2575081155b15610faf57839250610fc0565b610fbd82610c398684611621565b92505b5050919050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610ffa6111f9565b6001600160a01b031661100b610e06565b6001600160a01b031614611066576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166110ab5760405162461bcd60e51b8152600401808060200182810382526026815260200180611c316026913960400191505060405180910390fd5b6008546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600880546001600160a01b0319166001600160a01b0392909216919091179055565b61110f6111f9565b6001600160a01b0316611120610e06565b6001600160a01b03161461117b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6000333014156111f457600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506107499050565b503390565b600061120361119d565b905090565b6001600160a01b03831661124d5760405162461bcd60e51b8152600401808060200182810382526024815260200180611d746024913960400191505060405180910390fd5b6001600160a01b0382166112925760405162461bcd60e51b8152600401808060200182810382526022815260200180611c576022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b60006001600160a01b03861661133b5760405162461bcd60e51b8152600401808060200182810382526025815260200180611c9f6025913960400191505060405180910390fd5b600161134e6113498761198c565b611a0f565b83868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156113a5573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b600082820183811015611428576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b0383166114745760405162461bcd60e51b8152600401808060200182810382526025815260200180611d4f6025913960400191505060405180910390fd5b6001600160a01b0382166114b95760405162461bcd60e51b8152600401808060200182810382526023815260200180611ba96023913960400191505060405180910390fd5b6114c4838383610d28565b61150181604051806060016040528060268152602001611c79602691396001600160a01b038616600090815260208190526040902054919061158a565b6001600160a01b03808516600090815260208190526040808220939093559084168152205461153090826113ce565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156116195760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156115de5781810151838201526020016115c6565b50505050905090810190601f16801561160b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008261163057506000610764565b8282028284828161163d57fe5b04146114285760405162461bcd60e51b8152600401808060200182810382526021815260200180611cc46021913960400191505060405180910390fd5b60008082116116d0576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816116d957fe5b049392505050565b6001600160a01b0382166117265760405162461bcd60e51b8152600401808060200182810382526021815260200180611d2e6021913960400191505060405180910390fd5b61173282600083610d28565b61176f81604051806060016040528060228152602001611bcc602291396001600160a01b038516600090815260208190526040902054919061158a565b6001600160a01b0383166000908152602081905260409020556002546117959082611a5b565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600954604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561182857600080fd5b505afa15801561183c573d6000803e3d6000fd5b505050506040513d602081101561185257600080fd5b505190506000611860610a89565b905080158061186d575081155b156118815761187c8484611ab8565b61189f565b600061189183610c398685611621565b905061189d8582611ab8565b505b6009546001600160a01b03166323b872dd6118b86111f9565b30866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050602060405180830381600087803b15801561191057600080fd5b505af1158015611924573d6000803e3d6000fd5b505050506040513d602081101561193a57600080fd5b5051611986576040805162461bcd60e51b8152602060048201526016602482015275151c985b9cd9995c881bd9881651d38819985a5b195960521b604482015290519081900360640190fd5b50505050565b6000604051806080016040528060438152602001611bee60439139805190602001208260000151836020015184604001518051906020012060405160200180858152602001848152602001836001600160a01b03168152602001828152602001945050505050604051602081830303815290604052805190602001209050919050565b6000611a19610a8f565b82604051602001808061190160f01b81525060020183815260200182815260200192505050604051602081830303815290604052805190602001209050919050565b600082821115611ab2576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6001600160a01b038216611b13576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b611b1f60008383610d28565b600254611b2c90826113ce565b6002556001600160a01b038216600090815260208190526040902054611b5290826113ce565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e63654d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e6174757265294f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63654e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5349474e4552536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63655369676e657220616e64207369676e617475726520646f206e6f74206d6174636845524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220f37316ee423e142ce98eeb72c94cf713714f27b86fbf3409e6c57367fab0acfe64736f6c63430007060033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c75696e7432353620636861696e496429000000000000000000000000a33aaa07853038943ef2c32cde73a094cf993ee0

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

000000000000000000000000a33aaa07853038943ef2c32cde73a094cf993ee0

-----Decoded View---------------
Arg [0] : _ygn (address): 0xa33aaa07853038943ef2c32cde73a094cf993ee0

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a33aaa07853038943ef2c32cde73a094cf993ee0


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