Contract Overview
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Latest 1 internal transaction
Parent Txn Hash | Block | From | To | Value | |||
---|---|---|---|---|---|---|---|
0xeec6036140c5e54382ef6039c20dc36f3fc23dee76c1d6f0d9eb13d3547dfffe | 44159379 | 179 days 11 hrs ago | Obol: Deployer | Contract Creation | 0 FTM |
[ Download CSV Export ]
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 Name:
SmeltRewardPool
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 50 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; // Note that this pool has no minter key of SMELT (rewards). // Instead, the governance will call SMELT distributeReward method and send reward to this pool at the beginning. contract SmeltRewardPool is Ownable, IERC721Receiver, ReentrancyGuard { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public smelt; IERC20 public stater; // governance address public operator; // Info of each user. struct UserInfo { uint256 amount; // How many tokens the user has provided. uint256 rewardDebt; // Deposit debt. See explanation below. } // Info of each ERC20 / ERC721 pool. struct PoolInfo { IERC20 token; // Address of token contract. IERC721 nft; // Address of nft contract. uint256 depositFee; // deposit fee uint256 allocPoint; // How many allocation points assigned to this pool. SMELT to distribute. uint256 lastRewardTime; // Last time that SMELT distribution occurs. uint256 accSmeltPerShare; // Accumulated SMELT per share, times 1e18. See below. bool isStarted; // if lastRewardBlock has passed bool isNftPool; // help w staking to nft vs erc20 tokens } struct UserNfts { uint256[] ids; mapping(uint256 => uint256) indexStaked; uint256 totalNftsStaked; } // Info of each ERC20 pool. PoolInfo[] public poolInfo; // Info of each user that stakes tokens. mapping(uint256 => mapping(address => UserInfo)) public userInfo; // map of ERC721 Token stakers. mapping(uint256 => address) public stakerAddress; mapping(address => UserNfts) public stakedTokens; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 public totalAllocPoint = 0; // The time when SMELT mining starts. uint256 public poolStartTime; // The time when SMELT mining ends. uint256 public poolEndTime; address public protocolFundAddress; uint256 public smeltPerSecond = 0.00115 ether; // 80000 SMELT / (800d * 24h * 60min * 60s) ~ 100 SMELT / day uint256 public runningTime = 800 days; uint256 public constant TOTAL_REWARDS = 80000 ether; event Deposit(address indexed user, uint256 indexed pid, uint256 amount); event Withdraw(address indexed user, uint256 indexed pid, uint256 amount); event StakedNft(address indexed user, uint256 indexed pid, uint256 _tokenIds); event UnstakedNft(address indexed user, uint256 indexed pid, uint256 _tokenIds); event RewardPaid(address indexed user, uint256 amount); event TeamMemberAllocationAdjusted(address indexed member, uint256 amount); event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount); event StringFailure(string stringFailure); function onERC721Received(address , address , uint256 , bytes memory) external pure override returns (bytes4){ return bytes4(keccak256("onERC721Received(address,address,uint256,bytes)")); } constructor( address _smelt, address _stater, address _protocolFund, uint256 _poolStartTime ) { require(block.timestamp < _poolStartTime, "late"); if (_smelt != address(0)) smelt = IERC20(_smelt); if (_stater != address(0)) stater = IERC20(_stater); if (_protocolFund != address(0)) protocolFundAddress = _protocolFund; poolStartTime = _poolStartTime; poolEndTime = poolStartTime + runningTime; operator = msg.sender; } modifier onlyOperator() { require(operator == msg.sender, "SmeltRewardPool: not operator"); _; } //=============================================== public and external functions ================================= // Returns ERC721 tokens staked by user function getStakedNfts(address _user) public view returns (uint256[] memory) { return stakedTokens[_user].ids; } // 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(smeltPerSecond); return poolEndTime.sub(_fromTime).mul(smeltPerSecond); } else { if (_toTime <= poolStartTime) return 0; if (_fromTime <= poolStartTime) return _toTime.sub(poolStartTime).mul(smeltPerSecond); return _toTime.sub(_fromTime).mul(smeltPerSecond); } } // View function to see pending SMELT on frontend. function pendingSMELT(uint256 _pid, address _user) external view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accSmeltPerShare = pool.accSmeltPerShare; uint256 tokenSupply = pool.token.balanceOf(address(this)); if (block.timestamp > pool.lastRewardTime && tokenSupply != 0) { uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp); uint256 _multiplyHelper = _generatedReward.mul(pool.allocPoint); // intermidiate var to avoid multiply and division calc errors uint256 _smeltReward = _multiplyHelper.div(totalAllocPoint); accSmeltPerShare = accSmeltPerShare.add(_smeltReward.mul(1e18).div(tokenSupply)); } return user.amount.mul(accSmeltPerShare).div(1e18).sub(user.rewardDebt); } // View function to see pending SMELT on frontend. function pendingSMELTNft(uint256 _pid, address _user) external view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accSmeltPerShare = pool.accSmeltPerShare; uint256 nftSupply = pool.nft.balanceOf(address(this)); if (block.timestamp > pool.lastRewardTime && nftSupply != 0) { uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp); uint256 _multiplyHelper = _generatedReward.mul(pool.allocPoint); // intermidiate var to avoid multiply and division calc errors uint256 _smeltReward = _multiplyHelper.div(totalAllocPoint); accSmeltPerShare = accSmeltPerShare.add(_smeltReward.mul(1e18).div(nftSupply)); } return user.amount.mul(accSmeltPerShare).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; } if (pool.isNftPool == true){ uint256 nftSupply = pool.nft.balanceOf(address(this)); if (nftSupply == 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 multiplyHelper = _generatedReward.mul(pool.allocPoint); uint256 _smeltReward = multiplyHelper.div(totalAllocPoint); pool.accSmeltPerShare = pool.accSmeltPerShare.add(_smeltReward.mul(1e18).div(nftSupply)); } pool.lastRewardTime = block.timestamp; } else { 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 multiplyHelper = _generatedReward.mul(pool.allocPoint); uint256 _smeltReward = multiplyHelper.div(totalAllocPoint); pool.accSmeltPerShare = pool.accSmeltPerShare.add(_smeltReward.mul(1e18).div(tokenSupply)); } pool.lastRewardTime = block.timestamp; } } // ============ Deposit & Withdraw ERC20 and ERC721 functionality function deposit(uint256 _pid, uint256 _amount) public nonReentrant { address _sender = msg.sender; PoolInfo storage pool = poolInfo[_pid]; require (pool.isNftPool == false , "Pool not for ERC20"); //==================make sure this is not nft pool UserInfo storage user = userInfo[_pid][_sender]; updatePool(_pid); if (user.amount > 0) { // transfer rewards to user if any pending rewards uint256 _pending = user.amount.mul(pool.accSmeltPerShare).div(1e18).sub(user.rewardDebt); if (_pending > 0) { // send pending reward to user, if rewards accumulating in _pending safeSmeltTransfer(_sender, _pending); emit RewardPaid(_sender, _pending); } } if (_amount > 0) { pool.token.safeTransferFrom(_sender, address(this), _amount); uint256 depositDebt = _amount.mul(pool.depositFee).div(10000); user.amount = user.amount.add(_amount.sub(depositDebt)); pool.token.safeTransfer(protocolFundAddress, depositDebt); } user.rewardDebt = user.amount.mul(pool.accSmeltPerShare).div(1e18); emit Deposit(_sender, _pid, _amount); } function StakeNft(uint256 _pid, uint256[] calldata _tokenIds) external nonReentrant { address _sender = msg.sender; PoolInfo storage pool = poolInfo[_pid]; require (pool.isNftPool == true , "Pool not for ERC721"); //==============make sure we stake nfts in pools that support nft staking UserInfo storage user = userInfo[_pid][_sender]; updatePool(_pid); if (user.amount > 0) { // transfer rewards to user if any pending rewards uint256 _pending = user.amount.mul(pool.accSmeltPerShare).div(1e18).sub(user.rewardDebt); if (_pending > 0) { // send pending reward to user, if rewards accumulating in _pending safeSmeltTransfer(_sender, _pending); emit RewardPaid(_sender, _pending); } } if (_tokenIds.length > 0) { for (uint256 i = 0; i < _tokenIds.length; ++i) { require( pool.nft.ownerOf(_tokenIds[i]) == _sender,"not owner of token"); pool.nft.safeTransferFrom(_sender, address(this), _tokenIds[i]); stakerAddress[_tokenIds[i]] = _sender; stakedTokens[_sender].ids.push(_tokenIds[i]); stakedTokens[_sender].indexStaked[_tokenIds[i]] = stakedTokens[_sender].ids.length - 1 ; user.amount = user.amount + 1; emit StakedNft(_sender, _pid, _tokenIds[i]); } } user.rewardDebt = user.amount.mul(pool.accSmeltPerShare).div(1e18); } // Withdraw ERC721 tokens. function UnstakeNft(uint256 _pid, uint256[] calldata _tokenIds) external nonReentrant { address _sender = msg.sender; PoolInfo storage pool = poolInfo[_pid]; require (pool.isNftPool == true, "not NFT pool"); //==================make sure this is not nft pool UserInfo storage user = userInfo[_pid][_sender]; updatePool(_pid); require(user.amount >= _tokenIds.length, "withdraw: not good"); uint256 _pending = user.amount.mul(pool.accSmeltPerShare).div(1e18).sub(user.rewardDebt); if (_pending > 0) { safeSmeltTransfer(_sender, _pending); emit RewardPaid(_sender, _pending); } if (_tokenIds.length > 0) { for (uint256 i = 0; i < _tokenIds.length; ++i) { require( stakerAddress[_tokenIds[i]] == _sender,"not deposited by you"); unStakeNftsFromStatArray(_sender,stakedTokens[_sender].indexStaked[_tokenIds[i]]); stakerAddress[_tokenIds[i]] = address(0); user.amount = user.amount - 1; pool.nft.safeTransferFrom(address(this), _sender, _tokenIds[i]); emit UnstakedNft(_sender, _pid, _tokenIds[i]); } } user.rewardDebt = user.amount.mul(pool.accSmeltPerShare).div(1e18); } // Withdraw tokens. function withdraw(uint256 _pid, uint256 _amount) public nonReentrant { address _sender = msg.sender; PoolInfo storage pool = poolInfo[_pid]; require (pool.isNftPool == false , "pool for nfts"); //==================make sure this is not nft pool UserInfo storage user = userInfo[_pid][_sender]; require(user.amount >= _amount, "withdraw: not good"); updatePool(_pid); uint256 _pending = user.amount.mul(pool.accSmeltPerShare).div(1e18).sub(user.rewardDebt); if (_pending > 0) { safeSmeltTransfer(_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.accSmeltPerShare).div(1e18); emit Withdraw(_sender, _pid, _amount); } function claimRewardNft(uint256 _pid) public nonReentrant { address _sender = msg.sender; PoolInfo storage pool = poolInfo[_pid]; require (pool.isNftPool == true, "pool for ERC20"); UserInfo storage user = userInfo[_pid][_sender]; updatePool(_pid); uint256 _pending = user.amount.mul(pool.accSmeltPerShare).div(1e18).sub(user.rewardDebt); if (_pending > 0) { safeSmeltTransfer(_sender, _pending); emit RewardPaid(_sender, _pending); } user.rewardDebt = user.amount.mul(pool.accSmeltPerShare).div(1e18); } // 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); } // ============================================================= internal functions =========================== function checkPoolDuplicate(IERC20 _token) internal view { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { require(poolInfo[pid].token != _token, "SmeltRewardPool: existing pool?"); } } function nftCheckPoolDuplicate(IERC721 _nft) internal view { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { require(poolInfo[pid].nft != _nft, "SmeltRewardPool: existing pool?"); } } function unStakeNftsFromStatArray(address _sender,uint _index) internal { require(_index < stakedTokens[_sender].ids.length); uint256 length = stakedTokens[_sender].ids.length; stakedTokens[_sender].indexStaked[stakedTokens[_sender].ids[length-1]] = _index; stakedTokens[_sender].ids[_index] = stakedTokens[_sender].ids[length-1]; stakedTokens[_sender].ids.pop(); } // Safe SMELT transfer function, in case if rounding error causes pool to not have enough SMELTs. function safeSmeltTransfer(address _to, uint256 _amount) internal { uint256 _smeltBalance = smelt.balanceOf(address(this)); if (_smeltBalance > 0) { if (_amount > _smeltBalance) { smelt.safeTransfer(_to, _smeltBalance); } else { smelt.safeTransfer(_to, _amount); } } } //===================================== ONLY OPERATOR FUNCTIONS ======================================================= // Add a new pool. Can only be called by operator. // @ _allocPoint - amount of smelt this pool will emit // @ _token - token that can be deposited into this pool function add( bool _isNftPool, IERC20 _token, IERC721 _nft, uint256 _depFee, uint256 _allocPoint, bool _withUpdate, uint256 _lastRewardTime ) public onlyOperator { if (_isNftPool) { _token = IERC20(0x0000000000000000000000000000000000000000); nftCheckPoolDuplicate(_nft); } else if (!_isNftPool) { _nft = IERC721(0x0000000000000000000000000000000000000000); 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({ isNftPool : _isNftPool, token : _token, nft : _nft, depositFee: _depFee, allocPoint : _allocPoint, lastRewardTime : _lastRewardTime, accSmeltPerShare : 0, isStarted : _isStarted })); if (_isStarted) { totalAllocPoint = totalAllocPoint.add(_allocPoint); } } // Cannot change deposit fee to insure everyone pays same dep fees!!!! // Update the given pool's SMELT allocation point. Can only be called by operator. function set(uint256 _pid, uint256 _allocPoint) public onlyOperator { massUpdatePools(); PoolInfo storage pool = poolInfo[_pid]; if (pool.isStarted) { totalAllocPoint = totalAllocPoint.sub(pool.allocPoint).add( _allocPoint ); } pool.allocPoint = _allocPoint; } function setTeamToken (address _teamToken) public onlyOperator { require (_teamToken != address(0), "cant be 0 address"); stater = IERC20(_teamToken); } function setOperator(address _operator) external onlyOperator { operator = _operator; } function governanceAllocationAdjustment( uint256 _pid, uint256 _amount, address _teamMember ) external onlyOperator { PoolInfo storage pool = poolInfo[_pid]; require (pool.token == stater , "team pool only"); //==================make sure this is TEAM POOL ONLY UserInfo storage user = userInfo[_pid][_teamMember]; updatePool(_pid); uint256 _pending = user.amount.mul(pool.accSmeltPerShare).div(1e18).sub(user.rewardDebt); if (_pending > 0) { safeSmeltTransfer(protocolFundAddress, _pending); emit RewardPaid(protocolFundAddress, _pending); } if (_amount < user.amount){ uint256 cut = user.amount.sub(_amount); stater.safeTransfer(protocolFundAddress, cut); } else if(_amount > user.amount) { uint256 bonus = _amount.sub(user.amount); stater.safeTransferFrom(protocolFundAddress, address(this), bonus); } user.amount = _amount; user.rewardDebt = user.amount.mul(pool.accSmeltPerShare).div(1e18); emit TeamMemberAllocationAdjusted(_teamMember, _amount); } function governanceRecoverUnsupported( IERC20 _token, uint256 _amount, address _to ) external onlyOperator { require(address(_token) == address(smelt), "reward token only"); _token.safeTransfer(_to, _amount); } }
// 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 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @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 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' 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) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _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 require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// 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 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// 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 (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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"); (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"); (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"); (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"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal 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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// 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": 50 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_smelt","type":"address"},{"internalType":"address","name":"_stater","type":"address"},{"internalType":"address","name":"_protocolFund","type":"address"},{"internalType":"uint256","name":"_poolStartTime","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":"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":"_tokenIds","type":"uint256"}],"name":"StakedNft","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"stringFailure","type":"string"}],"name":"StringFailure","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"member","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TeamMemberAllocationAdjusted","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":"_tokenIds","type":"uint256"}],"name":"UnstakedNft","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":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"StakeNft","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"TOTAL_REWARDS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"UnstakeNft","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isNftPool","type":"bool"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"contract IERC721","name":"_nft","type":"address"},{"internalType":"uint256","name":"_depFee","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"},{"internalType":"uint256","name":"_lastRewardTime","type":"uint256"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"claimRewardNft","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":"_fromTime","type":"uint256"},{"internalType":"uint256","name":"_toTime","type":"uint256"}],"name":"getGeneratedReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getStakedNfts","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_teamMember","type":"address"}],"name":"governanceAllocationAdjustment","outputs":[],"stateMutability":"nonpayable","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":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"pendingSMELT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingSMELTNft","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":"contract IERC721","name":"nft","type":"address"},{"internalType":"uint256","name":"depositFee","type":"uint256"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardTime","type":"uint256"},{"internalType":"uint256","name":"accSmeltPerShare","type":"uint256"},{"internalType":"bool","name":"isStarted","type":"bool"},{"internalType":"bool","name":"isNftPool","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolFundAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","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"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_teamToken","type":"address"}],"name":"setTeamToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"smelt","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"smeltPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakedTokens","outputs":[{"internalType":"uint256","name":"totalNftsStaked","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stater","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_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
60806040526000600955660415eb3d7de000600d5563041eb000600e553480156200002957600080fd5b5060405162002f9d38038062002f9d8339810160408190526200004c91620001c3565b620000573362000156565b600180554281116200009e5760405162461bcd60e51b815260040162000095906020808252600490820152636c61746560e01b604082015260600190565b60405180910390fd5b6001600160a01b03841615620000ca57600280546001600160a01b0319166001600160a01b0386161790555b6001600160a01b03831615620000f657600380546001600160a01b0319166001600160a01b0385161790555b6001600160a01b038216156200012257600c80546001600160a01b0319166001600160a01b0384161790555b600a819055600e5462000136908262000215565b600b555050600480546001600160a01b03191633179055506200023c9050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620001be57600080fd5b919050565b60008060008060808587031215620001da57600080fd5b620001e585620001a6565b9350620001f560208601620001a6565b92506200020560408601620001a6565b6060959095015193969295505050565b600082198211156200023757634e487b7160e01b600052601160045260246000fd5b500190565b612d51806200024c6000396000f3fe608060405234801561001057600080fd5b50600436106101dc5760003560e01c806373aea40811610105578063b3ab15fb1161009d578063b3ab15fb1461049a578063c4cdbf68146104ad578063ccc61a26146104c0578063d2e2a184146104d3578063dce2bb4c146104e6578063e2bbb158146104ef578063f2fde38b14610502578063fd58865514610515578063feece0ab1461052857600080fd5b806373aea408146103aa578063795ca0de146103bd5780638da5cb5b146103d057806393f1a40b146103d8578063940670451461041f578063943f013d14610448578063a01b931814610451578063a5b39cfb14610464578063b2ef11261461048757600080fd5b80634500173d116101785780634500173d1461032957806351eb05a61461033c5780635312ea8e1461034f57806354575af414610362578063570ca735146103755780635f96dc1114610388578063630b5ba1146103915780636e271dd514610399578063715018a6146103a257600080fd5b8063018cb042146101e157806309cf6091146101f657806309d34d6e1461021a578063150b7a021461023a5780631526fe271461028a57806317caf6f1146102e75780631ab06ee5146102f0578063231f0c6a14610303578063441a3e7014610316575b600080fd5b6101f46101ef3660046126d3565b610548565b005b6102076910f0cf064dd59200000081565b6040519081526020015b60405180910390f35b60035461022d906001600160a01b031681565b60405161021191906126ec565b61027161024836600461272b565b7f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f949350505050565b6040516001600160e01b03199091168152602001610211565b61029d6102983660046126d3565b6106d0565b604080516001600160a01b03998a168152989097166020890152958701949094526060860192909252608085015260a0840152151560c0830152151560e082015261010001610211565b61020760095481565b6101f46102fe36600461280b565b610738565b61020761031136600461280b565b6107cd565b6101f461032436600461280b565b610892565b600c5461022d906001600160a01b031681565b6101f461034a3660046126d3565b610a8a565b6101f461035d3660046126d3565b610c55565b6101f461037036600461282d565b610cf7565b60045461022d906001600160a01b031681565b610207600a5481565b6101f4610d8b565b610207600b5481565b6101f4610db2565b6102076103b836600461286f565b610ded565b60025461022d906001600160a01b031681565b61022d610f74565b61040a6103e636600461286f565b60066020908152600092835260408084209091529082529020805460019091015482565b60408051928352602083019190915201610211565b61022d61042d3660046126d3565b6007602052600090815260409020546001600160a01b031681565b610207600e5481565b6101f461045f36600461289f565b610f83565b61020761047236600461291e565b60086020526000908152604090206002015481565b6101f461049536600461293b565b61134e565b6101f46104a836600461291e565b611581565b6102076104bb36600461286f565b6115cd565b6101f46104ce36600461289f565b611646565b6101f46104e136600461291e565b611ab7565b610207600d5481565b6101f46104fd36600461280b565b611b4d565b6101f461051036600461291e565b611d7a565b6101f4610523366004612977565b611e1a565b61053b61053636600461291e565b612032565b60405161021191906129f2565b600260015414156105745760405162461bcd60e51b815260040161056b90612a36565b60405180910390fd5b60026001556005805433916000918490811061059257610592612a6d565b906000526020600020906007020190508060060160019054906101000a900460ff16151560011515146105f85760405162461bcd60e51b815260206004820152600e60248201526d0706f6f6c20666f722045524332360941b604482015260640161056b565b60008381526006602090815260408083206001600160a01b0386168452909152902061062384610a8a565b6000610660826001015461065a670de0b6b3a76400006106548760050154876000015461209e90919063ffffffff16565b906120b1565b906120bd565b905080156106a45761067284826120c9565b836001600160a01b0316600080516020612cfc8339815191528260405161069b91815260200190565b60405180910390a25b600583015482546106c291670de0b6b3a7640000916106549161209e565b600192830155508055505050565b600581815481106106e057600080fd5b600091825260209091206007909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919060ff8082169161010090041688565b6004546001600160a01b031633146107625760405162461bcd60e51b815260040161056b90612a83565b61076a610d8b565b60006005838154811061077f5761077f612a6d565b60009182526020909120600790910201600681015490915060ff16156107c6576107c2826107bc83600301546009546120bd90919063ffffffff16565b90612188565b6009555b6003015550565b60008183106107de5750600061088c565b600b54821061084657600b5483106107f85750600061088c565b600a54831161082b57610824600d5461081e600a54600b546120bd90919063ffffffff16565b9061209e565b905061088c565b610824600d5461081e85600b546120bd90919063ffffffff16565b600a5482116108575750600061088c565b600a54831161087b57610824600d5461081e600a54856120bd90919063ffffffff16565b600d546108249061081e84866120bd565b92915050565b600260015414156108b55760405162461bcd60e51b815260040161056b90612a36565b6002600155600580543391600091859081106108d3576108d3612a6d565b600091825260209091206007909102016006810154909150610100900460ff16156109305760405162461bcd60e51b815260206004820152600d60248201526c706f6f6c20666f72206e66747360981b604482015260640161056b565b60008481526006602090815260408083206001600160a01b0386168452909152902080548411156109735760405162461bcd60e51b815260040161056b90612aba565b61097c85610a8a565b60006109ad826001015461065a670de0b6b3a76400006106548760050154876000015461209e90919063ffffffff16565b905080156109f1576109bf84826120c9565b836001600160a01b0316600080516020612cfc833981519152826040516109e891815260200190565b60405180910390a25b8415610a1b578154610a0390866120bd565b82558254610a1b906001600160a01b03168587612194565b60058301548254610a3991670de0b6b3a7640000916106549161209e565b600183015560405185815286906001600160a01b038616907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a350506001805550505050565b600060058281548110610a9f57610a9f612a6d565b9060005260206000209060070201905080600401544211610abe575050565b600681015460ff61010090910416151560011415610c215760018101546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610b099030906004016126ec565b60206040518083038186803b158015610b2157600080fd5b505afa158015610b35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b599190612ae6565b905080610b6b57504260049091015550565b600682015460ff16610b9b5760068201805460ff191660011790556003820154600954610b9791612188565b6009555b60095415610c16576000610bb38360040154426107cd565b90506000610bce84600301548361209e90919063ffffffff16565b90506000610be7600954836120b190919063ffffffff16565b9050610c0d610c028561065484670de0b6b3a764000061209e565b600587015490612188565b60058601555050505b504260048201555050565b80546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610b099030906004016126ec565b5050565b600060058281548110610c6a57610c6a612a6d565b600091825260208083208584526006825260408085203380875293528420805485825560018201959095556007909302018054909450919291610cba916001600160a01b03919091169083612194565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a350505050565b6004546001600160a01b03163314610d215760405162461bcd60e51b815260040161056b90612a83565b6002546001600160a01b03848116911614610d725760405162461bcd60e51b815260206004820152601160248201527072657761726420746f6b656e206f6e6c7960781b604482015260640161056b565b610d866001600160a01b0384168284612194565b505050565b60055460005b81811015610c5157610da281610a8a565b610dab81612b15565b9050610d91565b33610dbb610f74565b6001600160a01b031614610de15760405162461bcd60e51b815260040161056b90612b30565b610deb60006121f7565b565b60008060058481548110610e0357610e03612a6d565b600091825260208083208784526006825260408085206001600160a01b03808a16875293528085206005600790950290920193840154600185015491516370a0823160e01b815294965091949193919216906370a0823190610e699030906004016126ec565b60206040518083038186803b158015610e8157600080fd5b505afa158015610e95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb99190612ae6565b9050836004015442118015610ecd57508015155b15610f3e576000610ee28560040154426107cd565b90506000610efd86600301548361209e90919063ffffffff16565b90506000610f16600954836120b190919063ffffffff16565b9050610f38610f318561065484670de0b6b3a764000061209e565b8690612188565b94505050505b610f69836001015461065a670de0b6b3a764000061065486886000015461209e90919063ffffffff16565b979650505050505050565b6000546001600160a01b031690565b60026001541415610fa65760405162461bcd60e51b815260040161056b90612a36565b600260015560058054339160009186908110610fc457610fc4612a6d565b906000526020600020906007020190508060060160019054906101000a900460ff16151560011515146110285760405162461bcd60e51b815260206004820152600c60248201526b1b9bdd08139195081c1bdbdb60a21b604482015260640161056b565b60008581526006602090815260408083206001600160a01b0386168452909152902061105386610a8a565b80548411156110745760405162461bcd60e51b815260040161056b90612aba565b60006110a5826001015461065a670de0b6b3a76400006106548760050154876000015461209e90919063ffffffff16565b905080156110e9576110b784826120c9565b836001600160a01b0316600080516020612cfc833981519152826040516110e091815260200190565b60405180910390a25b84156113205760005b8581101561131e57846001600160a01b03166007600089898581811061111a5761111a612a6d565b60209081029290920135835250810191909152604001600020546001600160a01b0316146111815760405162461bcd60e51b81526020600482015260146024820152736e6f74206465706f736974656420627920796f7560601b604482015260640161056b565b6001600160a01b03851660009081526008602052604081206111d0918791600101908a8a868181106111b5576111b5612a6d565b90506020020135815260200190815260200160002054612247565b6000600760008989858181106111e8576111e8612a6d565b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600183600001546112329190612b65565b835560018401546001600160a01b03166342842e0e30878a8a8681811061125b5761125b612a6d565b905060200201356040518463ffffffff1660e01b815260040161128093929190612b7c565b600060405180830381600087803b15801561129a57600080fd5b505af11580156112ae573d6000803e3d6000fd5b5050505087856001600160a01b03167f46390c98202d07ccea0f7e324248fc8132ca146857642537eb71fb0708982e788989858181106112f0576112f0612a6d565b9050602002013560405161130691815260200190565b60405180910390a361131781612b15565b90506110f2565b505b6005830154825461133e91670de0b6b3a7640000916106549161209e565b6001928301555080555050505050565b6004546001600160a01b031633146113785760405162461bcd60e51b815260040161056b90612a83565b60006005848154811061138d5761138d612a6d565b6000918252602090912060035460079092020180549092506001600160a01b039081169116146113f05760405162461bcd60e51b815260206004820152600e60248201526d7465616d20706f6f6c206f6e6c7960901b604482015260640161056b565b60008481526006602090815260408083206001600160a01b0386168452909152902061141b85610a8a565b600061144c826001015461065a670de0b6b3a76400006106548760050154876000015461209e90919063ffffffff16565b9050801561149b57600c5461146a906001600160a01b0316826120c9565b600c546040518281526001600160a01b0390911690600080516020612cfc8339815191529060200160405180910390a25b81548510156114d95781546000906114b390876120bd565b600c546003549192506114d3916001600160a01b03908116911683612194565b50611515565b81548511156115155781546000906114f29087906120bd565b600c54600354919250611513916001600160a01b0390811691163084612380565b505b848255600583015461153690670de0b6b3a76400009061065490889061209e565b60018301556040518581526001600160a01b038516907f6db053d439fb609663f6c71cadd15ab9085c2c0b01ef1490335143035f46abf39060200160405180910390a2505050505050565b6004546001600160a01b031633146115ab5760405162461bcd60e51b815260040161056b90612a83565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b600080600584815481106115e3576115e3612a6d565b600091825260208083208784526006825260408085206001600160a01b03808a16875293528085206005600790950290920193840154845491516370a0823160e01b815294965091949193919216906370a0823190610e699030906004016126ec565b600260015414156116695760405162461bcd60e51b815260040161056b90612a36565b60026001556005805433916000918690811061168757611687612a6d565b906000526020600020906007020190508060060160019054906101000a900460ff16151560011515146116f25760405162461bcd60e51b8152602060048201526013602482015272506f6f6c206e6f7420666f722045524337323160681b604482015260640161056b565b60008581526006602090815260408083206001600160a01b0386168452909152902061171d86610a8a565b80541561179b576000611755826001015461065a670de0b6b3a76400006106548760050154876000015461209e90919063ffffffff16565b905080156117995761176784826120c9565b836001600160a01b0316600080516020612cfc8339815191528260405161179091815260200190565b60405180910390a25b505b8315611a8a5760005b84811015611a885760018301546001600160a01b038086169116636352211e8888858181106117d5576117d5612a6d565b905060200201356040518263ffffffff1660e01b81526004016117fa91815260200190565b60206040518083038186803b15801561181257600080fd5b505afa158015611826573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061184a9190612ba0565b6001600160a01b0316146118955760405162461bcd60e51b81526020600482015260126024820152713737ba1037bbb732b91037b3103a37b5b2b760711b604482015260640161056b565b60018301546001600160a01b03166342842e0e85308989868181106118bc576118bc612a6d565b905060200201356040518463ffffffff1660e01b81526004016118e193929190612b7c565b600060405180830381600087803b1580156118fb57600080fd5b505af115801561190f573d6000803e3d6000fd5b50505050836007600088888581811061192a5761192a612a6d565b60209081029290920135835250818101929092526040908101600090812080546001600160a01b0319166001600160a01b0395861617905592871683526008909152902086868381811061198057611980612a6d565b83546001818101865560009586526020808720938102959095013592909101919091556001600160a01b03881684526008909252506040909120546119c59190612b65565b6001600160a01b0385166000908152600860205260408120600101908888858181106119f3576119f3612a6d565b60209081029290920135835250810191909152604001600020558154611a1a906001612bbd565b8255866001600160a01b0385167fcd48031a9eff1fe010946746d05ca7a709a50e4340e6f4808f0cd70871f58d84888885818110611a5a57611a5a612a6d565b90506020020135604051611a7091815260200190565b60405180910390a3611a8181612b15565b90506117a4565b505b60058201548154611aa891670de0b6b3a7640000916106549161209e565b60019182015580555050505050565b6004546001600160a01b03163314611ae15760405162461bcd60e51b815260040161056b90612a83565b6001600160a01b038116611b2b5760405162461bcd60e51b815260206004820152601160248201527063616e742062652030206164647265737360781b604482015260640161056b565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60026001541415611b705760405162461bcd60e51b815260040161056b90612a36565b600260015560058054339160009185908110611b8e57611b8e612a6d565b600091825260209091206007909102016006810154909150610100900460ff1615611bf05760405162461bcd60e51b81526020600482015260126024820152710506f6f6c206e6f7420666f722045524332360741b604482015260640161056b565b60008481526006602090815260408083206001600160a01b03861684529091529020611c1b85610a8a565b805415611c99576000611c53826001015461065a670de0b6b3a76400006106548760050154876000015461209e90919063ffffffff16565b90508015611c9757611c6584826120c9565b836001600160a01b0316600080516020612cfc83398151915282604051611c8e91815260200190565b60405180910390a25b505b8315611d0c578154611cb6906001600160a01b0316843087612380565b6000611cd561271061065485600201548861209e90919063ffffffff16565b9050611cec611ce486836120bd565b835490612188565b8255600c548354611d0a916001600160a01b03918216911683612194565b505b60058201548154611d2a91670de0b6b3a7640000916106549161209e565b600182015560405184815285906001600160a01b038516907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a3505060018055505050565b33611d83610f74565b6001600160a01b031614611da95760405162461bcd60e51b815260040161056b90612b30565b6001600160a01b038116611e0e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161056b565b611e17816121f7565b50565b6004546001600160a01b03163314611e445760405162461bcd60e51b815260040161056b90612a83565b8615611e5c5760009550611e57856123a7565b611e6e565b86611e6e5760009450611e6e8661241d565b8115611e7c57611e7c610d8b565b600a54421015611ea85780611e945750600a54611ebc565b600a54811015611ea35750600a545b611ebc565b801580611eb457504281105b15611ebc5750425b6000600a5482111580611ecf5750428211155b90506005604051806101000160405280896001600160a01b03168152602001886001600160a01b031681526020018781526020018681526020018481526020016000815260200183151581526020018a1515815250908060018154018082558091505060019003906000526020600020906007020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020155606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff02191690831515021790555060e08201518160060160016101000a81548160ff02191690831515021790555050508015612028576009546120249085612188565b6009555b5050505050505050565b6001600160a01b03811660009081526008602090815260409182902080548351818402810184019094528084526060939283018282801561209257602002820191906000526020600020905b81548152602001906001019080831161207e575b50505050509050919050565b60006120aa8284612bd5565b9392505050565b60006120aa8284612bf4565b60006120aa8284612b65565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a08231906120fa9030906004016126ec565b60206040518083038186803b15801561211257600080fd5b505afa158015612126573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061214a9190612ae6565b90508015610d86578082111561217157600254610d86906001600160a01b03168483612194565b600254610d86906001600160a01b03168484612194565b60006120aa8284612bbd565b6040516001600160a01b038316602482015260448101829052610d8690849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612490565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038216600090815260086020526040902054811061226b57600080fd5b6001600160a01b03821660009081526008602052604081208054918391600180820192919061229a9086612b65565b815481106122aa576122aa612a6d565b600091825260208083209091015483528281019390935260409182018120939093556001600160a01b0386168352600890915290206122ea600183612b65565b815481106122fa576122fa612a6d565b60009182526020808320909101546001600160a01b03861683526008909152604090912080548490811061233057612330612a6d565b60009182526020808320909101929092556001600160a01b038516815260089091526040902080548061236557612365612c16565b60019003818190600052602060002001600090559055505050565b6123a1846323b872dd60e01b8585856040516024016121c093929190612b7c565b50505050565b60055460005b81811015610d8657826001600160a01b0316600582815481106123d2576123d2612a6d565b60009182526020909120600160079092020101546001600160a01b0316141561240d5760405162461bcd60e51b815260040161056b90612c2c565b61241681612b15565b90506123ad565b60055460005b81811015610d8657826001600160a01b03166005828154811061244857612448612a6d565b60009182526020909120600790910201546001600160a01b031614156124805760405162461bcd60e51b815260040161056b90612c2c565b61248981612b15565b9050612423565b60006124e5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166125629092919063ffffffff16565b805190915015610d8657808060200190518101906125039190612c63565b610d865760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161056b565b60606125718484600085612579565b949350505050565b6060824710156125da5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161056b565b6001600160a01b0385163b6126315760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161056b565b600080866001600160a01b0316858760405161264d9190612cac565b60006040518083038185875af1925050503d806000811461268a576040519150601f19603f3d011682016040523d82523d6000602084013e61268f565b606091505b5091509150610f69828286606083156126a95750816120aa565b8251156126b95782518084602001fd5b8160405162461bcd60e51b815260040161056b9190612cc8565b6000602082840312156126e557600080fd5b5035919050565b6001600160a01b0391909116815260200190565b6001600160a01b0381168114611e1757600080fd5b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561274157600080fd5b843561274c81612700565b9350602085013561275c81612700565b925060408501359150606085013567ffffffffffffffff8082111561278057600080fd5b818701915087601f83011261279457600080fd5b8135818111156127a6576127a6612715565b604051601f8201601f19908116603f011681019083821181831017156127ce576127ce612715565b816040528281528a60208487010111156127e757600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561281e57600080fd5b50508035926020909101359150565b60008060006060848603121561284257600080fd5b833561284d81612700565b925060208401359150604084013561286481612700565b809150509250925092565b6000806040838503121561288257600080fd5b82359150602083013561289481612700565b809150509250929050565b6000806000604084860312156128b457600080fd5b83359250602084013567ffffffffffffffff808211156128d357600080fd5b818601915086601f8301126128e757600080fd5b8135818111156128f657600080fd5b8760208260051b850101111561290b57600080fd5b6020830194508093505050509250925092565b60006020828403121561293057600080fd5b81356120aa81612700565b60008060006060848603121561295057600080fd5b8335925060208401359150604084013561286481612700565b8015158114611e1757600080fd5b600080600080600080600060e0888a03121561299257600080fd5b873561299d81612969565b965060208801356129ad81612700565b955060408801356129bd81612700565b9450606088013593506080880135925060a08801356129db81612969565b8092505060c0880135905092959891949750929550565b6020808252825182820181905260009190848201906040850190845b81811015612a2a57835183529284019291840191600101612a0e565b50909695505050505050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6020808252601d908201527f536d656c74526577617264506f6f6c3a206e6f74206f70657261746f72000000604082015260600190565b6020808252601290820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604082015260600190565b600060208284031215612af857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415612b2957612b29612aff565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600082821015612b7757612b77612aff565b500390565b6001600160a01b039384168152919092166020820152604081019190915260600190565b600060208284031215612bb257600080fd5b81516120aa81612700565b60008219821115612bd057612bd0612aff565b500190565b6000816000190483118215151615612bef57612bef612aff565b500290565b600082612c1157634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603160045260246000fd5b6020808252601f908201527f536d656c74526577617264506f6f6c3a206578697374696e6720706f6f6c3f00604082015260600190565b600060208284031215612c7557600080fd5b81516120aa81612969565b60005b83811015612c9b578181015183820152602001612c83565b838111156123a15750506000910152565b60008251612cbe818460208701612c80565b9190910192915050565b6020815260008251806020840152612ce7816040850160208701612c80565b601f01601f1916919091016040019291505056fee2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486a2646970667358221220d0c2f2234ebfba9076e0fa6e676d173f4a95c1e6b051438d69bf5228279582fe64736f6c63430008090033000000000000000000000000141faa507855e56396eadbd25ec82656755cd61e0000000000000000000000005706d4d6694d22a11d98678db9d461eadbee7e410000000000000000000000000a10dad90b9c6fb8b87bff3857a4b012890c53a50000000000000000000000000000000000000000000000000000000062ebd0e0
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000141faa507855e56396eadbd25ec82656755cd61e0000000000000000000000005706d4d6694d22a11d98678db9d461eadbee7e410000000000000000000000000a10dad90b9c6fb8b87bff3857a4b012890c53a50000000000000000000000000000000000000000000000000000000062ebd0e0
-----Decoded View---------------
Arg [0] : _smelt (address): 0x141faa507855e56396eadbd25ec82656755cd61e
Arg [1] : _stater (address): 0x5706d4d6694d22a11d98678db9d461eadbee7e41
Arg [2] : _protocolFund (address): 0x0a10dad90b9c6fb8b87bff3857a4b012890c53a5
Arg [3] : _poolStartTime (uint256): 1659621600
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000141faa507855e56396eadbd25ec82656755cd61e
Arg [1] : 0000000000000000000000005706d4d6694d22a11d98678db9d461eadbee7e41
Arg [2] : 0000000000000000000000000a10dad90b9c6fb8b87bff3857a4b012890c53a5
Arg [3] : 0000000000000000000000000000000000000000000000000000000062ebd0e0
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Validator ID :
0 FTM
Amount Staked
0
Amount Delegated
0
Staking Total
0
Staking Start Epoch
0
Staking Start Time
0
Proof of Importance
0
Origination Score
0
Validation Score
0
Active
0
Online
0
Downtime
0 s
Address | Amount | claimed Rewards | Created On Epoch | Created On |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.