Contract 0xb24d1498ad20c5ee95142c05fd14f564bb61a379

 

Contract Overview

Balance:
0 MATIC

MATIC Value:
$0.00

Token:
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xd70c6ff3070c4f5ff52713fc46c4aa87fce0174b20a8b38479d9313f1352a2ccLeave316454802022-08-08 4:26:4159 days 8 hrs ago0x003873fc1ea728a8553f46b1f516effa6336f61f IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.00280324568 30.07
0xe85c7f30997b8b3d12b61fdb2dc07fee18c6924ee6ce8a2ad935b4331c03072aLeave314960512022-08-04 3:34:2363 days 9 hrs ago0x8d7a429b0b6284806bcd50809c52ba60e849a0f4 IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.00254652354 32.01
0x3ca783edafc0457a13396204186dd13e99a19ce5eed55ef17fbd10cab55aff24Burn And Stake309185042022-07-20 1:45:4978 days 11 hrs ago0x003873fc1ea728a8553f46b1f516effa6336f61f IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.003613290295 30.000002451
0xa3412a54b757a1a2e44562f3eba3092e287c2f2b482fb75f32cc35165ae17308Leave308106752022-07-17 4:39:1681 days 8 hrs ago0x003873fc1ea728a8553f46b1f516effa6336f61f IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.00279672 30.00000001
0xdd37aebf4cb1da564da7446bfb1bea6a689b6a861dc8c4cad6e66880750408dbLeave306120812022-07-11 18:24:5586 days 19 hrs ago0x8d7a429b0b6284806bcd50809c52ba60e849a0f4 IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.003922278257 42.073696227
0xb7143a670fcb6a9fa3ce3cb43741aa3f26652c9fa2da6e1eed9578823e548b1dBurn And Stake302533342022-07-02 13:41:0995 days 23 hrs ago0x8d7a429b0b6284806bcd50809c52ba60e849a0f4 IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.006541785758 54.314370772
0xde5b6768f85b9e73e5487d336fd476b88ea625ba93e86692e174aebe263b12edBurn And Stake299649982022-06-25 1:35:31103 days 11 hrs ago0x8d7a429b0b6284806bcd50809c52ba60e849a0f4 IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.019168853404 159.15290556
0xb694aff9794cf79bf2a9cc98c6df55421d9a6915fd64906c99acf86e99bb6cdbLeave291796262022-06-05 3:11:18123 days 10 hrs ago0x9bdbdb4a8f7f816c87a67f5281484ed902c6b942 IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.004891956 61.5
0x34a3de702b476150a46230c94d6378513c3869c910b4e504b650ec1c3110704aBurn And Stake276060252022-04-26 17:48:01162 days 19 hrs ago0x1aa0c004b09589fd8d03660d04269b8e95c7670e IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.003835676447 31.846404089
0xf66171ecb2a7b9ae41ea5492c1e9604a6bf89127cbf9b45e44755c4ecc9b7c38Burn And Stake275247002022-04-24 15:58:59164 days 21 hrs ago0x7036bb83d9425ca6dc35dce7b2a70439b30e0a50 IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.004579724633 38.024000011
0xbf14f6aaf59574e71cea49ac65c27448c1ebac547205dbf060581603d1e32cb6Burn And Stake271847542022-04-15 23:57:14173 days 13 hrs ago0x7036bb83d9425ca6dc35dce7b2a70439b30e0a50 IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.003892635106 32.319313751
0x46a1315c0cbc2aa1b4ae27ad2319c4a4f5596709543016f1fb0ad97c140548c6Burn And Stake269533832022-04-10 3:18:46179 days 10 hrs ago0x1aa0c004b09589fd8d03660d04269b8e95c7670e IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.003657317141 30.365543379
0x03db95d3a3a8ea67cad1f34404bc3d885778bafaa75eb4312ed7c5d9ffe3c43bBurn And Stake269034672022-04-08 20:31:48180 days 16 hrs ago0x7036bb83d9425ca6dc35dce7b2a70439b30e0a50 IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.003855380429 32.009999993
0x100a7448b52988945e888b3893abf75ae062cf40043793c83626a4a19ebb758aBurn And Stake266892442022-04-03 8:45:14186 days 4 hrs ago0x7036bb83d9425ca6dc35dce7b2a70439b30e0a50 IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.003632513741 30.159608625
0x9fc628b9e0615fec0c8e0703500b99c88f2367e9ac3f63002cb802a968836724Burn And Stake263581522022-03-25 20:52:56194 days 16 hrs ago0x7036bb83d9425ca6dc35dce7b2a70439b30e0a50 IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.00368872285 30.626295013
0x105765a7e22ca625ffea71999ec3c2060c660eacf41b47895ed69520920c14f6Burn And Stake262039832022-03-21 22:27:53198 days 14 hrs ago0x1aa0c004b09589fd8d03660d04269b8e95c7670e IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.004150469227 34.457453819
0x3a04de5a907633fb66def469d2721fa9f8cfcd107e307c440d9fb9555d4fb106Burn And Stake260496122022-03-17 19:33:25202 days 17 hrs ago0x7036bb83d9425ca6dc35dce7b2a70439b30e0a50 IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.003626013435 30.105638645
0x821ae1a8a7ec7f24e2da9c0981e2f2ae3192c6b600c8d32306033f87a35b9be1Leave257025522022-03-07 22:35:16212 days 14 hrs ago0xdff6dd355fb2e216f6f6511f4f61363caf3144e7 IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.003919290514 42.037137897
0x43fd79b7558b5c0d6c637f2ae7fd1e6b5e6b46f992435f25d2acb6d76db9bb03Leave255654342022-03-04 9:08:57216 days 4 hrs ago0x7036bb83d9425ca6dc35dce7b2a70439b30e0a50 IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.002902715683 31.136999947
0x59dc97e71344fd683c07bae65ade81f4ef983f230b17217c25c8cd789812b0c6Burn And Stake255075092022-03-02 21:01:29217 days 16 hrs ago0x7036bb83d9425ca6dc35dce7b2a70439b30e0a50 IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.003956305648 32.847950056
0x9b0d468e94b322bc1ca761ffa2fe55759b7cf57043dd9d4061d136d85081fe3aLeave253977852022-02-27 20:56:29220 days 16 hrs ago0x7036bb83d9425ca6dc35dce7b2a70439b30e0a50 IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.002817647806 35.422505865
0x75d11c3dcfe6913e18c3395fa6c09f841da1416296c389ee9f6e94ca331f36ebBurn And Stake252979732022-02-24 18:17:39223 days 19 hrs ago0x7036bb83d9425ca6dc35dce7b2a70439b30e0a50 IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.000983628321 32.979994025
0x509f0bbc8da392bad9f93eef035cd8b6676f9348948f2a88eb598f37c64a5288Leave252976522022-02-24 18:03:06223 days 19 hrs ago0x7036bb83d9425ca6dc35dce7b2a70439b30e0a50 IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.003109454548 39.091000559
0x663183f1c1aa601f209bdd763d63abcc59f21002b80ac36270bde4343cc2119eLeave252511472022-02-23 6:08:23225 days 7 hrs ago0x7036bb83d9425ca6dc35dce7b2a70439b30e0a50 IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.002817110663 30.218727615
0xb1a2260b7d03fa21cd8a1527cbd3165419891bc124d81b0aaf904262b9016fe7Burn And Stake251900762022-02-21 10:51:27227 days 2 hrs ago0x10855704d1dde09d90c0d1afee4e1e6626e45bb7 IN  0xb24d1498ad20c5ee95142c05fd14f564bb61a3790 MATIC0.003939190142 32.711005638
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FYGNClaimableBurner

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 12 : FYGNClaimableBurner.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;

