More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 3,310 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Reward To Stake | 21931012 | 39 mins ago | IN | 0 ETH | 0.00066829 | ||||
Stake With Permi... | 21930143 | 3 hrs ago | IN | 0 ETH | 0.0001855 | ||||
Stake With Permi... | 21928039 | 10 hrs ago | IN | 0 ETH | 0.0001756 | ||||
Stake With Permi... | 21928027 | 10 hrs ago | IN | 0 ETH | 0.00041164 | ||||
Un Stake | 21928013 | 10 hrs ago | IN | 0 ETH | 0.00011196 | ||||
Un Stake | 21926452 | 15 hrs ago | IN | 0 ETH | 0.00012839 | ||||
Claim | 21926377 | 16 hrs ago | IN | 0 ETH | 0.00012627 | ||||
Stake With Permi... | 21926313 | 16 hrs ago | IN | 0 ETH | 0.00029158 | ||||
Reward To Stake | 21925986 | 17 hrs ago | IN | 0 ETH | 0.00013854 | ||||
Stake With Permi... | 21925914 | 17 hrs ago | IN | 0 ETH | 0.00026134 | ||||
Stake With Permi... | 21925718 | 18 hrs ago | IN | 0 ETH | 0.00059512 | ||||
Stake With Permi... | 21925659 | 18 hrs ago | IN | 0 ETH | 0.00046174 | ||||
Un Stake | 21925477 | 19 hrs ago | IN | 0 ETH | 0.00043725 | ||||
Un Stake | 21925464 | 19 hrs ago | IN | 0 ETH | 0.00018171 | ||||
Stake With Permi... | 21925458 | 19 hrs ago | IN | 0 ETH | 0.00022832 | ||||
Un Stake | 21925453 | 19 hrs ago | IN | 0 ETH | 0.00016241 | ||||
Stake With Permi... | 21925336 | 19 hrs ago | IN | 0 ETH | 0.00022788 | ||||
Un Stake | 21925321 | 19 hrs ago | IN | 0 ETH | 0.00013951 | ||||
Reward To Stake | 21925024 | 20 hrs ago | IN | 0 ETH | 0.00023656 | ||||
Stake With Permi... | 21923512 | 25 hrs ago | IN | 0 ETH | 0.00034456 | ||||
Un Stake | 21923507 | 25 hrs ago | IN | 0 ETH | 0.0002053 | ||||
Un Stake | 21923505 | 25 hrs ago | IN | 0 ETH | 0.00025569 | ||||
Reward To Stake | 21923462 | 25 hrs ago | IN | 0 ETH | 0.0002604 | ||||
Un Stake | 21923450 | 25 hrs ago | IN | 0 ETH | 0.00007754 | ||||
Reward To Stake | 21923449 | 25 hrs ago | IN | 0 ETH | 0.00030756 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
FlexibleStaking
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; /** * @title FlexibleStaking * @dev A flexible staking contract where users can stake their tokens and receive rewards. */ contract FlexibleStaking is Ownable, ReentrancyGuard { event Staked(address indexed user, uint256 amount); event RecursiveStake(address indexed user, uint256 amount); event Claimed(address indexed user, uint256 amount); event UnStake(address indexed owner, uint256 amount, uint256 reward); event RemainingClaim(address indexed owner, uint256 amount); event IncreasePool(address indexed account, uint256 amount); using SafeERC20 for IERC20; using Math for uint256; IERC20 public immutable token; uint256 internal constant RATE_CAL = 1e10; uint256 internal constant TOKEN_DECIMAL = 1e18; uint256 internal _poolSize; uint256 internal constant DAILY_REWARD = 277_777 * TOKEN_DECIMAL; uint256 internal _totalStaked; uint256 internal _totalClaimedReward; uint64 internal _lastUpdateDay; uint64 internal immutable LAUNCH_TIME; uint64 internal immutable REWARD_PERIOD; uint256 internal _countUsers; struct Stake { uint64 startTime; uint256 stakeAmount; uint64 epochDay; uint64 lastClaimTime; uint256 totalClaim; bool isActive; } mapping(address => Stake) internal stakes; mapping(uint256 => uint256) internal daysRate; /** * @dev Initializes the FlexibleStaking contract. * @param initialOwner The address of the initial owner. * @param tokenAddress The address of the staking token. * @param launchTime The timestamp when staking starts. * @param rewardPeriod The duration of each reward period. * @param poolSize The initial size of the reward pool. */ constructor( address initialOwner, address tokenAddress, uint64 launchTime, uint64 rewardPeriod, uint256 poolSize ) Ownable(initialOwner) { uint64 currentTime = uint64(block.timestamp); require( initialOwner != address(0), "STAKE:FLEX:Owner's address cannot be zero." ); require( tokenAddress != address(0), "STAKE:FLEX:Token address cannot be zero." ); require( launchTime > currentTime, "STAKE:FLEX:Launch time must be greater than present time." ); token = IERC20(tokenAddress); LAUNCH_TIME = launchTime; REWARD_PERIOD = rewardPeriod; _poolSize = poolSize; } /** * @notice Allows a user to stake tokens. * @param amount The amount of tokens to stake. */ function stake(uint256 amount) external nonReentrant { require( token.allowance(_msgSender(), address(this)) >= amount, "STAKE:FLEX:Insufficient allowance" ); _stake(_msgSender(), amount); } /** * @notice Allows a user to stake tokens using permit. * @param account The account to stake tokens. * @param amount The amount of tokens to stake. * @param deadline The deadline for permit signature. * @param v The `v` component of the permit signature. * @param r The `r` component of the permit signature. * @param s The `s` component of the permit signature. */ function stakeWithPermit( address account, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external nonReentrant { IERC20Permit(address(token)).permit( account, address(this), amount, deadline, v, r, s ); _stake(account, amount); } /** * @notice Allows a user to claim their rewards. */ function claim() external nonReentrant { Stake storage user = stakes[_msgSender()]; require(user.isActive, "STAKE:FLEX:You have none staked tokens."); uint64 currentDay = _currentDay(); _update(currentDay); uint256 reward = _calculateReward( user.epochDay, currentDay, user.stakeAmount ); require(reward > 0, "STAKE:FLEX:No reward have been earned yet."); user.epochDay = currentDay; _claimed(user, reward); } /** * @notice Allows a user to unstake their tokens. */ function unStake() external nonReentrant { address account = _msgSender(); Stake storage user = stakes[account]; require(user.isActive, "STAKE:FLEX:You have none staked tokens."); uint64 currentDay = _currentDay(); require( currentDay >= user.epochDay, "STAKE:FLEX:You cannot exit before your is up." ); uint256 amount = user.stakeAmount; // kullanıcıya varsa claim haklarınıda ver uint256 reward = _calculateReward( user.epochDay, currentDay, user.stakeAmount ); _poolSize -= reward; user.epochDay = currentDay; user.stakeAmount = 0; user.lastClaimTime = uint64(block.timestamp); user.totalClaim += reward; user.isActive = false; _countUsers--; _totalClaimedReward += reward; _totalStaked -= amount; _update(currentDay + 1); token.safeTransfer(account, amount + reward); emit UnStake(account, amount, reward); } /** * @notice Allows a user to stake their rewards. */ function rewardToStake() external nonReentrant { require(_endTime() > block.timestamp, "STAKE:FLEX:The contract has expired."); Stake storage user = stakes[_msgSender()]; require(user.isActive, "STAKE:FLEX:You have none staked tokens."); uint64 currentDay = _currentDay() + 1; uint256 reward = _calculateReward( user.epochDay, currentDay, user.stakeAmount ); require(reward > 0, "STAKE:FLEX:No reward have been earned yet."); user.stakeAmount += reward; user.epochDay = currentDay; _totalStaked += reward; _totalClaimedReward += reward; _update(currentDay); emit RecursiveStake(_msgSender(), reward); } /** * @notice Allows the contract owner to claim the remaining pool balance after staking ends. * @param to The address to transfer the remaining pool balance. */ function remainingClaim(address to) external onlyOwner nonReentrant { require(block.timestamp > _endTime(), "STAKE:FLEX:Distribution is still continue."); require(_countUsers == 0, "STAKE:FLEX:There is still active an account at the contract."); token.safeTransfer(to, _poolSize); _poolSize = 0; emit RemainingClaim(to, _poolSize); } /** * @notice Increases the reward pool size. * @param amount The amount to increase the reward pool. */ function increasePool(uint256 amount) external { token.safeTransferFrom(_msgSender(), address(this), amount); _poolSize += amount; emit IncreasePool(_msgSender(), amount); } // ------------------------------------------------------------ // ===================== PUBLIC FUNCTIONS // ------------------------------------------------------------ /** * @notice Retrieves information about a user's staking. * @param account The account to query. * @return startTime The time when the user started staking. * @return stakeAmount The amount of tokens staked by the user. * @return lastClaimTime The time of the last claim. * @return totalClaim The total amount claimed by the user. * @return unlockAmount The amount of rewards available for claim. * @return nextUnlockTime The time when the next reward can be claimed. * @return nextUnlockAmount The amount of rewards available in the next claim. * @return epochDay The current epoch day for the user. * @return isActive Whether the user's stake is active. */ function accountInfo(address account) public view returns ( uint256 startTime, uint256 stakeAmount, uint256 lastClaimTime, uint256 totalClaim, uint256 unlockAmount, uint256 nextUnlockTime, uint256 nextUnlockAmount, uint64 epochDay, bool isActive ) { Stake storage user = stakes[account]; startTime = user.startTime; stakeAmount = user.stakeAmount; lastClaimTime = user.lastClaimTime; totalClaim = user.totalClaim; epochDay = user.epochDay; isActive = user.isActive; if (user.isActive) { uint256 endContractTime = _endTime(); uint256 currentTime = block.timestamp; unlockAmount = _calculateReward( user.epochDay, _currentDay(), user.stakeAmount ); if (endContractTime > currentTime) { nextUnlockTime = _nextRewardTime(user.epochDay); nextUnlockAmount = (stakeAmount * daysRate[_lastUpdateDay]) / RATE_CAL; } } } /** * @notice Retrieves general information about the staking contract. * @return launchTime The time when staking started. * @return rewardPeriod The duration of each reward period. * @return lastUpdateDay The last day when rate was updated. * @return currentDay The day given which day we are in. * @return poolSize The current size of the reward pool. * @return dailyReward The daily reward amount. * @return totalStaked The total amount of tokens staked. * @return totalClaimedReward The total amount of tokens claimed as reward. * @return userCount The number of active users. */ function info() public view returns ( uint64 launchTime, uint64 rewardPeriod, uint64 lastUpdateDay, uint64 currentDay, uint256 poolSize, uint256 dailyReward, uint256 totalStaked, uint256 totalClaimedReward, uint256 userCount ) { return ( LAUNCH_TIME, REWARD_PERIOD, _lastUpdateDay, _currentDay(), _poolSize, DAILY_REWARD, _totalStaked, _totalClaimedReward, _countUsers ); } /** * @notice Retrieves the rate for a specific day. * @param day The day for which to retrieve the rate. * @return The rate for the specified day. */ function getDayRate(uint256 day) public view returns (uint256) { uint256 currentDay = day; while (true) { if (daysRate[currentDay] != 0) { return daysRate[currentDay]; } if (currentDay == 0) { break; } currentDay--; } return 0; } /** * @dev Internal function to handle staking of tokens. * @param account The account staking tokens. * @param amount The amount of tokens to stake. */ function _stake(address account, uint256 amount) private { require(block.timestamp > LAUNCH_TIME, "STAKE:Staking time has not started yet."); require(_endTime() > block.timestamp, "STAKE:The contract has expired."); require( token.balanceOf(account) >= amount, "STAKE:FLEX:Insufficient balance." ); token.safeTransferFrom(account, address(this), amount); uint64 currentDay = _currentDay() + 1; Stake storage user = stakes[account]; if (user.stakeAmount == 0) { user.startTime = uint64(block.timestamp); user.isActive = true; _countUsers++; } if (currentDay - 1 >= user.epochDay && user.stakeAmount > 0) { uint256 reward = _calculateReward( user.epochDay, currentDay, user.stakeAmount ); _claimed(user, reward); } user.epochDay = currentDay; user.stakeAmount += amount; _totalStaked += amount; _update(currentDay); emit Staked(account, amount); } /** * @dev Internal function to process claiming of rewards. * @param user The user claiming rewards. * @param reward The amount of rewards to claim. */ function _claimed(Stake storage user, uint256 reward) private { user.lastClaimTime = uint64(block.timestamp); user.totalClaim += reward; _poolSize -= reward; address account = _msgSender(); token.safeTransfer(account, reward); _totalClaimedReward += reward; emit Claimed(account, reward); } /** * @dev Calculates the total reward for a specific period. * @param epochDay The epoch day when staking started. * @param claimDay The current epoch day. * @param stakeAmount The amount of tokens staked. * @return totalReward for the specified period. */ function _calculateReward( uint64 epochDay, uint64 claimDay, uint256 stakeAmount ) internal view returns (uint256) { uint256 totalReward; uint256 lastRate; for (uint64 i = epochDay; i < claimDay; i++) { uint256 dayRate = daysRate[i]; if (dayRate != 0) { lastRate = dayRate; } totalReward += stakeAmount * lastRate; } return totalReward / RATE_CAL; } /** * @dev Updates the contract state for the current day. */ function _update(uint64 day) internal { if (_lastUpdateDay <= day) { daysRate[day] = _currentRate(); _lastUpdateDay = day; } } /** * @dev Calculates the time of the next reward claim. * @param epochDay The current epoch day. * @return The timestamp of the next reward claim. */ function _nextRewardTime(uint64 epochDay) internal view returns (uint256) { uint256 daysPassed = ((block.timestamp - LAUNCH_TIME) / REWARD_PERIOD); if (_currentDay() >= epochDay) { daysPassed += 1; } else { daysPassed += 2; } return LAUNCH_TIME + (daysPassed * REWARD_PERIOD); } /** * @dev Calculates the current rate. * @return The current rate. */ function _currentRate() internal view returns (uint256) { if(_totalStaked > 0){ return (DAILY_REWARD * RATE_CAL) / _totalStaked; } return 0; } /** * @dev Retrieves the current day. * @return The current day. */ function _currentDay() internal view returns (uint64) { uint64 currentTime = uint64(block.timestamp); if (LAUNCH_TIME > currentTime) { return 0; } if (currentTime >= _endTime()) { return uint64(_totalPeriod()); } return (currentTime - LAUNCH_TIME) / REWARD_PERIOD; } /** * @dev Calculates the total staking period. * @return The total staking period. */ function _totalPeriod() internal view returns (uint256) { return ((_poolSize + _totalClaimedReward) / DAILY_REWARD) + 1; } /** * @dev Retrieves the timestamp when staking ends. * @return The timestamp when staking ends. */ function _endTime() internal view returns (uint256) { return LAUNCH_TIME + (_totalPeriod() * REWARD_PERIOD); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../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. * * The initial owner is set to the address provided by the deployer. 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; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC20Permit} from "../extensions/IERC20Permit.sol"; import {Address} from "../../../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; /** * @dev An operation with an ERC20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @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); if (returndata.length != 0 && !abi.decode(returndata, (bool))) { revert SafeERC20FailedOperation(address(token)); } } /** * @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). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // 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 cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @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 or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * 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. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @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`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert FailedInnerCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ 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 subtraction of two unsigned integers, with an overflow flag. */ 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. */ 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. */ 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. */ 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 largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; /** * @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; /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); constructor() { _status = NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be NOT_ENTERED if (_status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail _status = ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == ENTERED; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "debug": { "revertStrings": "debug" }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint64","name":"launchTime","type":"uint64"},{"internalType":"uint64","name":"rewardPeriod","type":"uint64"},{"internalType":"uint256","name":"poolSize","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"IncreasePool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RecursiveStake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RemainingClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"UnStake","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"accountInfo","outputs":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"stakeAmount","type":"uint256"},{"internalType":"uint256","name":"lastClaimTime","type":"uint256"},{"internalType":"uint256","name":"totalClaim","type":"uint256"},{"internalType":"uint256","name":"unlockAmount","type":"uint256"},{"internalType":"uint256","name":"nextUnlockTime","type":"uint256"},{"internalType":"uint256","name":"nextUnlockAmount","type":"uint256"},{"internalType":"uint64","name":"epochDay","type":"uint64"},{"internalType":"bool","name":"isActive","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"day","type":"uint256"}],"name":"getDayRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"increasePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"info","outputs":[{"internalType":"uint64","name":"launchTime","type":"uint64"},{"internalType":"uint64","name":"rewardPeriod","type":"uint64"},{"internalType":"uint64","name":"lastUpdateDay","type":"uint64"},{"internalType":"uint64","name":"currentDay","type":"uint64"},{"internalType":"uint256","name":"poolSize","type":"uint256"},{"internalType":"uint256","name":"dailyReward","type":"uint256"},{"internalType":"uint256","name":"totalStaked","type":"uint256"},{"internalType":"uint256","name":"totalClaimedReward","type":"uint256"},{"internalType":"uint256","name":"userCount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"remainingClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"stakeWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unStake","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e06040523480156200005e5760405162461bcd60e51b815260206004820152602260248201527f45746865722073656e7420746f206e6f6e2d70617961626c652066756e637469604482019081526137b760f11b6064830152608482fd5b50604051620021d6380380620021d68339810160408190526200008191620002d0565b846001600160a01b038116620000b257604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b620000bd816200024b565b5060018055426001600160a01b0386166200012e5760405162461bcd60e51b815260206004820152602a60248201527f5354414b453a464c45583a4f776e6572277320616464726573732063616e6e6f6044820152693a103132903d32b9379760b11b6064820152608401620000a9565b6001600160a01b038516620001975760405162461bcd60e51b815260206004820152602860248201527f5354414b453a464c45583a546f6b656e20616464726573732063616e6e6f74206044820152673132903d32b9379760c11b6064820152608401620000a9565b806001600160401b0316846001600160401b031611620002205760405162461bcd60e51b815260206004820152603960248201527f5354414b453a464c45583a4c61756e63682074696d65206d757374206265206760448201527f726561746572207468616e2070726573656e742074696d652e000000000000006064820152608401620000a9565b506001600160a01b039093166080526001600160401b0391821660a0521660c0526002555062000382565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620002b357600080fd5b919050565b80516001600160401b0381168114620002b357600080fd5b600080600080600060a08688031215620003345760405162461bcd60e51b815260206004820152602260248201527f414249206465636f64696e673a207475706c65206461746120746f6f2073686f6044820152611c9d60f21b6064820152608481fd5b6200033f866200029b565b94506200034f602087016200029b565b93506200035f60408701620002b8565b92506200036f60608701620002b8565b9150608086015190509295509295909350565b60805160a05160c051611da6620004306000396000818161038201528181610f4f015281816116550152818161170b01526117c101526000818161036101528181610ef801528181610f73015281816112790152818161169d0152818161173501526117f501526000818161032f015281816106b40152818161077f01528181610946015281816109c401528181610aa40152818161110d01528181611376015261149d0152611da66000f3fe608060405234801561005d5760405162461bcd60e51b815260206004820152602260248201527f45746865722073656e7420746f206e6f6e2d70617961626c652066756e637469604482019081526137b760f11b6064830152608482fd5b50600436106101375760003560e01c80638da5cb5b116100d9578063a7310b58116100b3578063a7310b58146102ad578063acb751131461030f578063f2fde38b14610317578063fc0c546a1461032a57610137565b80638da5cb5b1461025457806399a9dbe814610279578063a694fc3a1461029a57610137565b806373cf575a1161011557806373cf575a1461021357806373d6a8891461021b5780637d9aff4b1461022e578063833e8bb61461024157610137565b8063370158ea1461019c5780634e71d92d14610201578063715018a61461020b575b60405162461bcd60e51b815260206004820152603560248201527f436f6e747261637420646f6573206e6f7420686176652066616c6c6261636b2060448201908152746e6f7220726563656976652066756e6374696f6e7360581b6064830152608482fd5b6101a4610351565b604080516001600160401b039a8b168152988a1660208a015296891696880196909652969093166060860152608085019190915260a084015260c083015260e0820192909252610100810191909152610120015b60405180910390f35b6102096103fd565b005b6102096104d2565b6102096104e4565b610209610229366004611a92565b61072d565b61020961023c366004611af5565b610846565b61020961024f366004611b13565b6109bf565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101f8565b61028c610287366004611b13565b610a43565b6040519081526020016101f8565b6102096102a8366004611b13565b610a91565b6102c06102bb366004611af5565b610c02565b60408051998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c08401526001600160401b031660e08301521515610100820152610120016101f8565b610209610cff565b610209610325366004611af5565b610ead565b6102617f000000000000000000000000000000000000000000000000000000000000000081565b60008060008060008060008060007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000600560009054906101000a90046001600160401b03166103bf610ee8565b6002546103d7670de0b6b3a764000062043d11611b45565b600354600454600654985098509850985098509850985098509850909192939495969798565b610405610fa2565b336000908152600760205260409020600481015460ff166104415760405162461bcd60e51b815260040161043890611b5c565b60405180910390fd5b600061044b610ee8565b905061045681610fcc565b6002820154600183015460009161047a916001600160401b0390911690849061101c565b90506000811161049c5760405162461bcd60e51b815260040161043890611ba3565b60028301805467ffffffffffffffff19166001600160401b0384161790556104c483826110a5565b5050506104d060018055565b565b6104da611196565b6104d060006111c3565b6104ec610fa2565b336000818152600760205260409020600481015460ff1661051f5760405162461bcd60e51b815260040161043890611b5c565b6000610529610ee8565b60028301549091506001600160401b0390811690821610156105a35760405162461bcd60e51b815260206004820152602d60248201527f5354414b453a464c45583a596f752063616e6e6f742065786974206265666f7260448201526c32903cb7bab91034b9903ab81760991b6064820152608401610438565b600182015460028301546000906105c4906001600160401b0316848461101c565b905080600260008282546105d89190611bed565b9091555050600284018054600060018701819055426001600160401b03908116600160401b026fffffffffffffffffffffffffffffffff199093169087161791909117909155600385018054839290610632908490611c00565b909155505060048401805460ff191690556006805490600061065383611c13565b9190505550806004600082825461066a9190611c00565b9250508190555081600360008282546106839190611bed565b9091555061069c9050610697846001611c2a565b610fcc565b6106db856106aa8385611c00565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190611213565b60408051838152602081018390526001600160a01b038716917f54a9763035584fc4fcad1bc4e0e7a83f93e016f50ae32bd527530a77257393ee910160405180910390a250505050506104d060018055565b610735610fa2565b60405163d505accf60e01b81526001600160a01b038781166004830152306024830152604482018790526064820186905260ff8516608483015260a4820184905260c482018390527f0000000000000000000000000000000000000000000000000000000000000000169063d505accf9060e401600060405180830381600087803b1580156108135760405162461bcd60e51b815260206004820152602560248201527f54617267657420636f6e747261637420646f6573206e6f7420636f6e7461696e604482019081526420636f646560d81b6064830152608482fd5b505af1158015610827573d6000803e3d6000fd5b505050506108358686611277565b61083e60018055565b505050505050565b61084e611196565b610856610fa2565b61085e611651565b42116108bf5760405162461bcd60e51b815260206004820152602a60248201527f5354414b453a464c45583a446973747269627574696f6e206973207374696c6c6044820152691031b7b73a34b73ab29760b11b6064820152608401610438565b600654156109355760405162461bcd60e51b815260206004820152603c60248201527f5354414b453a464c45583a5468657265206973207374696c6c2061637469766560448201527f20616e206163636f756e742061742074686520636f6e74726163742e000000006064820152608401610438565b60025461096e906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016908390611213565b600060028190556040519081526001600160a01b038216907ffc3c901b54b3eda21b5c2fac44318971c059dede078e02337447a82649704d6b9060200160405180910390a26109bc60018055565b50565b6109f47f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163330846116c7565b8060026000828254610a069190611c00565b909155505060405181815233907f034d8d86948028af29be6db4d39c10fa2a7fc4ea889c3b3f08a37bc5fe3757a89060200160405180910390a250565b6000815b60008181526008602052604090205415610a705760009081526008602052604090205492915050565b8015610a885780610a8081611c13565b915050610a47565b50600092915050565b610a99610fa2565b806001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663dd62ed3e336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015230602482015260440160206040518083038186803b158015610b5f5760405162461bcd60e51b815260206004820152602560248201527f54617267657420636f6e747261637420646f6573206e6f7420636f6e7461696e604482019081526420636f646560d81b6064830152608482fd5b505afa158015610b73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b979190611c51565b1015610bef5760405162461bcd60e51b815260206004820152602160248201527f5354414b453a464c45583a496e73756666696369656e7420616c6c6f77616e636044820152606560f81b6064820152608401610438565b610bf93382611277565b6109bc60018055565b6001600160a01b0381166000908152600760205260408120805460018201546002830154600384015460048501546001600160401b03948516969395600160401b84048616959294938493849391169160ff909116908115610cf1576000610c68611651565b60028301549091504290610c91906001600160401b0316610c87610ee8565b856001015461101c565b975080821115610cee576002830154610cb2906001600160401b0316611706565b6005546001600160401b03166000908152600860205260409020549097506402540be40090610ce1908d611b45565b610ceb9190611c83565b95505b50505b509193959799909294969850565b610d07610fa2565b42610d10611651565b11610d695760405162461bcd60e51b8152602060048201526024808201527f5354414b453a464c45583a54686520636f6e74726163742068617320657870696044820152633932b21760e11b6064820152608401610438565b336000908152600760205260409020600481015460ff16610d9c5760405162461bcd60e51b815260040161043890611b5c565b6000610da6610ee8565b610db1906001611c2a565b60028301546001840154919250600091610dd6916001600160401b031690849061101c565b905060008111610df85760405162461bcd60e51b815260040161043890611ba3565b80836001016000828254610e0c9190611c00565b909155505060028301805467ffffffffffffffff19166001600160401b03841617905560038054829190600090610e44908490611c00565b925050819055508060046000828254610e5d9190611c00565b90915550610e6c905082610fcc565b60405181815233907f2f3c266b110e692e19d05d63065a99cf2a1a080053892feefadab12b55fc364c9060200160405180910390a25050506104d060018055565b610eb5611196565b6001600160a01b038116610edf57604051631e4fbdf760e01b815260006004820152602401610438565b6109bc816111c3565b6000426001600160401b038082167f00000000000000000000000000000000000000000000000000000000000000009091161115610f2857600091505090565b610f30611651565b816001600160401b031610610f4d57610f4761181a565b91505090565b7f0000000000000000000000000000000000000000000000000000000000000000610f987f000000000000000000000000000000000000000000000000000000000000000083611c97565b610f479190611cb7565b600260015403610fc557604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b6005546001600160401b038083169116116109bc57610fe9611856565b6001600160401b0382166000818152600860205260409020919091556005805467ffffffffffffffff1916909117905550565b60008080855b856001600160401b0316816001600160401b03161015611089576001600160401b038116600090815260086020526040902054801561105f578092505b6110698387611b45565b6110739085611c00565b935050808061108190611cdd565b915050611022565b506110996402540be40083611c83565b925050505b9392505050565b6002820180546fffffffffffffffff00000000000000001916600160401b426001600160401b0316021790556003820180548291906000906110e8908490611c00565b9250508190555080600260008282546111019190611bed565b9091555033905061113c7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168284611213565b816004600082825461114e9190611c00565b90915550506040518281526001600160a01b038216907fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a9060200160405180910390a2505050565b6000546001600160a01b031633146104d05760405163118cdaa760e01b8152336004820152602401610438565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b0383811660248301526044820183905261127291859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611899565b505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160401b031642116112ff5760405162461bcd60e51b815260206004820152602760248201527f5354414b453a5374616b696e672074696d6520686173206e6f7420737461727460448201526632b2103cb2ba1760c91b6064820152608401610438565b42611308611651565b116113555760405162461bcd60e51b815260206004820152601f60248201527f5354414b453a54686520636f6e74726163742068617320657870697265642e006044820152606401610438565b6040516370a0823160e01b81526001600160a01b03838116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a082319060240160206040518083038186803b15801561140a5760405162461bcd60e51b815260206004820152602560248201527f54617267657420636f6e747261637420646f6573206e6f7420636f6e7461696e604482019081526420636f646560d81b6064830152608482fd5b505afa15801561141e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114429190611c51565b10156114905760405162461bcd60e51b815260206004820181905260248201527f5354414b453a464c45583a496e73756666696369656e742062616c616e63652e6044820152606401610438565b6114c56001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168330846116c7565b60006114cf610ee8565b6114da906001611c2a565b6001600160a01b0384166000908152600760205260408120600181015492935091900361154057805467ffffffffffffffff1916426001600160401b031617815560048101805460ff191660011790556006805490600061153a83611d03565b91905055505b60028101546001600160401b0316611559600184611c97565b6001600160401b031610158015611574575060008160010154115b156115ab576002810154600182015460009161159d916001600160401b0390911690859061101c565b90506115a982826110a5565b505b60028101805467ffffffffffffffff19166001600160401b0384161790556001810180548491906000906115e0908490611c00565b9250508190555082600360008282546115f99190611c00565b90915550611608905082610fcc565b836001600160a01b03167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d8460405161164391815260200190565b60405180910390a250505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160401b031661168561181a565b61168f9190611b45565b6116c2906001600160401b037f000000000000000000000000000000000000000000000000000000000000000016611c00565b905090565b6040516001600160a01b0384811660248301528381166044830152606482018390526117009186918216906323b872dd90608401611240565b50505050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160401b03167f00000000000000000000000000000000000000000000000000000000000000006001600160401b0316426117689190611bed565b6117729190611c83565b9050826001600160401b0316611786610ee8565b6001600160401b0316106117a65761179f600182611c00565b90506117b4565b6117b1600282611c00565b90505b6117e76001600160401b037f00000000000000000000000000000000000000000000000000000000000000001682611b45565b61109e906001600160401b037f000000000000000000000000000000000000000000000000000000000000000016611c00565b6000611831670de0b6b3a764000062043d11611b45565b6004546002546118419190611c00565b61184b9190611c83565b6116c2906001611c00565b60035460009015611893576003546402540be40061187f670de0b6b3a764000062043d11611b45565b6118899190611b45565b6116c29190611c83565b50600090565b60006118ae6001600160a01b038416836118fc565b905080516000141580156118d35750808060200190518101906118d19190611d1c565b155b1561127257604051635274afe760e01b81526001600160a01b0384166004820152602401610438565b606061190a83836000611913565b90505b92915050565b6060814710156119385760405163cd78605960e01b8152306004820152602401610438565b600080856001600160a01b031684866040516119549190611d41565b60006040518083038185875af1925050503d8060008114611991576040519150601f19603f3d011682016040523d82523d6000602084013e611996565b606091505b50915091506110998683836060826119b6576119b1826119fd565b61109e565b81511580156119cd57506001600160a01b0384163b155b156119f657604051639996b31560e01b81526001600160a01b0385166004820152602401610438565b508061109e565b805115611a0d5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60405162461bcd60e51b815260206004820152602260248201527f414249206465636f64696e673a207475706c65206461746120746f6f2073686f6044820152611c9d60f21b6064820152608481fd5b80356001600160a01b0381168114611a8d57600080fd5b919050565b60008060008060008060c08789031215611aae57611aae611a26565b611ab787611a76565b95506020870135945060408701359350606087013560ff81168114611adb57600080fd5b9598949750929560808101359460a0909101359350915050565b600060208284031215611b0a57611b0a611a26565b61190a82611a76565b600060208284031215611b2857611b28611a26565b5035919050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761190d5761190d611b2f565b60208082526027908201527f5354414b453a464c45583a596f752068617665206e6f6e65207374616b6564206040820152663a37b5b2b7399760c91b606082015260800190565b6020808252602a908201527f5354414b453a464c45583a4e6f207265776172642068617665206265656e206560408201526930b93732b2103cb2ba1760b11b606082015260800190565b8181038181111561190d5761190d611b2f565b8082018082111561190d5761190d611b2f565b600081611c2257611c22611b2f565b506000190190565b6001600160401b03818116838216019080821115611c4a57611c4a611b2f565b5092915050565b600060208284031215611c6657611c66611a26565b5051919050565b634e487b7160e01b600052601260045260246000fd5b600082611c9257611c92611c6d565b500490565b6001600160401b03828116828216039080821115611c4a57611c4a611b2f565b60006001600160401b0380841680611cd157611cd1611c6d565b92169190910492915050565b60006001600160401b03808316818103611cf957611cf9611b2f565b6001019392505050565b600060018201611d1557611d15611b2f565b5060010190565b600060208284031215611d3157611d31611a26565b8151801515811461109e57600080fd5b6000825160005b81811015611d625760208186018101518583015201611d48565b50600092019182525091905056fea26469706673582212207cd9f3c2b4d2b3f822012e089d0c06cf86358e4072571cf19184f934fd76012a64736f6c6343000814003300000000000000000000000073395dd2954333fe546414679b931fb08c84ae8100000000000000000000000092d5942f468447f1f21c2092580f15544923b434000000000000000000000000000000000000000000000000000000006724d0d000000000000000000000000000000000000000000000000000000000000151800000000000000000000000000000000000000000026c62ad77dc602dae000000
Deployed Bytecode
0x608060405234801561005d5760405162461bcd60e51b815260206004820152602260248201527f45746865722073656e7420746f206e6f6e2d70617961626c652066756e637469604482019081526137b760f11b6064830152608482fd5b50600436106101375760003560e01c80638da5cb5b116100d9578063a7310b58116100b3578063a7310b58146102ad578063acb751131461030f578063f2fde38b14610317578063fc0c546a1461032a57610137565b80638da5cb5b1461025457806399a9dbe814610279578063a694fc3a1461029a57610137565b806373cf575a1161011557806373cf575a1461021357806373d6a8891461021b5780637d9aff4b1461022e578063833e8bb61461024157610137565b8063370158ea1461019c5780634e71d92d14610201578063715018a61461020b575b60405162461bcd60e51b815260206004820152603560248201527f436f6e747261637420646f6573206e6f7420686176652066616c6c6261636b2060448201908152746e6f7220726563656976652066756e6374696f6e7360581b6064830152608482fd5b6101a4610351565b604080516001600160401b039a8b168152988a1660208a015296891696880196909652969093166060860152608085019190915260a084015260c083015260e0820192909252610100810191909152610120015b60405180910390f35b6102096103fd565b005b6102096104d2565b6102096104e4565b610209610229366004611a92565b61072d565b61020961023c366004611af5565b610846565b61020961024f366004611b13565b6109bf565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101f8565b61028c610287366004611b13565b610a43565b6040519081526020016101f8565b6102096102a8366004611b13565b610a91565b6102c06102bb366004611af5565b610c02565b60408051998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c08401526001600160401b031660e08301521515610100820152610120016101f8565b610209610cff565b610209610325366004611af5565b610ead565b6102617f00000000000000000000000092d5942f468447f1f21c2092580f15544923b43481565b60008060008060008060008060007f000000000000000000000000000000000000000000000000000000006724d0d07f0000000000000000000000000000000000000000000000000000000000015180600560009054906101000a90046001600160401b03166103bf610ee8565b6002546103d7670de0b6b3a764000062043d11611b45565b600354600454600654985098509850985098509850985098509850909192939495969798565b610405610fa2565b336000908152600760205260409020600481015460ff166104415760405162461bcd60e51b815260040161043890611b5c565b60405180910390fd5b600061044b610ee8565b905061045681610fcc565b6002820154600183015460009161047a916001600160401b0390911690849061101c565b90506000811161049c5760405162461bcd60e51b815260040161043890611ba3565b60028301805467ffffffffffffffff19166001600160401b0384161790556104c483826110a5565b5050506104d060018055565b565b6104da611196565b6104d060006111c3565b6104ec610fa2565b336000818152600760205260409020600481015460ff1661051f5760405162461bcd60e51b815260040161043890611b5c565b6000610529610ee8565b60028301549091506001600160401b0390811690821610156105a35760405162461bcd60e51b815260206004820152602d60248201527f5354414b453a464c45583a596f752063616e6e6f742065786974206265666f7260448201526c32903cb7bab91034b9903ab81760991b6064820152608401610438565b600182015460028301546000906105c4906001600160401b0316848461101c565b905080600260008282546105d89190611bed565b9091555050600284018054600060018701819055426001600160401b03908116600160401b026fffffffffffffffffffffffffffffffff199093169087161791909117909155600385018054839290610632908490611c00565b909155505060048401805460ff191690556006805490600061065383611c13565b9190505550806004600082825461066a9190611c00565b9250508190555081600360008282546106839190611bed565b9091555061069c9050610697846001611c2a565b610fcc565b6106db856106aa8385611c00565b6001600160a01b037f00000000000000000000000092d5942f468447f1f21c2092580f15544923b434169190611213565b60408051838152602081018390526001600160a01b038716917f54a9763035584fc4fcad1bc4e0e7a83f93e016f50ae32bd527530a77257393ee910160405180910390a250505050506104d060018055565b610735610fa2565b60405163d505accf60e01b81526001600160a01b038781166004830152306024830152604482018790526064820186905260ff8516608483015260a4820184905260c482018390527f00000000000000000000000092d5942f468447f1f21c2092580f15544923b434169063d505accf9060e401600060405180830381600087803b1580156108135760405162461bcd60e51b815260206004820152602560248201527f54617267657420636f6e747261637420646f6573206e6f7420636f6e7461696e604482019081526420636f646560d81b6064830152608482fd5b505af1158015610827573d6000803e3d6000fd5b505050506108358686611277565b61083e60018055565b505050505050565b61084e611196565b610856610fa2565b61085e611651565b42116108bf5760405162461bcd60e51b815260206004820152602a60248201527f5354414b453a464c45583a446973747269627574696f6e206973207374696c6c6044820152691031b7b73a34b73ab29760b11b6064820152608401610438565b600654156109355760405162461bcd60e51b815260206004820152603c60248201527f5354414b453a464c45583a5468657265206973207374696c6c2061637469766560448201527f20616e206163636f756e742061742074686520636f6e74726163742e000000006064820152608401610438565b60025461096e906001600160a01b037f00000000000000000000000092d5942f468447f1f21c2092580f15544923b43416908390611213565b600060028190556040519081526001600160a01b038216907ffc3c901b54b3eda21b5c2fac44318971c059dede078e02337447a82649704d6b9060200160405180910390a26109bc60018055565b50565b6109f47f00000000000000000000000092d5942f468447f1f21c2092580f15544923b4346001600160a01b03163330846116c7565b8060026000828254610a069190611c00565b909155505060405181815233907f034d8d86948028af29be6db4d39c10fa2a7fc4ea889c3b3f08a37bc5fe3757a89060200160405180910390a250565b6000815b60008181526008602052604090205415610a705760009081526008602052604090205492915050565b8015610a885780610a8081611c13565b915050610a47565b50600092915050565b610a99610fa2565b806001600160a01b037f00000000000000000000000092d5942f468447f1f21c2092580f15544923b4341663dd62ed3e336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015230602482015260440160206040518083038186803b158015610b5f5760405162461bcd60e51b815260206004820152602560248201527f54617267657420636f6e747261637420646f6573206e6f7420636f6e7461696e604482019081526420636f646560d81b6064830152608482fd5b505afa158015610b73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b979190611c51565b1015610bef5760405162461bcd60e51b815260206004820152602160248201527f5354414b453a464c45583a496e73756666696369656e7420616c6c6f77616e636044820152606560f81b6064820152608401610438565b610bf93382611277565b6109bc60018055565b6001600160a01b0381166000908152600760205260408120805460018201546002830154600384015460048501546001600160401b03948516969395600160401b84048616959294938493849391169160ff909116908115610cf1576000610c68611651565b60028301549091504290610c91906001600160401b0316610c87610ee8565b856001015461101c565b975080821115610cee576002830154610cb2906001600160401b0316611706565b6005546001600160401b03166000908152600860205260409020549097506402540be40090610ce1908d611b45565b610ceb9190611c83565b95505b50505b509193959799909294969850565b610d07610fa2565b42610d10611651565b11610d695760405162461bcd60e51b8152602060048201526024808201527f5354414b453a464c45583a54686520636f6e74726163742068617320657870696044820152633932b21760e11b6064820152608401610438565b336000908152600760205260409020600481015460ff16610d9c5760405162461bcd60e51b815260040161043890611b5c565b6000610da6610ee8565b610db1906001611c2a565b60028301546001840154919250600091610dd6916001600160401b031690849061101c565b905060008111610df85760405162461bcd60e51b815260040161043890611ba3565b80836001016000828254610e0c9190611c00565b909155505060028301805467ffffffffffffffff19166001600160401b03841617905560038054829190600090610e44908490611c00565b925050819055508060046000828254610e5d9190611c00565b90915550610e6c905082610fcc565b60405181815233907f2f3c266b110e692e19d05d63065a99cf2a1a080053892feefadab12b55fc364c9060200160405180910390a25050506104d060018055565b610eb5611196565b6001600160a01b038116610edf57604051631e4fbdf760e01b815260006004820152602401610438565b6109bc816111c3565b6000426001600160401b038082167f000000000000000000000000000000000000000000000000000000006724d0d09091161115610f2857600091505090565b610f30611651565b816001600160401b031610610f4d57610f4761181a565b91505090565b7f0000000000000000000000000000000000000000000000000000000000015180610f987f000000000000000000000000000000000000000000000000000000006724d0d083611c97565b610f479190611cb7565b600260015403610fc557604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b6005546001600160401b038083169116116109bc57610fe9611856565b6001600160401b0382166000818152600860205260409020919091556005805467ffffffffffffffff1916909117905550565b60008080855b856001600160401b0316816001600160401b03161015611089576001600160401b038116600090815260086020526040902054801561105f578092505b6110698387611b45565b6110739085611c00565b935050808061108190611cdd565b915050611022565b506110996402540be40083611c83565b925050505b9392505050565b6002820180546fffffffffffffffff00000000000000001916600160401b426001600160401b0316021790556003820180548291906000906110e8908490611c00565b9250508190555080600260008282546111019190611bed565b9091555033905061113c7f00000000000000000000000092d5942f468447f1f21c2092580f15544923b4346001600160a01b03168284611213565b816004600082825461114e9190611c00565b90915550506040518281526001600160a01b038216907fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a9060200160405180910390a2505050565b6000546001600160a01b031633146104d05760405163118cdaa760e01b8152336004820152602401610438565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b0383811660248301526044820183905261127291859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611899565b505050565b7f000000000000000000000000000000000000000000000000000000006724d0d06001600160401b031642116112ff5760405162461bcd60e51b815260206004820152602760248201527f5354414b453a5374616b696e672074696d6520686173206e6f7420737461727460448201526632b2103cb2ba1760c91b6064820152608401610438565b42611308611651565b116113555760405162461bcd60e51b815260206004820152601f60248201527f5354414b453a54686520636f6e74726163742068617320657870697265642e006044820152606401610438565b6040516370a0823160e01b81526001600160a01b03838116600483015282917f00000000000000000000000092d5942f468447f1f21c2092580f15544923b434909116906370a082319060240160206040518083038186803b15801561140a5760405162461bcd60e51b815260206004820152602560248201527f54617267657420636f6e747261637420646f6573206e6f7420636f6e7461696e604482019081526420636f646560d81b6064830152608482fd5b505afa15801561141e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114429190611c51565b10156114905760405162461bcd60e51b815260206004820181905260248201527f5354414b453a464c45583a496e73756666696369656e742062616c616e63652e6044820152606401610438565b6114c56001600160a01b037f00000000000000000000000092d5942f468447f1f21c2092580f15544923b434168330846116c7565b60006114cf610ee8565b6114da906001611c2a565b6001600160a01b0384166000908152600760205260408120600181015492935091900361154057805467ffffffffffffffff1916426001600160401b031617815560048101805460ff191660011790556006805490600061153a83611d03565b91905055505b60028101546001600160401b0316611559600184611c97565b6001600160401b031610158015611574575060008160010154115b156115ab576002810154600182015460009161159d916001600160401b0390911690859061101c565b90506115a982826110a5565b505b60028101805467ffffffffffffffff19166001600160401b0384161790556001810180548491906000906115e0908490611c00565b9250508190555082600360008282546115f99190611c00565b90915550611608905082610fcc565b836001600160a01b03167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d8460405161164391815260200190565b60405180910390a250505050565b60007f00000000000000000000000000000000000000000000000000000000000151806001600160401b031661168561181a565b61168f9190611b45565b6116c2906001600160401b037f000000000000000000000000000000000000000000000000000000006724d0d016611c00565b905090565b6040516001600160a01b0384811660248301528381166044830152606482018390526117009186918216906323b872dd90608401611240565b50505050565b6000807f00000000000000000000000000000000000000000000000000000000000151806001600160401b03167f000000000000000000000000000000000000000000000000000000006724d0d06001600160401b0316426117689190611bed565b6117729190611c83565b9050826001600160401b0316611786610ee8565b6001600160401b0316106117a65761179f600182611c00565b90506117b4565b6117b1600282611c00565b90505b6117e76001600160401b037f00000000000000000000000000000000000000000000000000000000000151801682611b45565b61109e906001600160401b037f000000000000000000000000000000000000000000000000000000006724d0d016611c00565b6000611831670de0b6b3a764000062043d11611b45565b6004546002546118419190611c00565b61184b9190611c83565b6116c2906001611c00565b60035460009015611893576003546402540be40061187f670de0b6b3a764000062043d11611b45565b6118899190611b45565b6116c29190611c83565b50600090565b60006118ae6001600160a01b038416836118fc565b905080516000141580156118d35750808060200190518101906118d19190611d1c565b155b1561127257604051635274afe760e01b81526001600160a01b0384166004820152602401610438565b606061190a83836000611913565b90505b92915050565b6060814710156119385760405163cd78605960e01b8152306004820152602401610438565b600080856001600160a01b031684866040516119549190611d41565b60006040518083038185875af1925050503d8060008114611991576040519150601f19603f3d011682016040523d82523d6000602084013e611996565b606091505b50915091506110998683836060826119b6576119b1826119fd565b61109e565b81511580156119cd57506001600160a01b0384163b155b156119f657604051639996b31560e01b81526001600160a01b0385166004820152602401610438565b508061109e565b805115611a0d5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60405162461bcd60e51b815260206004820152602260248201527f414249206465636f64696e673a207475706c65206461746120746f6f2073686f6044820152611c9d60f21b6064820152608481fd5b80356001600160a01b0381168114611a8d57600080fd5b919050565b60008060008060008060c08789031215611aae57611aae611a26565b611ab787611a76565b95506020870135945060408701359350606087013560ff81168114611adb57600080fd5b9598949750929560808101359460a0909101359350915050565b600060208284031215611b0a57611b0a611a26565b61190a82611a76565b600060208284031215611b2857611b28611a26565b5035919050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761190d5761190d611b2f565b60208082526027908201527f5354414b453a464c45583a596f752068617665206e6f6e65207374616b6564206040820152663a37b5b2b7399760c91b606082015260800190565b6020808252602a908201527f5354414b453a464c45583a4e6f207265776172642068617665206265656e206560408201526930b93732b2103cb2ba1760b11b606082015260800190565b8181038181111561190d5761190d611b2f565b8082018082111561190d5761190d611b2f565b600081611c2257611c22611b2f565b506000190190565b6001600160401b03818116838216019080821115611c4a57611c4a611b2f565b5092915050565b600060208284031215611c6657611c66611a26565b5051919050565b634e487b7160e01b600052601260045260246000fd5b600082611c9257611c92611c6d565b500490565b6001600160401b03828116828216039080821115611c4a57611c4a611b2f565b60006001600160401b0380841680611cd157611cd1611c6d565b92169190910492915050565b60006001600160401b03808316818103611cf957611cf9611b2f565b6001019392505050565b600060018201611d1557611d15611b2f565b5060010190565b600060208284031215611d3157611d31611a26565b8151801515811461109e57600080fd5b6000825160005b81811015611d625760208186018101518583015201611d48565b50600092019182525091905056fea26469706673582212207cd9f3c2b4d2b3f822012e089d0c06cf86358e4072571cf19184f934fd76012a64736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000073395dd2954333fe546414679b931fb08c84ae8100000000000000000000000092d5942f468447f1f21c2092580f15544923b434000000000000000000000000000000000000000000000000000000006724d0d000000000000000000000000000000000000000000000000000000000000151800000000000000000000000000000000000000000026c62ad77dc602dae000000
-----Decoded View---------------
Arg [0] : initialOwner (address): 0x73395DD2954333Fe546414679B931fB08C84ae81
Arg [1] : tokenAddress (address): 0x92D5942f468447f1F21c2092580F15544923b434
Arg [2] : launchTime (uint64): 1730466000
Arg [3] : rewardPeriod (uint64): 86400
Arg [4] : poolSize (uint256): 750000000000000000000000000
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000073395dd2954333fe546414679b931fb08c84ae81
Arg [1] : 00000000000000000000000092d5942f468447f1f21c2092580f15544923b434
Arg [2] : 000000000000000000000000000000000000000000000000000000006724d0d0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000015180
Arg [4] : 0000000000000000000000000000000000000000026c62ad77dc602dae000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.