ETH Price: $3,929.45 (+2.70%)

Contract

0x66663724b50f4EA40e5ceD7Fc5181fE1816cE0C4
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Emergency Withdr...204275322024-07-31 15:48:47126 days ago1722440927IN
0x66663724...1816cE0C4
0 ETH0.0004592211.03302389
Emergency Withdr...188710352023-12-26 16:22:59344 days ago1703607779IN
0x66663724...1816cE0C4
0 ETH0.0010593725.45173922
Deposit188710312023-12-26 16:22:11344 days ago1703607731IN
0x66663724...1816cE0C4
0 ETH0.002336424.03539277
Deposit188710282023-12-26 16:21:35344 days ago1703607695IN
0x66663724...1816cE0C4
0 ETH0.0024352725.05243965
Update Multiplie...188710262023-12-26 16:21:11344 days ago1703607671IN
0x66663724...1816cE0C4
0 ETH0.0006740723.42086947
Deposit188710132023-12-26 16:18:35344 days ago1703607515IN
0x66663724...1816cE0C4
0 ETH0.0026213226.9663832
Set Phx Per Bloc...188710132023-12-26 16:18:35344 days ago1703607515IN
0x66663724...1816cE0C4
0 ETH0.0007823726.9663832
Update Multiplie...188710102023-12-26 16:17:59344 days ago1703607479IN
0x66663724...1816cE0C4
0 ETH0.0007940827.59057092
Update Multiplie...188709982023-12-26 16:15:35344 days ago1703607335IN
0x66663724...1816cE0C4
0 ETH0.0008871930.8643871
Set Phx Per Bloc...188709962023-12-26 16:15:11344 days ago1703607311IN
0x66663724...1816cE0C4
0 ETH0.0009055931.2005171
Set Phx Per Bloc...188709882023-12-26 16:13:35344 days ago1703607215IN
0x66663724...1816cE0C4
0 ETH0.0008683429.91713222
Set Phx Per Bloc...188709842023-12-26 16:12:47344 days ago1703607167IN
0x66663724...1816cE0C4
0 ETH0.0008570829.51706455
Deposit188709822023-12-26 16:12:23344 days ago1703607143IN
0x66663724...1816cE0C4
0 ETH0.0030621131.5009315
Deposit188709422023-12-26 16:04:23344 days ago1703606663IN
0x66663724...1816cE0C4
0 ETH0.0031135332.02993584
Update Pool188709262023-12-26 16:00:59344 days ago1703606459IN
0x66663724...1816cE0C4
0 ETH0.0014610129.86962052
Deposit188709182023-12-26 15:59:23344 days ago1703606363IN
0x66663724...1816cE0C4
0 ETH0.0034041330.24495459
Update Multiplie...188709102023-12-26 15:57:47344 days ago1703606267IN
0x66663724...1816cE0C4
0 ETH0.0008363729.04794147
Set Phx Per Bloc...188709082023-12-26 15:57:23344 days ago1703606243IN
0x66663724...1816cE0C4
0 ETH0.0008942530.82246494
Deposit187780922023-12-13 15:18:47357 days ago1702480727IN
0x66663724...1816cE0C4
0 ETH0.0027317649.36512037
Deposit187780682023-12-13 15:13:47357 days ago1702480427IN
0x66663724...1816cE0C4
0 ETH0.0014813551.97753357
Update Pool187780182023-12-13 15:03:47358 days ago1702479827IN
0x66663724...1816cE0C4
0 ETH0.0026736654.66174357
Deposit187779902023-12-13 14:58:11358 days ago1702479491IN
0x66663724...1816cE0C4
0 ETH0.0031939657.71742333
Set Phx Per Bloc...187778632023-12-13 14:31:59358 days ago1702477919IN
0x66663724...1816cE0C4
0 ETH0.0013164245.39252902
Deposit184967722023-11-04 6:04:11397 days ago1699077851IN
0x66663724...1816cE0C4
0 ETH0.0009204511.94523962
Withdraw184863622023-11-02 19:05:47398 days ago1698951947IN
0x66663724...1816cE0C4
0 ETH0.0027245627.53369157
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:
PHXStake

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 1 runs

Other Settings:
default evmVersion
File 1 of 5 : phxStake.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.4;