import "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "./YGNStaker.sol";

contract FYGNClaimableBurner is Ownable {
    using SafeMath for uint256;

    ERC20Burnable public fYGNToken;

    IERC20 public ygnToken;

    YGNStaker public ygnStaker;

    constructor(
        ERC20Burnable _fYGN,
        IERC20 _ygnToken,
        YGNStaker _ygnStaker
    ) {
        fYGNToken = _fYGN;
        ygnToken = _ygnToken;
        ygnStaker = _ygnStaker;
    }

    function updateYGNStaker(YGNStaker _ygnStaker) external onlyOwner {
        ygnStaker = _ygnStaker;
    }

    function updateYGN(IERC20 _ygnToken) external onlyOwner {
        ygnToken = _ygnToken;
    }

    function updateFYGN(ERC20Burnable _fYGNToken) external onlyOwner {
        fYGNToken = _fYGNToken;
    }

    function getYGNAmount(uint256 _fYGNShare) public view returns (uint256) {
        uint256 totalSupply = fYGNToken.totalSupply();
        if (totalSupply == 0) {
            return 0;
        }
        return _fYGNShare.mul(ygnToken.balanceOf((address(this)))).div(totalSupply);
    }

    function burnFYGNFor(address _account, uint256 _fYGNShare) external {
        leaveInternal(_account, _fYGNShare);
    }

    function burnAndStake(uint256 _fYGNShare) external {
        fYGNToken.transferFrom(msg.sender, address(this), _fYGNShare);
        uint256 ygnAmount = getYGNAmount(_fYGNShare);

        fYGNToken.burn(_fYGNShare);

        ygnToken.approve(address(ygnStaker), ygnAmount);
        ygnStaker.enterFor(msg.sender, ygnAmount);
    }

    function leaveInternal(address _account, uint256 _fYGNShare) internal {
        fYGNToken.transferFrom(msg.sender, address(this), _fYGNShare);

        uint256 ygnAmount = getYGNAmount(_fYGNShare);

        ygnToken.transfer(_account, ygnAmount);

        fYGNToken.burn(_fYGNShare);
    }

    function leave(uint256 _fYGNShare) public {
        leaveInternal(msg.sender, _fYGNShare);
    }
}

