Latest 25 from a total of 10,186 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Withdraw | 275524570 | 392 days ago | IN | 0 ETH | 0.00000218 | ||||
| Withdraw | 266823276 | 417 days ago | IN | 0 ETH | 0.00000175 | ||||
| Withdraw | 258337569 | 442 days ago | IN | 0 ETH | 0.00000118 | ||||
| Deposit | 258337471 | 442 days ago | IN | 0 ETH | 0.00000097 | ||||
| Withdraw | 228381517 | 529 days ago | IN | 0 ETH | 0.00000213 | ||||
| Deposit | 228381403 | 529 days ago | IN | 0 ETH | 0.00000192 | ||||
| Withdraw | 201535459 | 607 days ago | IN | 0 ETH | 0.00000117 | ||||
| Withdraw | 176493769 | 682 days ago | IN | 0 ETH | 0.00009531 | ||||
| Withdraw | 173843064 | 690 days ago | IN | 0 ETH | 0.00003376 | ||||
| Withdraw | 173842266 | 690 days ago | IN | 0 ETH | 0.00003023 | ||||
| Withdraw | 161640443 | 726 days ago | IN | 0 ETH | 0.00013572 | ||||
| Withdraw | 155268782 | 746 days ago | IN | 0 ETH | 0.00009922 | ||||
| Deposit | 155268005 | 746 days ago | IN | 0 ETH | 0.00009719 | ||||
| Withdraw | 151850241 | 756 days ago | IN | 0 ETH | 0.0000371 | ||||
| Deposit | 151850185 | 756 days ago | IN | 0 ETH | 0.00003507 | ||||
| Withdraw | 148382035 | 767 days ago | IN | 0 ETH | 0.00008215 | ||||
| Withdraw | 147765681 | 769 days ago | IN | 0 ETH | 0.00010111 | ||||
| Withdraw | 144474447 | 779 days ago | IN | 0 ETH | 0.00004112 | ||||
| Withdraw | 128983735 | 829 days ago | IN | 0 ETH | 0.00006876 | ||||
| Deposit | 128983680 | 829 days ago | IN | 0 ETH | 0.00006673 | ||||
| Withdraw | 120403578 | 856 days ago | IN | 0 ETH | 0.00006456 | ||||
| Withdraw | 115548658 | 871 days ago | IN | 0 ETH | 0.00009448 | ||||
| Withdraw | 114528124 | 874 days ago | IN | 0 ETH | 0.00009235 | ||||
| Deposit | 114527991 | 874 days ago | IN | 0 ETH | 0.0000921 | ||||
| Withdraw | 113500749 | 877 days ago | IN | 0 ETH | 0.00007542 |
Latest 25 internal transactions (View All)
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 72076814 | 999 days ago | 0 ETH | ||||
| 72076814 | 999 days ago | 0 ETH | ||||
| 72076814 | 999 days ago | 0 ETH | ||||
| 71986003 | 999 days ago | 0 ETH | ||||
| 71986003 | 999 days ago | 0 ETH | ||||
| 71986003 | 999 days ago | 0 ETH | ||||
| 71980507 | 999 days ago | 0 ETH | ||||
| 71980257 | 999 days ago | 0 ETH | ||||
| 71980257 | 999 days ago | 0 ETH | ||||
| 71940558 | 1000 days ago | 0 ETH | ||||
| 71940558 | 1000 days ago | 0 ETH | ||||
| 71940558 | 1000 days ago | 0 ETH | ||||
| 71940558 | 1000 days ago | 0 ETH | ||||
| 71940558 | 1000 days ago | 0 ETH | ||||
| 71940558 | 1000 days ago | 0 ETH | ||||
| 71940558 | 1000 days ago | 0 ETH | ||||
| 71886212 | 1000 days ago | 0 ETH | ||||
| 71832036 | 1000 days ago | 0 ETH | ||||
| 71830563 | 1000 days ago | 0 ETH | ||||
| 71830563 | 1000 days ago | 0 ETH | ||||
| 71797164 | 1000 days ago | 0 ETH | ||||
| 71797164 | 1000 days ago | 0 ETH | ||||
| 71797164 | 1000 days ago | 0 ETH | ||||
| 71792620 | 1000 days ago | 0 ETH | ||||
| 71792620 | 1000 days ago | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
MasterChef
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
contract MasterChef is Ownable, ReentrancyGuard {
using SafeMath for uint256;
IERC20 public immutable PLS;
uint256 public constant MONTH_IN_SECONDS = 2_628_000 seconds;
// 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 PLS
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.amount * pool.accPlsPerShare) - user.rewardDebt
//
// Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
// 1. The pool's `accPlsPerShare` (and `lastRewardSecond`) 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. PLS to emit per second
uint256 lastRewardSecond; // Last block timestamp that PLS distribution occurs.
uint256 accPlsPerShare; // Accumulated PLS per share, times 1e18. See below.
uint256 lpSupply;
}
// PLS tokens emitted per second.
uint256 public plsPerSecond;
// Info of each pool.
PoolInfo[] public poolInfo;
// Info of each user that stakes LP tokens.
mapping(uint256 => 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 timestamp where PLS mining starts
// poolId => timestamp;
mapping(uint256 => uint256) startTime;
constructor(
address _pls,
address _gov,
uint256 _initialEmission
) {
PLS = IERC20(_pls);
transferOwnership(_gov);
plsPerSecond = _initialEmission / MONTH_IN_SECONDS;
}
// Deposit LP tokens to MasterChef for PLS allocation.
function deposit(uint256 _pid, uint256 _amount) external nonReentrant {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
updatePool(_pid);
if (user.amount > 0) {
uint256 pending = user.amount.mul(pool.accPlsPerShare).div(1e18).sub(user.rewardDebt);
if (pending > 0) {
safePlsTransfer(msg.sender, pending);
}
}
if (_amount > 0) {
uint256 balanceBefore = pool.lpToken.balanceOf(address(this));
pool.lpToken.transferFrom(address(msg.sender), address(this), _amount);
_amount = pool.lpToken.balanceOf(address(this)) - balanceBefore;
user.amount = user.amount.add(_amount);
pool.lpSupply = pool.lpSupply.add(_amount);
}
user.rewardDebt = user.amount.mul(pool.accPlsPerShare).div(1e18);
emit Deposit(msg.sender, _pid, _amount);
}
// Withdraw LP tokens from MasterChef.
function withdraw(uint256 _pid, uint256 _amount) external nonReentrant {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
require(user.amount >= _amount, 'withdraw: not good');
updatePool(_pid);
uint256 pending = user.amount.mul(pool.accPlsPerShare).div(1e18).sub(user.rewardDebt);
if (pending > 0) {
safePlsTransfer(msg.sender, pending);
}
if (_amount > 0) {
user.amount = user.amount.sub(_amount);
pool.lpToken.transfer(address(msg.sender), _amount);
pool.lpSupply = pool.lpSupply.sub(_amount);
}
user.rewardDebt = user.amount.mul(pool.accPlsPerShare).div(1e18);
emit Withdraw(msg.sender, _pid, _amount);
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) external nonReentrant {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
uint256 amount = user.amount;
user.amount = 0;
user.rewardDebt = 0;
pool.lpToken.transfer(address(msg.sender), amount);
if (pool.lpSupply >= amount) {
pool.lpSupply = pool.lpSupply.sub(amount);
} else {
pool.lpSupply = 0;
}
emit EmergencyWithdraw(msg.sender, _pid, amount);
}
// Safe pls transfer function, just in case if rounding error causes pool to not have enough PLS.
function safePlsTransfer(address _to, uint256 _amount) internal {
uint256 plsBal = PLS.balanceOf(address(this));
bool transferSuccess = false;
if (_amount > plsBal) {
transferSuccess = PLS.transfer(_to, plsBal);
} else {
transferSuccess = PLS.transfer(_to, _amount);
}
require(transferSuccess, 'safePlsTransfer: transfer failed');
}
function poolLength() external view returns (uint256) {
return poolInfo.length;
}
// Return reward multiplier over the given _from to _to second.
function getMultiplier(uint256 _from, uint256 _to) public pure returns (uint256) {
return _to.sub(_from);
}
// Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
if (block.timestamp <= pool.lastRewardSecond) {
return;
}
if (pool.lpSupply == 0 || pool.allocPoint == 0) {
pool.lastRewardSecond = block.timestamp;
return;
}
uint256 multiplier = getMultiplier(pool.lastRewardSecond, block.timestamp);
uint256 plsReward = multiplier.mul(plsPerSecond).mul(pool.allocPoint).div(totalAllocPoint);
pool.accPlsPerShare = pool.accPlsPerShare.add(plsReward.mul(1e18).div(pool.lpSupply));
pool.lastRewardSecond = block.timestamp;
}
// Update reward variables for all pools. Be careful of gas spending!
function massUpdatePools() public {
uint256 length = poolInfo.length;
for (uint256 pid = 0; pid < length; ++pid) {
updatePool(pid);
}
}
// View function to see pending pls on frontend.
function pendingPls(uint256 _pid, address _user) external view returns (uint256) {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][_user];
uint256 accPlsPerShare = pool.accPlsPerShare;
if (block.timestamp > pool.lastRewardSecond && pool.lpSupply != 0 && totalAllocPoint > 0) {
uint256 multiplier = getMultiplier(pool.lastRewardSecond, block.timestamp);
uint256 plsReward = multiplier.mul(plsPerSecond).mul(pool.allocPoint).div(totalAllocPoint);
accPlsPerShare = accPlsPerShare.add(plsReward.mul(1e18).div(pool.lpSupply));
}
return user.amount.mul(accPlsPerShare).div(1e18).sub(user.rewardDebt);
}
/** OWNER ONLY */
function updateEmissionRate(uint256 _plsPerSecond) external onlyOwner {
massUpdatePools();
plsPerSecond = _plsPerSecond;
emit UpdateEmissionRate(msg.sender, _plsPerSecond);
}
// Add a new lp to the pool. Can only be called by the owner.
function add(
uint256 _allocPoint,
IERC20 _lpToken,
bool _withUpdate
) external onlyOwner {
if (_withUpdate) {
massUpdatePools();
}
uint256 lastRewardSecond = block.timestamp;
startTime[poolInfo.length] = lastRewardSecond;
totalAllocPoint = totalAllocPoint.add(_allocPoint);
poolInfo.push(
PoolInfo({
lpToken: _lpToken,
allocPoint: _allocPoint,
lastRewardSecond: lastRewardSecond,
accPlsPerShare: 0,
lpSupply: 0
})
);
}
// Update the given pool's PLS allocation point. Can only be called by the owner.
function set(
uint256 _pid,
uint256 _allocPoint,
bool _withUpdate
) external onlyOwner {
if (_withUpdate) {
massUpdatePools();
}
totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
poolInfo[_pid].allocPoint = _allocPoint;
}
event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
event UpdateEmissionRate(address indexed caller, uint256 newAmount);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)
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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
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() {
_transferOwnership(_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 {
_transferOwnership(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");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)
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 generally not needed starting with Solidity 0.8, since 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;
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
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;
}
}{
"optimizer": {
"enabled": true,
"runs": 1000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_pls","type":"address"},{"internalType":"address","name":"_gov","type":"address"},{"internalType":"uint256","name":"_initialEmission","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"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":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"UpdateEmissionRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"MONTH_IN_SECONDS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PLS","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"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":"pure","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingPls","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"plsPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardSecond","type":"uint256"},{"internalType":"uint256","name":"accPlsPerShare","type":"uint256"},{"internalType":"uint256","name":"lpSupply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","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":"_plsPerSecond","type":"uint256"}],"name":"updateEmissionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"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":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60a060405260006005553480156200001657600080fd5b50604051620018b4380380620018b48339810160408190526200003991620001be565b62000044336200007c565b600180556001600160a01b0383166080526200006082620000cc565b6200006f622819a082620001ff565b6002555062000222915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000546001600160a01b031633146200012c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b038116620001935760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840162000123565b6200019e816200007c565b50565b80516001600160a01b0381168114620001b957600080fd5b919050565b600080600060608486031215620001d457600080fd5b620001df84620001a1565b9250620001ef60208501620001a1565b9150604084015190509250925092565b6000826200021d57634e487b7160e01b600052601260045260246000fd5b500490565b6080516116616200025360003960008181610269015281816111970152818161124b01526112f401526116616000f3fe608060405234801561001057600080fd5b506004361061016c5760003560e01c8063715018a6116100cd5780638dbb1e3a11610081578063c4443f2711610066578063c4443f2714610317578063e2bbb1581461032a578063f2fde38b1461033d57600080fd5b80638dbb1e3a146102bd57806393f1a40b146102d057600080fd5b806374935f11116100b257806374935f11146102645780637de35002146102a35780638da5cb5b146102ac57600080fd5b8063715018a6146102525780637171225c1461025a57600080fd5b8063441a3e70116101245780635312ea8e116101095780635312ea8e14610224578063630b5ba11461023757806364482f791461023f57600080fd5b8063441a3e70146101fe57806351eb05a61461021157600080fd5b80631526fe27116101555780631526fe271461019d57806317caf6f1146101e25780631eaaa045146101eb57600080fd5b8063081e3eda146101715780630ba84cd214610188575b600080fd5b6003545b6040519081526020015b60405180910390f35b61019b610196366004611423565b610350565b005b6101b06101ab366004611423565b6103f4565b604080516001600160a01b0390961686526020860194909452928401919091526060830152608082015260a00161017f565b61017560055481565b61019b6101f936600461145f565b61043f565b61019b61020c3660046114a1565b6105f8565b61019b61021f366004611423565b61084b565b61019b610232366004611423565b610922565b61019b610abe565b61019b61024d3660046114c3565b610ae9565b61019b610bc8565b610175622819a081565b61028b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161017f565b61017560025481565b6000546001600160a01b031661028b565b6101756102cb3660046114a1565b610c2e565b6103026102de3660046114f1565b60046020908152600092835260408084209091529082529020805460019091015482565b6040805192835260208301919091520161017f565b6101756103253660046114f1565b610c41565b61019b6103383660046114a1565b610d59565b61019b61034b366004611521565b61106d565b6000546001600160a01b031633146103af5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6103b7610abe565b600281905560405181815233907fe2492e003bbe8afa53088b406f0c1cb5d9e280370fc72a74cf116ffd343c40539060200160405180910390a250565b6003818154811061040457600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b0390931694509092909185565b6000546001600160a01b031633146104995760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103a6565b80156104a7576104a7610abe565b600354600090815260066020526040902042908190556005546104ca908561114f565b60059081556040805160a0810182526001600160a01b039586168152602081019687529081019283526000606082018181526080830182815260038054600181018255935292517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b92909402918201805473ffffffffffffffffffffffffffffffffffffffff1916949097169390931790955594517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c85015590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d840155517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85e8301555090517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85f90910155565b6002600154141561064b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103a6565b60026001819055506000600383815481106106685761066861153e565b6000918252602080832086845260048252604080852033865290925292208054600590920290920192508311156106e15760405162461bcd60e51b815260206004820152601260248201527f77697468647261773a206e6f7420676f6f64000000000000000000000000000060448201526064016103a6565b6106ea8461084b565b60006107278260010154610721670de0b6b3a764000061071b8760030154876000015461115b90919063ffffffff16565b90611167565b90611173565b9050801561073957610739338261117f565b83156107e657815461074b9085611173565b8255825460405163a9059cbb60e01b8152336004820152602481018690526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b15801561079857600080fd5b505af11580156107ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d09190611554565b5060048301546107e09085611173565b60048401555b6003830154825461080491670de0b6b3a76400009161071b9161115b565b6001830155604051848152859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a3505060018055505050565b6000600382815481106108605761086061153e565b906000526020600020906005020190508060020154421161087f575050565b6004810154158061089257506001810154155b156108a1574260029091015550565b60006108b1826002015442610c2e565b905060006108de60055461071b85600101546108d86002548761115b90919063ffffffff16565b9061115b565b9050610911610906846004015461071b670de0b6b3a76400008561115b90919063ffffffff16565b60038501549061114f565b600384015550504260029091015550565b600260015414156109755760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103a6565b60026001819055506000600382815481106109925761099261153e565b6000918252602080832085845260048083526040808620338088529452808620805487825560018201979097556005959095029092018054925163a9059cbb60e01b815291820193909352602481018590529194509192916001600160a01b03169063a9059cbb90604401602060405180830381600087803b158015610a1757600080fd5b505af1158015610a2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4f9190611554565b5080836004015410610a74576004830154610a6a9082611173565b6004840155610a7c565b600060048401555b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595906020015b60405180910390a35050600180555050565b60035460005b81811015610ae557610ad58161084b565b610ade81611587565b9050610ac4565b5050565b6000546001600160a01b03163314610b435760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103a6565b8015610b5157610b51610abe565b610b9482610b8e60038681548110610b6b57610b6b61153e565b90600052602060002090600502016001015460055461117390919063ffffffff16565b9061114f565b6005819055508160038481548110610bae57610bae61153e565b906000526020600020906005020160010181905550505050565b6000546001600160a01b03163314610c225760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103a6565b610c2c60006113c6565b565b6000610c3a8284611173565b9392505050565b60008060038481548110610c5757610c5761153e565b600091825260208083208784526004825260408085206001600160a01b03891686529092529220600360059092029092019081015460028201549193509042118015610ca65750600483015415155b8015610cb457506000600554115b15610d24576000610cc9846002015442610c2e565b90506000610cf060055461071b87600101546108d86002548761115b90919063ffffffff16565b9050610d1f610d18866004015461071b670de0b6b3a76400008561115b90919063ffffffff16565b849061114f565b925050505b610d4f8260010154610721670de0b6b3a764000061071b85876000015461115b90919063ffffffff16565b9695505050505050565b60026001541415610dac5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103a6565b6002600181905550600060038381548110610dc957610dc961153e565b60009182526020808320868452600482526040808520338652909252922060059091029091019150610dfa8461084b565b805415610e46576000610e328260010154610721670de0b6b3a764000061071b8760030154876000015461115b90919063ffffffff16565b90508015610e4457610e44338261117f565b505b82156110165781546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610e8f57600080fd5b505afa158015610ea3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec791906115a2565b83546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018790529192506001600160a01b0316906323b872dd90606401602060405180830381600087803b158015610f3257600080fd5b505af1158015610f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6a9190611554565b5082546040516370a0823160e01b815230600482015282916001600160a01b0316906370a082319060240160206040518083038186803b158015610fad57600080fd5b505afa158015610fc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe591906115a2565b610fef91906115bb565b8254909450610ffe908561114f565b8255600483015461100f908561114f565b6004840155505b6003820154815461103491670de0b6b3a76400009161071b9161115b565b6001820155604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590602001610aac565b6000546001600160a01b031633146110c75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103a6565b6001600160a01b0381166111435760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103a6565b61114c816113c6565b50565b6000610c3a82846115d2565b6000610c3a82846115ea565b6000610c3a8284611609565b6000610c3a82846115bb565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b1580156111e157600080fd5b505afa1580156111f5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121991906115a2565b90506000818311156112ce5760405163a9059cbb60e01b81526001600160a01b038581166004830152602482018490527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90604401602060405180830381600087803b15801561128f57600080fd5b505af11580156112a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c79190611554565b9050611373565b60405163a9059cbb60e01b81526001600160a01b038581166004830152602482018590527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90604401602060405180830381600087803b15801561133857600080fd5b505af115801561134c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113709190611554565b90505b806113c05760405162461bcd60e51b815260206004820181905260248201527f73616665506c735472616e736665723a207472616e73666572206661696c656460448201526064016103a6565b50505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561143557600080fd5b5035919050565b6001600160a01b038116811461114c57600080fd5b801515811461114c57600080fd5b60008060006060848603121561147457600080fd5b8335925060208401356114868161143c565b9150604084013561149681611451565b809150509250925092565b600080604083850312156114b457600080fd5b50508035926020909101359150565b6000806000606084860312156114d857600080fd5b8335925060208401359150604084013561149681611451565b6000806040838503121561150457600080fd5b8235915060208301356115168161143c565b809150509250929050565b60006020828403121561153357600080fd5b8135610c3a8161143c565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561156657600080fd5b8151610c3a81611451565b634e487b7160e01b600052601160045260246000fd5b600060001982141561159b5761159b611571565b5060010190565b6000602082840312156115b457600080fd5b5051919050565b6000828210156115cd576115cd611571565b500390565b600082198211156115e5576115e5611571565b500190565b600081600019048311821515161561160457611604611571565b500290565b60008261162657634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220fef65c71a74d5f05be12af8cb78829a7b074a8174c296e18e87cb4a1e64ae36a64736f6c6343000809003300000000000000000000000051318b7d00db7acc4026c88c3952b66278b6a67f000000000000000000000000a5c1c5a67ba16430547fea9d608ef81119be18760000000000000000000000000000000000000000000045e155fa0110fa400000
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061016c5760003560e01c8063715018a6116100cd5780638dbb1e3a11610081578063c4443f2711610066578063c4443f2714610317578063e2bbb1581461032a578063f2fde38b1461033d57600080fd5b80638dbb1e3a146102bd57806393f1a40b146102d057600080fd5b806374935f11116100b257806374935f11146102645780637de35002146102a35780638da5cb5b146102ac57600080fd5b8063715018a6146102525780637171225c1461025a57600080fd5b8063441a3e70116101245780635312ea8e116101095780635312ea8e14610224578063630b5ba11461023757806364482f791461023f57600080fd5b8063441a3e70146101fe57806351eb05a61461021157600080fd5b80631526fe27116101555780631526fe271461019d57806317caf6f1146101e25780631eaaa045146101eb57600080fd5b8063081e3eda146101715780630ba84cd214610188575b600080fd5b6003545b6040519081526020015b60405180910390f35b61019b610196366004611423565b610350565b005b6101b06101ab366004611423565b6103f4565b604080516001600160a01b0390961686526020860194909452928401919091526060830152608082015260a00161017f565b61017560055481565b61019b6101f936600461145f565b61043f565b61019b61020c3660046114a1565b6105f8565b61019b61021f366004611423565b61084b565b61019b610232366004611423565b610922565b61019b610abe565b61019b61024d3660046114c3565b610ae9565b61019b610bc8565b610175622819a081565b61028b7f00000000000000000000000051318b7d00db7acc4026c88c3952b66278b6a67f81565b6040516001600160a01b03909116815260200161017f565b61017560025481565b6000546001600160a01b031661028b565b6101756102cb3660046114a1565b610c2e565b6103026102de3660046114f1565b60046020908152600092835260408084209091529082529020805460019091015482565b6040805192835260208301919091520161017f565b6101756103253660046114f1565b610c41565b61019b6103383660046114a1565b610d59565b61019b61034b366004611521565b61106d565b6000546001600160a01b031633146103af5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6103b7610abe565b600281905560405181815233907fe2492e003bbe8afa53088b406f0c1cb5d9e280370fc72a74cf116ffd343c40539060200160405180910390a250565b6003818154811061040457600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b0390931694509092909185565b6000546001600160a01b031633146104995760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103a6565b80156104a7576104a7610abe565b600354600090815260066020526040902042908190556005546104ca908561114f565b60059081556040805160a0810182526001600160a01b039586168152602081019687529081019283526000606082018181526080830182815260038054600181018255935292517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b92909402918201805473ffffffffffffffffffffffffffffffffffffffff1916949097169390931790955594517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c85015590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d840155517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85e8301555090517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85f90910155565b6002600154141561064b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103a6565b60026001819055506000600383815481106106685761066861153e565b6000918252602080832086845260048252604080852033865290925292208054600590920290920192508311156106e15760405162461bcd60e51b815260206004820152601260248201527f77697468647261773a206e6f7420676f6f64000000000000000000000000000060448201526064016103a6565b6106ea8461084b565b60006107278260010154610721670de0b6b3a764000061071b8760030154876000015461115b90919063ffffffff16565b90611167565b90611173565b9050801561073957610739338261117f565b83156107e657815461074b9085611173565b8255825460405163a9059cbb60e01b8152336004820152602481018690526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b15801561079857600080fd5b505af11580156107ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d09190611554565b5060048301546107e09085611173565b60048401555b6003830154825461080491670de0b6b3a76400009161071b9161115b565b6001830155604051848152859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a3505060018055505050565b6000600382815481106108605761086061153e565b906000526020600020906005020190508060020154421161087f575050565b6004810154158061089257506001810154155b156108a1574260029091015550565b60006108b1826002015442610c2e565b905060006108de60055461071b85600101546108d86002548761115b90919063ffffffff16565b9061115b565b9050610911610906846004015461071b670de0b6b3a76400008561115b90919063ffffffff16565b60038501549061114f565b600384015550504260029091015550565b600260015414156109755760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103a6565b60026001819055506000600382815481106109925761099261153e565b6000918252602080832085845260048083526040808620338088529452808620805487825560018201979097556005959095029092018054925163a9059cbb60e01b815291820193909352602481018590529194509192916001600160a01b03169063a9059cbb90604401602060405180830381600087803b158015610a1757600080fd5b505af1158015610a2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4f9190611554565b5080836004015410610a74576004830154610a6a9082611173565b6004840155610a7c565b600060048401555b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595906020015b60405180910390a35050600180555050565b60035460005b81811015610ae557610ad58161084b565b610ade81611587565b9050610ac4565b5050565b6000546001600160a01b03163314610b435760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103a6565b8015610b5157610b51610abe565b610b9482610b8e60038681548110610b6b57610b6b61153e565b90600052602060002090600502016001015460055461117390919063ffffffff16565b9061114f565b6005819055508160038481548110610bae57610bae61153e565b906000526020600020906005020160010181905550505050565b6000546001600160a01b03163314610c225760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103a6565b610c2c60006113c6565b565b6000610c3a8284611173565b9392505050565b60008060038481548110610c5757610c5761153e565b600091825260208083208784526004825260408085206001600160a01b03891686529092529220600360059092029092019081015460028201549193509042118015610ca65750600483015415155b8015610cb457506000600554115b15610d24576000610cc9846002015442610c2e565b90506000610cf060055461071b87600101546108d86002548761115b90919063ffffffff16565b9050610d1f610d18866004015461071b670de0b6b3a76400008561115b90919063ffffffff16565b849061114f565b925050505b610d4f8260010154610721670de0b6b3a764000061071b85876000015461115b90919063ffffffff16565b9695505050505050565b60026001541415610dac5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103a6565b6002600181905550600060038381548110610dc957610dc961153e565b60009182526020808320868452600482526040808520338652909252922060059091029091019150610dfa8461084b565b805415610e46576000610e328260010154610721670de0b6b3a764000061071b8760030154876000015461115b90919063ffffffff16565b90508015610e4457610e44338261117f565b505b82156110165781546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610e8f57600080fd5b505afa158015610ea3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec791906115a2565b83546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018790529192506001600160a01b0316906323b872dd90606401602060405180830381600087803b158015610f3257600080fd5b505af1158015610f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6a9190611554565b5082546040516370a0823160e01b815230600482015282916001600160a01b0316906370a082319060240160206040518083038186803b158015610fad57600080fd5b505afa158015610fc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe591906115a2565b610fef91906115bb565b8254909450610ffe908561114f565b8255600483015461100f908561114f565b6004840155505b6003820154815461103491670de0b6b3a76400009161071b9161115b565b6001820155604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590602001610aac565b6000546001600160a01b031633146110c75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103a6565b6001600160a01b0381166111435760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103a6565b61114c816113c6565b50565b6000610c3a82846115d2565b6000610c3a82846115ea565b6000610c3a8284611609565b6000610c3a82846115bb565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000051318b7d00db7acc4026c88c3952b66278b6a67f6001600160a01b0316906370a082319060240160206040518083038186803b1580156111e157600080fd5b505afa1580156111f5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121991906115a2565b90506000818311156112ce5760405163a9059cbb60e01b81526001600160a01b038581166004830152602482018490527f00000000000000000000000051318b7d00db7acc4026c88c3952b66278b6a67f169063a9059cbb90604401602060405180830381600087803b15801561128f57600080fd5b505af11580156112a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c79190611554565b9050611373565b60405163a9059cbb60e01b81526001600160a01b038581166004830152602482018590527f00000000000000000000000051318b7d00db7acc4026c88c3952b66278b6a67f169063a9059cbb90604401602060405180830381600087803b15801561133857600080fd5b505af115801561134c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113709190611554565b90505b806113c05760405162461bcd60e51b815260206004820181905260248201527f73616665506c735472616e736665723a207472616e73666572206661696c656460448201526064016103a6565b50505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561143557600080fd5b5035919050565b6001600160a01b038116811461114c57600080fd5b801515811461114c57600080fd5b60008060006060848603121561147457600080fd5b8335925060208401356114868161143c565b9150604084013561149681611451565b809150509250925092565b600080604083850312156114b457600080fd5b50508035926020909101359150565b6000806000606084860312156114d857600080fd5b8335925060208401359150604084013561149681611451565b6000806040838503121561150457600080fd5b8235915060208301356115168161143c565b809150509250929050565b60006020828403121561153357600080fd5b8135610c3a8161143c565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561156657600080fd5b8151610c3a81611451565b634e487b7160e01b600052601160045260246000fd5b600060001982141561159b5761159b611571565b5060010190565b6000602082840312156115b457600080fd5b5051919050565b6000828210156115cd576115cd611571565b500390565b600082198211156115e5576115e5611571565b500190565b600081600019048311821515161561160457611604611571565b500290565b60008261162657634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220fef65c71a74d5f05be12af8cb78829a7b074a8174c296e18e87cb4a1e64ae36a64736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000051318b7d00db7acc4026c88c3952b66278b6a67f000000000000000000000000a5c1c5a67ba16430547fea9d608ef81119be18760000000000000000000000000000000000000000000045e155fa0110fa400000
-----Decoded View---------------
Arg [0] : _pls (address): 0x51318B7D00db7ACc4026C88c3952B66278B6A67F
Arg [1] : _gov (address): 0xa5c1c5a67Ba16430547FEA9D608Ef81119bE1876
Arg [2] : _initialEmission (uint256): 330000000000000000000000
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000051318b7d00db7acc4026c88c3952b66278b6a67f
Arg [1] : 000000000000000000000000a5c1c5a67ba16430547fea9d608ef81119be1876
Arg [2] : 0000000000000000000000000000000000000000000045e155fa0110fa400000
Loading...
Loading
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.