More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 927 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 15663016 | 850 days ago | IN | 0 ETH | 0.00034296 | ||||
Withdraw | 15663014 | 850 days ago | IN | 0 ETH | 0.00061446 | ||||
Deposit | 15621599 | 856 days ago | IN | 0 ETH | 0.00166488 | ||||
Withdraw | 15619202 | 856 days ago | IN | 0 ETH | 0.00268136 | ||||
Withdraw | 15618143 | 856 days ago | IN | 0 ETH | 0.00330808 | ||||
Withdraw | 15618137 | 856 days ago | IN | 0 ETH | 0.00332871 | ||||
Withdraw | 15609796 | 857 days ago | IN | 0 ETH | 0.00050458 | ||||
Withdraw | 15608767 | 858 days ago | IN | 0 ETH | 0.00062675 | ||||
Withdraw | 15608759 | 858 days ago | IN | 0 ETH | 0.0006172 | ||||
Withdraw | 15604984 | 858 days ago | IN | 0 ETH | 0.00075255 | ||||
Withdraw | 15604982 | 858 days ago | IN | 0 ETH | 0.00058306 | ||||
Withdraw | 15604981 | 858 days ago | IN | 0 ETH | 0.00064854 | ||||
Withdraw | 15604979 | 858 days ago | IN | 0 ETH | 0.00056125 | ||||
Withdraw | 15596315 | 859 days ago | IN | 0 ETH | 0.00086536 | ||||
Withdraw | 15596313 | 859 days ago | IN | 0 ETH | 0.00095373 | ||||
Withdraw | 15596311 | 859 days ago | IN | 0 ETH | 0.00102341 | ||||
Withdraw | 15596309 | 859 days ago | IN | 0 ETH | 0.0008963 | ||||
Withdraw | 15594098 | 860 days ago | IN | 0 ETH | 0.0005684 | ||||
Withdraw | 15594094 | 860 days ago | IN | 0 ETH | 0.00058695 | ||||
Withdraw | 15594092 | 860 days ago | IN | 0 ETH | 0.00036779 | ||||
Withdraw | 15594086 | 860 days ago | IN | 0 ETH | 0.00058946 | ||||
Withdraw | 15594019 | 860 days ago | IN | 0 ETH | 0.00069118 | ||||
Withdraw | 15593863 | 860 days ago | IN | 0 ETH | 0.00064019 | ||||
Withdraw | 15593445 | 860 days ago | IN | 0 ETH | 0.00064835 | ||||
Withdraw | 15593441 | 860 days ago | IN | 0 ETH | 0.00056293 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
SlvmGenesisRewardPool
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/** *Submitted for verification at Etherscan.io on 2022-04-15 */ // SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // File @openzeppelin/contracts/math/[email protected] pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } } // File @openzeppelin/contracts/utils/[email protected] pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File @openzeppelin/contracts/token/ERC20/[email protected] pragma solidity >=0.6.0 <0.8.0; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } // File contracts/distribution/SlvmGenesisRewardPool.sol interface INode { function whitelist(address _addr) external view returns(bool); } pragma solidity 0.6.12; // Note that this pool has no minter key of SLVM (rewards). // Instead, the governance will call SLVM distributeReward method and send reward to this pool at the beginning. contract SlvmGenesisRewardPool { using SafeMath for uint256; using SafeERC20 for IERC20; // governance address public operator; address public node; address public feeAddress; address public paxg = 0x45804880De22913dAFE09f4980848ECE6EcbAf78; uint256 public whitelistPrice = 125000000000000000; // Info of each user. struct UserInfo { uint256 amount; // How many tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. } // Info of each pool. struct PoolInfo { IERC20 token; // Address of LP token contract. uint256 allocPoint; // How many allocation points assigned to this pool. SLVM to distribute. uint256 lastRewardTime; // Last time that SLVM distribution occurs. uint256 accSlvmPerShare; // Accumulated SLVM per share, times 1e18. See below. bool isStarted; // if lastRewardBlock has passed uint256 fee; } IERC20 public slvm; // 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 time when SLVM mining starts. uint256 public poolStartTime; // The time when SLVM mining ends. uint256 public poolEndTime; mapping (address => bool) public whitelist; bool whitelistEnabled = true; // MAINNET uint256 public slvmPerSecond = 0.0192901234567 ether; // 5000 SLVM / (24h * 60min * 60s) uint256 public runningTime = 3 days; // 3 days uint256 public constant TOTAL_REWARDS = 5000 ether; // END MAINNET 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 RewardPaid(address indexed user, uint256 amount); constructor( address _slvm, uint256 _poolStartTime, address _node, address _feeAddress ) public { require(block.timestamp < _poolStartTime, "late"); if (_slvm != address(0)) slvm = IERC20(_slvm); poolStartTime = _poolStartTime; poolEndTime = poolStartTime + runningTime; operator = msg.sender; node = _node; feeAddress = _feeAddress; } modifier onlyOperator() { require(operator == msg.sender, "SlvmGenesisPool: caller is not the operator"); _; } // set fee address function setFeeAddress(address _feeAddress) public onlyOperator{ feeAddress = _feeAddress; } // set an address's whitelist state function setWhitelist(address _addr, bool _f) public onlyOperator{ whitelist[_addr] = _f; } // set whitelist on or off function setWhitelistEnabled(bool _f) public onlyOperator{ whitelistEnabled = _f; } // buy whitelist function buyWhitelist() public { require(isWhitelist(msg.sender) == false, "Already in whitelist"); IERC20(paxg).transferFrom(msg.sender, feeAddress, whitelistPrice); whitelist[msg.sender] = true; } // check address is whitelisted function isWhitelist(address _addr) public view returns(bool){ if ( whitelistEnabled ){ bool f1 = whitelist[_addr]; bool f2 = INode(node).whitelist(_addr); return f1 || f2; } return true; } // check pool duplicate function checkPoolDuplicate(IERC20 _token) internal view { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { require(poolInfo[pid].token != _token, "SlvmGenesisPool: existing pool?"); } } // Add a new token to the pool. Can only be called by the owner. function add( uint256 _allocPoint, IERC20 _token, bool _withUpdate, uint256 _lastRewardTime, uint256 _fee ) public onlyOperator { checkPoolDuplicate(_token); if (_withUpdate) { massUpdatePools(); } if (block.timestamp < poolStartTime) { // chef is sleeping if (_lastRewardTime == 0) { _lastRewardTime = poolStartTime; } else { if (_lastRewardTime < poolStartTime) { _lastRewardTime = poolStartTime; } } } else { // chef is cooking if (_lastRewardTime == 0 || _lastRewardTime < block.timestamp) { _lastRewardTime = block.timestamp; } } bool _isStarted = (_lastRewardTime <= poolStartTime) || (_lastRewardTime <= block.timestamp); poolInfo.push(PoolInfo({token: _token, allocPoint: _allocPoint, lastRewardTime: _lastRewardTime, accSlvmPerShare: 0, isStarted: _isStarted, fee: _fee})); if (_isStarted) { totalAllocPoint = totalAllocPoint.add(_allocPoint); } } // Update the given pool's SLVM allocation point. Can only be called by the owner. function set(uint256 _pid, uint256 _allocPoint, uint256 _fee) public onlyOperator { massUpdatePools(); PoolInfo storage pool = poolInfo[_pid]; if (pool.isStarted) { totalAllocPoint = totalAllocPoint.sub(pool.allocPoint).add(_allocPoint); } pool.allocPoint = _allocPoint; pool.fee = _fee; } // Return accumulate rewards over the given _from to _to block. function getGeneratedReward(uint256 _fromTime, uint256 _toTime) public view returns (uint256) { if (_fromTime >= _toTime) return 0; if (_toTime >= poolEndTime) { if (_fromTime >= poolEndTime) return 0; if (_fromTime <= poolStartTime) return poolEndTime.sub(poolStartTime).mul(slvmPerSecond); return poolEndTime.sub(_fromTime).mul(slvmPerSecond); } else { if (_toTime <= poolStartTime) return 0; if (_fromTime <= poolStartTime) return _toTime.sub(poolStartTime).mul(slvmPerSecond); return _toTime.sub(_fromTime).mul(slvmPerSecond); } } // View function to see pending SLVM on frontend. function pendingSLVM(uint256 _pid, address _user) external view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accSlvmPerShare = pool.accSlvmPerShare; uint256 tokenSupply = pool.token.balanceOf(address(this)); if (block.timestamp > pool.lastRewardTime && tokenSupply != 0) { uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp); uint256 _slvmReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint); accSlvmPerShare = accSlvmPerShare.add(_slvmReward.mul(1e18).div(tokenSupply)); } return user.amount.mul(accSlvmPerShare).div(1e18).sub(user.rewardDebt); } // 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); } } // 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.lastRewardTime) { return; } uint256 tokenSupply = pool.token.balanceOf(address(this)); if (tokenSupply == 0) { pool.lastRewardTime = block.timestamp; return; } if (!pool.isStarted) { pool.isStarted = true; totalAllocPoint = totalAllocPoint.add(pool.allocPoint); } if (totalAllocPoint > 0) { uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp); uint256 _slvmReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint); pool.accSlvmPerShare = pool.accSlvmPerShare.add(_slvmReward.mul(1e18).div(tokenSupply)); } pool.lastRewardTime = block.timestamp; } // Deposit LP tokens. function deposit(uint256 _pid, uint256 _amount) public { address _sender = msg.sender; bool _f = isWhitelist(_sender); require(_f, "Not in whitelist"); PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_sender]; updatePool(_pid); if (user.amount > 0) { uint256 _pending = user.amount.mul(pool.accSlvmPerShare).div(1e18).sub(user.rewardDebt); if (_pending > 0) { safeSlvmTransfer(_sender, _pending); emit RewardPaid(_sender, _pending); } } if (_amount > 0) { pool.token.safeTransferFrom(_sender, address(this), _amount); uint256 fee = _amount.mul(pool.fee).div(1000); pool.token.transfer(feeAddress, fee); user.amount = user.amount.add(_amount).sub(fee); } user.rewardDebt = user.amount.mul(pool.accSlvmPerShare).div(1e18); emit Deposit(_sender, _pid, _amount); } // Withdraw LP tokens. function withdraw(uint256 _pid, uint256 _amount) public { address _sender = msg.sender; PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_sender]; require(user.amount >= _amount, "withdraw: not good"); updatePool(_pid); uint256 _pending = user.amount.mul(pool.accSlvmPerShare).div(1e18).sub(user.rewardDebt); if (_pending > 0) { safeSlvmTransfer(_sender, _pending); emit RewardPaid(_sender, _pending); } if (_amount > 0) { user.amount = user.amount.sub(_amount); pool.token.safeTransfer(_sender, _amount); } user.rewardDebt = user.amount.mul(pool.accSlvmPerShare).div(1e18); emit Withdraw(_sender, _pid, _amount); } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; uint256 _amount = user.amount; user.amount = 0; user.rewardDebt = 0; pool.token.safeTransfer(msg.sender, _amount); emit EmergencyWithdraw(msg.sender, _pid, _amount); } // Safe SLVM transfer function, just in case if rounding error causes pool to not have enough SLVMs. function safeSlvmTransfer(address _to, uint256 _amount) internal { uint256 _slvmBalance = slvm.balanceOf(address(this)); if (_slvmBalance > 0) { if (_amount > _slvmBalance) { slvm.safeTransfer(_to, _slvmBalance); } else { slvm.safeTransfer(_to, _amount); } } } function setOperator(address _operator) external onlyOperator { operator = _operator; } function governanceRecoverUnsupported( IERC20 _token, uint256 amount, address to ) external onlyOperator { if (block.timestamp < poolEndTime + 90 days) { // do not allow to drain core token (SLVM or lps) if less than 90 days after pool ends require(_token != slvm, "slvm"); uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { PoolInfo storage pool = poolInfo[pid]; require(_token != pool.token, "pool.token"); } } _token.safeTransfer(to, amount); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_slvm","type":"address"},{"internalType":"uint256","name":"_poolStartTime","type":"uint256"},{"internalType":"address","name":"_node","type":"address"},{"internalType":"address","name":"_feeAddress","type":"address"}],"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":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardPaid","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":"TOTAL_REWARDS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"},{"internalType":"uint256","name":"_lastRewardTime","type":"uint256"},{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buyWhitelist","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":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromTime","type":"uint256"},{"internalType":"uint256","name":"_toTime","type":"uint256"}],"name":"getGeneratedReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"governanceRecoverUnsupported","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"isWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"node","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paxg","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingSLVM","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardTime","type":"uint256"},{"internalType":"uint256","name":"accSlvmPerShare","type":"uint256"},{"internalType":"bool","name":"isStarted","type":"bool"},{"internalType":"uint256","name":"fee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"runningTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"bool","name":"_f","type":"bool"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_f","type":"bool"}],"name":"setWhitelistEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"slvm","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slvmPerSecond","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":"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":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistPrice","outputs":[{"internalType":"uint256","name":"","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
6080604052600380546001600160a01b0319167345804880de22913dafe09f4980848ece6ecbaf781790556701bc16d674ec80006004556000600855600c805460ff1916600117905566448843dc4f5e60600d556203f480600e5534801561006657600080fd5b50604051611f0b380380611f0b8339818101604052608081101561008957600080fd5b50805160208201516040830151606090930151919290914283116100dd576040805162461bcd60e51b815260206004808301919091526024820152636c61746560e01b604482015290519081900360640190fd5b6001600160a01b0384161561010857600580546001600160a01b0319166001600160a01b0386161790555b6009839055600e54909201600a55600080546001600160a01b03199081163317909155600180546001600160a01b039384169083161790556002805493909216921691909117905550611dab806101606000396000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c8063630b5ba11161010f578063a0e0e5cc116100a2578063d70754ec11610071578063d70754ec14610557578063e2bbb1581461055f578063e37b24cb14610582578063fc1a1c361461058a576101e5565b8063a0e0e5cc146104fb578063a509ceaf14610503578063b3ab15fb1461050b578063c683630d14610531576101e5565b806393f1a40b116100de57806393f1a40b14610448578063943f013d1461048d5780639b19251a146104955780639f5e470b146104cf576101e5565b8063630b5ba11461040a5780636e271dd5146104125780638705fcd41461041a5780639327c12214610440576101e5565b8063441a3e701161018757806354575af41161015657806354575af414610384578063570ca735146103ba5780635f96dc11146103c257806362e006c7146103ca576101e5565b8063441a3e70146102f957806351eb05a61461031c5780635312ea8e1461033957806353d6fd5914610356576101e5565b806317caf6f1116101c357806317caf6f114610281578063231f0c6a1461028957806341275358146102ac57806343b0e8df146102d0576101e5565b8063052d9e7e146101ea57806309cf60911461020b5780631526fe2714610225575b600080fd5b6102096004803603602081101561020057600080fd5b50351515610592565b005b6102136105ee565b60408051918252519081900360200190f35b6102426004803603602081101561023b57600080fd5b50356105fc565b604080516001600160a01b03909716875260208701959095528585019390935260608501919091521515608084015260a0830152519081900360c00190f35b61021361064f565b6102136004803603604081101561029f57600080fd5b5080359060200135610655565b6102b461071a565b604080516001600160a01b039092168252519081900360200190f35b610209600480360360608110156102e657600080fd5b5080359060208101359060400135610729565b6102096004803603604081101561030f57600080fd5b50803590602001356107e1565b6102096004803603602081101561033257600080fd5b503561099e565b6102096004803603602081101561034f57600080fd5b5035610afc565b6102096004803603604081101561036c57600080fd5b506001600160a01b0381351690602001351515610b98565b6102096004803603606081101561039a57600080fd5b506001600160a01b03813581169160208101359160409091013516610c0c565b6102b4610d54565b610213610d63565b610209600480360360a08110156103e057600080fd5b508035906001600160a01b0360208201351690604081013515159060608101359060800135610d69565b610209610f9a565b610213610fbd565b6102096004803603602081101561043057600080fd5b50356001600160a01b0316610fc3565b6102b461102e565b6104746004803603604081101561045e57600080fd5b50803590602001356001600160a01b031661103d565b6040805192835260208301919091528051918290030190f35b610213611061565b6104bb600480360360208110156104ab57600080fd5b50356001600160a01b0316611067565b604080519115158252519081900360200190f35b610213600480360360408110156104e557600080fd5b50803590602001356001600160a01b031661107c565b6102136111da565b6102b46111e0565b6102096004803603602081101561052157600080fd5b50356001600160a01b03166111ef565b6104bb6004803603602081101561054757600080fd5b50356001600160a01b031661125a565b6102b4611317565b6102096004803603604081101561057557600080fd5b5080359060200135611326565b610209611591565b610213611690565b6000546001600160a01b031633146105db5760405162461bcd60e51b815260040180806020018281038252602b815260200180611d21602b913960400191505060405180910390fd5b600c805460ff1916911515919091179055565b69010f0cf064dd5920000081565b6006818154811061060957fe5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0390941695509193909260ff9091169086565b60085481565b600081831061066657506000610714565b600a5482106106ce57600a54831061068057506000610714565b60095483116106b3576106ac600d546106a6600954600a5461169690919063ffffffff16565b906116f3565b9050610714565b6106ac600d546106a685600a5461169690919063ffffffff16565b60095482116106df57506000610714565b6009548311610703576106ac600d546106a66009548561169690919063ffffffff16565b600d546106ac906106a68486611696565b92915050565b6002546001600160a01b031681565b6000546001600160a01b031633146107725760405162461bcd60e51b815260040180806020018281038252602b815260200180611d21602b913960400191505060405180910390fd5b61077a610f9a565b60006006848154811061078957fe5b60009182526020909120600690910201600481015490915060ff16156107d0576107cc836107c6836001015460085461169690919063ffffffff16565b90611753565b6008555b600181019290925560059091015550565b60003390506000600684815481106107f557fe5b600091825260208083208784526007825260408085206001600160a01b03881686529092529220805460069092029092019250841115610871576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b61087a8561099e565b60006108b782600101546108b1670de0b6b3a76400006108ab876003015487600001546116f390919063ffffffff16565b906117ad565b90611696565b90508015610909576108c98482611814565b6040805182815290516001600160a01b038616917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b841561093357815461091b9086611696565b82558254610933906001600160a01b031685876118ca565b6003830154825461095191670de0b6b3a7640000916108ab916116f3565b600183015560408051868152905187916001600160a01b038716917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a3505050505050565b6000600682815481106109ad57fe5b90600052602060002090600602019050806002015442116109ce5750610af9565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610a1857600080fd5b505afa158015610a2c573d6000803e3d6000fd5b505050506040513d6020811015610a4257600080fd5b5051905080610a58575042600290910155610af9565b600482015460ff16610a895760048201805460ff19166001908117909155820154600854610a8591611753565b6008555b60085415610af0576000610aa1836002015442610655565b90506000610ac26008546108ab8660010154856116f390919063ffffffff16565b9050610ae8610add846108ab84670de0b6b3a76400006116f3565b600386015490611753565b600385015550505b50426002909101555b50565b600060068281548110610b0b57fe5b600091825260208083208584526007825260408085203380875293528420805485825560018201959095556006909302018054909450919291610b5b916001600160a01b039190911690836118ca565b604080518281529051859133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a350505050565b6000546001600160a01b03163314610be15760405162461bcd60e51b815260040180806020018281038252602b815260200180611d21602b913960400191505060405180910390fd5b6001600160a01b03919091166000908152600b60205260409020805460ff1916911515919091179055565b6000546001600160a01b03163314610c555760405162461bcd60e51b815260040180806020018281038252602b815260200180611d21602b913960400191505060405180910390fd5b600a546276a70001421015610d3b576005546001600160a01b0384811691161415610cb0576040805162461bcd60e51b81526020600480830191909152602482015263736c766d60e01b604482015290519081900360640190fd5b60065460005b81811015610d3857600060068281548110610ccd57fe5b6000918252602090912060069091020180549091506001600160a01b0387811691161415610d2f576040805162461bcd60e51b815260206004820152600a6024820152693837b7b6173a37b5b2b760b11b604482015290519081900360640190fd5b50600101610cb6565b50505b610d4f6001600160a01b03841682846118ca565b505050565b6000546001600160a01b031681565b60095481565b6000546001600160a01b03163314610db25760405162461bcd60e51b815260040180806020018281038252602b815260200180611d21602b913960400191505060405180910390fd5b610dbb8461191c565b8215610dc957610dc9610f9a565b600954421015610df75781610de2576009549150610df2565b600954821015610df25760095491505b610e0c565b811580610e0357504282105b15610e0c574291505b600060095483111580610e1f5750428311155b6040805160c0810182526001600160a01b038881168252602082018a8152928201878152600060608401818152861580156080870190815260a087018b8152600680546001810182559581905297517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f9590980294850180546001600160a01b031916989097169790971790955595517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4083015591517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4182015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4282015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d438201805460ff191691151591909117905590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4490910155909150610f9257600854610f8e9087611753565b6008555b505050505050565b60065460005b81811015610fb957610fb18161099e565b600101610fa0565b5050565b600a5481565b6000546001600160a01b0316331461100c5760405162461bcd60e51b815260040180806020018281038252602b815260200180611d21602b913960400191505060405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b031681565b60076020908152600092835260408084209091529082529020805460019091015482565b600e5481565b600b6020526000908152604090205460ff1681565b6000806006848154811061108c57fe5b600091825260208083208784526007825260408085206001600160a01b0389811687529084528186206006959095029092016003810154815483516370a0823160e01b815230600482015293519298509596909590949316926370a082319260248082019391829003018186803b15801561110657600080fd5b505afa15801561111a573d6000803e3d6000fd5b505050506040513d602081101561113057600080fd5b505160028501549091504211801561114757508015155b156111a457600061115c856002015442610655565b9050600061117d6008546108ab8860010154856116f390919063ffffffff16565b905061119f611198846108ab84670de0b6b3a76400006116f3565b8590611753565b935050505b6111cf83600101546108b1670de0b6b3a76400006108ab8688600001546116f390919063ffffffff16565b979650505050505050565b600d5481565b6005546001600160a01b031681565b6000546001600160a01b031633146112385760405162461bcd60e51b815260040180806020018281038252602b815260200180611d21602b913960400191505060405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600c5460009060ff161561130e576001600160a01b038083166000818152600b60209081526040808320546001548251634d8c928d60e11b81526004810196909652915160ff9091169593949190931692639b19251a92602480840193919291829003018186803b1580156112ce57600080fd5b505afa1580156112e2573d6000803e3d6000fd5b505050506040513d60208110156112f857600080fd5b5051905081806113055750805b92505050611312565b5060015b919050565b6001546001600160a01b031681565b3360006113328261125a565b905080611379576040805162461bcd60e51b815260206004820152601060248201526f139bdd081a5b881dda1a5d195b1a5cdd60821b604482015290519081900360640190fd5b60006006858154811061138857fe5b600091825260208083208884526007825260408085206001600160a01b03891686529092529220600690910290910191506113c28661099e565b80541561144e5760006113fa82600101546108b1670de0b6b3a76400006108ab876003015487600001546116f390919063ffffffff16565b9050801561144c5761140c8582611814565b6040805182815290516001600160a01b038716917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b505b841561152657815461146b906001600160a01b03168530886119b6565b600061148a6103e86108ab8560050154896116f390919063ffffffff16565b83546002546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101859052905193945091169163a9059cbb916044808201926020929091908290030181600087803b1580156114e457600080fd5b505af11580156114f8573d6000803e3d6000fd5b505050506040513d602081101561150e57600080fd5b505081546115229082906108b19089611753565b8255505b6003820154815461154491670de0b6b3a7640000916108ab916116f3565b600182015560408051868152905187916001600160a01b038716917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a3505050505050565b61159a3361125a565b156115e3576040805162461bcd60e51b8152602060048201526014602482015273105b1c9958591e481a5b881dda1a5d195b1a5cdd60621b604482015290519081900360640190fd5b60035460025460048054604080516323b872dd60e01b815233938101939093526001600160a01b03938416602484015260448301919091525191909216916323b872dd9160648083019260209291908290030181600087803b15801561164857600080fd5b505af115801561165c573d6000803e3d6000fd5b505050506040513d602081101561167257600080fd5b5050336000908152600b60205260409020805460ff19166001179055565b60045481565b6000828211156116ed576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008261170257506000610714565b8282028284828161170f57fe5b041461174c5760405162461bcd60e51b8152600401808060200182810382526021815260200180611d006021913960400191505060405180910390fd5b9392505050565b60008282018381101561174c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000808211611803576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161180c57fe5b049392505050565b600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561185f57600080fd5b505afa158015611873573d6000803e3d6000fd5b505050506040513d602081101561188957600080fd5b505190508015610d4f57808211156118b7576005546118b2906001600160a01b031684836118ca565b610d4f565b600554610d4f906001600160a01b031684845b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610d4f908490611a16565b60065460005b81811015610d4f57826001600160a01b03166006828154811061194157fe5b60009182526020909120600690910201546001600160a01b031614156119ae576040805162461bcd60e51b815260206004820152601f60248201527f536c766d47656e65736973506f6f6c3a206578697374696e6720706f6f6c3f00604482015290519081900360640190fd5b600101611922565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611a10908590611a16565b50505050565b6060611a6b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ac79092919063ffffffff16565b805190915015610d4f57808060200190516020811015611a8a57600080fd5b5051610d4f5760405162461bcd60e51b815260040180806020018281038252602a815260200180611d4c602a913960400191505060405180910390fd5b6060611ad68484600085611ade565b949350505050565b606082471015611b1f5760405162461bcd60e51b8152600401808060200182810382526026815260200180611cda6026913960400191505060405180910390fd5b611b2885611c2f565b611b79576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310611bb85780518252601f199092019160209182019101611b99565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611c1a576040519150601f19603f3d011682016040523d82523d6000602084013e611c1f565b606091505b50915091506111cf828286611c35565b3b151590565b60608315611c4457508161174c565b825115611c545782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611c9e578181015183820152602001611c86565b50505050905090810190601f168015611ccb5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77536c766d47656e65736973506f6f6c3a2063616c6c6572206973206e6f7420746865206f70657261746f725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d6ea5433bca27f977e7e711cb7974ac5b88dd90119b521d6c9257c20f55870da64736f6c634300060c00330000000000000000000000007cbcfd88c952a1f5eaa954945ebc7ed8f1015ec00000000000000000000000000000000000000000000000000000000063289200000000000000000000000000e09902fa1d358dc67cd429b27de43df112564ad700000000000000000000000000e2b7b6f51223c3a985644642843d6f5a16c6df
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101e55760003560e01c8063630b5ba11161010f578063a0e0e5cc116100a2578063d70754ec11610071578063d70754ec14610557578063e2bbb1581461055f578063e37b24cb14610582578063fc1a1c361461058a576101e5565b8063a0e0e5cc146104fb578063a509ceaf14610503578063b3ab15fb1461050b578063c683630d14610531576101e5565b806393f1a40b116100de57806393f1a40b14610448578063943f013d1461048d5780639b19251a146104955780639f5e470b146104cf576101e5565b8063630b5ba11461040a5780636e271dd5146104125780638705fcd41461041a5780639327c12214610440576101e5565b8063441a3e701161018757806354575af41161015657806354575af414610384578063570ca735146103ba5780635f96dc11146103c257806362e006c7146103ca576101e5565b8063441a3e70146102f957806351eb05a61461031c5780635312ea8e1461033957806353d6fd5914610356576101e5565b806317caf6f1116101c357806317caf6f114610281578063231f0c6a1461028957806341275358146102ac57806343b0e8df146102d0576101e5565b8063052d9e7e146101ea57806309cf60911461020b5780631526fe2714610225575b600080fd5b6102096004803603602081101561020057600080fd5b50351515610592565b005b6102136105ee565b60408051918252519081900360200190f35b6102426004803603602081101561023b57600080fd5b50356105fc565b604080516001600160a01b03909716875260208701959095528585019390935260608501919091521515608084015260a0830152519081900360c00190f35b61021361064f565b6102136004803603604081101561029f57600080fd5b5080359060200135610655565b6102b461071a565b604080516001600160a01b039092168252519081900360200190f35b610209600480360360608110156102e657600080fd5b5080359060208101359060400135610729565b6102096004803603604081101561030f57600080fd5b50803590602001356107e1565b6102096004803603602081101561033257600080fd5b503561099e565b6102096004803603602081101561034f57600080fd5b5035610afc565b6102096004803603604081101561036c57600080fd5b506001600160a01b0381351690602001351515610b98565b6102096004803603606081101561039a57600080fd5b506001600160a01b03813581169160208101359160409091013516610c0c565b6102b4610d54565b610213610d63565b610209600480360360a08110156103e057600080fd5b508035906001600160a01b0360208201351690604081013515159060608101359060800135610d69565b610209610f9a565b610213610fbd565b6102096004803603602081101561043057600080fd5b50356001600160a01b0316610fc3565b6102b461102e565b6104746004803603604081101561045e57600080fd5b50803590602001356001600160a01b031661103d565b6040805192835260208301919091528051918290030190f35b610213611061565b6104bb600480360360208110156104ab57600080fd5b50356001600160a01b0316611067565b604080519115158252519081900360200190f35b610213600480360360408110156104e557600080fd5b50803590602001356001600160a01b031661107c565b6102136111da565b6102b46111e0565b6102096004803603602081101561052157600080fd5b50356001600160a01b03166111ef565b6104bb6004803603602081101561054757600080fd5b50356001600160a01b031661125a565b6102b4611317565b6102096004803603604081101561057557600080fd5b5080359060200135611326565b610209611591565b610213611690565b6000546001600160a01b031633146105db5760405162461bcd60e51b815260040180806020018281038252602b815260200180611d21602b913960400191505060405180910390fd5b600c805460ff1916911515919091179055565b69010f0cf064dd5920000081565b6006818154811061060957fe5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0390941695509193909260ff9091169086565b60085481565b600081831061066657506000610714565b600a5482106106ce57600a54831061068057506000610714565b60095483116106b3576106ac600d546106a6600954600a5461169690919063ffffffff16565b906116f3565b9050610714565b6106ac600d546106a685600a5461169690919063ffffffff16565b60095482116106df57506000610714565b6009548311610703576106ac600d546106a66009548561169690919063ffffffff16565b600d546106ac906106a68486611696565b92915050565b6002546001600160a01b031681565b6000546001600160a01b031633146107725760405162461bcd60e51b815260040180806020018281038252602b815260200180611d21602b913960400191505060405180910390fd5b61077a610f9a565b60006006848154811061078957fe5b60009182526020909120600690910201600481015490915060ff16156107d0576107cc836107c6836001015460085461169690919063ffffffff16565b90611753565b6008555b600181019290925560059091015550565b60003390506000600684815481106107f557fe5b600091825260208083208784526007825260408085206001600160a01b03881686529092529220805460069092029092019250841115610871576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b61087a8561099e565b60006108b782600101546108b1670de0b6b3a76400006108ab876003015487600001546116f390919063ffffffff16565b906117ad565b90611696565b90508015610909576108c98482611814565b6040805182815290516001600160a01b038616917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b841561093357815461091b9086611696565b82558254610933906001600160a01b031685876118ca565b6003830154825461095191670de0b6b3a7640000916108ab916116f3565b600183015560408051868152905187916001600160a01b038716917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a3505050505050565b6000600682815481106109ad57fe5b90600052602060002090600602019050806002015442116109ce5750610af9565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610a1857600080fd5b505afa158015610a2c573d6000803e3d6000fd5b505050506040513d6020811015610a4257600080fd5b5051905080610a58575042600290910155610af9565b600482015460ff16610a895760048201805460ff19166001908117909155820154600854610a8591611753565b6008555b60085415610af0576000610aa1836002015442610655565b90506000610ac26008546108ab8660010154856116f390919063ffffffff16565b9050610ae8610add846108ab84670de0b6b3a76400006116f3565b600386015490611753565b600385015550505b50426002909101555b50565b600060068281548110610b0b57fe5b600091825260208083208584526007825260408085203380875293528420805485825560018201959095556006909302018054909450919291610b5b916001600160a01b039190911690836118ca565b604080518281529051859133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a350505050565b6000546001600160a01b03163314610be15760405162461bcd60e51b815260040180806020018281038252602b815260200180611d21602b913960400191505060405180910390fd5b6001600160a01b03919091166000908152600b60205260409020805460ff1916911515919091179055565b6000546001600160a01b03163314610c555760405162461bcd60e51b815260040180806020018281038252602b815260200180611d21602b913960400191505060405180910390fd5b600a546276a70001421015610d3b576005546001600160a01b0384811691161415610cb0576040805162461bcd60e51b81526020600480830191909152602482015263736c766d60e01b604482015290519081900360640190fd5b60065460005b81811015610d3857600060068281548110610ccd57fe5b6000918252602090912060069091020180549091506001600160a01b0387811691161415610d2f576040805162461bcd60e51b815260206004820152600a6024820152693837b7b6173a37b5b2b760b11b604482015290519081900360640190fd5b50600101610cb6565b50505b610d4f6001600160a01b03841682846118ca565b505050565b6000546001600160a01b031681565b60095481565b6000546001600160a01b03163314610db25760405162461bcd60e51b815260040180806020018281038252602b815260200180611d21602b913960400191505060405180910390fd5b610dbb8461191c565b8215610dc957610dc9610f9a565b600954421015610df75781610de2576009549150610df2565b600954821015610df25760095491505b610e0c565b811580610e0357504282105b15610e0c574291505b600060095483111580610e1f5750428311155b6040805160c0810182526001600160a01b038881168252602082018a8152928201878152600060608401818152861580156080870190815260a087018b8152600680546001810182559581905297517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f9590980294850180546001600160a01b031916989097169790971790955595517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4083015591517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4182015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4282015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d438201805460ff191691151591909117905590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4490910155909150610f9257600854610f8e9087611753565b6008555b505050505050565b60065460005b81811015610fb957610fb18161099e565b600101610fa0565b5050565b600a5481565b6000546001600160a01b0316331461100c5760405162461bcd60e51b815260040180806020018281038252602b815260200180611d21602b913960400191505060405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b031681565b60076020908152600092835260408084209091529082529020805460019091015482565b600e5481565b600b6020526000908152604090205460ff1681565b6000806006848154811061108c57fe5b600091825260208083208784526007825260408085206001600160a01b0389811687529084528186206006959095029092016003810154815483516370a0823160e01b815230600482015293519298509596909590949316926370a082319260248082019391829003018186803b15801561110657600080fd5b505afa15801561111a573d6000803e3d6000fd5b505050506040513d602081101561113057600080fd5b505160028501549091504211801561114757508015155b156111a457600061115c856002015442610655565b9050600061117d6008546108ab8860010154856116f390919063ffffffff16565b905061119f611198846108ab84670de0b6b3a76400006116f3565b8590611753565b935050505b6111cf83600101546108b1670de0b6b3a76400006108ab8688600001546116f390919063ffffffff16565b979650505050505050565b600d5481565b6005546001600160a01b031681565b6000546001600160a01b031633146112385760405162461bcd60e51b815260040180806020018281038252602b815260200180611d21602b913960400191505060405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600c5460009060ff161561130e576001600160a01b038083166000818152600b60209081526040808320546001548251634d8c928d60e11b81526004810196909652915160ff9091169593949190931692639b19251a92602480840193919291829003018186803b1580156112ce57600080fd5b505afa1580156112e2573d6000803e3d6000fd5b505050506040513d60208110156112f857600080fd5b5051905081806113055750805b92505050611312565b5060015b919050565b6001546001600160a01b031681565b3360006113328261125a565b905080611379576040805162461bcd60e51b815260206004820152601060248201526f139bdd081a5b881dda1a5d195b1a5cdd60821b604482015290519081900360640190fd5b60006006858154811061138857fe5b600091825260208083208884526007825260408085206001600160a01b03891686529092529220600690910290910191506113c28661099e565b80541561144e5760006113fa82600101546108b1670de0b6b3a76400006108ab876003015487600001546116f390919063ffffffff16565b9050801561144c5761140c8582611814565b6040805182815290516001600160a01b038716917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b505b841561152657815461146b906001600160a01b03168530886119b6565b600061148a6103e86108ab8560050154896116f390919063ffffffff16565b83546002546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101859052905193945091169163a9059cbb916044808201926020929091908290030181600087803b1580156114e457600080fd5b505af11580156114f8573d6000803e3d6000fd5b505050506040513d602081101561150e57600080fd5b505081546115229082906108b19089611753565b8255505b6003820154815461154491670de0b6b3a7640000916108ab916116f3565b600182015560408051868152905187916001600160a01b038716917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a3505050505050565b61159a3361125a565b156115e3576040805162461bcd60e51b8152602060048201526014602482015273105b1c9958591e481a5b881dda1a5d195b1a5cdd60621b604482015290519081900360640190fd5b60035460025460048054604080516323b872dd60e01b815233938101939093526001600160a01b03938416602484015260448301919091525191909216916323b872dd9160648083019260209291908290030181600087803b15801561164857600080fd5b505af115801561165c573d6000803e3d6000fd5b505050506040513d602081101561167257600080fd5b5050336000908152600b60205260409020805460ff19166001179055565b60045481565b6000828211156116ed576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008261170257506000610714565b8282028284828161170f57fe5b041461174c5760405162461bcd60e51b8152600401808060200182810382526021815260200180611d006021913960400191505060405180910390fd5b9392505050565b60008282018381101561174c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000808211611803576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161180c57fe5b049392505050565b600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561185f57600080fd5b505afa158015611873573d6000803e3d6000fd5b505050506040513d602081101561188957600080fd5b505190508015610d4f57808211156118b7576005546118b2906001600160a01b031684836118ca565b610d4f565b600554610d4f906001600160a01b031684845b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610d4f908490611a16565b60065460005b81811015610d4f57826001600160a01b03166006828154811061194157fe5b60009182526020909120600690910201546001600160a01b031614156119ae576040805162461bcd60e51b815260206004820152601f60248201527f536c766d47656e65736973506f6f6c3a206578697374696e6720706f6f6c3f00604482015290519081900360640190fd5b600101611922565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611a10908590611a16565b50505050565b6060611a6b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ac79092919063ffffffff16565b805190915015610d4f57808060200190516020811015611a8a57600080fd5b5051610d4f5760405162461bcd60e51b815260040180806020018281038252602a815260200180611d4c602a913960400191505060405180910390fd5b6060611ad68484600085611ade565b949350505050565b606082471015611b1f5760405162461bcd60e51b8152600401808060200182810382526026815260200180611cda6026913960400191505060405180910390fd5b611b2885611c2f565b611b79576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310611bb85780518252601f199092019160209182019101611b99565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611c1a576040519150601f19603f3d011682016040523d82523d6000602084013e611c1f565b606091505b50915091506111cf828286611c35565b3b151590565b60608315611c4457508161174c565b825115611c545782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611c9e578181015183820152602001611c86565b50505050905090810190601f168015611ccb5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77536c766d47656e65736973506f6f6c3a2063616c6c6572206973206e6f7420746865206f70657261746f725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d6ea5433bca27f977e7e711cb7974ac5b88dd90119b521d6c9257c20f55870da64736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000007cbcfd88c952a1f5eaa954945ebc7ed8f1015ec00000000000000000000000000000000000000000000000000000000063289200000000000000000000000000e09902fa1d358dc67cd429b27de43df112564ad700000000000000000000000000e2b7b6f51223c3a985644642843d6f5a16c6df
-----Decoded View---------------
Arg [0] : _slvm (address): 0x7CBCFd88C952a1f5EAa954945EBC7ED8f1015ec0
Arg [1] : _poolStartTime (uint256): 1663603200
Arg [2] : _node (address): 0xE09902fa1d358dC67cD429B27De43df112564Ad7
Arg [3] : _feeAddress (address): 0x00E2b7B6F51223c3a985644642843D6f5a16c6DF
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000007cbcfd88c952a1f5eaa954945ebc7ed8f1015ec0
Arg [1] : 0000000000000000000000000000000000000000000000000000000063289200
Arg [2] : 000000000000000000000000e09902fa1d358dc67cd429b27de43df112564ad7
Arg [3] : 00000000000000000000000000e2b7b6f51223c3a985644642843d6f5a16c6df
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.