ETH Price: $3,279.45 (+0.98%)
Gas: 1 Gwei

Contract

0x78Ac220f81f78780B4Ae9037598d6Ee5b096D5F5
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Mass Harvest198727292024-05-15 3:35:5974 days ago1715744159IN
0x78Ac220f...5b096D5F5
0 ETH0.000540585
Mass Harvest184903362023-11-03 8:27:11268 days ago1699000031IN
0x78Ac220f...5b096D5F5
0 ETH0.0028651527
Mass Harvest183975802023-10-21 8:45:35281 days ago1697877935IN
0x78Ac220f...5b096D5F5
0 ETH0.000756817
Mass Harvest180508882023-09-02 19:24:11330 days ago1693682651IN
0x78Ac220f...5b096D5F5
0 ETH0.0011672811
Mass Harvest177781202023-07-26 15:22:59368 days ago1690384979IN
0x78Ac220f...5b096D5F5
0 ETH0.0035678633
Mass Harvest175780442023-06-28 13:14:11396 days ago1687958051IN
0x78Ac220f...5b096D5F5
0 ETH0.001910118
Mass Harvest175189672023-06-20 5:55:47404 days ago1687240547IN
0x78Ac220f...5b096D5F5
0 ETH0.0015917515
Mass Harvest175089392023-06-18 20:08:11406 days ago1687118891IN
0x78Ac220f...5b096D5F5
0 ETH0.0015917515
Mass Harvest174854762023-06-15 13:07:59409 days ago1686834479IN
0x78Ac220f...5b096D5F5
0 ETH0.0028651527
Mass Harvest174786662023-06-14 14:06:59410 days ago1686751619IN
0x78Ac220f...5b096D5F5
0 ETH0.0023785722
Mass Harvest174625512023-06-12 7:39:23412 days ago1686555563IN
0x78Ac220f...5b096D5F5
0 ETH0.0016217515
Mass Harvest174527072023-06-10 22:23:23414 days ago1686435803IN
0x78Ac220f...5b096D5F5
0 ETH0.0004896816
Mass Harvest174527072023-06-10 22:23:23414 days ago1686435803IN
0x78Ac220f...5b096D5F5
0 ETH0.0018379817
Mass Harvest174431872023-06-09 14:12:11415 days ago1686319931IN
0x78Ac220f...5b096D5F5
0 ETH0.0026529225
Mass Harvest174421612023-06-09 10:44:35415 days ago1686307475IN
0x78Ac220f...5b096D5F5
0 ETH0.0020542219
Mass Harvest174224402023-06-06 15:57:59418 days ago1686067079IN
0x78Ac220f...5b096D5F5
0 ETH0.0033957432
Mass Harvest173766312023-05-31 4:58:11424 days ago1685509091IN
0x78Ac220f...5b096D5F5
0 ETH0.0032896231
Mass Harvest173569912023-05-28 10:42:23427 days ago1685270543IN
0x78Ac220f...5b096D5F5
0 ETH0.002546824
Mass Harvest173418322023-05-26 7:36:23429 days ago1685086583IN
0x78Ac220f...5b096D5F5
0 ETH0.0027590426
Mass Harvest173138322023-05-22 9:05:23433 days ago1684746323IN
0x78Ac220f...5b096D5F5
0 ETH0.0033957432
Mass Harvest173040072023-05-20 23:51:23435 days ago1684626683IN
0x78Ac220f...5b096D5F5
0 ETH0.0029712728
Mass Harvest172275242023-05-10 4:06:23445 days ago1683691583IN
0x78Ac220f...5b096D5F5
0 ETH0.0073930260
Mass Harvest172183562023-05-08 21:11:11447 days ago1683580271IN
0x78Ac220f...5b096D5F5
0 ETH0.0100811195
Mass Harvest172159802023-05-08 13:09:59447 days ago1683551399IN
0x78Ac220f...5b096D5F5
0 ETH0.01086206102.35934593
Mass Harvest172087792023-05-07 12:51:47448 days ago1683463907IN
0x78Ac220f...5b096D5F5
0 ETH0.0091088785.83808279
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PlugYieldFarm

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 6 : PlugYieldFarm.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.6.0;

import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./interfaces/IStaking.sol";

