More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 44 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 20185153 | 102 days ago | IN | 0 ETH | 0.00049651 | ||||
Claim | 19760432 | 161 days ago | IN | 0 ETH | 0.00054742 | ||||
Claim | 19659457 | 175 days ago | IN | 0 ETH | 0.00087688 | ||||
Withdraw All | 19570254 | 188 days ago | IN | 0 ETH | 0.00740608 | ||||
Claim | 19544817 | 191 days ago | IN | 0 ETH | 0.00145524 | ||||
Claim | 19438696 | 206 days ago | IN | 0 ETH | 0.00300578 | ||||
Withdraw All | 19338156 | 220 days ago | IN | 0 ETH | 0.00693584 | ||||
Claim | 18873529 | 286 days ago | IN | 0 ETH | 0.0008165 | ||||
Claim | 18739205 | 304 days ago | IN | 0 ETH | 0.00241482 | ||||
Claim | 18667873 | 314 days ago | IN | 0 ETH | 0.00175725 | ||||
Claim | 18667869 | 314 days ago | IN | 0 ETH | 0.00269838 | ||||
Withdraw All | 18602492 | 324 days ago | IN | 0 ETH | 0.00231939 | ||||
Claim | 18399963 | 352 days ago | IN | 0 ETH | 0.00094715 | ||||
Withdraw All | 18373630 | 356 days ago | IN | 0 ETH | 0.00097229 | ||||
Claim | 18239930 | 374 days ago | IN | 0 ETH | 0.00090611 | ||||
Withdraw All | 18149800 | 387 days ago | IN | 0 ETH | 0.00203361 | ||||
Withdraw All | 18043896 | 402 days ago | IN | 0 ETH | 0.0035352 | ||||
Stake | 17830184 | 432 days ago | IN | 0 ETH | 0.00275855 | ||||
Claim | 17727358 | 446 days ago | IN | 0 ETH | 0.00129026 | ||||
Withdraw All | 17633261 | 459 days ago | IN | 0 ETH | 0.00854404 | ||||
Claim | 17605862 | 463 days ago | IN | 0 ETH | 0.00101841 | ||||
Stake | 17585573 | 466 days ago | IN | 0 ETH | 0.00487438 | ||||
Claim | 17584987 | 466 days ago | IN | 0 ETH | 0.00193773 | ||||
Withdraw All | 17446736 | 486 days ago | IN | 0 ETH | 0.00260094 | ||||
Reset Reward | 17379968 | 495 days ago | IN | 0 ETH | 0.00195863 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
BambooDAOStaking
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./Recoverable.sol"; import "./Generatable.sol"; import "./Array.sol"; struct Fee { uint128 numerator; uint128 denominator; } struct PendingPeriod { uint128 repeat; uint128 period; } struct PendingAmount { uint32 createdAt; uint112 fullAmount; uint112 claimedAmount; PendingPeriod pendingPeriod; } /** * @title Contract that adds auto-compounding staking functionalities with whitelist support * @author artpumpkin * @notice Stakes any ERC20 token in a auto-compounding way using this contract */ contract BambooDAOStaking is Ownable, Pausable, Generatable, Recoverable { using Array for uint256[]; using SafeERC20 for IERC20; IERC20 private immutable _token; uint256 private constant YEAR = 365 days; uint152 public rewardRate; uint32 public rewardDuration = 12 weeks; uint32 private _rewardUpdatedAt = uint32(block.timestamp); uint32 public rewardFinishedAt; bool public whitelisted = false; mapping(address => bool) public isWhitelisted; uint256 private _totalStake; mapping(address => uint256) private _userStake; uint128 private _rewardPerToken; uint128 private _lastRewardPerTokenPaid; mapping(address => uint256) private _userRewardPerTokenPaid; Fee public fee = Fee(0, 1000); PendingPeriod public pendingPeriod = PendingPeriod({ repeat: 4, period: 7 days }); mapping(address => uint256[]) private _userPendingIds; mapping(address => mapping(uint256 => PendingAmount)) private _userPending; /** * @param token_ The ERC20 token address to enable staking for */ constructor(IERC20 token_) { _token = token_; } /** * @notice Computes the compounded total stake in real-time * @return totalStake The current compounded total stake */ function totalStake() public view returns (uint256) { return _totalStake + _earned(_totalStake, _lastRewardPerTokenPaid); } /** * @notice Gets the current staking APY (4 decimals) * @return apy The current staking APY */ function apy() external view returns (uint256) { if (block.timestamp > rewardFinishedAt || totalStake() == 0) { return 0; } return (rewardRate * YEAR * 100 * 100) / totalStake(); } /** * @notice Converts targeted APY (4 decimals) to rewards to set * @param apy_ The targeted APY to convert * @return rewards The amount of rewards to set to match the targeted APY */ function apyToAlphaRewards(uint256 apy_) external view returns (uint256) { return (totalStake() * rewardDuration * apy_) / (YEAR * 100 * 100); } /** * @notice Converts targeted APY (4 decimals) to rewards to increase/decrease * @dev This function can only be used if the reward duration isn't finished yet * @param apy_ The targeted APY to convert * @return rewards The amount of rewards to increase/decrease to match the targeted APY */ function apyToDeltaRewards(uint256 apy_) external view returns (int256) { require(block.timestamp <= rewardFinishedAt, "reward duration finished"); uint256 remainingReward = rewardRate * (rewardFinishedAt - block.timestamp); int256 results = int256((totalStake() * rewardDuration * apy_) / (YEAR * 100 * 100)) - int256(remainingReward); return results >= 0 ? results : -results; } /** * @notice Gets the current rewards for a specific duration in seconds * @param duration_ The specific duration in seconds * @return rewards The rewards computed for the inputed duration */ function rewardsForDuration(uint256 duration_) external view returns (uint256) { if (block.timestamp > rewardFinishedAt) { return 0; } return rewardRate * duration_; } /** * @notice Computes the compounded user stake in real-time * @param account_ The user address to use * @return userStake The current compounded user stake */ function userStake(address account_) external view returns (uint256) { return _userStake[account_] + earned(account_); } /** * @notice Returns the user pending amount metadata * @param account_ The user address to use * @param index_ The user pending index to use * @return pendingAmount The user pending amount metadata */ function userPending(address account_, uint256 index_) public view returns (PendingAmount memory) { uint256 id = _userPendingIds[account_][index_]; return _userPending[account_][id]; } /** * @notice Computes the user claimable pending percentage * @param account_ The user address to use * @param index_ The user pending index to use * @dev 18 decimals were used to not lose information * @return percentage The user claimable pending percentage */ function userClaimablePendingPercentage(address account_, uint256 index_) external view returns (uint256) { PendingAmount memory pendingAmount = userPending(account_, index_); uint256 n = getClaimablePendingPortion(pendingAmount); return n >= pendingAmount.pendingPeriod.repeat ? 100 * 1e9 : (n * 100 * 1e9) / pendingAmount.pendingPeriod.repeat; } /** * @notice Returns the user pending ids * @param account_ The user address to use * @return ids The user pending ids */ function userPendingIds(address account_) external view returns (uint256[] memory) { return _userPendingIds[account_]; } /** * @notice Returns the last time rewards were updated * @return lastTimeRewardActiveAt A timestamp of the last time the update reward modifier was called */ function lastTimeRewardActiveAt() public view returns (uint256) { return rewardFinishedAt > block.timestamp ? block.timestamp : rewardFinishedAt; } /** * @notice Returns the current reward per token value * @return rewardPerToken The accumulated reward per token value */ function rewardPerToken() public view returns (uint256) { if (_totalStake == 0) { return _rewardPerToken; } return _rewardPerToken + ((lastTimeRewardActiveAt() - _rewardUpdatedAt) * rewardRate * 1e9) / _totalStake; } /** * @notice Returns the total rewards available * @return totalDurationReward The total expected rewards for the current reward duration */ function totalDurationReward() external view returns (uint256) { return rewardRate * rewardDuration; } /** * @notice Returns the user earned rewards * @param account_ The user address to use * @return earned The user earned rewards */ function earned(address account_) private view returns (uint256) { return _earned(_userStake[account_], _userRewardPerTokenPaid[account_]); } /** * @notice Returns the accumulated rewards for a given staking amount * @param stakeAmount_ The staked token amount * @param rewardPerTokenPaid_ The already paid reward per token * @return _earned The earned rewards based on a staking amount and the reward per token paid */ function _earned(uint256 stakeAmount_, uint256 rewardPerTokenPaid_) internal view returns (uint256) { uint256 rewardPerTokenDiff = rewardPerToken() - rewardPerTokenPaid_; return (stakeAmount_ * rewardPerTokenDiff) / 1e9; } /** * @notice This modifier is used to update the rewards metadata for a specific account * @notice It is called for every user or owner interaction that changes the staking, the reward pool or the reward duration * @notice This is an extended modifier version of the Synthetix contract to support auto-compounding * @notice _rewardPerToken is accumulated every second * @notice _rewardUpdatedAt is updated for every interaction with this modifier * @param account_ The user address to use */ modifier updateReward(address account_) { _rewardPerToken = uint128(rewardPerToken()); _rewardUpdatedAt = uint32(lastTimeRewardActiveAt()); // auto-compounding if (account_ != address(0)) { uint256 reward = earned(account_); _userRewardPerTokenPaid[account_] = _rewardPerToken; _lastRewardPerTokenPaid = _rewardPerToken; _userStake[account_] += reward; _totalStake += reward; } _; } /** * @notice This modifier is used to check whether the sender is whitelisted or not */ modifier onlyWhitelist() { require(!whitelisted || isWhitelisted[msg.sender], "sender isn't whitelisted"); _; } /** * @notice Sets the contract to support whitelisting or not * @param value_ Boolean value indicating whether to enable whitelisting or not */ function setWhitelisted(bool value_) external onlyOwner { whitelisted = value_; emit WhitelistedSet(value_); } /** * @notice Sets an array of users to be whitelisted or not * @param users_ Users addresses * @param values_ Boolean values indicating whether the current user to be whitelisted or not */ function setIsWhitelisted(address[] calldata users_, bool[] calldata values_) external onlyOwner { require(users_.length == values_.length, "users_ and values_ have different lengths"); for (uint256 i = 0; i < users_.length; i++) { isWhitelisted[users_[i]] = values_[i]; } emit IsWhitelistedSet(users_, values_); } /** * @notice Stakes an amount of the ERC20 token * @param amount_ The amount to stake */ function stake(uint256 amount_) external whenNotPaused updateReward(msg.sender) onlyWhitelist { // checks require(amount_ > 0, "invalid input amount"); // effects _totalStake += amount_; _userStake[msg.sender] += amount_; // interactions _token.safeTransferFrom(msg.sender, address(this), amount_); emit Staked(msg.sender, amount_); } /** * @notice Creates a new pending after withdrawal * @param amount_ The amount to create pending for */ function createPending(uint256 amount_) internal { uint256 id = unique(); _userPendingIds[msg.sender].push(id); _userPending[msg.sender][id] = PendingAmount({ createdAt: uint32(block.timestamp), fullAmount: uint112(amount_), claimedAmount: 0, pendingPeriod: pendingPeriod }); emit PendingCreated(msg.sender, block.timestamp, amount_); } /** * @notice Cancels an existing pending * @param index_ The pending index to cancel */ function cancelPending(uint256 index_) external whenNotPaused updateReward(msg.sender) { PendingAmount memory pendingAmount = userPending(msg.sender, index_); uint256 amount = pendingAmount.fullAmount - pendingAmount.claimedAmount; deletePending(index_); // effects _totalStake += amount; _userStake[msg.sender] += amount; emit PendingCanceled(msg.sender, pendingAmount.createdAt, pendingAmount.fullAmount); } /** * @notice Deletes an existing pending * @param index_ The pending index to delete */ function deletePending(uint256 index_) internal { uint256[] storage ids = _userPendingIds[msg.sender]; uint256 id = ids[index_]; ids.remove(index_); delete _userPending[msg.sender][id]; } /** * @notice Withdraws an amount of the ERC20 token * @notice When you withdraw a pending will be created for that amount * @notice You will be able to claim the pending for after an exact vesting period * @param amount_ The amount to withdraw */ function _withdraw(uint256 amount_) internal { // effects _totalStake -= amount_; _userStake[msg.sender] -= amount_; createPending(amount_); emit Withdrawn(msg.sender, amount_); } /** * @notice Withdraws an amount of the ERC20 token * @param amount_ The amount to withdraw */ function withdraw(uint256 amount_) external whenNotPaused updateReward(msg.sender) { // checks require(_userStake[msg.sender] > 0, "user has no active stake"); require(amount_ > 0 && _userStake[msg.sender] >= amount_, "invalid input amount"); // effects _withdraw(amount_); } /** * @notice Withdraws the full amount of the ERC20 token */ function withdrawAll() external whenNotPaused updateReward(msg.sender) { // checks require(_userStake[msg.sender] > 0, "user has no active stake"); // effects _withdraw(_userStake[msg.sender]); } /** * @notice Gets the user claimable pending portion * @param pendingAmount_ The pending amount metadata to use */ function getClaimablePendingPortion(PendingAmount memory pendingAmount_) private view returns (uint256) { return (block.timestamp - pendingAmount_.createdAt) / pendingAmount_.pendingPeriod.period; // 0 1 2 3 4 } /** * @notice Updates the claiming fee * @param numerator_ The fee numerator * @param denominator_ The fee denominator */ function setFee(uint128 numerator_, uint128 denominator_) external onlyOwner { require(denominator_ != 0, "denominator must not equal 0"); fee = Fee(numerator_, denominator_); emit FeeSet(numerator_, denominator_); } /** * @notice User can claim a specific pending by index * @param index_ The pending index to claim */ function claim(uint256 index_) external whenNotPaused { // checks uint256 id = _userPendingIds[msg.sender][index_]; PendingAmount storage pendingAmount = _userPending[msg.sender][id]; uint256 n = getClaimablePendingPortion(pendingAmount); require(n != 0, "claim is still pending"); uint256 amount; /** * @notice n is the user claimable pending portion * @notice Checking if user n and the user MAX n are greater than or equal * @notice That way we know if the user wants to claim the full amount or just part of it */ if (n >= pendingAmount.pendingPeriod.repeat) { amount = pendingAmount.fullAmount - pendingAmount.claimedAmount; } else { uint256 percentage = (n * 1e9) / pendingAmount.pendingPeriod.repeat; amount = (pendingAmount.fullAmount * percentage) / 1e9 - pendingAmount.claimedAmount; } // effects /** * @notice Pending is completely done * @notice It will remove the pending item */ if (n >= pendingAmount.pendingPeriod.repeat) { uint256 createdAt = pendingAmount.createdAt; uint256 fullAmount = pendingAmount.fullAmount; deletePending(index_); emit PendingFinished(msg.sender, createdAt, fullAmount); } /** * @notice Pending is partially done * @notice It will update the pending item */ else { pendingAmount.claimedAmount += uint112(amount); emit PendingUpdated(msg.sender, pendingAmount.createdAt, pendingAmount.fullAmount); } // interactions uint256 feeAmount = (amount * fee.numerator) / fee.denominator; _token.safeTransfer(msg.sender, amount - feeAmount); emit Claimed(msg.sender, amount); } /** * @notice Owner can set staking rewards * @param reward_ The reward amount to set */ function setReward(uint256 reward_) external onlyOwner updateReward(address(0)) { resetReward(); // checks require(reward_ > 0, "invalid input amount"); // effects rewardRate = uint152(reward_ / rewardDuration); _rewardUpdatedAt = uint32(block.timestamp); rewardFinishedAt = uint32(block.timestamp + rewardDuration); // interactions _token.safeTransferFrom(owner(), address(this), reward_); emit RewardSet(reward_); } /** * @notice Owner can increase staking rewards only if the duration isn't finished yet * @notice Increasing rewards doesn't alter the reward finish time * @param reward_ The reward amount to increase */ function increaseReward(uint256 reward_) external onlyOwner updateReward(address(0)) { // checks require(reward_ > 0, "invalid input amount"); require(block.timestamp <= rewardFinishedAt, "reward duration finished"); // effects uint256 remainingReward = rewardRate * (rewardFinishedAt - block.timestamp); rewardRate = uint152((remainingReward + reward_) / (rewardFinishedAt - block.timestamp)); _rewardUpdatedAt = uint32(block.timestamp); // interactions _token.safeTransferFrom(owner(), address(this), reward_); emit RewardIncreased(reward_); } /** * @notice Owner can decrease staking rewards only if the duration isn't finished yet * @notice Decreasing rewards doesn't alter the reward finish time * @param reward_ The reward amount to decrease */ function decreaseReward(uint256 reward_) external onlyOwner updateReward(address(0)) { // checks require(reward_ > 0, "invalid input amount"); require(block.timestamp <= rewardFinishedAt, "reward duration finished"); // effects uint256 remainingReward = rewardRate * (rewardFinishedAt - block.timestamp); require(remainingReward > reward_, "invalid input amount"); rewardRate = uint152((remainingReward - reward_) / (rewardFinishedAt - block.timestamp)); _rewardUpdatedAt = uint32(block.timestamp); // interactions _token.safeTransfer(owner(), reward_); emit RewardDecreased(reward_); } /** * @notice Owner can rest all rewards and reward finish time back to 0 */ function resetReward() public onlyOwner updateReward(address(0)) { if (rewardFinishedAt <= block.timestamp) { rewardRate = 0; _rewardUpdatedAt = uint32(block.timestamp); rewardFinishedAt = uint32(block.timestamp); } else { // checks uint256 remainingReward = rewardRate * (rewardFinishedAt - block.timestamp); // effects rewardRate = 0; _rewardUpdatedAt = uint32(block.timestamp); rewardFinishedAt = uint32(block.timestamp); // interactions _token.safeTransfer(owner(), remainingReward); } emit RewardReseted(); } /** * @notice Owner can update the reward duration * @notice It can only be updated if the old reward duration is already finished * @param rewardDuration_ The reward rewardDuration_ to use */ function setRewardDuration(uint32 rewardDuration_) external onlyOwner { require(block.timestamp > rewardFinishedAt, "reward duration must be finalized"); rewardDuration = rewardDuration_; emit RewardDurationSet(rewardDuration_); } /** * @notice Owner can set the pending period * @notice If we want a vesting period of 7 days 4 times, we can have the repeat as 4 and the period as 7 days * @param repeat_ The number of times to keep a withdrawal pending * @param period_ The period between each repeat */ function setPendingPeriod(uint128 repeat_, uint128 period_) external onlyOwner { pendingPeriod = PendingPeriod(repeat_, period_); emit PendingPeriodSet(repeat_, period_); } /** * @notice Owner can pause the staking contract */ function pause() external whenNotPaused onlyOwner { _pause(); } /** * @notice Owner can resume the staking contract */ function unpause() external whenPaused onlyOwner { _unpause(); } event Staked(address indexed account, uint256 amount); event PendingCreated(address indexed account, uint256 createdAt, uint256 amount); event PendingUpdated(address indexed account, uint256 createdAt, uint256 amount); event PendingFinished(address indexed account, uint256 createdAt, uint256 amount); event PendingCanceled(address indexed account, uint256 createdAt, uint256 amount); event Withdrawn(address indexed account, uint256 amount); event Claimed(address indexed account, uint256 amount); event RewardSet(uint256 amount); event RewardIncreased(uint256 amount); event RewardDecreased(uint256 amount); event RewardReseted(); event RewardDurationSet(uint256 duration); event PendingPeriodSet(uint256 repeat, uint256 period); event FeeSet(uint256 numerator, uint256 denominator); event WhitelistedSet(bool value); event IsWhitelistedSet(address[] users, bool[] values); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev 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 { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) 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 Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { 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 // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @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. */ 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]. */ 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 v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @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 amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) 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(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title Array * @author artpumpkin * @notice Adds utility functions to an array of integers */ library Array { /** * @notice Removes an array item by index * @dev This is a O(1) time-complexity algorithm without persiting the order * @param array_ A reference value to the array * @param index_ An item index to be removed */ function remove(uint256[] storage array_, uint256 index_) internal { require(index_ < array_.length, "index out of bound"); array_[index_] = array_[array_.length - 1]; array_.pop(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title Generatable * @author artpumpkin * @notice Generates a unique id */ contract Generatable { uint256 private _id; /** * @notice Generates a unique id * @return id The newly generated id */ function unique() internal returns (uint256) { _id += 1; return _id; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; /** * @title Recoverable * @author artpumpkin * @notice Recovers stuck BNB or ERC20 tokens * @dev You can inhertit from this contract to support recovering stuck tokens or BNB */ contract Recoverable is Ownable { using SafeERC20 for IERC20; /** * @notice Recovers stuck ERC20 token in the contract * @param token_ An ERC20 token address * @param amount_ Amount to recover */ function recoverERC20(address token_, uint256 amount_) external onlyOwner { IERC20 erc20 = IERC20(token_); require(erc20.balanceOf(address(this)) >= amount_, "invalid input amount"); erc20.safeTransfer(owner(), amount_); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "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":"contract IERC20","name":"token_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"numerator","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"FeeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"users","type":"address[]"},{"indexed":false,"internalType":"bool[]","name":"values","type":"bool[]"}],"name":"IsWhitelistedSet","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":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"createdAt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PendingCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"createdAt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PendingCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"createdAt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PendingFinished","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"repeat","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"period","type":"uint256"}],"name":"PendingPeriodSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"createdAt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PendingUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardDecreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"RewardDurationSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardIncreased","type":"event"},{"anonymous":false,"inputs":[],"name":"RewardReseted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"value","type":"bool"}],"name":"WhitelistedSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"apy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"apy_","type":"uint256"}],"name":"apyToAlphaRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"apy_","type":"uint256"}],"name":"apyToDeltaRewards","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index_","type":"uint256"}],"name":"cancelPending","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index_","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"reward_","type":"uint256"}],"name":"decreaseReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint128","name":"numerator","type":"uint128"},{"internalType":"uint128","name":"denominator","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"reward_","type":"uint256"}],"name":"increaseReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardActiveAt","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":[],"name":"pendingPeriod","outputs":[{"internalType":"uint128","name":"repeat","type":"uint128"},{"internalType":"uint128","name":"period","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resetReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardDuration","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardFinishedAt","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint152","name":"","type":"uint152"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"duration_","type":"uint256"}],"name":"rewardsForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"numerator_","type":"uint128"},{"internalType":"uint128","name":"denominator_","type":"uint128"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"users_","type":"address[]"},{"internalType":"bool[]","name":"values_","type":"bool[]"}],"name":"setIsWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"repeat_","type":"uint128"},{"internalType":"uint128","name":"period_","type":"uint128"}],"name":"setPendingPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"reward_","type":"uint256"}],"name":"setReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"rewardDuration_","type":"uint32"}],"name":"setRewardDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value_","type":"bool"}],"name":"setWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalDurationReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"},{"internalType":"uint256","name":"index_","type":"uint256"}],"name":"userClaimablePendingPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"},{"internalType":"uint256","name":"index_","type":"uint256"}],"name":"userPending","outputs":[{"components":[{"internalType":"uint32","name":"createdAt","type":"uint32"},{"internalType":"uint112","name":"fullAmount","type":"uint112"},{"internalType":"uint112","name":"claimedAmount","type":"uint112"},{"components":[{"internalType":"uint128","name":"repeat","type":"uint128"},{"internalType":"uint128","name":"period","type":"uint128"}],"internalType":"struct PendingPeriod","name":"pendingPeriod","type":"tuple"}],"internalType":"struct PendingAmount","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"}],"name":"userPendingIds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"}],"name":"userStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6002805461375f60a11b600160981b600160d81b0319909116600160b81b63ffffffff42160217176001600160f81b03169055600060a0526103e860c052607d60831b600855610120604052600460e05262093a806101005272093a80000000000000000000000000000000046009553480156200007c57600080fd5b5060405162003362380380620033628339810160408190526200009f916200011d565b620000aa33620000cd565b6000805460ff60a01b1916905560601b6001600160601b0319166080526200014d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156200012f578081fd5b81516001600160a01b038116811462000146578182fd5b9392505050565b60805160601c6131d36200018f600039600081816107ea01528181610bc30152818161123f015281816116d901528181611bc901526121e601526131d36000f3fe608060405234801561001057600080fd5b50600436106102485760003560e01c80637a7ad8931161013b5780638da5cb5b116100b8578063cd3daf9d1161007c578063cd3daf9d1461055c578063ddca3f4314610564578063f2fde38b146105a2578063f520e7e5146105b5578063fbc5d1ed146105cc57600080fd5b80638da5cb5b1461050b578063a1ad261014610526578063a694fc3a1461052e578063acc59b8614610541578063ad4ed54f1461054957600080fd5b8063853828b6116100ff578063853828b6146104c25780638980f11f146104ca5780638aae3167146104dd5780638b0e9f3f146104f05780638baca6a5146104f857600080fd5b80637a7ad8931461043d5780637a88a997146104505780637b0a47ee1461047c5780637b789204146104a75780638456cb59146104ba57600080fd5b80633d9287fa116101c95780635f1bec331161018d5780635f1bec33146103dc57806365d1948f146103ef57806368e5585d14610402578063715018a6146104155780637742e2e91461041d57600080fd5b80633d9287fa146103935780633f4ba83a146103a75780635588fdf1146103af57806355c64ce1146103c25780635c975abb146103ca57600080fd5b806331e359e91161021057806331e359e9146102c157806334fbb6e314610332578063379607f5146103455780633af32abf146103585780633bcfc4b81461038b57600080fd5b806303f109931461024d57806325c85a95146102625780632851a94614610275578063293be4561461029b5780632e1a7d4d146102ae575b600080fd5b61026061025b366004612e10565b6105ea565b005b610260610270366004612e40565b61084b565b610288610283366004612e10565b610916565b6040519081526020015b60405180910390f35b6102606102a9366004612e10565b610a00565b6102606102bc366004612e10565b610c23565b6102d46102cf366004612d14565b610db2565b6040516102929190815163ffffffff1681526020808301516001600160701b03908116828401526040808501519091169083015260609283015180516001600160801b03908116948401949094520151909116608082015260a00190565b610288610340366004612e10565b610ebf565b610260610353366004612e10565b610f19565b61037b610366366004612cf3565b60036020526000908152604090205460ff1681565b6040519015158152602001610292565b6102886112a3565b60025461037b90600160f81b900460ff1681565b61026061131b565b6102606103bd366004612e10565b611335565b6102606114f7565b600054600160a01b900460ff1661037b565b6102886103ea366004612d14565b61172e565b6102606103fd366004612d3d565b6117a8565b610288610410366004612cf3565b611908565b610260611936565b61043061042b366004612cf3565b611948565b6040516102929190612f0d565b61026061044b366004612e10565b6119b4565b60025461046790600160d81b900463ffffffff1681565b60405163ffffffff9091168152602001610292565b60025461048f906001600160981b031681565b6040516001600160981b039091168152602001610292565b6102606104b5366004612da6565b611c20565b610260611c77565b610260611c8f565b6102606104d8366004612d14565b611df2565b6102606104eb366004612dde565b611ebe565b610288611f7e565b610288610506366004612e10565b611fad565b6000546040516001600160a01b039091168152602001610292565b610288611fe6565b61026061053c366004612e10565b612019565b610288612248565b610260610557366004612dde565b61227c565b6102886122e6565b600854610582906001600160801b0380821691600160801b90041682565b604080516001600160801b03938416815292909116602083015201610292565b6102606105b0366004612cf3565b61236b565b60025461046790600160981b900463ffffffff1681565b600954610582906001600160801b0380821691600160801b90041682565b6105f26123e1565b60006105fc6122e6565b600680546001600160801b0319166001600160801b0392909216919091179055610624611fe6565b6002805463ffffffff92909216600160b81b0263ffffffff60b81b199092169190911790556001600160a01b038116156106db5760006106638261243b565b600680546001600160a01b03851660009081526007602090815260408083206001600160801b0394851690558454909316600160801b81021790935560059092528120805492935083929091906106bb908490613014565b9250508190555080600460008282546106d49190613014565b9091555050505b600082116107045760405162461bcd60e51b81526004016106fb90612fbb565b60405180910390fd5b600254600160d81b900463ffffffff164211156107335760405162461bcd60e51b81526004016106fb90612f84565b600254600090610751904290600160d81b900463ffffffff16613101565b60025461076791906001600160981b031661307b565b600254909150610785904290600160d81b900463ffffffff16613101565b61078f8483613014565b610799919061302c565b600280546001600160981b0392909216600167ffffffff0000000160981b031990921691909117600160b81b4263ffffffff1602179055600054610812906001600160a01b03166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016903086612469565b6040518381527f5492efc1de42b0db13f77bb09932eca69805413de511c6334aa0e3eac3ac4b3f906020015b60405180910390a1505050565b6108536123e1565b600254600160d81b900463ffffffff1642116108bb5760405162461bcd60e51b815260206004820152602160248201527f726577617264206475726174696f6e206d7573742062652066696e616c697a656044820152601960fa1b60648201526084016106fb565b6002805463ffffffff60981b1916600160981b63ffffffff8416908102919091179091556040519081527f823b3cede11929e1b876086e20886121c9c32f04426a36ed323a85d541df3b8e906020015b60405180910390a150565b600254600090600160d81b900463ffffffff164211156109485760405162461bcd60e51b81526004016106fb90612f84565b600254600090610966904290600160d81b900463ffffffff16613101565b60025461097c91906001600160981b031661307b565b90506000816109906301e13380606461307b565b61099b90606461307b565b6002548690600160981b900463ffffffff166109b5611f7e565b6109bf919061307b565b6109c9919061307b565b6109d3919061302c565b6109dd919061309a565b905060008112156109f6576109f18161315f565b6109f8565b805b949350505050565b610a086123e1565b6000610a126122e6565b600680546001600160801b0319166001600160801b0392909216919091179055610a3a611fe6565b6002805463ffffffff92909216600160b81b0263ffffffff60b81b199092169190911790556001600160a01b03811615610af1576000610a798261243b565b600680546001600160a01b03851660009081526007602090815260408083206001600160801b0394851690558454909316600160801b8102179093556005909252812080549293508392909190610ad1908490613014565b925050819055508060046000828254610aea9190613014565b9091555050505b610af96114f7565b60008211610b195760405162461bcd60e51b81526004016106fb90612fbb565b600254610b3390600160981b900463ffffffff168361302c565b6002805463ffffffff42818116600160b81b02600167ffffffff0000000160981b03199093166001600160981b0395909516949094179190911791829055610b8492600160981b9092041690613014565b6002601b6101000a81548163ffffffff021916908363ffffffff160217905550610beb610bb96000546001600160a01b031690565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016903085612469565b6040518281527f4c42db8a799110fdd6a26148a21a5fbe4e581c926bccfd3b2d8a7f3aed4a87c8906020015b60405180910390a15050565b610c2b6124da565b33610c346122e6565b600680546001600160801b0319166001600160801b0392909216919091179055610c5c611fe6565b6002805463ffffffff92909216600160b81b0263ffffffff60b81b199092169190911790556001600160a01b03811615610d13576000610c9b8261243b565b600680546001600160a01b03851660009081526007602090815260408083206001600160801b0394851690558454909316600160801b8102179093556005909252812080549293508392909190610cf3908490613014565b925050819055508060046000828254610d0c9190613014565b9091555050505b33600090815260056020526040902054610d6a5760405162461bcd60e51b81526020600482015260186024820152777573657220686173206e6f20616374697665207374616b6560401b60448201526064016106fb565b600082118015610d895750336000908152600560205260409020548211155b610da55760405162461bcd60e51b81526004016106fb90612fbb565b610dae82612527565b5050565b610de96040805160808101825260008082526020808301829052828401829052835180850190945281845283015290606082015290565b6001600160a01b0383166000908152600a60205260408120805484908110610e2157634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0387168352600b82526040808420918452908252918290208251608081018452815463ffffffff811682526001600160701b03600160201b8204811683860152600160901b909104168185015283518085019094526001909101546001600160801b038082168552600160801b9091041691830191909152606081019190915291505092915050565b6000610ed06301e13380606461307b565b610edb90606461307b565b6002548390600160981b900463ffffffff16610ef5611f7e565b610eff919061307b565b610f09919061307b565b610f13919061302c565b92915050565b610f216124da565b336000908152600a60205260408120805483908110610f5057634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910154338352600b8252604080842082855283528084208151608081018352815463ffffffff811682526001600160701b03600160201b8204811683880152600160901b9091041681840152825180840190935260018201546001600160801b038082168552600160801b909104169483019490945260608401919091529093509190610fe7906125a4565b90508061102f5760405162461bcd60e51b8152602060048201526016602482015275636c61696d206973207374696c6c2070656e64696e6760501b60448201526064016106fb565b60018201546000906001600160801b0316821061107b57825461106b906001600160701b03600160901b8204811691600160201b9004166130d9565b6001600160701b031690506110ed565b60018301546000906001600160801b031661109a84633b9aca0061307b565b6110a4919061302c565b84549091506001600160701b03600160901b8204811691633b9aca00916110d5918591600160201b9091041661307b565b6110df919061302c565b6110e99190613101565b9150505b60018301546001600160801b0316821061116657825463ffffffff811690600160201b90046001600160701b0316611124876125cc565b604080518381526020810183905233917fff6ae62d9a44071b98c2279beedb19b575bf1b7fe8a1023bc4db72576d3c90ea910160405180910390a250506111f8565b82548190849060129061118a908490600160901b90046001600160701b0316612fe9565b82546101009290920a6001600160701b0381810219909316918316021790915584546040805163ffffffff83168152600160201b90920490921660208201523392507ff1d09c825c0c0c0aa75e123dad6f4952d6b7be70e210fbf70498222c7a1a1d51910160405180910390a25b6008546000906001600160801b03600160801b820481169161121b91168461307b565b611225919061302c565b9050611266336112358385613101565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016919061263e565b60405182815233907fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a9060200160405180910390a2505050505050565b600254600090600160d81b900463ffffffff164211806112c857506112c6611f7e565b155b156112d35750600090565b6112db611f7e565b6002546112f6906301e13380906001600160981b031661307b565b61130190606461307b565b61130c90606461307b565b611316919061302c565b905090565b61132361266e565b61132b6123e1565b6113336126be565b565b61133d6124da565b336113466122e6565b600680546001600160801b0319166001600160801b039290921691909117905561136e611fe6565b6002805463ffffffff92909216600160b81b0263ffffffff60b81b199092169190911790556001600160a01b038116156114255760006113ad8261243b565b600680546001600160a01b03851660009081526007602090815260408083206001600160801b0394851690558454909316600160801b8102179093556005909252812080549293508392909190611405908490613014565b92505081905550806004600082825461141e9190613014565b9091555050505b60006114313384610db2565b905060008160400151826020015161144991906130d9565b6001600160701b0316905061145d846125cc565b806004600082825461146f9190613014565b90915550503360009081526005602052604081208054839290611493908490613014565b90915550508151602083015160405133927f836348d0e7c4283f31d2f8c39cd96a0bb83b92f031b249f3ede8843ab3cf9f43926114e99263ffffffff9290921682526001600160701b0316602082015260400190565b60405180910390a250505050565b6114ff6123e1565b60006115096122e6565b600680546001600160801b0319166001600160801b0392909216919091179055611531611fe6565b6002805463ffffffff92909216600160b81b0263ffffffff60b81b199092169190911790556001600160a01b038116156115e85760006115708261243b565b600680546001600160a01b03851660009081526007602090815260408083206001600160801b0394851690558454909316600160801b81021790935560059092528120805492935083929091906115c8908490613014565b9250508190555080600460008282546115e19190613014565b9091555050505b60025442600160d81b90910463ffffffff1611611646576002805460016bffffffffffffffff0000000160981b031916600160b81b4263ffffffff1690810263ffffffff60d81b191691909117600160d81b91909102179055611702565b600254600090611664904290600160d81b900463ffffffff16613101565b60025461167a91906001600160981b031661307b565b6002805460016bffffffffffffffff0000000160981b031916600160b81b4263ffffffff1690810263ffffffff60d81b191691909117600160d81b91909102179055600054909150611700906001600160a01b03166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016908361263e565b505b6040517f011151fee38e81be17b15779d66e09f0ef9580477dc2bfcaa42c52e600dd8ace90600090a150565b60008061173b8484610db2565b90506000611748826125a4565b6060830151519091506001600160801b0316811015611798576060820151516001600160801b031661177b82606461307b565b61178990633b9aca0061307b565b611793919061302c565b61179f565b64174876e8005b95945050505050565b6117b06123e1565b8281146118115760405162461bcd60e51b815260206004820152602960248201527f75736572735f20616e642076616c7565735f206861766520646966666572656e60448201526874206c656e6774687360b81b60648201526084016106fb565b60005b838110156118c45782828281811061183c57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906118519190612da6565b6003600087878581811061187557634e487b7160e01b600052603260045260246000fd5b905060200201602081019061188a9190612cf3565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806118bc81613144565b915050611814565b507fa0c1f30b2947a115af9a029333ba23f2d8cb329761c50800f1cd57dd7f817e7d848484846040516118fa9493929190612e80565b60405180910390a150505050565b60006119138261243b565b6001600160a01b038316600090815260056020526040902054610f139190613014565b61193e6123e1565b6113336000612713565b6001600160a01b0381166000908152600a60209081526040918290208054835181840281018401909452808452606093928301828280156119a857602002820191906000526020600020905b815481526020019060010190808311611994575b50505050509050919050565b6119bc6123e1565b60006119c66122e6565b600680546001600160801b0319166001600160801b03929092169190911790556119ee611fe6565b6002805463ffffffff92909216600160b81b0263ffffffff60b81b199092169190911790556001600160a01b03811615611aa5576000611a2d8261243b565b600680546001600160a01b03851660009081526007602090815260408083206001600160801b0394851690558454909316600160801b8102179093556005909252812080549293508392909190611a85908490613014565b925050819055508060046000828254611a9e9190613014565b9091555050505b60008211611ac55760405162461bcd60e51b81526004016106fb90612fbb565b600254600160d81b900463ffffffff16421115611af45760405162461bcd60e51b81526004016106fb90612f84565b600254600090611b12904290600160d81b900463ffffffff16613101565b600254611b2891906001600160981b031661307b565b9050828111611b495760405162461bcd60e51b81526004016106fb90612fbb565b600254611b64904290600160d81b900463ffffffff16613101565b611b6e8483613101565b611b78919061302c565b600280546001600160981b0392909216600167ffffffff0000000160981b031990921691909117600160b81b4263ffffffff1602179055600054611bf0906001600160a01b03166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016908561263e565b6040518381527f59aabd199d2751695ba57141a25f9503cd30c281e0f9848bb81f3413faad19f99060200161083e565b611c286123e1565b60028054821515600160f81b026001600160f81b039091161790556040517fb01836c6aa0dfdafd7081c08627c0650add748ccade91d36a50b7607ceb81c5d9061090b90831515815260200190565b611c7f6124da565b611c876123e1565b611333612763565b611c976124da565b33611ca06122e6565b600680546001600160801b0319166001600160801b0392909216919091179055611cc8611fe6565b6002805463ffffffff92909216600160b81b0263ffffffff60b81b199092169190911790556001600160a01b03811615611d7f576000611d078261243b565b600680546001600160a01b03851660009081526007602090815260408083206001600160801b0394851690558454909316600160801b8102179093556005909252812080549293508392909190611d5f908490613014565b925050819055508060046000828254611d789190613014565b9091555050505b33600090815260056020526040902054611dd65760405162461bcd60e51b81526020600482015260186024820152777573657220686173206e6f20616374697665207374616b6560401b60448201526064016106fb565b33600090815260056020526040902054611def90612527565b50565b611dfa6123e1565b6040516370a0823160e01b8152306004820152829082906001600160a01b038316906370a082319060240160206040518083038186803b158015611e3d57600080fd5b505afa158015611e51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e759190612e28565b1015611e935760405162461bcd60e51b81526004016106fb90612fbb565b611eb9611ea86000546001600160a01b031690565b6001600160a01b038316908461263e565b505050565b611ec66123e1565b6001600160801b038116611f1c5760405162461bcd60e51b815260206004820152601c60248201527f64656e6f6d696e61746f72206d757374206e6f7420657175616c20300000000060448201526064016106fb565b6040805180820182526001600160801b038481168083529084166020928301819052600160801b810282176008558351918252918101919091527f74dbbbe280ef27b79a8a0c449d5ae2ba7a31849103241d0f98df70bbc9d03e379101610c17565b600454600654600091611fa091600160801b90046001600160801b03166127a6565b6004546113169190613014565b600254600090600160d81b900463ffffffff16421115611fcf57506000919050565b600254610f139083906001600160981b031661307b565b60025460009042600160d81b90910463ffffffff16116120145750600254600160d81b900463ffffffff1690565b504290565b6120216124da565b3361202a6122e6565b600680546001600160801b0319166001600160801b0392909216919091179055612052611fe6565b6002805463ffffffff92909216600160b81b0263ffffffff60b81b199092169190911790556001600160a01b038116156121095760006120918261243b565b600680546001600160a01b03851660009081526007602090815260408083206001600160801b0394851690558454909316600160801b81021790935560059092528120805492935083929091906120e9908490613014565b9250508190555080600460008282546121029190613014565b9091555050505b600254600160f81b900460ff16158061213157503360009081526003602052604090205460ff165b61217d5760405162461bcd60e51b815260206004820152601860248201527f73656e6465722069736e27742077686974656c6973746564000000000000000060448201526064016106fb565b6000821161219d5760405162461bcd60e51b81526004016106fb90612fbb565b81600460008282546121af9190613014565b909155505033600090815260056020526040812080548492906121d3908490613014565b9091555061220e90506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085612469565b60405182815233907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d906020015b60405180910390a25050565b60025460009061226e9063ffffffff600160981b820416906001600160981b031661304c565b6001600160981b0316905090565b6122846123e1565b6040805180820182526001600160801b038481168083529084166020928301819052600160801b810282176009558351918252918101919091527fec6af74db0ef2b872cf39eee53dedb278f1808b74a5bf127270d9bb94711690b9101610c17565b60006004546000141561230357506006546001600160801b031690565b6004546002546001600160981b03811690600160b81b900463ffffffff16612329611fe6565b6123339190613101565b61233d919061307b565b61234b90633b9aca0061307b565b612355919061302c565b60065461131691906001600160801b0316613014565b6123736123e1565b6001600160a01b0381166123d85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106fb565b611def81612713565b6000546001600160a01b031633146113335760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106fb565b6001600160a01b0381166000908152600560209081526040808320546007909252822054610f1391906127a6565b6040516001600160a01b03808516602483015283166044820152606481018290526124d49085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526127d7565b50505050565b600054600160a01b900460ff16156113335760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106fb565b80600460008282546125399190613101565b9091555050336000908152600560205260408120805483929061255d908490613101565b9091555061256c9050816128a9565b60405181815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59060200160405180910390a250565b60608101516020015181516000916001600160801b031690610f099063ffffffff1642613101565b336000908152600a60205260408120805490919082908490811061260057634e487b7160e01b600052603260045260246000fd5b600091825260209091200154905061261882846129ec565b336000908152600b60209081526040808320938352929052908120818155600101555050565b6040516001600160a01b038316602482015260448101829052611eb990849063a9059cbb60e01b9060640161249d565b600054600160a01b900460ff166113335760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106fb565b6126c661266e565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61276b6124da565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586126f63390565b600080826127b26122e6565b6127bc9190613101565b9050633b9aca006127cd828661307b565b6109f8919061302c565b600061282c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612ad09092919063ffffffff16565b805190915015611eb9578080602001905181019061284a9190612dc2565b611eb95760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106fb565b60006128b3612adf565b336000818152600a6020908152604080832080546001818101835591855283852001869055815160808101835263ffffffff4281811683526001600160701b03808c16848801908152848701898152875180890189526009546001600160801b038082168352600160801b918290048116838d0152606089019283528d8d52600b8c528a8d208f8e528c529b8a902097518854945193518616600160901b0271ffffffffffffffffffffffffffffffffffff94909616600160201b0271ffffffffffffffffffffffffffffffffffff199095169716969096179290921716919091178455518051960151871690910294909516939093179201919091555192935090917fdbe555b3504d78e1f2b7609ccf7fefd0ba8b38fd5b87f701f3cc87cc0e0e646b9161223c918690918252602082015260400190565b81548110612a315760405162461bcd60e51b81526020600482015260126024820152711a5b99195e081bdd5d081bd988189bdd5b9960721b60448201526064016106fb565b81548290612a4190600190613101565b81548110612a5f57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154828281548110612a8a57634e487b7160e01b600052603260045260246000fd5b906000526020600020018190555081805480612ab657634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590555050565b60606109f88484600085612b00565b60006001806000828254612af39190613014565b9091555050600154919050565b606082471015612b615760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106fb565b600080866001600160a01b03168587604051612b7d9190612e64565b60006040518083038185875af1925050503d8060008114612bba576040519150601f19603f3d011682016040523d82523d6000602084013e612bbf565b606091505b5091509150612bd087838387612bdb565b979650505050505050565b60608315612c47578251612c40576001600160a01b0385163b612c405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106fb565b50816109f8565b6109f88383815115612c5c5781518083602001fd5b8060405162461bcd60e51b81526004016106fb9190612f51565b80356001600160a01b0381168114612c8d57600080fd5b919050565b60008083601f840112612ca3578182fd5b50813567ffffffffffffffff811115612cba578182fd5b6020830191508360208260051b8501011115612cd557600080fd5b9250929050565b80356001600160801b0381168114612c8d57600080fd5b600060208284031215612d04578081fd5b612d0d82612c76565b9392505050565b60008060408385031215612d26578081fd5b612d2f83612c76565b946020939093013593505050565b60008060008060408587031215612d52578182fd5b843567ffffffffffffffff80821115612d69578384fd5b612d7588838901612c92565b90965094506020870135915080821115612d8d578384fd5b50612d9a87828801612c92565b95989497509550505050565b600060208284031215612db7578081fd5b8135612d0d8161318f565b600060208284031215612dd3578081fd5b8151612d0d8161318f565b60008060408385031215612df0578182fd5b612df983612cdc565b9150612e0760208401612cdc565b90509250929050565b600060208284031215612e21578081fd5b5035919050565b600060208284031215612e39578081fd5b5051919050565b600060208284031215612e51578081fd5b813563ffffffff81168114612d0d578182fd5b60008251612e76818460208701613118565b9190910192915050565b6040808252810184905260008560608301825b87811015612ec1576001600160a01b03612eac84612c76565b16825260209283019290910190600101612e93565b50838103602085810191909152858252915085908201835b86811015612f00578235612eec8161318f565b151582529183019190830190600101612ed9565b5098975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612f4557835183529284019291840191600101612f29565b50909695505050505050565b6020815260008251806020840152612f70816040850160208701613118565b601f01601f19169190910160400192915050565b60208082526018908201527f726577617264206475726174696f6e2066696e69736865640000000000000000604082015260600190565b6020808252601490820152731a5b9d985b1a59081a5b9c1d5d08185b5bdd5b9d60621b604082015260600190565b60006001600160701b0380831681851680830382111561300b5761300b613179565b01949350505050565b6000821982111561302757613027613179565b500190565b60008261304757634e487b7160e01b81526012600452602481fd5b500490565b60006001600160981b038083168185168183048111821515161561307257613072613179565b02949350505050565b600081600019048311821515161561309557613095613179565b500290565b60008083128015600160ff1b8501841216156130b8576130b8613179565b6001600160ff1b03840183138116156130d3576130d3613179565b50500390565b60006001600160701b03838116908316818110156130f9576130f9613179565b039392505050565b60008282101561311357613113613179565b500390565b60005b8381101561313357818101518382015260200161311b565b838111156124d45750506000910152565b600060001982141561315857613158613179565b5060010190565b6000600160ff1b82141561317557613175613179565b0390565b634e487b7160e01b600052601160045260246000fd5b8015158114611def57600080fdfea2646970667358221220e62aa7326e1914ab4b1fe1a55e8c82200171a9c5cd2adb685daea10ebc8601b764736f6c634300080400330000000000000000000000002f0d6619803a4e12737e473293a301de2fd1aafb
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102485760003560e01c80637a7ad8931161013b5780638da5cb5b116100b8578063cd3daf9d1161007c578063cd3daf9d1461055c578063ddca3f4314610564578063f2fde38b146105a2578063f520e7e5146105b5578063fbc5d1ed146105cc57600080fd5b80638da5cb5b1461050b578063a1ad261014610526578063a694fc3a1461052e578063acc59b8614610541578063ad4ed54f1461054957600080fd5b8063853828b6116100ff578063853828b6146104c25780638980f11f146104ca5780638aae3167146104dd5780638b0e9f3f146104f05780638baca6a5146104f857600080fd5b80637a7ad8931461043d5780637a88a997146104505780637b0a47ee1461047c5780637b789204146104a75780638456cb59146104ba57600080fd5b80633d9287fa116101c95780635f1bec331161018d5780635f1bec33146103dc57806365d1948f146103ef57806368e5585d14610402578063715018a6146104155780637742e2e91461041d57600080fd5b80633d9287fa146103935780633f4ba83a146103a75780635588fdf1146103af57806355c64ce1146103c25780635c975abb146103ca57600080fd5b806331e359e91161021057806331e359e9146102c157806334fbb6e314610332578063379607f5146103455780633af32abf146103585780633bcfc4b81461038b57600080fd5b806303f109931461024d57806325c85a95146102625780632851a94614610275578063293be4561461029b5780632e1a7d4d146102ae575b600080fd5b61026061025b366004612e10565b6105ea565b005b610260610270366004612e40565b61084b565b610288610283366004612e10565b610916565b6040519081526020015b60405180910390f35b6102606102a9366004612e10565b610a00565b6102606102bc366004612e10565b610c23565b6102d46102cf366004612d14565b610db2565b6040516102929190815163ffffffff1681526020808301516001600160701b03908116828401526040808501519091169083015260609283015180516001600160801b03908116948401949094520151909116608082015260a00190565b610288610340366004612e10565b610ebf565b610260610353366004612e10565b610f19565b61037b610366366004612cf3565b60036020526000908152604090205460ff1681565b6040519015158152602001610292565b6102886112a3565b60025461037b90600160f81b900460ff1681565b61026061131b565b6102606103bd366004612e10565b611335565b6102606114f7565b600054600160a01b900460ff1661037b565b6102886103ea366004612d14565b61172e565b6102606103fd366004612d3d565b6117a8565b610288610410366004612cf3565b611908565b610260611936565b61043061042b366004612cf3565b611948565b6040516102929190612f0d565b61026061044b366004612e10565b6119b4565b60025461046790600160d81b900463ffffffff1681565b60405163ffffffff9091168152602001610292565b60025461048f906001600160981b031681565b6040516001600160981b039091168152602001610292565b6102606104b5366004612da6565b611c20565b610260611c77565b610260611c8f565b6102606104d8366004612d14565b611df2565b6102606104eb366004612dde565b611ebe565b610288611f7e565b610288610506366004612e10565b611fad565b6000546040516001600160a01b039091168152602001610292565b610288611fe6565b61026061053c366004612e10565b612019565b610288612248565b610260610557366004612dde565b61227c565b6102886122e6565b600854610582906001600160801b0380821691600160801b90041682565b604080516001600160801b03938416815292909116602083015201610292565b6102606105b0366004612cf3565b61236b565b60025461046790600160981b900463ffffffff1681565b600954610582906001600160801b0380821691600160801b90041682565b6105f26123e1565b60006105fc6122e6565b600680546001600160801b0319166001600160801b0392909216919091179055610624611fe6565b6002805463ffffffff92909216600160b81b0263ffffffff60b81b199092169190911790556001600160a01b038116156106db5760006106638261243b565b600680546001600160a01b03851660009081526007602090815260408083206001600160801b0394851690558454909316600160801b81021790935560059092528120805492935083929091906106bb908490613014565b9250508190555080600460008282546106d49190613014565b9091555050505b600082116107045760405162461bcd60e51b81526004016106fb90612fbb565b60405180910390fd5b600254600160d81b900463ffffffff164211156107335760405162461bcd60e51b81526004016106fb90612f84565b600254600090610751904290600160d81b900463ffffffff16613101565b60025461076791906001600160981b031661307b565b600254909150610785904290600160d81b900463ffffffff16613101565b61078f8483613014565b610799919061302c565b600280546001600160981b0392909216600167ffffffff0000000160981b031990921691909117600160b81b4263ffffffff1602179055600054610812906001600160a01b03166001600160a01b037f0000000000000000000000002f0d6619803a4e12737e473293a301de2fd1aafb16903086612469565b6040518381527f5492efc1de42b0db13f77bb09932eca69805413de511c6334aa0e3eac3ac4b3f906020015b60405180910390a1505050565b6108536123e1565b600254600160d81b900463ffffffff1642116108bb5760405162461bcd60e51b815260206004820152602160248201527f726577617264206475726174696f6e206d7573742062652066696e616c697a656044820152601960fa1b60648201526084016106fb565b6002805463ffffffff60981b1916600160981b63ffffffff8416908102919091179091556040519081527f823b3cede11929e1b876086e20886121c9c32f04426a36ed323a85d541df3b8e906020015b60405180910390a150565b600254600090600160d81b900463ffffffff164211156109485760405162461bcd60e51b81526004016106fb90612f84565b600254600090610966904290600160d81b900463ffffffff16613101565b60025461097c91906001600160981b031661307b565b90506000816109906301e13380606461307b565b61099b90606461307b565b6002548690600160981b900463ffffffff166109b5611f7e565b6109bf919061307b565b6109c9919061307b565b6109d3919061302c565b6109dd919061309a565b905060008112156109f6576109f18161315f565b6109f8565b805b949350505050565b610a086123e1565b6000610a126122e6565b600680546001600160801b0319166001600160801b0392909216919091179055610a3a611fe6565b6002805463ffffffff92909216600160b81b0263ffffffff60b81b199092169190911790556001600160a01b03811615610af1576000610a798261243b565b600680546001600160a01b03851660009081526007602090815260408083206001600160801b0394851690558454909316600160801b8102179093556005909252812080549293508392909190610ad1908490613014565b925050819055508060046000828254610aea9190613014565b9091555050505b610af96114f7565b60008211610b195760405162461bcd60e51b81526004016106fb90612fbb565b600254610b3390600160981b900463ffffffff168361302c565b6002805463ffffffff42818116600160b81b02600167ffffffff0000000160981b03199093166001600160981b0395909516949094179190911791829055610b8492600160981b9092041690613014565b6002601b6101000a81548163ffffffff021916908363ffffffff160217905550610beb610bb96000546001600160a01b031690565b6001600160a01b037f0000000000000000000000002f0d6619803a4e12737e473293a301de2fd1aafb16903085612469565b6040518281527f4c42db8a799110fdd6a26148a21a5fbe4e581c926bccfd3b2d8a7f3aed4a87c8906020015b60405180910390a15050565b610c2b6124da565b33610c346122e6565b600680546001600160801b0319166001600160801b0392909216919091179055610c5c611fe6565b6002805463ffffffff92909216600160b81b0263ffffffff60b81b199092169190911790556001600160a01b03811615610d13576000610c9b8261243b565b600680546001600160a01b03851660009081526007602090815260408083206001600160801b0394851690558454909316600160801b8102179093556005909252812080549293508392909190610cf3908490613014565b925050819055508060046000828254610d0c9190613014565b9091555050505b33600090815260056020526040902054610d6a5760405162461bcd60e51b81526020600482015260186024820152777573657220686173206e6f20616374697665207374616b6560401b60448201526064016106fb565b600082118015610d895750336000908152600560205260409020548211155b610da55760405162461bcd60e51b81526004016106fb90612fbb565b610dae82612527565b5050565b610de96040805160808101825260008082526020808301829052828401829052835180850190945281845283015290606082015290565b6001600160a01b0383166000908152600a60205260408120805484908110610e2157634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0387168352600b82526040808420918452908252918290208251608081018452815463ffffffff811682526001600160701b03600160201b8204811683860152600160901b909104168185015283518085019094526001909101546001600160801b038082168552600160801b9091041691830191909152606081019190915291505092915050565b6000610ed06301e13380606461307b565b610edb90606461307b565b6002548390600160981b900463ffffffff16610ef5611f7e565b610eff919061307b565b610f09919061307b565b610f13919061302c565b92915050565b610f216124da565b336000908152600a60205260408120805483908110610f5057634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910154338352600b8252604080842082855283528084208151608081018352815463ffffffff811682526001600160701b03600160201b8204811683880152600160901b9091041681840152825180840190935260018201546001600160801b038082168552600160801b909104169483019490945260608401919091529093509190610fe7906125a4565b90508061102f5760405162461bcd60e51b8152602060048201526016602482015275636c61696d206973207374696c6c2070656e64696e6760501b60448201526064016106fb565b60018201546000906001600160801b0316821061107b57825461106b906001600160701b03600160901b8204811691600160201b9004166130d9565b6001600160701b031690506110ed565b60018301546000906001600160801b031661109a84633b9aca0061307b565b6110a4919061302c565b84549091506001600160701b03600160901b8204811691633b9aca00916110d5918591600160201b9091041661307b565b6110df919061302c565b6110e99190613101565b9150505b60018301546001600160801b0316821061116657825463ffffffff811690600160201b90046001600160701b0316611124876125cc565b604080518381526020810183905233917fff6ae62d9a44071b98c2279beedb19b575bf1b7fe8a1023bc4db72576d3c90ea910160405180910390a250506111f8565b82548190849060129061118a908490600160901b90046001600160701b0316612fe9565b82546101009290920a6001600160701b0381810219909316918316021790915584546040805163ffffffff83168152600160201b90920490921660208201523392507ff1d09c825c0c0c0aa75e123dad6f4952d6b7be70e210fbf70498222c7a1a1d51910160405180910390a25b6008546000906001600160801b03600160801b820481169161121b91168461307b565b611225919061302c565b9050611266336112358385613101565b6001600160a01b037f0000000000000000000000002f0d6619803a4e12737e473293a301de2fd1aafb16919061263e565b60405182815233907fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a9060200160405180910390a2505050505050565b600254600090600160d81b900463ffffffff164211806112c857506112c6611f7e565b155b156112d35750600090565b6112db611f7e565b6002546112f6906301e13380906001600160981b031661307b565b61130190606461307b565b61130c90606461307b565b611316919061302c565b905090565b61132361266e565b61132b6123e1565b6113336126be565b565b61133d6124da565b336113466122e6565b600680546001600160801b0319166001600160801b039290921691909117905561136e611fe6565b6002805463ffffffff92909216600160b81b0263ffffffff60b81b199092169190911790556001600160a01b038116156114255760006113ad8261243b565b600680546001600160a01b03851660009081526007602090815260408083206001600160801b0394851690558454909316600160801b8102179093556005909252812080549293508392909190611405908490613014565b92505081905550806004600082825461141e9190613014565b9091555050505b60006114313384610db2565b905060008160400151826020015161144991906130d9565b6001600160701b0316905061145d846125cc565b806004600082825461146f9190613014565b90915550503360009081526005602052604081208054839290611493908490613014565b90915550508151602083015160405133927f836348d0e7c4283f31d2f8c39cd96a0bb83b92f031b249f3ede8843ab3cf9f43926114e99263ffffffff9290921682526001600160701b0316602082015260400190565b60405180910390a250505050565b6114ff6123e1565b60006115096122e6565b600680546001600160801b0319166001600160801b0392909216919091179055611531611fe6565b6002805463ffffffff92909216600160b81b0263ffffffff60b81b199092169190911790556001600160a01b038116156115e85760006115708261243b565b600680546001600160a01b03851660009081526007602090815260408083206001600160801b0394851690558454909316600160801b81021790935560059092528120805492935083929091906115c8908490613014565b9250508190555080600460008282546115e19190613014565b9091555050505b60025442600160d81b90910463ffffffff1611611646576002805460016bffffffffffffffff0000000160981b031916600160b81b4263ffffffff1690810263ffffffff60d81b191691909117600160d81b91909102179055611702565b600254600090611664904290600160d81b900463ffffffff16613101565b60025461167a91906001600160981b031661307b565b6002805460016bffffffffffffffff0000000160981b031916600160b81b4263ffffffff1690810263ffffffff60d81b191691909117600160d81b91909102179055600054909150611700906001600160a01b03166001600160a01b037f0000000000000000000000002f0d6619803a4e12737e473293a301de2fd1aafb16908361263e565b505b6040517f011151fee38e81be17b15779d66e09f0ef9580477dc2bfcaa42c52e600dd8ace90600090a150565b60008061173b8484610db2565b90506000611748826125a4565b6060830151519091506001600160801b0316811015611798576060820151516001600160801b031661177b82606461307b565b61178990633b9aca0061307b565b611793919061302c565b61179f565b64174876e8005b95945050505050565b6117b06123e1565b8281146118115760405162461bcd60e51b815260206004820152602960248201527f75736572735f20616e642076616c7565735f206861766520646966666572656e60448201526874206c656e6774687360b81b60648201526084016106fb565b60005b838110156118c45782828281811061183c57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906118519190612da6565b6003600087878581811061187557634e487b7160e01b600052603260045260246000fd5b905060200201602081019061188a9190612cf3565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806118bc81613144565b915050611814565b507fa0c1f30b2947a115af9a029333ba23f2d8cb329761c50800f1cd57dd7f817e7d848484846040516118fa9493929190612e80565b60405180910390a150505050565b60006119138261243b565b6001600160a01b038316600090815260056020526040902054610f139190613014565b61193e6123e1565b6113336000612713565b6001600160a01b0381166000908152600a60209081526040918290208054835181840281018401909452808452606093928301828280156119a857602002820191906000526020600020905b815481526020019060010190808311611994575b50505050509050919050565b6119bc6123e1565b60006119c66122e6565b600680546001600160801b0319166001600160801b03929092169190911790556119ee611fe6565b6002805463ffffffff92909216600160b81b0263ffffffff60b81b199092169190911790556001600160a01b03811615611aa5576000611a2d8261243b565b600680546001600160a01b03851660009081526007602090815260408083206001600160801b0394851690558454909316600160801b8102179093556005909252812080549293508392909190611a85908490613014565b925050819055508060046000828254611a9e9190613014565b9091555050505b60008211611ac55760405162461bcd60e51b81526004016106fb90612fbb565b600254600160d81b900463ffffffff16421115611af45760405162461bcd60e51b81526004016106fb90612f84565b600254600090611b12904290600160d81b900463ffffffff16613101565b600254611b2891906001600160981b031661307b565b9050828111611b495760405162461bcd60e51b81526004016106fb90612fbb565b600254611b64904290600160d81b900463ffffffff16613101565b611b6e8483613101565b611b78919061302c565b600280546001600160981b0392909216600167ffffffff0000000160981b031990921691909117600160b81b4263ffffffff1602179055600054611bf0906001600160a01b03166001600160a01b037f0000000000000000000000002f0d6619803a4e12737e473293a301de2fd1aafb16908561263e565b6040518381527f59aabd199d2751695ba57141a25f9503cd30c281e0f9848bb81f3413faad19f99060200161083e565b611c286123e1565b60028054821515600160f81b026001600160f81b039091161790556040517fb01836c6aa0dfdafd7081c08627c0650add748ccade91d36a50b7607ceb81c5d9061090b90831515815260200190565b611c7f6124da565b611c876123e1565b611333612763565b611c976124da565b33611ca06122e6565b600680546001600160801b0319166001600160801b0392909216919091179055611cc8611fe6565b6002805463ffffffff92909216600160b81b0263ffffffff60b81b199092169190911790556001600160a01b03811615611d7f576000611d078261243b565b600680546001600160a01b03851660009081526007602090815260408083206001600160801b0394851690558454909316600160801b8102179093556005909252812080549293508392909190611d5f908490613014565b925050819055508060046000828254611d789190613014565b9091555050505b33600090815260056020526040902054611dd65760405162461bcd60e51b81526020600482015260186024820152777573657220686173206e6f20616374697665207374616b6560401b60448201526064016106fb565b33600090815260056020526040902054611def90612527565b50565b611dfa6123e1565b6040516370a0823160e01b8152306004820152829082906001600160a01b038316906370a082319060240160206040518083038186803b158015611e3d57600080fd5b505afa158015611e51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e759190612e28565b1015611e935760405162461bcd60e51b81526004016106fb90612fbb565b611eb9611ea86000546001600160a01b031690565b6001600160a01b038316908461263e565b505050565b611ec66123e1565b6001600160801b038116611f1c5760405162461bcd60e51b815260206004820152601c60248201527f64656e6f6d696e61746f72206d757374206e6f7420657175616c20300000000060448201526064016106fb565b6040805180820182526001600160801b038481168083529084166020928301819052600160801b810282176008558351918252918101919091527f74dbbbe280ef27b79a8a0c449d5ae2ba7a31849103241d0f98df70bbc9d03e379101610c17565b600454600654600091611fa091600160801b90046001600160801b03166127a6565b6004546113169190613014565b600254600090600160d81b900463ffffffff16421115611fcf57506000919050565b600254610f139083906001600160981b031661307b565b60025460009042600160d81b90910463ffffffff16116120145750600254600160d81b900463ffffffff1690565b504290565b6120216124da565b3361202a6122e6565b600680546001600160801b0319166001600160801b0392909216919091179055612052611fe6565b6002805463ffffffff92909216600160b81b0263ffffffff60b81b199092169190911790556001600160a01b038116156121095760006120918261243b565b600680546001600160a01b03851660009081526007602090815260408083206001600160801b0394851690558454909316600160801b81021790935560059092528120805492935083929091906120e9908490613014565b9250508190555080600460008282546121029190613014565b9091555050505b600254600160f81b900460ff16158061213157503360009081526003602052604090205460ff165b61217d5760405162461bcd60e51b815260206004820152601860248201527f73656e6465722069736e27742077686974656c6973746564000000000000000060448201526064016106fb565b6000821161219d5760405162461bcd60e51b81526004016106fb90612fbb565b81600460008282546121af9190613014565b909155505033600090815260056020526040812080548492906121d3908490613014565b9091555061220e90506001600160a01b037f0000000000000000000000002f0d6619803a4e12737e473293a301de2fd1aafb16333085612469565b60405182815233907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d906020015b60405180910390a25050565b60025460009061226e9063ffffffff600160981b820416906001600160981b031661304c565b6001600160981b0316905090565b6122846123e1565b6040805180820182526001600160801b038481168083529084166020928301819052600160801b810282176009558351918252918101919091527fec6af74db0ef2b872cf39eee53dedb278f1808b74a5bf127270d9bb94711690b9101610c17565b60006004546000141561230357506006546001600160801b031690565b6004546002546001600160981b03811690600160b81b900463ffffffff16612329611fe6565b6123339190613101565b61233d919061307b565b61234b90633b9aca0061307b565b612355919061302c565b60065461131691906001600160801b0316613014565b6123736123e1565b6001600160a01b0381166123d85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106fb565b611def81612713565b6000546001600160a01b031633146113335760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106fb565b6001600160a01b0381166000908152600560209081526040808320546007909252822054610f1391906127a6565b6040516001600160a01b03808516602483015283166044820152606481018290526124d49085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526127d7565b50505050565b600054600160a01b900460ff16156113335760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106fb565b80600460008282546125399190613101565b9091555050336000908152600560205260408120805483929061255d908490613101565b9091555061256c9050816128a9565b60405181815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59060200160405180910390a250565b60608101516020015181516000916001600160801b031690610f099063ffffffff1642613101565b336000908152600a60205260408120805490919082908490811061260057634e487b7160e01b600052603260045260246000fd5b600091825260209091200154905061261882846129ec565b336000908152600b60209081526040808320938352929052908120818155600101555050565b6040516001600160a01b038316602482015260448101829052611eb990849063a9059cbb60e01b9060640161249d565b600054600160a01b900460ff166113335760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106fb565b6126c661266e565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61276b6124da565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586126f63390565b600080826127b26122e6565b6127bc9190613101565b9050633b9aca006127cd828661307b565b6109f8919061302c565b600061282c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612ad09092919063ffffffff16565b805190915015611eb9578080602001905181019061284a9190612dc2565b611eb95760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106fb565b60006128b3612adf565b336000818152600a6020908152604080832080546001818101835591855283852001869055815160808101835263ffffffff4281811683526001600160701b03808c16848801908152848701898152875180890189526009546001600160801b038082168352600160801b918290048116838d0152606089019283528d8d52600b8c528a8d208f8e528c529b8a902097518854945193518616600160901b0271ffffffffffffffffffffffffffffffffffff94909616600160201b0271ffffffffffffffffffffffffffffffffffff199095169716969096179290921716919091178455518051960151871690910294909516939093179201919091555192935090917fdbe555b3504d78e1f2b7609ccf7fefd0ba8b38fd5b87f701f3cc87cc0e0e646b9161223c918690918252602082015260400190565b81548110612a315760405162461bcd60e51b81526020600482015260126024820152711a5b99195e081bdd5d081bd988189bdd5b9960721b60448201526064016106fb565b81548290612a4190600190613101565b81548110612a5f57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154828281548110612a8a57634e487b7160e01b600052603260045260246000fd5b906000526020600020018190555081805480612ab657634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590555050565b60606109f88484600085612b00565b60006001806000828254612af39190613014565b9091555050600154919050565b606082471015612b615760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106fb565b600080866001600160a01b03168587604051612b7d9190612e64565b60006040518083038185875af1925050503d8060008114612bba576040519150601f19603f3d011682016040523d82523d6000602084013e612bbf565b606091505b5091509150612bd087838387612bdb565b979650505050505050565b60608315612c47578251612c40576001600160a01b0385163b612c405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106fb565b50816109f8565b6109f88383815115612c5c5781518083602001fd5b8060405162461bcd60e51b81526004016106fb9190612f51565b80356001600160a01b0381168114612c8d57600080fd5b919050565b60008083601f840112612ca3578182fd5b50813567ffffffffffffffff811115612cba578182fd5b6020830191508360208260051b8501011115612cd557600080fd5b9250929050565b80356001600160801b0381168114612c8d57600080fd5b600060208284031215612d04578081fd5b612d0d82612c76565b9392505050565b60008060408385031215612d26578081fd5b612d2f83612c76565b946020939093013593505050565b60008060008060408587031215612d52578182fd5b843567ffffffffffffffff80821115612d69578384fd5b612d7588838901612c92565b90965094506020870135915080821115612d8d578384fd5b50612d9a87828801612c92565b95989497509550505050565b600060208284031215612db7578081fd5b8135612d0d8161318f565b600060208284031215612dd3578081fd5b8151612d0d8161318f565b60008060408385031215612df0578182fd5b612df983612cdc565b9150612e0760208401612cdc565b90509250929050565b600060208284031215612e21578081fd5b5035919050565b600060208284031215612e39578081fd5b5051919050565b600060208284031215612e51578081fd5b813563ffffffff81168114612d0d578182fd5b60008251612e76818460208701613118565b9190910192915050565b6040808252810184905260008560608301825b87811015612ec1576001600160a01b03612eac84612c76565b16825260209283019290910190600101612e93565b50838103602085810191909152858252915085908201835b86811015612f00578235612eec8161318f565b151582529183019190830190600101612ed9565b5098975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612f4557835183529284019291840191600101612f29565b50909695505050505050565b6020815260008251806020840152612f70816040850160208701613118565b601f01601f19169190910160400192915050565b60208082526018908201527f726577617264206475726174696f6e2066696e69736865640000000000000000604082015260600190565b6020808252601490820152731a5b9d985b1a59081a5b9c1d5d08185b5bdd5b9d60621b604082015260600190565b60006001600160701b0380831681851680830382111561300b5761300b613179565b01949350505050565b6000821982111561302757613027613179565b500190565b60008261304757634e487b7160e01b81526012600452602481fd5b500490565b60006001600160981b038083168185168183048111821515161561307257613072613179565b02949350505050565b600081600019048311821515161561309557613095613179565b500290565b60008083128015600160ff1b8501841216156130b8576130b8613179565b6001600160ff1b03840183138116156130d3576130d3613179565b50500390565b60006001600160701b03838116908316818110156130f9576130f9613179565b039392505050565b60008282101561311357613113613179565b500390565b60005b8381101561313357818101518382015260200161311b565b838111156124d45750506000910152565b600060001982141561315857613158613179565b5060010190565b6000600160ff1b82141561317557613175613179565b0390565b634e487b7160e01b600052601160045260246000fd5b8015158114611def57600080fdfea2646970667358221220e62aa7326e1914ab4b1fe1a55e8c82200171a9c5cd2adb685daea10ebc8601b764736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002f0d6619803a4e12737e473293a301de2fd1aafb
-----Decoded View---------------
Arg [0] : token_ (address): 0x2F0D6619803a4E12737E473293a301dE2FD1aAfB
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000002f0d6619803a4e12737e473293a301de2fd1aafb
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 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.