File 2 of 12 : ERC20Burnable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    using SafeMath for uint256;

    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

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

        _approve(account, _msgSender(), decreasedAllowance);
        _burn(account, amount);
    }
}

File 3 of 12 : 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 4 of 12 : 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 5 of 12 : 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 6 of 12 : 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 7 of 12 : 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 8 of 12 : 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 9 of 12 : 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 10 of 12 : 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 11 of 12 : 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 12 of 12 : 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 ERC20Burnable","name":"_fYGN","type":"address"},{"internalType":"contract IERC20","name":"_ygnToken","type":"address"},{"internalType":"contract YGNStaker","name":"_ygnStaker","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"_fYGNShare","type":"uint256"}],"name":"burnAndStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_fYGNShare","type":"uint256"}],"name":"burnFYGNFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fYGNToken","outputs":[{"internalType":"contract ERC20Burnable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fYGNShare","type":"uint256"}],"name":"getYGNAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fYGNShare","type":"uint256"}],"name":"leave","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ERC20Burnable","name":"_fYGNToken","type":"address"}],"name":"updateFYGN","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_ygnToken","type":"address"}],"name":"updateYGN","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract YGNStaker","name":"_ygnStaker","type":"address"}],"name":"updateYGNStaker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ygnStaker","outputs":[{"internalType":"contract YGNStaker","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ygnToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50604051610cc2380380610cc28339818101604052606081101561003357600080fd5b5080516020820151604090920151909190600061004e6100da565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b039485166001600160a01b0319918216179091556002805493851693821693909317909255600380549190931691161790556100de565b3390565b610bd5806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636ae19f591161008c5780639b285caa116100665780639b285caa146101b8578063a88de17c146101d5578063f2fde38b146101fb578063f66f780b14610221576100cf565b80636ae19f591461017c578063715018a6146101a85780638da5cb5b146101b0576100cf565b80631bdd7928146100d45780631dc21cbc1461010357806334078a881461012757806346e54efd1461012f5780634a1423141461015757806367dfd4c91461015f575b600080fd5b6100f1600480360360208110156100ea57600080fd5b5035610247565b60408051918252519081900360200190f35b61010b61036c565b604080516001600160a01b039092168252519081900360200190f35b61010b61037b565b6101556004803603602081101561014557600080fd5b50356001600160a01b031661038a565b005b61010b61040e565b6101556004803603602081101561017557600080fd5b503561041d565b6101556004803603604081101561019257600080fd5b506001600160a01b03813516906020013561042a565b610155610438565b61010b6104e4565b610155600480360360208110156101ce57600080fd5b50356104f3565b610155600480360360208110156101eb57600080fd5b50356001600160a01b03166106e1565b6101556004803603602081101561021157600080fd5b50356001600160a01b0316610765565b6101556004803603602081101561023757600080fd5b50356001600160a01b0316610867565b600080600160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561029857600080fd5b505afa1580156102ac573d6000803e3d6000fd5b505050506040513d60208110156102c257600080fd5b50519050806102d5576000915050610367565b600254604080516370a0823160e01b8152306004820152905161036392849261035d926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561032a57600080fd5b505afa15801561033e573d6000803e3d6000fd5b505050506040513d602081101561035457600080fd5b505186906108eb565b9061094d565b9150505b919050565b6002546001600160a01b031681565b6001546001600160a01b031681565b6103926109b4565b6001600160a01b03166103a36104e4565b6001600160a01b0316146103ec576040805162461bcd60e51b81526020600482018190526024820152600080516020610b80833981519152604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b031681565b61042733826109b8565b50565b61043482826109b8565b5050565b6104406109b4565b6001600160a01b03166104516104e4565b6001600160a01b03161461049a576040805162461bcd60e51b81526020600482018190526024820152600080516020610b80833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b600154604080516323b872dd60e01b81523360048201523060248201526044810184905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b15801561054d57600080fd5b505af1158015610561573d6000803e3d6000fd5b505050506040513d602081101561057757600080fd5b506000905061058582610247565b60015460408051630852cd8d60e31b81526004810186905290519293506001600160a01b03909116916342966c689160248082019260009290919082900301818387803b1580156105d557600080fd5b505af11580156105e9573d6000803e3d6000fd5b50506002546003546040805163095ea7b360e01b81526001600160a01b03928316600482015260248101879052905191909216935063095ea7b3925060448083019260209291908290030181600087803b15801561064657600080fd5b505af115801561065a573d6000803e3d6000fd5b505050506040513d602081101561067057600080fd5b505060035460408051630291fc1f60e61b81523360048201526024810184905290516001600160a01b039092169163a47f07c09160448082019260009290919082900301818387803b1580156106c557600080fd5b505af11580156106d9573d6000803e3d6000fd5b505050505050565b6106e96109b4565b6001600160a01b03166106fa6104e4565b6001600160a01b031614610743576040805162461bcd60e51b81526020600482018190526024820152600080516020610b80833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b61076d6109b4565b6001600160a01b031661077e6104e4565b6001600160a01b0316146107c7576040805162461bcd60e51b81526020600482018190526024820152600080516020610b80833981519152604482015290519081900360640190fd5b6001600160a01b03811661080c5760405162461bcd60e51b8152600401808060200182810382526026815260200180610b396026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b61086f6109b4565b6001600160a01b03166108806104e4565b6001600160a01b0316146108c9576040805162461bcd60e51b81526020600482018190526024820152600080516020610b80833981519152604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000826108fa57506000610947565b8282028284828161090757fe5b04146109445760405162461bcd60e51b8152600401808060200182810382526021815260200180610b5f6021913960400191505060405180910390fd5b90505b92915050565b60008082116109a3576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816109ac57fe5b049392505050565b3390565b600154604080516323b872dd60e01b81523360048201523060248201526044810184905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015610a1257600080fd5b505af1158015610a26573d6000803e3d6000fd5b505050506040513d6020811015610a3c57600080fd5b5060009050610a4a82610247565b6002546040805163a9059cbb60e01b81526001600160a01b03878116600483015260248201859052915193945091169163a9059cbb916044808201926020929091908290030181600087803b158015610aa257600080fd5b505af1158015610ab6573d6000803e3d6000fd5b505050506040513d6020811015610acc57600080fd5b505060015460408051630852cd8d60e31b81526004810185905290516001600160a01b03909216916342966c689160248082019260009290919082900301818387803b158015610b1b57600080fd5b505af1158015610b2f573d6000803e3d6000fd5b5050505050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220735cf1184b573c7bf5a56a9141fe79a6d1cb23a4d349a38d9ecf391e3b94193564736f6c63430007060033000000000000000000000000397e10ee5e315f69b23cb6c8a913a589b5850c80000000000000000000000000a33aaa07853038943ef2c32cde73a094cf993ee0000000000000000000000000940920386550c8bfdd5f0dc685c23a6148e8cd38

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

000000000000000000000000397e10ee5e315f69b23cb6c8a913a589b5850c80000000000000000000000000a33aaa07853038943ef2c32cde73a094cf993ee0000000000000000000000000940920386550c8bfdd5f0dc685c23a6148e8cd38

-----Decoded View---------------
Arg [0] : _fYGN (address): 0x397e10ee5e315f69b23cb6c8a913a589b5850c80
Arg [1] : _ygnToken (address): 0xa33aaa07853038943ef2c32cde73a094cf993ee0
Arg [2] : _ygnStaker (address): 0x940920386550c8bfdd5f0dc685c23a6148e8cd38

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000397e10ee5e315f69b23cb6c8a913a589b5850c80
Arg [1] : 000000000000000000000000a33aaa07853038943ef2c32cde73a094cf993ee0
Arg [2] : 000000000000000000000000940920386550c8bfdd5f0dc685c23a6148e8cd38


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.