contract PlugYieldFarm {
    // lib
    using SafeMath for uint256;
    using SafeMath for uint128;

    // constants
    uint256 public constant TOTAL_DISTRIBUTED_AMOUNT = 250_000_000;
    uint256 public constant NR_OF_EPOCHS = 1;
    uint128 public constant EPOCHS_DELAYED_FROM_STAKING_CONTRACT = 0;

    // state variables

    // addreses
    address private _lpTokenAddress;
    address private _communityVault; //TODO: need to confirm where are the token minted to for now
    // contracts
    IERC20 private _plug;
    IStaking private _staking;

    uint256[] private epochs = new uint256[](NR_OF_EPOCHS + 1);
    uint256 private _totalAmountPerEpoch;
    uint128 public lastInitializedEpoch;
    mapping(address => uint128) private lastEpochIdHarvested;
    uint256 public epochDuration; // init from staking contract
    uint256 public epochStart; // init from staking contract

    // events
    event MassHarvest(
        address indexed user,
        uint256 epochsHarvested,
        uint256 totalValue
    );
    event Harvest(
        address indexed user,
        uint128 indexed epochId,
        uint256 amount
    );

    // constructor
    constructor(
        address plugTokenAddress,
        address lpTokenAddress,
        address stakeContract,
        address communityVault
    ) public {
        _plug = IERC20(plugTokenAddress);
        _lpTokenAddress = lpTokenAddress;
        _staking = IStaking(stakeContract);
        _communityVault = communityVault;
        epochDuration = _staking.epochDuration();
        epochStart =
            _staking.epoch1Start() +
            epochDuration.mul(EPOCHS_DELAYED_FROM_STAKING_CONTRACT);
        _totalAmountPerEpoch = 
            TOTAL_DISTRIBUTED_AMOUNT
                .mul(10**18)
                .div(NR_OF_EPOCHS);
    }

    // public methods
    // public method to harvest all the unharvested epochs until current epoch - 1
    function massHarvest() external returns (uint256) {
        uint256 totalDistributedValue;
        uint256 epochId = _getEpochId().sub(1); // fails in epoch 0
        // force max number of epochs
        if (epochId > NR_OF_EPOCHS) {
            epochId = NR_OF_EPOCHS;
        }

        for (
            uint128 i = lastEpochIdHarvested[msg.sender] + 1;
            i <= epochId;
            i++
        ) {
            // i = epochId
            // compute distributed Value and do one single transfer at the end
            totalDistributedValue += _harvest(i);
        }

        emit MassHarvest(
            msg.sender,
            epochId - lastEpochIdHarvested[msg.sender],
            totalDistributedValue
        );

        if (totalDistributedValue > 0) {
            _plug.transferFrom(
                _communityVault,
                msg.sender,
                totalDistributedValue
            );
        }

        return totalDistributedValue;
    }

    function harvest(uint128 epochId) external returns (uint256) {
        // checks for requested epoch
        require(_getEpochId() > epochId, "This epoch is in the future");
        require(epochId <= NR_OF_EPOCHS, "Maximum number of epochs is 12");
        require(
            lastEpochIdHarvested[msg.sender].add(1) == epochId,
            "Harvest in order"
        );
        uint256 userReward = _harvest(epochId);
        if (userReward > 0) {
            _plug.transferFrom(_communityVault, msg.sender, userReward);
        }
        emit Harvest(msg.sender, epochId, userReward);
        return userReward;
    }

    // views
    // calls to the staking smart contract to retrieve the epoch total pool size
    function getPoolSize(uint128 epochId) external view returns (uint256) {
        return _getPoolSize(epochId);
    }

    function getCurrentEpoch() external view returns (uint256) {
        return _getEpochId();
    }

    // calls to the staking smart contract to retrieve user balance for an epoch
    function getEpochStake(address userAddress, uint128 epochId)
        external
        view
        returns (uint256)
    {
        return _getUserBalancePerEpoch(userAddress, epochId);
    }

    function userLastEpochIdHarvested() external view returns (uint256) {
        return lastEpochIdHarvested[msg.sender];
    }

    // internal methods

    function _initEpoch(uint128 epochId) internal {
        require(
            lastInitializedEpoch.add(1) == epochId,
            "Epoch can be init only in order"
        );
        lastInitializedEpoch = epochId;
        // call the staking smart contract to init the epoch
        epochs[epochId] = _getPoolSize(epochId);
    }

    function _harvest(uint128 epochId) internal returns (uint256) {
        // try to initialize an epoch. if it can't it fails
        // if it fails either user either a Plug account will init not init epochs
        if (lastInitializedEpoch < epochId) {
            _initEpoch(epochId);
        }
        // Set user state for last harvested
        lastEpochIdHarvested[msg.sender] = epochId;
        // compute and return user total reward. For optimization reasons the transfer have been moved to an upper layer (i.e. massHarvest needs to do a single transfer)

        // exit if there is no stake on the epoch
        if (epochs[epochId] == 0) {
            return 0;
        }
        return
            _totalAmountPerEpoch
                .mul(_getUserBalancePerEpoch(msg.sender, epochId))
                .div(epochs[epochId]);
    }

    // retrieve _lpTokenAddress token balance
    function _getPoolSize(uint128 epochId) internal view returns (uint256) {
        return
            _staking.getEpochPoolSize(
                _lpTokenAddress,
                _stakingEpochId(epochId)
            );
    }

    // retrieve _lpTokenAddress token balance per user per epoch
    function _getUserBalancePerEpoch(address userAddress, uint128 epochId)
        internal
        view
        returns (uint256)
    {
        return
            _staking.getEpochUserBalance(
                userAddress,
                _lpTokenAddress,
                _stakingEpochId(epochId)
            );
    }

    // compute epoch id from block.timestamp and epochStart date
    function _getEpochId() internal view returns (uint128 epochId) {
        if (block.timestamp < epochStart) {
            return 0;
        }
        epochId = uint128(
            block.timestamp.sub(epochStart).div(epochDuration).add(1)
        );
    }

    // get the staking epoch
    function _stakingEpochId(uint128 epochId) internal pure returns (uint128) {
        return epochId + EPOCHS_DELAYED_FROM_STAKING_CONTRACT;
    }
}

