More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 904 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Unstake | 15205846 | 703 days ago | IN | 0 ETH | 0.00080087 | ||||
Stake | 14793472 | 771 days ago | IN | 0 ETH | 0.00217297 | ||||
Stake | 14793421 | 771 days ago | IN | 0 ETH | 0.00232283 | ||||
Stake | 14793420 | 771 days ago | IN | 0 ETH | 0.00285293 | ||||
Unstake | 14763208 | 775 days ago | IN | 0 ETH | 0.00406779 | ||||
Unstake | 14595407 | 802 days ago | IN | 0 ETH | 0.00102217 | ||||
Unstake | 14468626 | 822 days ago | IN | 0 ETH | 0.00151108 | ||||
Unstake | 14467203 | 822 days ago | IN | 0 ETH | 0.00098762 | ||||
Unstake | 14465668 | 822 days ago | IN | 0 ETH | 0.00139034 | ||||
Unstake | 14427823 | 828 days ago | IN | 0 ETH | 0.00094265 | ||||
Unstake | 14326995 | 844 days ago | IN | 0 ETH | 0.00122776 | ||||
Unstake | 14306127 | 847 days ago | IN | 0 ETH | 0.00185213 | ||||
Unstake | 14010171 | 893 days ago | IN | 0 ETH | 0.00497711 | ||||
Unstake | 13787298 | 927 days ago | IN | 0 ETH | 0.00540214 | ||||
Unstake | 13740774 | 935 days ago | IN | 0 ETH | 0.0092132 | ||||
Unstake | 13719639 | 938 days ago | IN | 0 ETH | 0.00626876 | ||||
Unstake | 13657228 | 948 days ago | IN | 0 ETH | 0.00395576 | ||||
Unstake | 13657161 | 948 days ago | IN | 0 ETH | 0.00555514 | ||||
Unstake | 13657160 | 948 days ago | IN | 0 ETH | 0.00525611 | ||||
Unstake | 13594909 | 958 days ago | IN | 0 ETH | 0.01030647 | ||||
Unstake | 13542528 | 966 days ago | IN | 0 ETH | 0.00658632 | ||||
Unstake | 13484243 | 975 days ago | IN | 0 ETH | 0.00432406 | ||||
Unstake | 13475784 | 976 days ago | IN | 0 ETH | 0.00308839 | ||||
Unstake | 13472714 | 977 days ago | IN | 0 ETH | 0.00337765 | ||||
Claim | 13472713 | 977 days ago | IN | 0 ETH | 0.0026779 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Staking
Compiler Version
v0.8.3+commit.8d00100c
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion, Audited
Contract Source Code (Solidity Standard Json-Input format)Audit Report
// SPDX-License-Identifier: MIT pragma solidity ^0.8.3; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; //Staking... contract Staking is Ownable, Pausable, ReentrancyGuard { using SafeMath for uint256; struct UserInfo { uint256 amount; // current staked SPI uint256 createdAt; // unix timestamp when the user created uint256 lastUpdateAt; // unix timestamp for last details update (when pointsDebt calculated) uint256 pointsDebt; // total points collected before latest deposit } uint256 public minimumAmount = 1 * (10**18); //1 SPI uint256 public maxAmount = 1000 * (10**18); //1000 SPI uint256 public lockTime = 1 hours; //emissionRate - points generated per SPI token per second staked //10000000000 = 0.01 SPI per 1 SPI staked 11days //10000000000000 = 10 SPI per 1 SPI staked 11days [TEST] uint256 public emissionRate; IERC20 spiToken; // token being staked mapping(address => UserInfo) public userInfo; event StakeClaimed(address user, uint256 amount); event RewardAdded(uint256 amount); event EmissionRateChanged(uint256 newEmissionRate); constructor(IERC20 _lpToken, uint256 _emissionRate) { spiToken = _lpToken; emissionRate = _emissionRate; } // Add reward to the smart contract (must have approval) function addReward(uint256 _amount) external { spiToken.transferFrom(msg.sender, address(this), _amount); emit RewardAdded(_amount); } //the core of the contract (must have approval) function stake(uint256 _amount) external whenNotPaused nonReentrant { require(_amount >= minimumAmount, "amount below minimumAmount"); require(_amount <= maxAmount, "amount greater than maxAmount"); require(spiToken.transferFrom(msg.sender, address(this), _amount), "failed to transfer"); // already deposited before UserInfo storage user = userInfo[msg.sender]; if (user.amount != 0) { user.pointsDebt = pointsBalance(msg.sender); } user.amount = user.amount.add(_amount); user.lastUpdateAt = block.timestamp; user.createdAt = block.timestamp; } //get them rewards function claim() public nonReentrant { UserInfo storage user = userInfo[msg.sender]; // deduct points uint256 amountToTransfer = pointsBalance(msg.sender); user.pointsDebt = 0; user.lastUpdateAt = block.timestamp; spiToken.transfer(msg.sender, amountToTransfer); } function unstake() external { UserInfo storage user = userInfo[msg.sender]; require(user.amount >= 0, "insufficient staked"); require(user.createdAt + lockTime <= block.timestamp, "tokens are locked"); // First, send all unclaimed rewards claim(); uint256 userAmount = user.amount; user.amount = 0; spiToken.transfer(msg.sender, userAmount); } //calculates the undebitted points. (seconds since staked) X emission rate X amount / 10^18 function _unDebitedPoints(UserInfo memory user) internal view returns (uint256) { return block.timestamp.sub(user.lastUpdateAt).mul(emissionRate).mul(user.amount).div(1e18); } //calculte how many points an address has function pointsBalance(address userAddress) public view returns (uint256) { UserInfo memory user = userInfo[userAddress]; return user.pointsDebt.add(_unDebitedPoints(user)); } //change how many SPI per second you gain (in wei) function changeEmissionRate(uint256 newEmissionRate) public onlyOwner { emissionRate = newEmissionRate; emit EmissionRateChanged(newEmissionRate); } //owner can withdraw any token sent here function reclaimToken(IERC20 token, uint256 _amount) public onlyOwner { require(address(token) != address(0), "no 0 address"); require(address(token) != address(spiToken), "can't withdraw the reward"); uint256 balance = token.balanceOf(address(this)); require(_amount <= balance, "you can't withdraw more than you have"); token.transfer(msg.sender, _amount); } function pause() public onlyOwner { _pause(); } function unpause() public onlyOwner { _unpause(); } //owner can withdraw any ETH sent here function withdraw() public onlyOwner { uint256 balance = address(this).balance; payable(msg.sender).transfer(balance); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT 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 "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor () { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT 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 "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external; }
// 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; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- Chainsulting - May 1st, 2021 - Security Audit Report
[{"inputs":[{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"uint256","name":"_emissionRate","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newEmissionRate","type":"uint256"}],"name":"EmissionRateChanged","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"StakeClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"addReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newEmissionRate","type":"uint256"}],"name":"changeEmissionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emissionRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"}],"name":"pointsBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"reclaimToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"lastUpdateAt","type":"uint256"},{"internalType":"uint256","name":"pointsDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052670de0b6b3a7640000600255683635c9adc5dea00000600355610e1060045534801561002f57600080fd5b5060405161112d38038061112d83398101604081905261004e916100c9565b600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b1916905560018055600680546001600160a01b0319166001600160a01b039390931692909217909155600555610101565b600080604083850312156100db578182fd5b82516001600160a01b03811681146100f1578283fd5b6020939093015192949293505050565b61101d806101106000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c80635f48f393116100ad5780638da5cb5b116100715780638da5cb5b1461024157806396afc4501461025c578063a694fc3a14610265578063bb0c829814610278578063f2fde38b1461028157610121565b80635f48f3931461020257806361ce35291461020b578063715018a61461021e57806374de4ec4146102265780638456cb591461023957610121565b80632def6620116100f45780632def6620146101bf5780633ccfd60b146101c75780633f4ba83a146101cf5780634e71d92d146101d75780635c975abb146101df57610121565b8063098e43b7146101265780630d6680871461013b5780631959a0021461015757806325ca4cff146101ac575b600080fd5b610139610134366004610ee6565b610294565b005b61014460045481565b6040519081526020015b60405180910390f35b61018c610165366004610e7f565b60076020526000908152604090208054600182015460028301546003909301549192909184565b60408051948552602085019390935291830152606082015260800161014e565b6101446101ba366004610e7f565b610303565b610139610369565b610139610464565b6101396104c1565b6101396104f5565b6101f2600054600160a01b900460ff1690565b604051901515815260200161014e565b61014460035481565b610139610219366004610ebb565b610601565b61013961082e565b610139610234366004610ee6565b6108a2565b61013961095d565b6000546040516001600160a01b03909116815260200161014e565b61014460055481565b610139610273366004610ee6565b61098f565b61014460025481565b61013961028f366004610e7f565b610bef565b6000546001600160a01b031633146102c75760405162461bcd60e51b81526004016102be90610f16565b60405180910390fd5b60058190556040518181527f4599b999878c4bf50471224bfb3eba260226641b501577af32f4ff1e2a3d7049906020015b60405180910390a150565b6001600160a01b038116600090815260076020908152604080832081516080810183528154815260018201549381019390935260028101549183019190915260030154606082015261036261035782610cd9565b606083015190610d1e565b9392505050565b33600090815260076020526040902042600454826001015461038b9190610f4b565b11156103cd5760405162461bcd60e51b81526020600482015260116024820152701d1bdad95b9cc8185c99481b1bd8dad959607a1b60448201526064016102be565b6103d56104f5565b80546000825560065460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b15801561042757600080fd5b505af115801561043b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045f9190610e9b565b505050565b6000546001600160a01b0316331461048e5760405162461bcd60e51b81526004016102be90610f16565b6040514790339082156108fc029083906000818181858888f193505050501580156104bd573d6000803e3d6000fd5b5050565b6000546001600160a01b031633146104eb5760405162461bcd60e51b81526004016102be90610f16565b6104f3610d2a565b565b600260015414156105485760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102be565b60026001553360008181526007602052604081209161056690610303565b6000600384015542600284015560065460405163a9059cbb60e01b8152336004820152602481018390529192506001600160a01b03169063a9059cbb90604401602060405180830381600087803b1580156105c057600080fd5b505af11580156105d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f89190610e9b565b50506001805550565b6000546001600160a01b0316331461062b5760405162461bcd60e51b81526004016102be90610f16565b6001600160a01b0382166106705760405162461bcd60e51b815260206004820152600c60248201526b6e6f2030206164647265737360a01b60448201526064016102be565b6006546001600160a01b03838116911614156106ce5760405162461bcd60e51b815260206004820152601960248201527f63616e277420776974686472617720746865207265776172640000000000000060448201526064016102be565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b15801561071057600080fd5b505afa158015610724573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107489190610efe565b9050808211156107a85760405162461bcd60e51b815260206004820152602560248201527f796f752063616e2774207769746864726177206d6f7265207468616e20796f75604482015264206861766560d81b60648201526084016102be565b60405163a9059cbb60e01b8152336004820152602481018390526001600160a01b0384169063a9059cbb90604401602060405180830381600087803b1580156107f057600080fd5b505af1158015610804573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108289190610e9b565b50505050565b6000546001600160a01b031633146108585760405162461bcd60e51b81526004016102be90610f16565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6006546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b1580156108f457600080fd5b505af1158015610908573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092c9190610e9b565b506040518181527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d906020016102f8565b6000546001600160a01b031633146109875760405162461bcd60e51b81526004016102be90610f16565b6104f3610dcd565b6109a2600054600160a01b900460ff1690565b156109e25760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016102be565b60026001541415610a355760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102be565b6002600181905554811015610a8c5760405162461bcd60e51b815260206004820152601a60248201527f616d6f756e742062656c6f77206d696e696d756d416d6f756e7400000000000060448201526064016102be565b600354811115610ade5760405162461bcd60e51b815260206004820152601d60248201527f616d6f756e742067726561746572207468616e206d6178416d6f756e7400000060448201526064016102be565b6006546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b158015610b3057600080fd5b505af1158015610b44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b689190610e9b565b610ba95760405162461bcd60e51b81526020600482015260126024820152713330b4b632b2103a37903a3930b739b332b960711b60448201526064016102be565b336000908152600760205260409020805415610bce57610bc833610303565b60038201555b8054610bda9083610d1e565b81554260028201819055600191820155805550565b6000546001600160a01b03163314610c195760405162461bcd60e51b81526004016102be90610f16565b6001600160a01b038116610c7e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102be565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000610d18670de0b6b3a7640000610d128460000151610d0c600554610d0c886040015142610e5b90919063ffffffff16565b90610e67565b90610e73565b92915050565b60006103628284610f4b565b610d3d600054600160a01b900460ff1690565b610d805760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016102be565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610de0600054600160a01b900460ff1690565b15610e205760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016102be565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610db03390565b60006103628284610fa2565b60006103628284610f83565b60006103628284610f63565b600060208284031215610e90578081fd5b813561036281610fcf565b600060208284031215610eac578081fd5b81518015158114610362578182fd5b60008060408385031215610ecd578081fd5b8235610ed881610fcf565b946020939093013593505050565b600060208284031215610ef7578081fd5b5035919050565b600060208284031215610f0f578081fd5b5051919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610f5e57610f5e610fb9565b500190565b600082610f7e57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615610f9d57610f9d610fb9565b500290565b600082821015610fb457610fb4610fb9565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610fe457600080fd5b5056fea26469706673582212208c8cf3f4f97e61668033b5ab95084c6e8d43e72746cd6d76c70976bd1965b06764736f6c634300080300330000000000000000000000009b02dd390a603add5c07f9fd9175b7dabe8d63b700000000000000000000000000000000000000000000000000000002540be400
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101215760003560e01c80635f48f393116100ad5780638da5cb5b116100715780638da5cb5b1461024157806396afc4501461025c578063a694fc3a14610265578063bb0c829814610278578063f2fde38b1461028157610121565b80635f48f3931461020257806361ce35291461020b578063715018a61461021e57806374de4ec4146102265780638456cb591461023957610121565b80632def6620116100f45780632def6620146101bf5780633ccfd60b146101c75780633f4ba83a146101cf5780634e71d92d146101d75780635c975abb146101df57610121565b8063098e43b7146101265780630d6680871461013b5780631959a0021461015757806325ca4cff146101ac575b600080fd5b610139610134366004610ee6565b610294565b005b61014460045481565b6040519081526020015b60405180910390f35b61018c610165366004610e7f565b60076020526000908152604090208054600182015460028301546003909301549192909184565b60408051948552602085019390935291830152606082015260800161014e565b6101446101ba366004610e7f565b610303565b610139610369565b610139610464565b6101396104c1565b6101396104f5565b6101f2600054600160a01b900460ff1690565b604051901515815260200161014e565b61014460035481565b610139610219366004610ebb565b610601565b61013961082e565b610139610234366004610ee6565b6108a2565b61013961095d565b6000546040516001600160a01b03909116815260200161014e565b61014460055481565b610139610273366004610ee6565b61098f565b61014460025481565b61013961028f366004610e7f565b610bef565b6000546001600160a01b031633146102c75760405162461bcd60e51b81526004016102be90610f16565b60405180910390fd5b60058190556040518181527f4599b999878c4bf50471224bfb3eba260226641b501577af32f4ff1e2a3d7049906020015b60405180910390a150565b6001600160a01b038116600090815260076020908152604080832081516080810183528154815260018201549381019390935260028101549183019190915260030154606082015261036261035782610cd9565b606083015190610d1e565b9392505050565b33600090815260076020526040902042600454826001015461038b9190610f4b565b11156103cd5760405162461bcd60e51b81526020600482015260116024820152701d1bdad95b9cc8185c99481b1bd8dad959607a1b60448201526064016102be565b6103d56104f5565b80546000825560065460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b15801561042757600080fd5b505af115801561043b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045f9190610e9b565b505050565b6000546001600160a01b0316331461048e5760405162461bcd60e51b81526004016102be90610f16565b6040514790339082156108fc029083906000818181858888f193505050501580156104bd573d6000803e3d6000fd5b5050565b6000546001600160a01b031633146104eb5760405162461bcd60e51b81526004016102be90610f16565b6104f3610d2a565b565b600260015414156105485760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102be565b60026001553360008181526007602052604081209161056690610303565b6000600384015542600284015560065460405163a9059cbb60e01b8152336004820152602481018390529192506001600160a01b03169063a9059cbb90604401602060405180830381600087803b1580156105c057600080fd5b505af11580156105d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f89190610e9b565b50506001805550565b6000546001600160a01b0316331461062b5760405162461bcd60e51b81526004016102be90610f16565b6001600160a01b0382166106705760405162461bcd60e51b815260206004820152600c60248201526b6e6f2030206164647265737360a01b60448201526064016102be565b6006546001600160a01b03838116911614156106ce5760405162461bcd60e51b815260206004820152601960248201527f63616e277420776974686472617720746865207265776172640000000000000060448201526064016102be565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b15801561071057600080fd5b505afa158015610724573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107489190610efe565b9050808211156107a85760405162461bcd60e51b815260206004820152602560248201527f796f752063616e2774207769746864726177206d6f7265207468616e20796f75604482015264206861766560d81b60648201526084016102be565b60405163a9059cbb60e01b8152336004820152602481018390526001600160a01b0384169063a9059cbb90604401602060405180830381600087803b1580156107f057600080fd5b505af1158015610804573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108289190610e9b565b50505050565b6000546001600160a01b031633146108585760405162461bcd60e51b81526004016102be90610f16565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6006546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b1580156108f457600080fd5b505af1158015610908573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092c9190610e9b565b506040518181527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d906020016102f8565b6000546001600160a01b031633146109875760405162461bcd60e51b81526004016102be90610f16565b6104f3610dcd565b6109a2600054600160a01b900460ff1690565b156109e25760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016102be565b60026001541415610a355760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102be565b6002600181905554811015610a8c5760405162461bcd60e51b815260206004820152601a60248201527f616d6f756e742062656c6f77206d696e696d756d416d6f756e7400000000000060448201526064016102be565b600354811115610ade5760405162461bcd60e51b815260206004820152601d60248201527f616d6f756e742067726561746572207468616e206d6178416d6f756e7400000060448201526064016102be565b6006546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b158015610b3057600080fd5b505af1158015610b44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b689190610e9b565b610ba95760405162461bcd60e51b81526020600482015260126024820152713330b4b632b2103a37903a3930b739b332b960711b60448201526064016102be565b336000908152600760205260409020805415610bce57610bc833610303565b60038201555b8054610bda9083610d1e565b81554260028201819055600191820155805550565b6000546001600160a01b03163314610c195760405162461bcd60e51b81526004016102be90610f16565b6001600160a01b038116610c7e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102be565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000610d18670de0b6b3a7640000610d128460000151610d0c600554610d0c886040015142610e5b90919063ffffffff16565b90610e67565b90610e73565b92915050565b60006103628284610f4b565b610d3d600054600160a01b900460ff1690565b610d805760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016102be565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610de0600054600160a01b900460ff1690565b15610e205760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016102be565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610db03390565b60006103628284610fa2565b60006103628284610f83565b60006103628284610f63565b600060208284031215610e90578081fd5b813561036281610fcf565b600060208284031215610eac578081fd5b81518015158114610362578182fd5b60008060408385031215610ecd578081fd5b8235610ed881610fcf565b946020939093013593505050565b600060208284031215610ef7578081fd5b5035919050565b600060208284031215610f0f578081fd5b5051919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610f5e57610f5e610fb9565b500190565b600082610f7e57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615610f9d57610f9d610fb9565b500290565b600082821015610fb457610fb4610fb9565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610fe457600080fd5b5056fea26469706673582212208c8cf3f4f97e61668033b5ab95084c6e8d43e72746cd6d76c70976bd1965b06764736f6c63430008030033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000009b02dd390a603add5c07f9fd9175b7dabe8d63b700000000000000000000000000000000000000000000000000000002540be400
-----Decoded View---------------
Arg [0] : _lpToken (address): 0x9B02dD390a603Add5c07f9fd9175b7DABE8D63B7
Arg [1] : _emissionRate (uint256): 10000000000
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000009b02dd390a603add5c07f9fd9175b7dabe8d63b7
Arg [1] : 00000000000000000000000000000000000000000000000000000002540be400
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.005866 | 1,225.3433 | $7.19 |
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.