Contract Overview
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Latest 1 internal transaction
Parent Txn Hash | Block | From | To | Value | |||
---|---|---|---|---|---|---|---|
0xe585a69ccf5f386726217e0147a30fdef5e4a042ae204adae2c85a26c85550c2 | 31460696 | 404 days 10 hrs ago | FDoge Finance: 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:
GenesisRewardPool
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "../interfaces/IERC20.sol"; import "../lib/SafeERC20.sol"; import "../lib/SafeMath.sol"; /*$$$$$_ $$$$$___ __$$$___ __$$$$__ $$$$$$$_ ____ $$$$$$$_ $$$$_ $$___$$_ __$$$___ $$___$$_ __$$$$_ $$$$$$$_ $$______ $$__$$__ _$$_$$__ _$$__$$_ $$______ ____ $$______ _$$__ $$$__$$_ _$$_$$__ $$$__$$_ _$$____ $$______ $$$$$___ $$___$$_ $$___$$_ $$______ $$$$$___ ____ $$$$$___ _$$__ $$$$_$$_ $$___$$_ $$$$_$$_ $$_____ $$$$$___ $$______ $$___$$_ $$___$$_ $$__$$$_ $$______ ____ $$______ _$$__ $$_$$$$_ $$$$$$$_ $$_$$$$_ $$_____ $$______ $$______ $$__$$__ _$$_$$__ _$$__$$_ $$______ _$$_ $$______ _$$__ $$__$$$_ $$___$$_ $$__$$$_ _$$____ $$______ $$______ $$$$$___ __$$$___ __$$$$__ $$$$$$$_ _$$_ $$______ $$$$_ $$___$$_ $$___$$_ $$___$$_ __$$$$_ $$$$$$$_*/ // Note that this pool has no minter key of TOMB (rewards). // Instead, the governance will call TOMB distributeReward method and send reward to this pool at the beginning. contract GenesisRewardPool { using SafeMath for uint256; using SafeERC20 for IERC20; // governance address public operator; // 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. TOMB to distribute. uint256 lastRewardTime; // Last time that TOMB distribution occurs. uint256 accTombPerShare; // Accumulated TOMB per share, times 1e18. See below. bool isStarted; // if lastRewardBlock has passed } IERC20 public tomb; // 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 TOMB mining starts. uint256 public poolStartTime; // The time when TOMB mining ends. uint256 public poolEndTime; // MAINNET uint256 public tombPerSecond = 0.12731 ether; // 11000 TOMB / (24h * 60min * 60s = 86400) uint256 public runningTime = 86400; // 1 days uint256 public constant TOTAL_REWARDS = 11000 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 _tomb, uint256 _poolStartTime) public { require(block.timestamp < _poolStartTime, "late"); if (_tomb != address(0)) tomb = IERC20(_tomb); poolStartTime = _poolStartTime; poolEndTime = poolStartTime + runningTime; operator = msg.sender; } modifier onlyOperator() { require(operator == msg.sender, "TombGenesisPool: caller is not the operator"); _; } function checkPoolDuplicate(IERC20 _token) internal view { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { require(poolInfo[pid].token != _token, "TombGenesisPool: 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 ) 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, accTombPerShare: 0, isStarted: _isStarted})); if (_isStarted) { totalAllocPoint = totalAllocPoint.add(_allocPoint); } } // Update the given pool's TOMB allocation point. Can only be called by the owner. 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; } // 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(tombPerSecond); return poolEndTime.sub(_fromTime).mul(tombPerSecond); } else { if (_toTime <= poolStartTime) return 0; if (_fromTime <= poolStartTime) return _toTime.sub(poolStartTime).mul(tombPerSecond); return _toTime.sub(_fromTime).mul(tombPerSecond); } } // View function to see pending TOMB on frontend. function pendingTOMB(uint256 _pid, address _user) external view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accTombPerShare = pool.accTombPerShare; uint256 tokenSupply = pool.token.balanceOf(address(this)); if (block.timestamp > pool.lastRewardTime && tokenSupply != 0) { uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp); uint256 _tombReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint); accTombPerShare = accTombPerShare.add(_tombReward.mul(1e18).div(tokenSupply)); } return user.amount.mul(accTombPerShare).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 _tombReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint); pool.accTombPerShare = pool.accTombPerShare.add(_tombReward.mul(1e18).div(tokenSupply)); } pool.lastRewardTime = block.timestamp; } // Deposit tokens. function deposit(uint256 _pid, uint256 _amount) public { address _sender = msg.sender; PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_sender]; updatePool(_pid); if (user.amount > 0) { uint256 _pending = user.amount.mul(pool.accTombPerShare).div(1e18).sub(user.rewardDebt); if (_pending > 0) { safeTombTransfer(_sender, _pending); emit RewardPaid(_sender, _pending); } } if (_amount > 0) { pool.token.safeTransferFrom(_sender, address(this), _amount); user.amount = user.amount.add(_amount); } user.rewardDebt = user.amount.mul(pool.accTombPerShare).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.accTombPerShare).div(1e18).sub(user.rewardDebt); if (_pending > 0) { safeTombTransfer(_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.accTombPerShare).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 TOMB transfer function, just in case if rounding error causes pool to not have enough TOMBs. function safeTombTransfer(address _to, uint256 _amount) internal { uint256 _tombBalance = tomb.balanceOf(address(this)); if (_tombBalance > 0) { if (_amount > _tombBalance) { tomb.safeTransfer(_to, _tombBalance); } else { tomb.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 (TOMB or lps) if less than 90 days after pool ends require(_token != tomb, "tomb"); 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); } }
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; /** * @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); }
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.6.0; import "../interfaces/IERC20.sol"; import "../lib/SafeMath.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 ERC20;` 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)); } 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. // A Solidity high level call has three parts: // 1. The target address is checked to verify it contains contract code // 2. The call itself is made, and success asserted // 3. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line max-line-length require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "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"); } } }
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.6.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.6.2; /** * @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) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @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"); } }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_tomb","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":"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"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_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":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingTOMB","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":"accTombPerShare","type":"uint256"},{"internalType":"bool","name":"isStarted","type":"bool"}],"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"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tomb","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tombPerSecond","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":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405260006004556701c44bc53e5ae0006007556201518060085534801561002857600080fd5b5060405161190a38038061190a8339818101604052604081101561004b57600080fd5b508051602090910151428111610091576040805162461bcd60e51b815260206004808301919091526024820152636c61746560e01b604482015290519081900360640190fd5b6001600160a01b038216156100bc57600180546001600160a01b0319166001600160a01b0384161790555b60058190556008540160065550600080546001600160a01b03191633179055611820806100ea6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c80635f96dc11116100d8578063943f013d1161008c578063b3ab15fb11610066578063b3ab15fb146103c4578063c040f23a146103ea578063e2bbb158146103f257610177565b8063943f013d1461037a57806396805e5414610382578063a2b123a8146103bc57610177565b80636e271dd5116100bd5780636e271dd51461030157806389744bb41461030957806393f1a40b1461033557610177565b80635f96dc11146102f1578063630b5ba1146102f957610177565b8063441a3e701161012f5780635312ea8e116101145780635312ea8e1461027a57806354575af414610297578063570ca735146102cd57610177565b8063441a3e701461023a57806351eb05a61461025d57610177565b806317caf6f11161016057806317caf6f1146101ea5780631ab06ee5146101f2578063231f0c6a1461021757610177565b806309cf60911461017c5780631526fe2714610196575b600080fd5b610184610415565b60408051918252519081900360200190f35b6101b3600480360360208110156101ac57600080fd5b5035610423565b604080516001600160a01b039096168652602086019490945284840192909252606084015215156080830152519081900360a00190f35b61018461046e565b6102156004803603604081101561020857600080fd5b5080359060200135610474565b005b6101846004803603604081101561022d57600080fd5b5080359060200135610522565b6102156004803603604081101561025057600080fd5b50803590602001356105e7565b6102156004803603602081101561027357600080fd5b50356107af565b6102156004803603602081101561029057600080fd5b503561090d565b610215600480360360608110156102ad57600080fd5b506001600160a01b038135811691602081013591604090910135166109a9565b6102d5610b1d565b604080516001600160a01b039092168252519081900360200190f35b610184610b2c565b610215610b32565b610184610b55565b6101846004803603604081101561031f57600080fd5b50803590602001356001600160a01b0316610b5b565b6103616004803603604081101561034b57600080fd5b50803590602001356001600160a01b0316610cb7565b6040805192835260208301919091528051918290030190f35b610184610cdb565b6102156004803603608081101561039857600080fd5b508035906001600160a01b0360208201351690604081013515159060600135610ce1565b610184610eeb565b610215600480360360208110156103da57600080fd5b50356001600160a01b0316610ef1565b6102d5610f69565b6102156004803603604081101561040857600080fd5b5080359060200135610f78565b6902544faa778090e0000081565b6002818154811061043057fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b0390931694509092909160ff1685565b60045481565b6000546001600160a01b031633146104bd5760405162461bcd60e51b815260040180806020018281038252602b8152602001806117c0602b913960400191505060405180910390fd5b6104c5610b32565b6000600283815481106104d457fe5b60009182526020909120600590910201600481015490915060ff161561051b576105178261051183600101546004546110e890919063ffffffff16565b90611131565b6004555b6001015550565b6000818310610533575060006105e1565b600654821061059b57600654831061054d575060006105e1565b6005548311610580576105796007546105736005546006546110e890919063ffffffff16565b9061118b565b90506105e1565b610579600754610573856006546110e890919063ffffffff16565b60055482116105ac575060006105e1565b60055483116105d057610579600754610573600554856110e890919063ffffffff16565b6007546105799061057384866110e8565b92915050565b60003390506000600284815481106105fb57fe5b600091825260208083208784526003825260408085206001600160a01b03881686529092529220805460059092029092019250841115610682576040805162461bcd60e51b815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b61068b856107af565b60006106c882600101546106c2670de0b6b3a76400006106bc8760030154876000015461118b90919063ffffffff16565b906111e4565b906110e8565b9050801561071a576106da8482611226565b6040805182815290516001600160a01b038616917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b841561074457815461072c90866110e8565b82558254610744906001600160a01b031685876112dc565b6003830154825461076291670de0b6b3a7640000916106bc9161118b565b600183015560408051868152905187916001600160a01b038716917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a3505050505050565b6000600282815481106107be57fe5b90600052602060002090600502019050806002015442116107df575061090a565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561082957600080fd5b505afa15801561083d573d6000803e3d6000fd5b505050506040513d602081101561085357600080fd5b505190508061086957504260029091015561090a565b600482015460ff1661089a576004808301805460ff19166001908117909155830154905461089691611131565b6004555b600454156109015760006108b2836002015442610522565b905060006108d36004546106bc86600101548561118b90919063ffffffff16565b90506108f96108ee846106bc84670de0b6b3a764000061118b565b600386015490611131565b600385015550505b50426002909101555b50565b60006002828154811061091c57fe5b60009182526020808320858452600382526040808520338087529352842080548582556001820195909555600590930201805490945091929161096c916001600160a01b039190911690836112dc565b604080518281529051859133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a350505050565b6000546001600160a01b031633146109f25760405162461bcd60e51b815260040180806020018281038252602b8152602001806117c0602b913960400191505060405180910390fd5b6006546276a70001421015610b04576001546001600160a01b0384811691161415610a66576040805162461bcd60e51b8152602060048083019190915260248201527f746f6d6200000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60025460005b81811015610b0157600060028281548110610a8357fe5b6000918252602090912060059091020180549091506001600160a01b0387811691161415610af8576040805162461bcd60e51b815260206004820152600a60248201527f706f6f6c2e746f6b656e00000000000000000000000000000000000000000000604482015290519081900360640190fd5b50600101610a6c565b50505b610b186001600160a01b03841682846112dc565b505050565b6000546001600160a01b031681565b60055481565b60025460005b81811015610b5157610b49816107af565b600101610b38565b5050565b60065481565b60008060028481548110610b6b57fe5b60009182526020808320878452600380835260408086206001600160a01b03808b168852908552818720600590960290930191820154825482516370a0823160e01b815230600482015292519398509596909590949316926370a0823192602480840193829003018186803b158015610be357600080fd5b505afa158015610bf7573d6000803e3d6000fd5b505050506040513d6020811015610c0d57600080fd5b5051600285015490915042118015610c2457508015155b15610c81576000610c39856002015442610522565b90506000610c5a6004546106bc88600101548561118b90919063ffffffff16565b9050610c7c610c75846106bc84670de0b6b3a764000061118b565b8590611131565b935050505b610cac83600101546106c2670de0b6b3a76400006106bc86886000015461118b90919063ffffffff16565b979650505050505050565b60036020908152600092835260408084209091529082529020805460019091015482565b60085481565b6000546001600160a01b03163314610d2a5760405162461bcd60e51b815260040180806020018281038252602b8152602001806117c0602b913960400191505060405180910390fd5b610d338361135c565b8115610d4157610d41610b32565b600554421015610d6d5780610d595750600554610d68565b600554811015610d6857506005545b610d81565b801580610d7957504281105b15610d815750425b600060055482111580610d945750428211155b6040805160a0810182526001600160a01b03878116825260208201898152928201868152600060608401818152861580156080870190815260028054600181018255945295517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace6005909402938401805473ffffffffffffffffffffffffffffffffffffffff1916919096161790945594517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf82015590517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad082015592517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad184015590517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2909201805460ff191692151592909217909155909150610ee457600454610ee09086611131565b6004555b5050505050565b60075481565b6000546001600160a01b03163314610f3a5760405162461bcd60e51b815260040180806020018281038252602b8152602001806117c0602b913960400191505060405180910390fd5b6000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b6000339050600060028481548110610f8c57fe5b600091825260208083208784526003825260408085206001600160a01b0388168652909252922060059091029091019150610fc6856107af565b805415611052576000610ffe82600101546106c2670de0b6b3a76400006106bc8760030154876000015461118b90919063ffffffff16565b90508015611050576110108482611226565b6040805182815290516001600160a01b038616917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b505b831561107e57815461106f906001600160a01b03168430876113f6565b805461107b9085611131565b81555b6003820154815461109c91670de0b6b3a7640000916106bc9161118b565b600182015560408051858152905186916001600160a01b038616917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a35050505050565b600061112a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611484565b9392505050565b60008282018381101561112a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008261119a575060006105e1565b828202828482816111a757fe5b041461112a5760405162461bcd60e51b81526004018080602001828103825260218152602001806117756021913960400191505060405180910390fd5b600061112a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061151b565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561127157600080fd5b505afa158015611285573d6000803e3d6000fd5b505050506040513d602081101561129b57600080fd5b505190508015610b1857808211156112c9576001546112c4906001600160a01b031684836112dc565b610b18565b600154610b18906001600160a01b031684845b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610b18908490611580565b60025460005b81811015610b1857826001600160a01b03166002828154811061138157fe5b60009182526020909120600590910201546001600160a01b031614156113ee576040805162461bcd60e51b815260206004820152601f60248201527f546f6d6247656e65736973506f6f6c3a206578697374696e6720706f6f6c3f00604482015290519081900360640190fd5b600101611362565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261147e908590611580565b50505050565b600081848411156115135760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156114d85781810151838201526020016114c0565b50505050905090810190601f1680156115055780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000818361156a5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156114d85781810151838201526020016114c0565b50600083858161157657fe5b0495945050505050565b611592826001600160a01b0316611738565b6115e3576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106116215780518252601f199092019160209182019101611602565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611683576040519150601f19603f3d011682016040523d82523d6000602084013e611688565b606091505b5091509150816116df576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b80511561147e578080602001905160208110156116fb57600080fd5b505161147e5760405162461bcd60e51b815260040180806020018281038252602a815260200180611796602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061176c57508115155b94935050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564546f6d6247656e65736973506f6f6c3a2063616c6c6572206973206e6f7420746865206f70657261746f72a2646970667358221220164b0ba4a6dacd2dec5194fc73b4ba7d297eb8e546e28a3dd365f08bef0d0a1d64736f6c634300060c0033000000000000000000000000eb0a2d1b1a33d95204af5d00f65fd9e3494198780000000000000000000000000000000000000000000000000000000062125770
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000eb0a2d1b1a33d95204af5d00f65fd9e3494198780000000000000000000000000000000000000000000000000000000062125770
-----Decoded View---------------
Arg [0] : _tomb (address): 0xeb0a2d1b1a33d95204af5d00f65fd9e349419878
Arg [1] : _poolStartTime (uint256): 1645369200
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000eb0a2d1b1a33d95204af5d00f65fd9e349419878
Arg [1] : 0000000000000000000000000000000000000000000000000000000062125770
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.