File 2 of 6 : SafeMath.sol
pragma solidity ^0.6.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, 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) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * 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);
        uint256 c = a - b;

        return c;
    }

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

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts 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) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

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

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

File 3 of 6 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.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 6 : IStaking.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.6.0;

import "@openzeppelin/contracts/access/Ownable.sol";

interface IStaking {

    function getEpochId(uint timestamp) external view returns (uint); // get epoch id
    function getEpochUserBalance(address user, address token, uint128 epoch) external view returns(uint);
    function getEpochPoolSize(address token, uint128 epoch) external view returns (uint);
    function epoch1Start() external view returns (uint);
    function epochDuration() external view returns (uint);
}

File 5 of 6 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import "../GSN/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.
 */
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 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 6 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.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;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"plugTokenAddress","type":"address"},{"internalType":"address","name":"lpTokenAddress","type":"address"},{"internalType":"address","name":"stakeContract","type":"address"},{"internalType":"address","name":"communityVault","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint128","name":"epochId","type":"uint128"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Harvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"epochsHarvested","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalValue","type":"uint256"}],"name":"MassHarvest","type":"event"},{"inputs":[],"name":"EPOCHS_DELAYED_FROM_STAKING_CONTRACT","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NR_OF_EPOCHS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_DISTRIBUTED_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epochDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epochStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"uint128","name":"epochId","type":"uint128"}],"name":"getEpochStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"epochId","type":"uint128"}],"name":"getPoolSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"epochId","type":"uint128"}],"name":"harvest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastInitializedEpoch","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massHarvest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"userLastEpochIdHarvested","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