import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract PHXStake is Ownable {
    
    using SafeMath for uint256;
    // Info of each user.

    struct UserInfo {
        uint256 amount;     // How many LP tokens the user has provided.
        uint256 rewardDebt; // Reward debt. See explanation below.
        //
        // We do some fancy math here. Basically, any point in time, the amount of CAKEs
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * accPhxPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
        //   1. The pool's `accPhxPerShare` (and `lastRewardBlock`) gets updated.
        //   2. User receives the pending reward sent to his/her address.
        //   3. User's `amount` gets updated.
        //   4. User's `rewardDebt` gets updated.
    }

    // // Info of each pool.
    // struct PoolInfo {
    //     IERC20 lpToken;           // Address of LP token contract.
    //     uint256 allocPoint;       // How many allocation points assigned to this pool. CAKEs to distribute per block.
    //     uint256 lastRewardBlock;  // Last block number that CAKEs distribution occurs.
    //     uint256 accPhxPerShare; // Accumulated CAKEs per share, times 1e12. See below.
    // }
    // The PHX TOKEN!

    IERC20 public phx;
    //The lpToken TOKEN!
    IERC20 public lpToken;
    // PHX tokens created per block.
    uint256 public phxPerBlock;
    // Bonus muliplier for early cake makers.
    uint256 public BONUS_MULTIPLIER = 1;
    // Info of each user that stakes LP tokens.
    mapping (address => UserInfo) public userInfo;
    // Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;
    // The block number when PHX mining starts.
    uint256 public startBlock;
    // How many allocation points assigned to pool.
    uint256 public allocPoint;
    // Accumulated PHX per share, times 1e12.
    uint256 public accPhxPerShare;
    //Last block number that CAKEs distribution occurs.
    uint256 public lastRewardBlock; 

    event Deposit(
        address indexed user, 
        uint256 amount
        );

    event Withdraw(
        address indexed user, 
        uint256 amount
        );

    event EmergencyWithdraw(
        address indexed user, 
        uint256 amount
        );

    constructor(
        IERC20 _phx,
        IERC20 _lpToken,
        uint256 _phxPerBlock
  
    ) public {
        phx = _phx;
        lpToken = _lpToken;
        phxPerBlock = _phxPerBlock;
        startBlock = block.number;
        allocPoint = 1000;
        lastRewardBlock = startBlock;
        accPhxPerShare= 0;
        totalAllocPoint = 1000;
    }

    function updateMultiplier(uint256 multiplierNumber) public onlyOwner {
        BONUS_MULTIPLIER = multiplierNumber;
    }
    function setPhxPerBlock(uint256 _phxPerBlock) external onlyOwner{
        phxPerBlock = _phxPerBlock;
    }

    // Update the pool's allocation point. Can only be called by the owner.
    function set(uint256 _allocPoint) public onlyOwner {
        uint256 prevAllocPoint = allocPoint;
        allocPoint = _allocPoint;
        if (prevAllocPoint != _allocPoint) {
            totalAllocPoint = totalAllocPoint.sub(prevAllocPoint).add(_allocPoint);
            updatePool();
        }
    }

    // Return reward multiplier over the given _from to _to block.
    function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
        return _to.sub(_from).mul(BONUS_MULTIPLIER);
    }

    // View function to see pending pheonix on frontend.
    function pendingPHX(address _user) 
        external 
        view 
        returns (uint256) 
        {
        UserInfo storage user = userInfo[_user];
        uint256 lpSupply = lpToken.balanceOf(address(this));
        uint256 accPhx = accPhxPerShare;
        if (block.number > lastRewardBlock && lpSupply != 0) {
            uint256 multiplier = getMultiplier(lastRewardBlock, block.number);
            
            uint256 phxReward = multiplier.mul(phxPerBlock).mul(allocPoint).div(totalAllocPoint);
            accPhx = accPhx.add(phxReward.mul(1e12).div(lpSupply));
        }
        return (user.amount.mul(accPhx).div(1e12).sub(user.rewardDebt));
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool() public {
        if (block.number <= lastRewardBlock) {
            return;
        }
        uint256 lpSupply = lpToken.balanceOf(address(this));
        if (lpSupply == 0) {
            lastRewardBlock = block.number;
            return;
        }
        uint256 multiplier = getMultiplier(lastRewardBlock, block.number);
        uint256 phxReward = multiplier.mul(phxPerBlock).mul(allocPoint).div(totalAllocPoint);
        accPhxPerShare = accPhxPerShare.add(phxReward.mul(1e12).div(lpSupply));
        lastRewardBlock = block.number;
    }

    // Deposit LP tokens to MasterChef for CAKE allocation.
    function deposit( uint256 _amount) public {
        UserInfo storage user = userInfo[msg.sender];
        updatePool();
        if (user.amount > 0) {
            uint256 pending = user.amount.mul(accPhxPerShare).div(1e12).sub(user.rewardDebt);
            if(pending > 0) {
                phx.transfer(msg.sender, pending);
            }
        }
        if (_amount > 0) {
            lpToken.transferFrom(address(msg.sender), address(this), _amount);
            user.amount = user.amount.add(_amount);
        }
        user.rewardDebt = user.amount.mul(accPhxPerShare).div(1e12);
        emit Deposit(msg.sender, _amount);
    }
    function lpTokenSupply() public view returns(uint256){
        return lpToken.balanceOf(address(this));
    }
    // function acc() public view returns(uint256){
    //     return accPhxPerShare;
    // }
    // function userInf() public view returns(uint256,uint256){
    //     return (userInfo[msg.sender].amount,userInfo[msg.sender].rewardDebt);
    // }
    // function utils() public view returns(uint256){
    //     return (block.number);
    // }
    // function getPhx() public view returns(uint256){
    //     uint256 multiplier = getMultiplier(lastRewardBlock, block.number);
    //     uint256 phxReward = multiplier.mul(phxPerBlock).mul(allocPoint).div(totalAllocPoint);
    //     return phxReward;
    // }
    // Withdraw LP tokens from MasterChef.
    function withdraw(uint256 _amount) public {

        UserInfo storage user = userInfo[msg.sender];
        require(user.amount >= _amount, "withdraw: not good");

        updatePool();
        uint256 pending = user.amount.mul(accPhxPerShare).div(1e12).sub(user.rewardDebt);
        if(pending > 0) {
           phx.transfer(msg.sender, pending);
        }
        if(_amount > 0) {
            user.amount = user.amount.sub(_amount);
            lpToken.transfer(address(msg.sender), _amount);
        }
        user.rewardDebt = user.amount.mul(accPhxPerShare).div(1e12);
        emit Withdraw(msg.sender, _amount);
    }
     // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw() public {
        // hi
        UserInfo storage user = userInfo[msg.sender];
        lpToken.transfer(address(msg.sender), user.amount);
        emit EmergencyWithdraw(msg.sender, user.amount);
        user.amount = 0;
        user.rewardDebt = 0;
    }
}

