Overview
Max Total Supply
0
Holders
0
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
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:
Staking
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; pragma experimental ABIEncoderV2; import "./interfaces/IERC677Receiver.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Multicall.sol"; contract Staking is Ownable, Multicall, IERC677Receiver { using SafeERC20 for IERC20; /// @notice Info of each Staking user. /// `amount` LP token amount the user has provided. /// `rewardDebt` The amount of token entitled to the user. struct UserInfo { uint256 amount; int256 rewardDebt; } /// @notice Info of each Staking pool. /// `allocPoint` The amount of allocation points assigned to the pool. /// Also known as the amount of token to distribute per block. struct PoolInfo { uint128 accRewardPerShare; uint64 lastRewardBlock; uint64 allocPoint; } /// @notice Address of token contract. IERC20 public rewardToken; address public rewardOwner; /// @notice Info of each Staking pool. PoolInfo[] public poolInfo; /// @notice Address of the LP token for each Staking pool. IERC20[] public lpToken; /// @notice Info of each user that stakes LP tokens. mapping (uint256 => mapping (address => UserInfo)) public userInfo; /// @dev Total allocation points. Must be the sum of all allocation points in all pools. uint256 public totalAllocPoint; uint256 public rewardPerBlock = 0; uint256 private constant ACC_PRECISION = 1e12; event Deposit(address indexed user, uint256 indexed pid, uint256 amount, address indexed to); event Withdraw(address indexed user, uint256 indexed pid, uint256 amount, address indexed to); event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount, address indexed to); event Harvest(address indexed user, uint256 indexed pid, uint256 amount); event LogPoolAddition(uint256 indexed pid, uint256 allocPoint, IERC20 indexed lpToken); event LogSetPool(uint256 indexed pid, uint256 allocPoint); event LogUpdatePool(uint256 indexed pid, uint64 lastRewardBlock, uint256 lpSupply, uint256 accRewardPerShare); /// @param _rewardToken The reward token contract address. constructor(IERC20 _rewardToken, address _rewardOwner, uint256 _rewardPerBlock) public Ownable() { rewardToken = _rewardToken; rewardOwner = _rewardOwner; rewardPerBlock = _rewardPerBlock; } /// @notice Sets the reward token. function setRewardToken(IERC20 _rewardToken) public onlyOwner { rewardToken = _rewardToken; } /// @notice Sets the reward owner. function setRewardOwner(address _rewardOwner) public onlyOwner { rewardOwner = _rewardOwner; } /// @notice Adjusts the reward per block. function setRewardsPerBlock(uint256 _rewardPerBlock) public onlyOwner { rewardPerBlock = _rewardPerBlock; } /// @notice Returns the number of Staking pools. function poolLength() public view returns (uint256 pools) { pools = poolInfo.length; } /// @notice Add a new LP to the pool. Can only be called by the owner. /// DO NOT add the same LP token more than once. Rewards will be messed up if you do. /// @param allocPoint AP of the new pool. /// @param _lpToken Address of the LP ERC-20 token. function add(uint256 allocPoint, IERC20 _lpToken) public onlyOwner { uint256 lastRewardBlock = block.number; totalAllocPoint = totalAllocPoint + allocPoint; lpToken.push(_lpToken); poolInfo.push(PoolInfo({ allocPoint: uint64(allocPoint), lastRewardBlock: uint64(lastRewardBlock), accRewardPerShare: 0 })); emit LogPoolAddition(lpToken.length - 1, allocPoint, _lpToken); } /// @notice Update the given pool's token allocation point. Can only be called by the owner. /// @param _pid The index of the pool. See `poolInfo`. /// @param _allocPoint New AP of the pool. function set(uint256 _pid, uint256 _allocPoint) public onlyOwner { totalAllocPoint = (totalAllocPoint - poolInfo[_pid].allocPoint) + _allocPoint; poolInfo[_pid].allocPoint = uint64(_allocPoint); emit LogSetPool(_pid, _allocPoint); } /// @notice View function to see pending token reward on frontend. /// @param _pid The index of the pool. See `poolInfo`. /// @param _user Address of user. /// @return pending token reward for a given user. function pendingRewards(uint256 _pid, address _user) external view returns (uint256 pending) { PoolInfo memory pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accRewardPerShare = pool.accRewardPerShare; uint256 lpSupply = lpToken[_pid].balanceOf(address(this)); if (block.number > pool.lastRewardBlock && lpSupply != 0) { uint256 blocks = block.number - pool.lastRewardBlock; uint256 reward = (blocks * rewardPerBlock * pool.allocPoint) / totalAllocPoint; accRewardPerShare = accRewardPerShare + ((reward * ACC_PRECISION) / lpSupply); } pending = uint256(int256((user.amount * accRewardPerShare) / ACC_PRECISION) - user.rewardDebt); } /// @notice Update reward variables for all pools. Be careful of gas spending! /// @param pids Pool IDs of all to be updated. Make sure to update all active pools. function massUpdatePools(uint256[] calldata pids) external { uint256 len = pids.length; for (uint256 i = 0; i < len; ++i) { updatePool(pids[i]); } } /// @notice Update reward variables of the given pool. /// @param pid The index of the pool. See `poolInfo`. /// @return pool Returns the pool that was updated. function updatePool(uint256 pid) public returns (PoolInfo memory pool) { pool = poolInfo[pid]; if (block.number > pool.lastRewardBlock) { uint256 lpSupply = lpToken[pid].balanceOf(address(this)); if (lpSupply > 0) { uint256 blocks = block.number - pool.lastRewardBlock; uint256 reward = (blocks * rewardPerBlock * pool.allocPoint) / totalAllocPoint; pool.accRewardPerShare = pool.accRewardPerShare + uint128((reward * ACC_PRECISION) / lpSupply); } pool.lastRewardBlock = uint64(block.number); poolInfo[pid] = pool; emit LogUpdatePool(pid, pool.lastRewardBlock, lpSupply, pool.accRewardPerShare); } } /// @notice Deposit LP tokens to Staking for reward token allocation. /// @param pid The index of the pool. See `poolInfo`. /// @param amount LP token amount to deposit. /// @param to The receiver of `amount` deposit benefit. function deposit(uint256 pid, uint256 amount, address to) public { PoolInfo memory pool = updatePool(pid); UserInfo storage user = userInfo[pid][to]; // Effects user.amount = user.amount + amount; user.rewardDebt = user.rewardDebt + int256((amount * pool.accRewardPerShare) / ACC_PRECISION); // Interactions lpToken[pid].safeTransferFrom(msg.sender, address(this), amount); emit Deposit(msg.sender, pid, amount, to); } /// @notice Withdraw LP tokens from Staking. /// @param pid The index of the pool. See `poolInfo`. /// @param amount LP token amount to withdraw. /// @param to Receiver of the LP tokens. function withdraw(uint256 pid, uint256 amount, address to) public { PoolInfo memory pool = updatePool(pid); UserInfo storage user = userInfo[pid][msg.sender]; // Effects user.rewardDebt = user.rewardDebt - int256((amount * pool.accRewardPerShare) / ACC_PRECISION); user.amount = user.amount - amount; // Interactions lpToken[pid].safeTransfer(to, amount); emit Withdraw(msg.sender, pid, amount, to); } /// @notice Harvest proceeds for transaction sender to `to`. /// @param pid The index of the pool. See `poolInfo`. /// @param to Receiver of token rewards. function harvest(uint256 pid, address to) public { PoolInfo memory pool = updatePool(pid); UserInfo storage user = userInfo[pid][msg.sender]; int256 accumulatedReward = int256((user.amount * pool.accRewardPerShare) / ACC_PRECISION); uint256 _pendingReward = uint256(accumulatedReward - user.rewardDebt); // Effects user.rewardDebt = accumulatedReward; // Interactions if (_pendingReward != 0) { rewardToken.safeTransferFrom(rewardOwner, to, _pendingReward); } emit Harvest(msg.sender, pid, _pendingReward); } /// @notice Withdraw LP tokens from Staking and harvest proceeds for transaction sender to `to`. /// @param pid The index of the pool. See `poolInfo`. /// @param amount LP token amount to withdraw. /// @param to Receiver of the LP tokens and token rewards. function withdrawAndHarvest(uint256 pid, uint256 amount, address to) public { PoolInfo memory pool = updatePool(pid); UserInfo storage user = userInfo[pid][msg.sender]; int256 accumulatedReward = int256((user.amount * pool.accRewardPerShare) / ACC_PRECISION); uint256 _pendingReward = uint256(accumulatedReward - user.rewardDebt); // Effects user.rewardDebt = accumulatedReward - int256((amount * pool.accRewardPerShare) / ACC_PRECISION); user.amount = user.amount - amount; // Interactions rewardToken.safeTransferFrom(rewardOwner, to, _pendingReward); lpToken[pid].safeTransfer(to, amount); emit Withdraw(msg.sender, pid, amount, to); emit Harvest(msg.sender, pid, _pendingReward); } /// @notice Withdraw without caring about rewards. EMERGENCY ONLY. /// @param pid The index of the pool. See `poolInfo`. /// @param to Receiver of the LP tokens. function emergencyWithdraw(uint256 pid, address to) public { UserInfo storage user = userInfo[pid][msg.sender]; uint256 amount = user.amount; user.amount = 0; user.rewardDebt = 0; // Note: transfer can fail or succeed if `amount` is zero. lpToken[pid].safeTransfer(to, amount); emit EmergencyWithdraw(msg.sender, pid, amount, to); } function onTokenTransfer(address to, uint amount, bytes calldata _data) external override { uint pid = 0; require(msg.sender == address(rewardToken), "onTokenTransfer: can only be called by rewardToken"); require(msg.sender == address(lpToken[pid]), "onTokenTransfer: pool 0 needs to be a rewardToken pool"); if (amount > 0) { // Deposit skipping token transfer (as it already was) PoolInfo memory pool = updatePool(pid); UserInfo storage user = userInfo[pid][to]; // Effects user.amount = user.amount + amount; user.rewardDebt = user.rewardDebt + int256((amount * pool.accRewardPerShare) / ACC_PRECISION); emit Deposit(msg.sender, pid, amount, to); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC677Receiver { function onTokenTransfer(address _sender, uint _value, bytes calldata _data) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT 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' // 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) + 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 // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), 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 { emit OwnershipTransferred(_owner, address(0)); _owner = 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"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./Address.sol"; /** * @dev Provides a function to batch together multiple calls in a single external call. * * _Available since v4.1._ */ abstract contract Multicall { /** * @dev Receives and executes a batch of function calls on this contract. */ function multicall(bytes[] calldata data) external returns (bytes[] memory results) { results = new bytes[](data.length); for (uint i = 0; i < data.length; i++) { results[i] = Address.functionDelegateCall(address(this), data[i]); } return results; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC20","name":"_rewardToken","type":"address"},{"internalType":"address","name":"_rewardOwner","type":"address"},{"internalType":"uint256","name":"_rewardPerBlock","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"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"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"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"EmergencyWithdraw","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":"Harvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"},{"indexed":true,"internalType":"contract IERC20","name":"lpToken","type":"address"}],"name":"LogPoolAddition","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"}],"name":"LogSetPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"lastRewardBlock","type":"uint64"},{"indexed":false,"internalType":"uint256","name":"lpSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accRewardPerShare","type":"uint256"}],"name":"LogUpdatePool","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":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lpToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"pids","type":"uint256[]"}],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"onTokenTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingRewards","outputs":[{"internalType":"uint256","name":"pending","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"uint128","name":"accRewardPerShare","type":"uint128"},{"internalType":"uint64","name":"lastRewardBlock","type":"uint64"},{"internalType":"uint64","name":"allocPoint","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"pools","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"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":"_rewardOwner","type":"address"}],"name":"setRewardOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_rewardToken","type":"address"}],"name":"setRewardToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardPerBlock","type":"uint256"}],"name":"setRewardsPerBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"}],"name":"updatePool","outputs":[{"components":[{"internalType":"uint128","name":"accRewardPerShare","type":"uint128"},{"internalType":"uint64","name":"lastRewardBlock","type":"uint64"},{"internalType":"uint64","name":"allocPoint","type":"uint64"}],"internalType":"struct Staking.PoolInfo","name":"pool","type":"tuple"}],"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":"int256","name":"rewardDebt","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawAndHarvest","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405260006007553480156200001657600080fd5b5060405162002094380380620020948339810160408190526200003991620000b3565b600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b039485166001600160a01b031991821617909155600280549390941692169190911790915560075562000113565b600080600060608486031215620000c8578283fd5b8351620000d581620000fa565b6020850151909350620000e881620000fa565b80925050604084015190509250925092565b6001600160a01b03811681146200011057600080fd5b50565b611f7180620001236000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c806385049c39116100de578063a1003b2911610097578063d18df53c11610071578063d18df53c146103de578063d1abb907146103f1578063f2fde38b14610404578063f7c618c11461041757600080fd5b8063a1003b2914610398578063a4c0ed36146103ab578063ac9650d8146103be57600080fd5b806385049c39146102fe5780638ae39cac146103115780638aee81271461031a5780638da5cb5b1461032d5780638dbdbe6d1461033e57806393f1a40b1461035157600080fd5b80632b8bbbe81161014b57806351eb05a61161012557806351eb05a61461026957806357a5b58c146102b8578063715018a6146102cb57806378ed5d1f146102d357600080fd5b80632b8bbbe8146102305780632f940c70146102435780634809b4291461025657600080fd5b8063081e3eda146101935780630ad58d2f146101aa5780631526fe27146101bf57806317caf6f11461020157806318fccc761461020a5780631ab06ee51461021d575b600080fd5b6003545b6040519081526020015b60405180910390f35b6101bd6101b8366004611c19565b61042a565b005b6101d26101cd366004611b99565b610538565b604080516001600160801b0390941684526001600160401b0392831660208501529116908201526060016101a1565b61019760065481565b6101bd610218366004611bc9565b61057d565b6101bd61022b366004611bf8565b610650565b6101bd61023e366004611bc9565b61076f565b6101bd610251366004611bc9565b6108de565b6101bd610264366004611a9b565b610986565b61027c610277366004611b99565b6109d2565b6040805182516001600160801b031681526020808401516001600160401b039081169183019190915292820151909216908201526060016101a1565b6101bd6102c6366004611b3a565b610c81565b6101bd610cd3565b6102e66102e1366004611b99565b610d47565b6040516001600160a01b0390911681526020016101a1565b6002546102e6906001600160a01b031681565b61019760075481565b6101bd610328366004611a9b565b610d71565b6000546001600160a01b03166102e6565b6101bd61034c366004611c19565b610dbd565b61038361035f366004611bc9565b60056020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152016101a1565b6101bd6103a6366004611b99565b610ec4565b6101bd6103b9366004611ab7565b610ef3565b6103d16103cc366004611b3a565b6110da565b6040516101a19190611c99565b6101976103ec366004611bc9565b6111f8565b6101bd6103ff366004611c19565b611409565b6101bd610412366004611a9b565b611589565b6001546102e6906001600160a01b031681565b6000610435846109d2565b6000858152600560209081526040808320338452909152902081519192509064e8d4a510009061046e906001600160801b031686611e2a565b6104789190611e0a565b81600101546104879190611e49565b60018201558054610499908590611e88565b81600001819055506104e38385600488815481106104c757634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03169190611673565b826001600160a01b031685336001600160a01b03167f8166bf25f8a2b7ed3c85049207da4358d16edbed977d23fa2ee6f0dde3ec21328760405161052991815260200190565b60405180910390a45050505050565b6003818154811061054857600080fd5b6000918252602090912001546001600160801b03811691506001600160401b03600160801b8204811691600160c01b90041683565b6000610588836109d2565b6000848152600560209081526040808320338452909152812082518154939450909264e8d4a51000916105c6916001600160801b0390911690611e2a565b6105d09190611e0a565b905060008260010154826105e49190611e49565b600184018390559050801561061157600254600154610611916001600160a01b03918216911687846116db565b604051818152869033907f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae06609249549060200160405180910390a3505050505050565b6000546001600160a01b031633146106835760405162461bcd60e51b815260040161067a90611d0d565b60405180910390fd5b80600383815481106106a557634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546006546106ce91600160c01b90046001600160401b031690611e88565b6106d89190611df2565b600681905550806003838154811061070057634e487b7160e01b600052603260045260246000fd5b9060005260206000200160000160186101000a8154816001600160401b0302191690836001600160401b03160217905550817f942cc7e17a17c164bd977f32ab8c54265d5b9d481e4e352bf874f1e568874e7c8260405161076391815260200190565b60405180910390a25050565b6000546001600160a01b031633146107995760405162461bcd60e51b815260040161067a90611d0d565b60065443906107a9908490611df2565b60065560048054600181810183557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b90910180546001600160a01b0386166001600160a01b031990911681179091556040805160608101825260008082526001600160401b03808816602084019081528a8216948401948552600380548089018255935292517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9092018054935194518216600160c01b026001600160c01b0395909216600160801b026001600160c01b03199094166001600160801b039390931692909217929092179290921617905591546108a69190611e88565b6040518581527f4710feb78e3bce8d2e3ca2989a8eb2f8bcd32a6a55b4535942c180fc4d2e29529060200160405180910390a3505050565b600082815260056020908152604080832033845290915281208054828255600182019290925560048054919291610932918591849190889081106104c757634e487b7160e01b600052603260045260246000fd5b826001600160a01b031684336001600160a01b03167f2cac5e20e1541d836381527a43f651851e302817b71dc8e810284e69210c1c6b8460405161097891815260200190565b60405180910390a450505050565b6000546001600160a01b031633146109b05760405162461bcd60e51b815260040161067a90611d0d565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b604080516060810182526000808252602082018190529181019190915260038281548110610a1057634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805160608101825292909101546001600160801b03811683526001600160401b03600160801b82048116948401859052600160c01b90910416908201529150431115610c7c57600060048381548110610a8657634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015610ad257600080fd5b505afa158015610ae6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0a9190611bb1565b90508015610b9a57600082602001516001600160401b031643610b2d9190611e88565b9050600060065484604001516001600160401b031660075484610b509190611e2a565b610b5a9190611e2a565b610b649190611e0a565b905082610b7664e8d4a5100083611e2a565b610b809190611e0a565b8451610b8c9190611dc7565b6001600160801b0316845250505b6001600160401b03431660208301526003805483919085908110610bce57634e487b7160e01b600052603260045260246000fd5b6000918252602091829020835191018054848401516040958601516001600160401b03908116600160c01b026001600160c01b03928216600160801b026001600160c01b03199094166001600160801b039687161793909317919091169190911790915585830151865185519190921681529283018590521681830152905184917f0fc9545022a542541ad085d091fb09a2ab36fee366a4576ab63714ea907ad353919081900360600190a2505b919050565b8060005b81811015610ccd57610cbc848483818110610cb057634e487b7160e01b600052603260045260246000fd5b905060200201356109d2565b50610cc681611ecb565b9050610c85565b50505050565b6000546001600160a01b03163314610cfd5760405162461bcd60e51b815260040161067a90611d0d565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60048181548110610d5757600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314610d9b5760405162461bcd60e51b815260040161067a90611d0d565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000610dc8846109d2565b60008581526005602090815260408083206001600160a01b03871684529091529020805491925090610dfb908590611df2565b8155815164e8d4a5100090610e19906001600160801b031686611e2a565b610e239190611e0a565b8160010154610e329190611d86565b8160010181905550610e7e33308660048981548110610e6157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03169291906116db565b826001600160a01b031685336001600160a01b03167f02d7e648dd130fc184d383e55bb126ac4c9c60e8f94bf05acdf557ba2d540b478760405161052991815260200190565b6000546001600160a01b03163314610eee5760405162461bcd60e51b815260040161067a90611d0d565b600755565b6001546000906001600160a01b03163314610f6b5760405162461bcd60e51b815260206004820152603260248201527f6f6e546f6b656e5472616e736665723a2063616e206f6e6c792062652063616c6044820152713632b210313c903932bbb0b9322a37b5b2b760711b606482015260840161067a565b60048181548110610f8c57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316331461100e5760405162461bcd60e51b815260206004820152603660248201527f6f6e546f6b656e5472616e736665723a20706f6f6c2030206e6565647320746f6044820152750818994818481c995dd85c99151bdad95b881c1bdbdb60521b606482015260840161067a565b83156110d357600061101f826109d2565b60008381526005602090815260408083206001600160a01b038b1684529091529020805491925090611052908790611df2565b8155815164e8d4a5100090611070906001600160801b031688611e2a565b61107a9190611e0a565b81600101546110899190611d86565b60018201556040518681526001600160a01b03881690849033907f02d7e648dd130fc184d383e55bb126ac4c9c60e8f94bf05acdf557ba2d540b479060200160405180910390a450505b5050505050565b6060816001600160401b0381111561110257634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561113557816020015b60608152602001906001900390816111205790505b50905060005b828110156111f1576111b33085858481811061116757634e487b7160e01b600052603260045260246000fd5b90506020028101906111799190611d42565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061171392505050565b8282815181106111d357634e487b7160e01b600052603260045260246000fd5b602002602001018190525080806111e990611ecb565b91505061113b565b5092915050565b6000806003848154811061121c57634e487b7160e01b600052603260045260246000fd5b600091825260208083206040805160608101825291909301546001600160801b0380821683526001600160401b03600160801b8304811684860152600160c01b90920490911682850152888552600583528385206001600160a01b03891686529092529183208251600480549496509194921692889081106112ae57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156112fa57600080fd5b505afa15801561130e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113329190611bb1565b905083602001516001600160401b03164311801561134f57508015155b156113d157600084602001516001600160401b03164361136f9190611e88565b9050600060065486604001516001600160401b0316600754846113929190611e2a565b61139c9190611e2a565b6113a69190611e0a565b9050826113b864e8d4a5100083611e2a565b6113c29190611e0a565b6113cc9085611df2565b935050505b6001830154835464e8d4a51000906113ea908590611e2a565b6113f49190611e0a565b6113fe9190611e49565b979650505050505050565b6000611414846109d2565b6000858152600560209081526040808320338452909152812082518154939450909264e8d4a5100091611452916001600160801b0390911690611e2a565b61145c9190611e0a565b905060008260010154826114709190611e49565b845190915064e8d4a510009061148f906001600160801b031688611e2a565b6114999190611e0a565b6114a39083611e49565b600184015582546114b5908790611e88565b83556002546001546114d5916001600160a01b03918216911687846116db565b6114fb858760048a815481106104c757634e487b7160e01b600052603260045260246000fd5b846001600160a01b031687336001600160a01b03167f8166bf25f8a2b7ed3c85049207da4358d16edbed977d23fa2ee6f0dde3ec21328960405161154191815260200190565b60405180910390a4604051818152879033907f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae06609249549060200160405180910390a350505050505050565b6000546001600160a01b031633146115b35760405162461bcd60e51b815260040161067a90611d0d565b6001600160a01b0381166116185760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161067a565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6040516001600160a01b0383166024820152604481018290526116d690849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261173f565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610ccd9085906323b872dd60e01b9060840161169f565b60606117388383604051806060016040528060278152602001611f1560279139611811565b9392505050565b6000611794826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118e59092919063ffffffff16565b8051909150156116d657808060200190518101906117b29190611b79565b6116d65760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161067a565b6060833b6118705760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161067a565b600080856001600160a01b03168560405161188b9190611c7d565b600060405180830381855af49150503d80600081146118c6576040519150601f19603f3d011682016040523d82523d6000602084013e6118cb565b606091505b50915091506118db8282866118fc565b9695505050505050565b60606118f48484600085611935565b949350505050565b6060831561190b575081611738565b82511561191b5782518084602001fd5b8160405162461bcd60e51b815260040161067a9190611cfa565b6060824710156119965760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161067a565b843b6119e45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161067a565b600080866001600160a01b03168587604051611a009190611c7d565b60006040518083038185875af1925050503d8060008114611a3d576040519150601f19603f3d011682016040523d82523d6000602084013e611a42565b606091505b50915091506113fe8282866118fc565b60008083601f840112611a63578182fd5b5081356001600160401b03811115611a79578182fd5b6020830191508360208260051b8501011115611a9457600080fd5b9250929050565b600060208284031215611aac578081fd5b813561173881611efc565b60008060008060608587031215611acc578283fd5b8435611ad781611efc565b93506020850135925060408501356001600160401b0380821115611af9578384fd5b818701915087601f830112611b0c578384fd5b813581811115611b1a578485fd5b886020828501011115611b2b578485fd5b95989497505060200194505050565b60008060208385031215611b4c578182fd5b82356001600160401b03811115611b61578283fd5b611b6d85828601611a52565b90969095509350505050565b600060208284031215611b8a578081fd5b81518015158114611738578182fd5b600060208284031215611baa578081fd5b5035919050565b600060208284031215611bc2578081fd5b5051919050565b60008060408385031215611bdb578182fd5b823591506020830135611bed81611efc565b809150509250929050565b60008060408385031215611c0a578182fd5b50508035926020909101359150565b600080600060608486031215611c2d578283fd5b83359250602084013591506040840135611c4681611efc565b809150509250925092565b60008151808452611c69816020860160208601611e9f565b601f01601f19169290920160200192915050565b60008251611c8f818460208701611e9f565b9190910192915050565b6000602080830181845280855180835260408601915060408160051b8701019250838701855b82811015611ced57603f19888603018452611cdb858351611c51565b94509285019290850190600101611cbf565b5092979650505050505050565b6020815260006117386020830184611c51565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000808335601e19843603018112611d58578283fd5b8301803591506001600160401b03821115611d71578283fd5b602001915036819003821315611a9457600080fd5b600080821280156001600160ff1b0384900385131615611da857611da8611ee6565b600160ff1b8390038412811615611dc157611dc1611ee6565b50500190565b60006001600160801b03808316818516808303821115611de957611de9611ee6565b01949350505050565b60008219821115611e0557611e05611ee6565b500190565b600082611e2557634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611e4457611e44611ee6565b500290565b60008083128015600160ff1b850184121615611e6757611e67611ee6565b6001600160ff1b0384018313811615611e8257611e82611ee6565b50500390565b600082821015611e9a57611e9a611ee6565b500390565b60005b83811015611eba578181015183820152602001611ea2565b83811115610ccd5750506000910152565b6000600019821415611edf57611edf611ee6565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114611f1157600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220f63d362b1d736ac0a7cb00b41df7bc74c4edd0568fb397dac8f4a02323358a8864736f6c6343000804003300000000000000000000000069fa0fee221ad11012bab0fdb45d444d3d2ce71c00000000000000000000000069539c1c678dfd26e626f109149b7cebdd5e47680000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061018e5760003560e01c806385049c39116100de578063a1003b2911610097578063d18df53c11610071578063d18df53c146103de578063d1abb907146103f1578063f2fde38b14610404578063f7c618c11461041757600080fd5b8063a1003b2914610398578063a4c0ed36146103ab578063ac9650d8146103be57600080fd5b806385049c39146102fe5780638ae39cac146103115780638aee81271461031a5780638da5cb5b1461032d5780638dbdbe6d1461033e57806393f1a40b1461035157600080fd5b80632b8bbbe81161014b57806351eb05a61161012557806351eb05a61461026957806357a5b58c146102b8578063715018a6146102cb57806378ed5d1f146102d357600080fd5b80632b8bbbe8146102305780632f940c70146102435780634809b4291461025657600080fd5b8063081e3eda146101935780630ad58d2f146101aa5780631526fe27146101bf57806317caf6f11461020157806318fccc761461020a5780631ab06ee51461021d575b600080fd5b6003545b6040519081526020015b60405180910390f35b6101bd6101b8366004611c19565b61042a565b005b6101d26101cd366004611b99565b610538565b604080516001600160801b0390941684526001600160401b0392831660208501529116908201526060016101a1565b61019760065481565b6101bd610218366004611bc9565b61057d565b6101bd61022b366004611bf8565b610650565b6101bd61023e366004611bc9565b61076f565b6101bd610251366004611bc9565b6108de565b6101bd610264366004611a9b565b610986565b61027c610277366004611b99565b6109d2565b6040805182516001600160801b031681526020808401516001600160401b039081169183019190915292820151909216908201526060016101a1565b6101bd6102c6366004611b3a565b610c81565b6101bd610cd3565b6102e66102e1366004611b99565b610d47565b6040516001600160a01b0390911681526020016101a1565b6002546102e6906001600160a01b031681565b61019760075481565b6101bd610328366004611a9b565b610d71565b6000546001600160a01b03166102e6565b6101bd61034c366004611c19565b610dbd565b61038361035f366004611bc9565b60056020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152016101a1565b6101bd6103a6366004611b99565b610ec4565b6101bd6103b9366004611ab7565b610ef3565b6103d16103cc366004611b3a565b6110da565b6040516101a19190611c99565b6101976103ec366004611bc9565b6111f8565b6101bd6103ff366004611c19565b611409565b6101bd610412366004611a9b565b611589565b6001546102e6906001600160a01b031681565b6000610435846109d2565b6000858152600560209081526040808320338452909152902081519192509064e8d4a510009061046e906001600160801b031686611e2a565b6104789190611e0a565b81600101546104879190611e49565b60018201558054610499908590611e88565b81600001819055506104e38385600488815481106104c757634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03169190611673565b826001600160a01b031685336001600160a01b03167f8166bf25f8a2b7ed3c85049207da4358d16edbed977d23fa2ee6f0dde3ec21328760405161052991815260200190565b60405180910390a45050505050565b6003818154811061054857600080fd5b6000918252602090912001546001600160801b03811691506001600160401b03600160801b8204811691600160c01b90041683565b6000610588836109d2565b6000848152600560209081526040808320338452909152812082518154939450909264e8d4a51000916105c6916001600160801b0390911690611e2a565b6105d09190611e0a565b905060008260010154826105e49190611e49565b600184018390559050801561061157600254600154610611916001600160a01b03918216911687846116db565b604051818152869033907f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae06609249549060200160405180910390a3505050505050565b6000546001600160a01b031633146106835760405162461bcd60e51b815260040161067a90611d0d565b60405180910390fd5b80600383815481106106a557634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546006546106ce91600160c01b90046001600160401b031690611e88565b6106d89190611df2565b600681905550806003838154811061070057634e487b7160e01b600052603260045260246000fd5b9060005260206000200160000160186101000a8154816001600160401b0302191690836001600160401b03160217905550817f942cc7e17a17c164bd977f32ab8c54265d5b9d481e4e352bf874f1e568874e7c8260405161076391815260200190565b60405180910390a25050565b6000546001600160a01b031633146107995760405162461bcd60e51b815260040161067a90611d0d565b60065443906107a9908490611df2565b60065560048054600181810183557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b90910180546001600160a01b0386166001600160a01b031990911681179091556040805160608101825260008082526001600160401b03808816602084019081528a8216948401948552600380548089018255935292517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9092018054935194518216600160c01b026001600160c01b0395909216600160801b026001600160c01b03199094166001600160801b039390931692909217929092179290921617905591546108a69190611e88565b6040518581527f4710feb78e3bce8d2e3ca2989a8eb2f8bcd32a6a55b4535942c180fc4d2e29529060200160405180910390a3505050565b600082815260056020908152604080832033845290915281208054828255600182019290925560048054919291610932918591849190889081106104c757634e487b7160e01b600052603260045260246000fd5b826001600160a01b031684336001600160a01b03167f2cac5e20e1541d836381527a43f651851e302817b71dc8e810284e69210c1c6b8460405161097891815260200190565b60405180910390a450505050565b6000546001600160a01b031633146109b05760405162461bcd60e51b815260040161067a90611d0d565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b604080516060810182526000808252602082018190529181019190915260038281548110610a1057634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805160608101825292909101546001600160801b03811683526001600160401b03600160801b82048116948401859052600160c01b90910416908201529150431115610c7c57600060048381548110610a8657634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015610ad257600080fd5b505afa158015610ae6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0a9190611bb1565b90508015610b9a57600082602001516001600160401b031643610b2d9190611e88565b9050600060065484604001516001600160401b031660075484610b509190611e2a565b610b5a9190611e2a565b610b649190611e0a565b905082610b7664e8d4a5100083611e2a565b610b809190611e0a565b8451610b8c9190611dc7565b6001600160801b0316845250505b6001600160401b03431660208301526003805483919085908110610bce57634e487b7160e01b600052603260045260246000fd5b6000918252602091829020835191018054848401516040958601516001600160401b03908116600160c01b026001600160c01b03928216600160801b026001600160c01b03199094166001600160801b039687161793909317919091169190911790915585830151865185519190921681529283018590521681830152905184917f0fc9545022a542541ad085d091fb09a2ab36fee366a4576ab63714ea907ad353919081900360600190a2505b919050565b8060005b81811015610ccd57610cbc848483818110610cb057634e487b7160e01b600052603260045260246000fd5b905060200201356109d2565b50610cc681611ecb565b9050610c85565b50505050565b6000546001600160a01b03163314610cfd5760405162461bcd60e51b815260040161067a90611d0d565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60048181548110610d5757600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314610d9b5760405162461bcd60e51b815260040161067a90611d0d565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000610dc8846109d2565b60008581526005602090815260408083206001600160a01b03871684529091529020805491925090610dfb908590611df2565b8155815164e8d4a5100090610e19906001600160801b031686611e2a565b610e239190611e0a565b8160010154610e329190611d86565b8160010181905550610e7e33308660048981548110610e6157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03169291906116db565b826001600160a01b031685336001600160a01b03167f02d7e648dd130fc184d383e55bb126ac4c9c60e8f94bf05acdf557ba2d540b478760405161052991815260200190565b6000546001600160a01b03163314610eee5760405162461bcd60e51b815260040161067a90611d0d565b600755565b6001546000906001600160a01b03163314610f6b5760405162461bcd60e51b815260206004820152603260248201527f6f6e546f6b656e5472616e736665723a2063616e206f6e6c792062652063616c6044820152713632b210313c903932bbb0b9322a37b5b2b760711b606482015260840161067a565b60048181548110610f8c57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316331461100e5760405162461bcd60e51b815260206004820152603660248201527f6f6e546f6b656e5472616e736665723a20706f6f6c2030206e6565647320746f6044820152750818994818481c995dd85c99151bdad95b881c1bdbdb60521b606482015260840161067a565b83156110d357600061101f826109d2565b60008381526005602090815260408083206001600160a01b038b1684529091529020805491925090611052908790611df2565b8155815164e8d4a5100090611070906001600160801b031688611e2a565b61107a9190611e0a565b81600101546110899190611d86565b60018201556040518681526001600160a01b03881690849033907f02d7e648dd130fc184d383e55bb126ac4c9c60e8f94bf05acdf557ba2d540b479060200160405180910390a450505b5050505050565b6060816001600160401b0381111561110257634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561113557816020015b60608152602001906001900390816111205790505b50905060005b828110156111f1576111b33085858481811061116757634e487b7160e01b600052603260045260246000fd5b90506020028101906111799190611d42565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061171392505050565b8282815181106111d357634e487b7160e01b600052603260045260246000fd5b602002602001018190525080806111e990611ecb565b91505061113b565b5092915050565b6000806003848154811061121c57634e487b7160e01b600052603260045260246000fd5b600091825260208083206040805160608101825291909301546001600160801b0380821683526001600160401b03600160801b8304811684860152600160c01b90920490911682850152888552600583528385206001600160a01b03891686529092529183208251600480549496509194921692889081106112ae57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156112fa57600080fd5b505afa15801561130e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113329190611bb1565b905083602001516001600160401b03164311801561134f57508015155b156113d157600084602001516001600160401b03164361136f9190611e88565b9050600060065486604001516001600160401b0316600754846113929190611e2a565b61139c9190611e2a565b6113a69190611e0a565b9050826113b864e8d4a5100083611e2a565b6113c29190611e0a565b6113cc9085611df2565b935050505b6001830154835464e8d4a51000906113ea908590611e2a565b6113f49190611e0a565b6113fe9190611e49565b979650505050505050565b6000611414846109d2565b6000858152600560209081526040808320338452909152812082518154939450909264e8d4a5100091611452916001600160801b0390911690611e2a565b61145c9190611e0a565b905060008260010154826114709190611e49565b845190915064e8d4a510009061148f906001600160801b031688611e2a565b6114999190611e0a565b6114a39083611e49565b600184015582546114b5908790611e88565b83556002546001546114d5916001600160a01b03918216911687846116db565b6114fb858760048a815481106104c757634e487b7160e01b600052603260045260246000fd5b846001600160a01b031687336001600160a01b03167f8166bf25f8a2b7ed3c85049207da4358d16edbed977d23fa2ee6f0dde3ec21328960405161154191815260200190565b60405180910390a4604051818152879033907f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae06609249549060200160405180910390a350505050505050565b6000546001600160a01b031633146115b35760405162461bcd60e51b815260040161067a90611d0d565b6001600160a01b0381166116185760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161067a565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6040516001600160a01b0383166024820152604481018290526116d690849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261173f565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610ccd9085906323b872dd60e01b9060840161169f565b60606117388383604051806060016040528060278152602001611f1560279139611811565b9392505050565b6000611794826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118e59092919063ffffffff16565b8051909150156116d657808060200190518101906117b29190611b79565b6116d65760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161067a565b6060833b6118705760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161067a565b600080856001600160a01b03168560405161188b9190611c7d565b600060405180830381855af49150503d80600081146118c6576040519150601f19603f3d011682016040523d82523d6000602084013e6118cb565b606091505b50915091506118db8282866118fc565b9695505050505050565b60606118f48484600085611935565b949350505050565b6060831561190b575081611738565b82511561191b5782518084602001fd5b8160405162461bcd60e51b815260040161067a9190611cfa565b6060824710156119965760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161067a565b843b6119e45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161067a565b600080866001600160a01b03168587604051611a009190611c7d565b60006040518083038185875af1925050503d8060008114611a3d576040519150601f19603f3d011682016040523d82523d6000602084013e611a42565b606091505b50915091506113fe8282866118fc565b60008083601f840112611a63578182fd5b5081356001600160401b03811115611a79578182fd5b6020830191508360208260051b8501011115611a9457600080fd5b9250929050565b600060208284031215611aac578081fd5b813561173881611efc565b60008060008060608587031215611acc578283fd5b8435611ad781611efc565b93506020850135925060408501356001600160401b0380821115611af9578384fd5b818701915087601f830112611b0c578384fd5b813581811115611b1a578485fd5b886020828501011115611b2b578485fd5b95989497505060200194505050565b60008060208385031215611b4c578182fd5b82356001600160401b03811115611b61578283fd5b611b6d85828601611a52565b90969095509350505050565b600060208284031215611b8a578081fd5b81518015158114611738578182fd5b600060208284031215611baa578081fd5b5035919050565b600060208284031215611bc2578081fd5b5051919050565b60008060408385031215611bdb578182fd5b823591506020830135611bed81611efc565b809150509250929050565b60008060408385031215611c0a578182fd5b50508035926020909101359150565b600080600060608486031215611c2d578283fd5b83359250602084013591506040840135611c4681611efc565b809150509250925092565b60008151808452611c69816020860160208601611e9f565b601f01601f19169290920160200192915050565b60008251611c8f818460208701611e9f565b9190910192915050565b6000602080830181845280855180835260408601915060408160051b8701019250838701855b82811015611ced57603f19888603018452611cdb858351611c51565b94509285019290850190600101611cbf565b5092979650505050505050565b6020815260006117386020830184611c51565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000808335601e19843603018112611d58578283fd5b8301803591506001600160401b03821115611d71578283fd5b602001915036819003821315611a9457600080fd5b600080821280156001600160ff1b0384900385131615611da857611da8611ee6565b600160ff1b8390038412811615611dc157611dc1611ee6565b50500190565b60006001600160801b03808316818516808303821115611de957611de9611ee6565b01949350505050565b60008219821115611e0557611e05611ee6565b500190565b600082611e2557634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611e4457611e44611ee6565b500290565b60008083128015600160ff1b850184121615611e6757611e67611ee6565b6001600160ff1b0384018313811615611e8257611e82611ee6565b50500390565b600082821015611e9a57611e9a611ee6565b500390565b60005b83811015611eba578181015183820152602001611ea2565b83811115610ccd5750506000910152565b6000600019821415611edf57611edf611ee6565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114611f1157600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220f63d362b1d736ac0a7cb00b41df7bc74c4edd0568fb397dac8f4a02323358a8864736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000069fa0fee221ad11012bab0fdb45d444d3d2ce71c00000000000000000000000069539c1c678dfd26e626f109149b7cebdd5e47680000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _rewardToken (address): 0x69fa0feE221AD11012BAb0FdB45d444D3D2Ce71c
Arg [1] : _rewardOwner (address): 0x69539C1c678dFd26E626f109149b7cEBDd5E4768
Arg [2] : _rewardPerBlock (uint256): 0
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000069fa0fee221ad11012bab0fdb45d444d3d2ce71c
Arg [1] : 00000000000000000000000069539c1c678dfd26e626f109149b7cebdd5e4768
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.