6002608081815260e060405290816020016020820280368337505081516200002f9260049250602001906200036f565b503480156200003d57600080fd5b5060405162000f8e38038062000f8e833981810160405260808110156200006357600080fd5b508051602080830151604080850151606090950151600280546001600160a01b03199081166001600160a01b0380891691909117909255600080548216838716179055600380548216838a161790819055600180549092168385161790915583516327f843b560e11b815293519697949694959294911692634ff0876a926004808301939192829003018186803b158015620000fe57600080fd5b505afa15801562000113573d6000803e3d6000fd5b505050506040513d60208110156200012a57600080fd5b505160088190556200014a90600062000217602090811b620005e417901c565b600360009054906101000a90046001600160a01b03166001600160a01b031663f4a4341d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200019957600080fd5b505afa158015620001ae573d6000803e3d6000fd5b505050506040513d6020811015620001c557600080fd5b505101600955620002096001620001f5630ee6b280670de0b6b3a764000062000217602090811b620005e417901c565b6200027e60201b6200063d1790919060201c565b60055550620003d692505050565b600082620002285750600062000278565b828202828482816200023657fe5b0414620002755760405162461bcd60e51b815260040180806020018281038252602181526020018062000f6d6021913960400191505060405180910390fd5b90505b92915050565b60006200027583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250620002c860201b60201c565b60008183620003585760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156200031c57818101518382015260200162000302565b50505050905090810190601f1680156200034a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816200036557fe5b0495945050505050565b828054828255906000526020600020908101928215620003ad579160200282015b82811115620003ad57825182559160200191906001019062000390565b50620003bb929150620003bf565b5090565b5b80821115620003bb5760008155600101620003c0565b610b8780620003e66000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c80639c7ec88111610081578063a6ace8a31161005b578063a6ace8a31461019a578063b97dd9e2146101a2578063f7e251f8146101aa576100d4565b80639c7ec88114610148578063a1c130d41461016c578063a43564eb14610174576100d4565b806343312451116100b257806343312451146101035780634ff0876a14610138578063674247d614610140576100d4565b806305917ac0146100d957806315e5a1e5146100f3578063290e4544146100fb575b600080fd5b6100e16101d0565b60408051918252519081900360200190f35b6100e16101d5565b6100e16101db565b6100e16004803603604081101561011957600080fd5b5080356001600160a01b031690602001356001600160801b031661033f565b6100e1610354565b6100e161035a565b610150610362565b604080516001600160801b039092168252519081900360200190f35b6100e1610371565b6100e16004803603602081101561018a57600080fd5b50356001600160801b031661038d565b6101506105bc565b6100e16105c1565b6100e1600480360360208110156101c057600080fd5b50356001600160801b03166105d9565b600181565b60095481565b60008060006101fc60016101ed61067f565b6001600160801b0316906106c4565b9050600181111561020b575060015b336000908152600760205260409020546001600160801b03166001015b81816001600160801b03161161024d5761024181610706565b90920191600101610228565b50336000818152600760209081526040918290205482516001600160801b039091168503815290810185905281517fb68dafc1da13dc868096d0b87347c831d0bda92d178317eb1dec7f788444485c929181900390910190a2811561033857600254600154604080516323b872dd60e01b81526001600160a01b03928316600482015233602482015260448101869052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561030b57600080fd5b505af115801561031f573d6000803e3d6000fd5b505050506040513d602081101561033557600080fd5b50505b5090505b90565b600061034b83836107c0565b90505b92915050565b60085481565b630ee6b28081565b6006546001600160801b031681565b336000908152600760205260409020546001600160801b031690565b6000816001600160801b03166103a161067f565b6001600160801b0316116103fc576040805162461bcd60e51b815260206004820152601b60248201527f546869732065706f636820697320696e20746865206675747572650000000000604482015290519081900360640190fd5b6001826001600160801b0316111561045b576040805162461bcd60e51b815260206004820152601e60248201527f4d6178696d756d206e756d626572206f662065706f6368732069732031320000604482015290519081900360640190fd5b336000908152600760205260409020546001600160801b038084169161048391166001610877565b146104d5576040805162461bcd60e51b815260206004820152601060248201527f4861727665737420696e206f7264657200000000000000000000000000000000604482015290519081900360640190fd5b60006104e083610706565b9050801561057457600254600154604080516323b872dd60e01b81526001600160a01b03928316600482015233602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561054757600080fd5b505af115801561055b573d6000803e3d6000fd5b505050506040513d602081101561057157600080fd5b50505b6040805182815290516001600160801b0385169133917f04ad45a69eeed9c390c3a678fed2d4b90bde98e742de9936d5e0915bf3d0ea4e9181900360200190a390505b919050565b600081565b60006105cb61067f565b6001600160801b0316905090565b600061034e826108d1565b6000826105f35750600061034e565b8282028284828161060057fe5b041461034b5760405162461bcd60e51b8152600401808060200182810382526021815260200180610b316021913960400191505060405180910390fd5b600061034b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610975565b60006009544210156106935750600061033c565b6106bf60016106b96008546106b3600954426106c490919063ffffffff16565b9061063d565b90610877565b905090565b600061034b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610a17565b6006546000906001600160801b03808416911610156107285761072882610a71565b33600090815260076020526040902080546fffffffffffffffffffffffffffffffff19166001600160801b03841690811790915560048054909190811061076b57fe5b906000526020600020015460001415610786575060006105b7565b61034e6004836001600160801b03168154811061079f57fe5b90600052602060002001546106b36107b733866107c0565b600554906105e4565b6003546000805490916001600160a01b0390811691638c028dd0918691166107e78661033c565b6040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b03168152602001826001600160801b03168152602001935050505060206040518083038186803b15801561084457600080fd5b505afa158015610858573d6000803e3d6000fd5b505050506040513d602081101561086e57600080fd5b50519392505050565b60008282018381101561034b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6003546000805490916001600160a01b0390811691632ca32d7e91166108f68561033c565b6040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160801b031681526020019250505060206040518083038186803b15801561094357600080fd5b505afa158015610957573d6000803e3d6000fd5b505050506040513d602081101561096d57600080fd5b505192915050565b60008183610a015760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156109c65781810151838201526020016109ae565b50505050905090810190601f1680156109f35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610a0d57fe5b0495945050505050565b60008184841115610a695760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156109c65781810151838201526020016109ae565b505050900390565b6006546001600160801b0380831691610a8c91166001610877565b14610ade576040805162461bcd60e51b815260206004820152601f60248201527f45706f63682063616e20626520696e6974206f6e6c7920696e206f7264657200604482015290519081900360640190fd5b600680546fffffffffffffffffffffffffffffffff19166001600160801b038316179055610b0b816108d1565b6004826001600160801b031681548110610b2157fe5b6000918252602090912001555056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220c588a7f0607c7d0c902d3be8a21aa2e5e5e01956cd8fbe206223dd9f0057d5a464736f6c634300060c0033536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7700000000000000000000000047da5456bc2e1ce391b645ce80f2e97192e4976a00000000000000000000000047da5456bc2e1ce391b645ce80f2e97192e4976a0000000000000000000000001c899b399998e984a3bbfb99e37bf5c692127154000000000000000000000000918ea5c939dd25b202b46e8b5ee54f54d623f380

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100d45760003560e01c80639c7ec88111610081578063a6ace8a31161005b578063a6ace8a31461019a578063b97dd9e2146101a2578063f7e251f8146101aa576100d4565b80639c7ec88114610148578063a1c130d41461016c578063a43564eb14610174576100d4565b806343312451116100b257806343312451146101035780634ff0876a14610138578063674247d614610140576100d4565b806305917ac0146100d957806315e5a1e5146100f3578063290e4544146100fb575b600080fd5b6100e16101d0565b60408051918252519081900360200190f35b6100e16101d5565b6100e16101db565b6100e16004803603604081101561011957600080fd5b5080356001600160a01b031690602001356001600160801b031661033f565b6100e1610354565b6100e161035a565b610150610362565b604080516001600160801b039092168252519081900360200190f35b6100e1610371565b6100e16004803603602081101561018a57600080fd5b50356001600160801b031661038d565b6101506105bc565b6100e16105c1565b6100e1600480360360208110156101c057600080fd5b50356001600160801b03166105d9565b600181565b60095481565b60008060006101fc60016101ed61067f565b6001600160801b0316906106c4565b9050600181111561020b575060015b336000908152600760205260409020546001600160801b03166001015b81816001600160801b03161161024d5761024181610706565b90920191600101610228565b50336000818152600760209081526040918290205482516001600160801b039091168503815290810185905281517fb68dafc1da13dc868096d0b87347c831d0bda92d178317eb1dec7f788444485c929181900390910190a2811561033857600254600154604080516323b872dd60e01b81526001600160a01b03928316600482015233602482015260448101869052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561030b57600080fd5b505af115801561031f573d6000803e3d6000fd5b505050506040513d602081101561033557600080fd5b50505b5090505b90565b600061034b83836107c0565b90505b92915050565b60085481565b630ee6b28081565b6006546001600160801b031681565b336000908152600760205260409020546001600160801b031690565b6000816001600160801b03166103a161067f565b6001600160801b0316116103fc576040805162461bcd60e51b815260206004820152601b60248201527f546869732065706f636820697320696e20746865206675747572650000000000604482015290519081900360640190fd5b6001826001600160801b0316111561045b576040805162461bcd60e51b815260206004820152601e60248201527f4d6178696d756d206e756d626572206f662065706f6368732069732031320000604482015290519081900360640190fd5b336000908152600760205260409020546001600160801b038084169161048391166001610877565b146104d5576040805162461bcd60e51b815260206004820152601060248201527f4861727665737420696e206f7264657200000000000000000000000000000000604482015290519081900360640190fd5b60006104e083610706565b9050801561057457600254600154604080516323b872dd60e01b81526001600160a01b03928316600482015233602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561054757600080fd5b505af115801561055b573d6000803e3d6000fd5b505050506040513d602081101561057157600080fd5b50505b6040805182815290516001600160801b0385169133917f04ad45a69eeed9c390c3a678fed2d4b90bde98e742de9936d5e0915bf3d0ea4e9181900360200190a390505b919050565b600081565b60006105cb61067f565b6001600160801b0316905090565b600061034e826108d1565b6000826105f35750600061034e565b8282028284828161060057fe5b041461034b5760405162461bcd60e51b8152600401808060200182810382526021815260200180610b316021913960400191505060405180910390fd5b600061034b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610975565b60006009544210156106935750600061033c565b6106bf60016106b96008546106b3600954426106c490919063ffffffff16565b9061063d565b90610877565b905090565b600061034b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610a17565b6006546000906001600160801b03808416911610156107285761072882610a71565b33600090815260076020526040902080546fffffffffffffffffffffffffffffffff19166001600160801b03841690811790915560048054909190811061076b57fe5b906000526020600020015460001415610786575060006105b7565b61034e6004836001600160801b03168154811061079f57fe5b90600052602060002001546106b36107b733866107c0565b600554906105e4565b6003546000805490916001600160a01b0390811691638c028dd0918691166107e78661033c565b6040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b03168152602001826001600160801b03168152602001935050505060206040518083038186803b15801561084457600080fd5b505afa158015610858573d6000803e3d6000fd5b505050506040513d602081101561086e57600080fd5b50519392505050565b60008282018381101561034b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6003546000805490916001600160a01b0390811691632ca32d7e91166108f68561033c565b6040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160801b031681526020019250505060206040518083038186803b15801561094357600080fd5b505afa158015610957573d6000803e3d6000fd5b505050506040513d602081101561096d57600080fd5b505192915050565b60008183610a015760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156109c65781810151838201526020016109ae565b50505050905090810190601f1680156109f35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610a0d57fe5b0495945050505050565b60008184841115610a695760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156109c65781810151838201526020016109ae565b505050900390565b6006546001600160801b0380831691610a8c91166001610877565b14610ade576040805162461bcd60e51b815260206004820152601f60248201527f45706f63682063616e20626520696e6974206f6e6c7920696e206f7264657200604482015290519081900360640190fd5b600680546fffffffffffffffffffffffffffffffff19166001600160801b038316179055610b0b816108d1565b6004826001600160801b031681548110610b2157fe5b6000918252602090912001555056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220c588a7f0607c7d0c902d3be8a21aa2e5e5e01956cd8fbe206223dd9f0057d5a464736f6c634300060c0033

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

00000000000000000000000047da5456bc2e1ce391b645ce80f2e97192e4976a00000000000000000000000047da5456bc2e1ce391b645ce80f2e97192e4976a0000000000000000000000001c899b399998e984a3bbfb99e37bf5c692127154000000000000000000000000918ea5c939dd25b202b46e8b5ee54f54d623f380

-----Decoded View---------------
Arg [0] : plugTokenAddress (address): 0x47DA5456bC2e1ce391b645Ce80F2E97192e4976a
Arg [1] : lpTokenAddress (address): 0x47DA5456bC2e1ce391b645Ce80F2E97192e4976a
Arg [2] : stakeContract (address): 0x1C899B399998e984a3bBfB99e37BF5C692127154
Arg [3] : communityVault (address): 0x918ea5c939Dd25B202b46e8b5Ee54f54D623f380

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000047da5456bc2e1ce391b645ce80f2e97192e4976a
Arg [1] : 00000000000000000000000047da5456bc2e1ce391b645ce80f2e97192e4976a
Arg [2] : 0000000000000000000000001c899b399998e984a3bbfb99e37bf5c692127154
Arg [3] : 000000000000000000000000918ea5c939dd25b202b46e8b5ee54f54d623f380


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

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