File 2 of 5 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
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) {
        unchecked {
            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) {
        unchecked {
            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) {
        unchecked {
            // 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) {
        unchecked {
            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) {
        unchecked {
            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) {
        return a + b;
    }

    /**
     * @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 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) {
        return a * b;
    }

    /**
     * @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.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        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) {
        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) {
        unchecked {
            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.
     *
     * 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) {
        unchecked {
            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) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

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

pragma solidity ^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 5 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^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() {
        _setOwner(_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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

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

pragma solidity ^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 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) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_phx","type":"address"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"uint256","name":"_phxPerBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"BONUS_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accPhxPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastRewardBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpTokenSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"pendingPHX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phx","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phxPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_phxPerBlock","type":"uint256"}],"name":"setPhxPerBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"multiplierNumber","type":"uint256"}],"name":"updateMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526001600455600060065534801561001a57600080fd5b50604051610f8f380380610f8f83398101604081905261003991610102565b61004233610096565b600180546001600160a01b039485166001600160a01b03199182161790915560028054939094169216919091179091556003554360078190556103e86008819055600a91909155600060095560065561013e565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146100fd57600080fd5b919050565b60008060006060848603121561011757600080fd5b610120846100e6565b925061012e602085016100e6565b9150604084015190509250925092565b610e428061014d6000396000f3fe608060405234801561001057600080fd5b506004361061011d5760003560e01c80630ff342011461012257806317caf6f11461013d5780631959a002146101465780632e1a7d4d1461018257806348cd4cb11461019757806356b693ca146101a05780635fcbd285146101a95780635ffe6146146101c957806360fe47b1146101dc578063715018a6146101ef57806387b5c910146101f75780638aa285501461020a5780638da5cb5b146102135780638dbb1e3a1461021b578063997fe2321461022e578063a9f8d18114610237578063b6b55f2514610240578063bc8edd4e14610253578063d3dd7eb714610266578063d6c23ad31461026f578063db2e21bc14610282578063e3161ddd1461028a578063f2fde38b14610292575b600080fd5b61012a6102a5565b6040519081526020015b60405180910390f35b61012a60065481565b61016d610154366004610c85565b6005602052600090815260409020805460019091015482565b60408051928352602083019190915201610134565b610195610190366004610cd0565b61032b565b005b61012a60075481565b61012a60035481565b6002546101bc906001600160a01b031681565b6040516101349190610d24565b6101956101d7366004610cd0565b610545565b6101956101ea366004610cd0565b610579565b6101956105e5565b61012a610205366004610c85565b610620565b61012a60045481565b6101bc610761565b61012a610229366004610d02565b610770565b61012a60095481565b61012a600a5481565b61019561024e366004610cd0565b61078b565b610195610261366004610cd0565b61095c565b61012a60085481565b6001546101bc906001600160a01b031681565b610195610990565b610195610a6b565b6101956102a0366004610c85565b610b65565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a08231906102d6903090600401610d24565b60206040518083038186803b1580156102ee57600080fd5b505afa158015610302573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103269190610ce9565b905090565b33600090815260056020526040902080548211156103855760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b60448201526064015b60405180910390fd5b61038d610a6b565b60006103c582600101546103bf64e8d4a510006103b96009548760000154610c0590919063ffffffff16565b90610c11565b90610c1d565b905080156104535760015460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906103ff9033908590600401610d38565b602060405180830381600087803b15801561041957600080fd5b505af115801561042d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104519190610cae565b505b82156104ed5781546104659084610c1d565b825560025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906104999033908790600401610d38565b602060405180830381600087803b1580156104b357600080fd5b505af11580156104c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104eb9190610cae565b505b60095482546105069164e8d4a51000916103b991610c05565b600183015560405183815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a2505050565b3361054e610761565b6001600160a01b0316146105745760405162461bcd60e51b815260040161037c90610d51565b600455565b33610582610761565b6001600160a01b0316146105a85760405162461bcd60e51b815260040161037c90610d51565b60088054908290558181146105e1576105d6826105d083600654610c1d90919063ffffffff16565b90610c29565b6006556105e1610a6b565b5050565b336105ee610761565b6001600160a01b0316146106145760405162461bcd60e51b815260040161037c90610d51565b61061e6000610c35565b565b6001600160a01b0380821660009081526005602052604080822060025491516370a0823160e01b8152929390928492909116906370a0823190610667903090600401610d24565b60206040518083038186803b15801561067f57600080fd5b505afa158015610693573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b79190610ce9565b600954600a5491925090431180156106ce57508115155b156107305760006106e1600a5443610770565b9050600061070c6006546103b960085461070660035487610c0590919063ffffffff16565b90610c05565b905061072b610724856103b98464e8d4a51000610c05565b8490610c29565b925050505b61075883600101546103bf64e8d4a510006103b9858860000154610c0590919063ffffffff16565b95945050505050565b6000546001600160a01b031690565b600454600090610784906107068486610c1d565b9392505050565b3360009081526005602052604090206107a2610a6b565b8054156108655760006107d582600101546103bf64e8d4a510006103b96009548760000154610c0590919063ffffffff16565b905080156108635760015460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb9061080f9033908590600401610d38565b602060405180830381600087803b15801561082957600080fd5b505af115801561083d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108619190610cae565b505b505b8115610905576002546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd90606401602060405180830381600087803b1580156108bd57600080fd5b505af11580156108d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f59190610cae565b5080546109029083610c29565b81555b600954815461091e9164e8d4a51000916103b991610c05565b600182015560405182815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a25050565b33610965610761565b6001600160a01b03161461098b5760405162461bcd60e51b815260040161037c90610d51565b600355565b33600081815260056020526040908190206002548154925163a9059cbb60e01b815291936001600160a01b039091169263a9059cbb926109d4929190600401610d38565b602060405180830381600087803b1580156109ee57600080fd5b505af1158015610a02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a269190610cae565b50805460405190815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a26000808255600190910155565b600a544311610a7657565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610aa7903090600401610d24565b60206040518083038186803b158015610abf57600080fd5b505afa158015610ad3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af79190610ce9565b905080610b05575043600a55565b6000610b13600a5443610770565b90506000610b386006546103b960085461070660035487610c0590919063ffffffff16565b9050610b59610b50846103b98464e8d4a51000610c05565b60095490610c29565b600955505043600a5550565b33610b6e610761565b6001600160a01b031614610b945760405162461bcd60e51b815260040161037c90610d51565b6001600160a01b038116610bf95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161037c565b610c0281610c35565b50565b60006107848284610dc0565b60006107848284610d9e565b60006107848284610ddf565b60006107848284610d86565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215610c9757600080fd5b81356001600160a01b038116811461078457600080fd5b600060208284031215610cc057600080fd5b8151801515811461078457600080fd5b600060208284031215610ce257600080fd5b5035919050565b600060208284031215610cfb57600080fd5b5051919050565b60008060408385031215610d1557600080fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610d9957610d99610df6565b500190565b600082610dbb57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615610dda57610dda610df6565b500290565b600082821015610df157610df1610df6565b500390565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220b2c7aee33b2572ed7192ea4c38cfd0da88b6e2fc10ae0e94ad7df6d6eb5d5f8164736f6c6343000807003300000000000000000000000038a2fdc11f526ddd5a607c1f251c065f40fbf2f7000000000000000000000000dfe317f907ca9bf6202cddec3def756438a3b3f700000000000000000000000000000000000000000000000002f86d3e1fe21dce

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061011d5760003560e01c80630ff342011461012257806317caf6f11461013d5780631959a002146101465780632e1a7d4d1461018257806348cd4cb11461019757806356b693ca146101a05780635fcbd285146101a95780635ffe6146146101c957806360fe47b1146101dc578063715018a6146101ef57806387b5c910146101f75780638aa285501461020a5780638da5cb5b146102135780638dbb1e3a1461021b578063997fe2321461022e578063a9f8d18114610237578063b6b55f2514610240578063bc8edd4e14610253578063d3dd7eb714610266578063d6c23ad31461026f578063db2e21bc14610282578063e3161ddd1461028a578063f2fde38b14610292575b600080fd5b61012a6102a5565b6040519081526020015b60405180910390f35b61012a60065481565b61016d610154366004610c85565b6005602052600090815260409020805460019091015482565b60408051928352602083019190915201610134565b610195610190366004610cd0565b61032b565b005b61012a60075481565b61012a60035481565b6002546101bc906001600160a01b031681565b6040516101349190610d24565b6101956101d7366004610cd0565b610545565b6101956101ea366004610cd0565b610579565b6101956105e5565b61012a610205366004610c85565b610620565b61012a60045481565b6101bc610761565b61012a610229366004610d02565b610770565b61012a60095481565b61012a600a5481565b61019561024e366004610cd0565b61078b565b610195610261366004610cd0565b61095c565b61012a60085481565b6001546101bc906001600160a01b031681565b610195610990565b610195610a6b565b6101956102a0366004610c85565b610b65565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a08231906102d6903090600401610d24565b60206040518083038186803b1580156102ee57600080fd5b505afa158015610302573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103269190610ce9565b905090565b33600090815260056020526040902080548211156103855760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b60448201526064015b60405180910390fd5b61038d610a6b565b60006103c582600101546103bf64e8d4a510006103b96009548760000154610c0590919063ffffffff16565b90610c11565b90610c1d565b905080156104535760015460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906103ff9033908590600401610d38565b602060405180830381600087803b15801561041957600080fd5b505af115801561042d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104519190610cae565b505b82156104ed5781546104659084610c1d565b825560025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906104999033908790600401610d38565b602060405180830381600087803b1580156104b357600080fd5b505af11580156104c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104eb9190610cae565b505b60095482546105069164e8d4a51000916103b991610c05565b600183015560405183815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a2505050565b3361054e610761565b6001600160a01b0316146105745760405162461bcd60e51b815260040161037c90610d51565b600455565b33610582610761565b6001600160a01b0316146105a85760405162461bcd60e51b815260040161037c90610d51565b60088054908290558181146105e1576105d6826105d083600654610c1d90919063ffffffff16565b90610c29565b6006556105e1610a6b565b5050565b336105ee610761565b6001600160a01b0316146106145760405162461bcd60e51b815260040161037c90610d51565b61061e6000610c35565b565b6001600160a01b0380821660009081526005602052604080822060025491516370a0823160e01b8152929390928492909116906370a0823190610667903090600401610d24565b60206040518083038186803b15801561067f57600080fd5b505afa158015610693573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b79190610ce9565b600954600a5491925090431180156106ce57508115155b156107305760006106e1600a5443610770565b9050600061070c6006546103b960085461070660035487610c0590919063ffffffff16565b90610c05565b905061072b610724856103b98464e8d4a51000610c05565b8490610c29565b925050505b61075883600101546103bf64e8d4a510006103b9858860000154610c0590919063ffffffff16565b95945050505050565b6000546001600160a01b031690565b600454600090610784906107068486610c1d565b9392505050565b3360009081526005602052604090206107a2610a6b565b8054156108655760006107d582600101546103bf64e8d4a510006103b96009548760000154610c0590919063ffffffff16565b905080156108635760015460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb9061080f9033908590600401610d38565b602060405180830381600087803b15801561082957600080fd5b505af115801561083d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108619190610cae565b505b505b8115610905576002546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd90606401602060405180830381600087803b1580156108bd57600080fd5b505af11580156108d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f59190610cae565b5080546109029083610c29565b81555b600954815461091e9164e8d4a51000916103b991610c05565b600182015560405182815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a25050565b33610965610761565b6001600160a01b03161461098b5760405162461bcd60e51b815260040161037c90610d51565b600355565b33600081815260056020526040908190206002548154925163a9059cbb60e01b815291936001600160a01b039091169263a9059cbb926109d4929190600401610d38565b602060405180830381600087803b1580156109ee57600080fd5b505af1158015610a02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a269190610cae565b50805460405190815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a26000808255600190910155565b600a544311610a7657565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610aa7903090600401610d24565b60206040518083038186803b158015610abf57600080fd5b505afa158015610ad3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af79190610ce9565b905080610b05575043600a55565b6000610b13600a5443610770565b90506000610b386006546103b960085461070660035487610c0590919063ffffffff16565b9050610b59610b50846103b98464e8d4a51000610c05565b60095490610c29565b600955505043600a5550565b33610b6e610761565b6001600160a01b031614610b945760405162461bcd60e51b815260040161037c90610d51565b6001600160a01b038116610bf95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161037c565b610c0281610c35565b50565b60006107848284610dc0565b60006107848284610d9e565b60006107848284610ddf565b60006107848284610d86565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215610c9757600080fd5b81356001600160a01b038116811461078457600080fd5b600060208284031215610cc057600080fd5b8151801515811461078457600080fd5b600060208284031215610ce257600080fd5b5035919050565b600060208284031215610cfb57600080fd5b5051919050565b60008060408385031215610d1557600080fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610d9957610d99610df6565b500190565b600082610dbb57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615610dda57610dda610df6565b500290565b600082821015610df157610df1610df6565b500390565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220b2c7aee33b2572ed7192ea4c38cfd0da88b6e2fc10ae0e94ad7df6d6eb5d5f8164736f6c63430008070033

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

00000000000000000000000038a2fdc11f526ddd5a607c1f251c065f40fbf2f7000000000000000000000000dfe317f907ca9bf6202cddec3def756438a3b3f700000000000000000000000000000000000000000000000002f86d3e1fe21dce

-----Decoded View---------------
Arg [0] : _phx (address): 0x38A2fDc11f526Ddd5a607C1F251C065f40fBF2f7
Arg [1] : _lpToken (address): 0xDFe317F907cA9BF6202CddEC3DEF756438A3B3F7
Arg [2] : _phxPerBlock (uint256): 214041095890410958

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000038a2fdc11f526ddd5a607c1f251c065f40fbf2f7
Arg [1] : 000000000000000000000000dfe317f907ca9bf6202cddec3def756438a3b3f7
Arg [2] : 00000000000000000000000000000000000000000000000002f86d3e1fe21dce


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.