More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 316 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Unstake | 20832163 | 121 days ago | IN | 0 ETH | 0.00159218 | ||||
Claim Rewards | 20832159 | 121 days ago | IN | 0 ETH | 0.00196564 | ||||
Unstake | 20628626 | 150 days ago | IN | 0 ETH | 0.00043228 | ||||
Stake | 20597451 | 154 days ago | IN | 0 ETH | 0.00018643 | ||||
Unstake | 20583995 | 156 days ago | IN | 0 ETH | 0.00018871 | ||||
Unstake | 20566056 | 158 days ago | IN | 0 ETH | 0.00012164 | ||||
Claim Rewards | 20566052 | 158 days ago | IN | 0 ETH | 0.0001434 | ||||
Unstake | 20566043 | 158 days ago | IN | 0 ETH | 0.00012906 | ||||
Claim Rewards | 20566040 | 158 days ago | IN | 0 ETH | 0.00011802 | ||||
Unstake | 20566024 | 158 days ago | IN | 0 ETH | 0.00010418 | ||||
Claim Rewards | 20566020 | 158 days ago | IN | 0 ETH | 0.00012606 | ||||
Unstake | 20563323 | 159 days ago | IN | 0 ETH | 0.00044596 | ||||
Claim Rewards | 20563321 | 159 days ago | IN | 0 ETH | 0.00047213 | ||||
Unstake | 20535817 | 163 days ago | IN | 0 ETH | 0.00113421 | ||||
Unstake | 20502904 | 167 days ago | IN | 0 ETH | 0.00010839 | ||||
Stake | 20471293 | 172 days ago | IN | 0 ETH | 0.00068461 | ||||
Claim Rewards | 20471287 | 172 days ago | IN | 0 ETH | 0.00045661 | ||||
Unstake | 20336291 | 191 days ago | IN | 0 ETH | 0.00110998 | ||||
Claim Rewards | 20328083 | 192 days ago | IN | 0 ETH | 0.00092804 | ||||
Claim Rewards | 20328077 | 192 days ago | IN | 0 ETH | 0.00100666 | ||||
Stake | 20311919 | 194 days ago | IN | 0 ETH | 0.0005442 | ||||
Unstake | 20284725 | 198 days ago | IN | 0 ETH | 0.00122044 | ||||
Unstake | 20278034 | 199 days ago | IN | 0 ETH | 0.00103581 | ||||
Unstake | 20277859 | 199 days ago | IN | 0 ETH | 0.00102966 | ||||
Claim Rewards | 20277853 | 199 days ago | IN | 0 ETH | 0.00091236 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
FairStaking
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.23; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract FairStaking is ReentrancyGuard, Ownable { struct User { uint256 stakedAmount; uint256 stakingTimestamp; uint256 paidOutRewards; uint lockupPeriod; } mapping(address => User) public users; IERC20 public fairToken; uint256 public totalStakedAmount; uint256 public totalWeight; // Total rewards ever deposited uint256 public stakingRewardsTotal; // Remaining rewards to be claimed uint256 public stakingRewardsRemaining; // When we started staking uint256 public stakingStartTimestamp; uint256 public stakingEndTimestamp; uint256 public minLockupPeriod = 7 days; uint256 public bonus30Days = 50; uint256 public bonus90Days = 100; uint public constant LOCKUP_WEEK = 0; uint public constant LOCKUP_MONTH = 1; uint public constant LOCKUP_QUARTER = 2; mapping(uint => uint256) public lockupTimes; mapping(uint => uint256) public rewardBonuses; uint256 public constant SECONDS_IN_YEAR = 365 days; event Staked(address indexed user, uint256 amount, uint lockupPeriod); event Unstaked(address indexed user, uint256 amount); event RewardClaimed(address indexed user, uint256 amount); event RewardTokensDeposited(address indexed user, uint256 amount); constructor(address _fairToken) { fairToken = IERC20(_fairToken); stakingRewardsRemaining = 0; stakingRewardsTotal = 0; lockupTimes[LOCKUP_WEEK] = 7 days; lockupTimes[LOCKUP_MONTH] = 30 days; lockupTimes[LOCKUP_QUARTER] = 90 days; rewardBonuses[LOCKUP_WEEK] = 0; rewardBonuses[LOCKUP_MONTH] = 50; rewardBonuses[LOCKUP_QUARTER] = 100; stakingStartTimestamp = block.timestamp; stakingEndTimestamp = block.timestamp + SECONDS_IN_YEAR; } function depositRewardTokens(uint256 _amount) external { fairToken.transferFrom(msg.sender, address(this), _amount); stakingRewardsTotal += _amount; stakingRewardsRemaining += _amount; emit RewardTokensDeposited(msg.sender, _amount); } function stake(uint256 _amount, uint _lockupPeriod) external nonReentrant { require(_amount > 0, "Amount must be greater than 0"); require(lockupTimes[_lockupPeriod] > 0, "Invalid lockup period"); require(_lockupPeriod >= users[msg.sender].lockupPeriod, "Cannot decrease lockup period"); if (users[msg.sender].stakedAmount > 0) { claimRewards(); } fairToken.transferFrom(msg.sender, address(this), _amount); // Remove the old weight, since it can change if the user is restaking with a different lockup period. totalWeight -= getUserWeight(msg.sender); users[msg.sender].stakedAmount += _amount; users[msg.sender].lockupPeriod = _lockupPeriod; totalWeight += getUserWeight(msg.sender); // Resetting staking timestamp and paid out rewards along with it. users[msg.sender].stakingTimestamp = block.timestamp; users[msg.sender].paidOutRewards = 0; totalStakedAmount += _amount; emit Staked(msg.sender, _amount, _lockupPeriod); } function unstake() external nonReentrant { require(users[msg.sender].stakedAmount > 0, "No stake to unstake"); require(block.timestamp >= users[msg.sender].stakingTimestamp + lockupTimes[users[msg.sender].lockupPeriod], "Lockup period not ended"); claimRewards(); uint256 amountToUnstake = users[msg.sender].stakedAmount; totalWeight -= getUserWeight(msg.sender); totalStakedAmount -= amountToUnstake; users[msg.sender].stakedAmount = 0; users[msg.sender].stakingTimestamp = 0; users[msg.sender].lockupPeriod = 0; users[msg.sender].paidOutRewards = 0; fairToken.transfer(msg.sender, amountToUnstake); emit Unstaked(msg.sender, amountToUnstake); } function claimRewards() public { User storage user = users[msg.sender]; require(user.stakedAmount > 0, "No stake to claim rewards"); require(stakingEndTimestamp > block.timestamp, "Staking period ended"); uint256 pendingRewards = calculateRewards(msg.sender); if (pendingRewards == 0) { return; } user.paidOutRewards += pendingRewards; // Update remaining rewards stakingRewardsRemaining -= pendingRewards; fairToken.transfer(msg.sender, pendingRewards); emit RewardClaimed(msg.sender, pendingRewards); } function calculateRewards(address _user) public view returns (uint256) { User storage user = users[_user]; if (user.stakedAmount == 0) { return 0; } uint256 userStakingDuration = block.timestamp - user.stakingTimestamp; uint256 totalStakingDuration = stakingEndTimestamp - stakingStartTimestamp; uint256 userStakingDurationShare = (userStakingDuration * 1e9) / totalStakingDuration; uint256 userWeight = getUserWeight(_user); uint256 userWeightShare = (userWeight * 1e9) / totalWeight; // Rewards can be negative as staking parameters change (i.e. stakingEndTimestamp) uint256 accrued = userStakingDurationShare * userWeightShare * stakingRewardsTotal / 1e18; if (accrued > user.paidOutRewards) return accrued - user.paidOutRewards; else return 0; } function getUserWeight(address _user) public view returns (uint256) { User storage user = users[_user]; if (user.stakedAmount == 0) { return 0; } return user.stakedAmount * (100 + rewardBonuses[user.lockupPeriod]); } function setLockupTime(uint _lockupPeriod, uint256 _period) external onlyOwner { lockupTimes[_lockupPeriod] = _period; } function setRewardBonus(uint _lockupPeriod, uint256 _bonus) external onlyOwner { rewardBonuses[_lockupPeriod] = _bonus; } function setStakingEndTimestamp(uint256 _timestamp) external onlyOwner { require(_timestamp > block.timestamp, "End timestamp must be in the future"); stakingEndTimestamp = _timestamp; } function currentBaseApy() public view returns (uint256) { return apyForRatio(stakingRewardsTotal, totalStakedAmount); } function getUserApy(address user_address) public view returns (uint256) { uint256 userWeight = getUserWeight(user_address); uint256 userWeightShare = (userWeight * 1e9) / totalWeight; return apyForRatio( userWeightShare * stakingRewardsTotal / 1e9, users[user_address].stakedAmount ); } function apyForRatio(uint256 rewards, uint256 balance) public view returns (uint256) { if (balance == 0) { return 0; } return (rewards * 1e9 / balance) * (SECONDS_IN_YEAR * 1e9 / (stakingEndTimestamp - stakingStartTimestamp)) / 1e14; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { 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.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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.9.4) (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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_fairToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardTokensDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockupPeriod","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[],"name":"LOCKUP_MONTH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCKUP_QUARTER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCKUP_WEEK","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SECONDS_IN_YEAR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewards","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"}],"name":"apyForRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bonus30Days","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bonus90Days","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"calculateRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentBaseApy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositRewardTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fairToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user_address","type":"address"}],"name":"getUserApy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getUserWeight","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lockupTimes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minLockupPeriod","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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardBonuses","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockupPeriod","type":"uint256"},{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"setLockupTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockupPeriod","type":"uint256"},{"internalType":"uint256","name":"_bonus","type":"uint256"}],"name":"setRewardBonus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"setStakingEndTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_lockupPeriod","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingEndTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingRewardsRemaining","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingRewardsTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingStartTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStakedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalWeight","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":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"users","outputs":[{"internalType":"uint256","name":"stakedAmount","type":"uint256"},{"internalType":"uint256","name":"stakingTimestamp","type":"uint256"},{"internalType":"uint256","name":"paidOutRewards","type":"uint256"},{"internalType":"uint256","name":"lockupPeriod","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405262093a80600a556032600b556064600c5534801561002157600080fd5b5060405161134e38038061134e833981016040819052610040916101cc565b600160005561004e3361017a565b600380546001600160a01b0319166001600160a01b03831617905560006007819055600681905562093a807f81955a0a11e65eac625c29e8882660bae4e165a75d72780094acae8ece9a29ee5562278d007ffd54ff1ed53f34a900b24c5ba64f85761163b5d82d98a47b9bd80e45466993c5556276a7007f10a81eed9d63d16face5e76357905348e6253d3394086026bb2bf2145d7cc24955600e6020527fe710864318d4a32f37d6ce54cb3fadbef648dd12d8dbdf53973564d56b7f881c81905560327fa7c5ba7114a813b50159add3a36832908dc83db71d0b9a24c2ad0f83be958207556002905260647f9adb202b1492743bc00c81d33cdc6423fa8c79109027eb6a845391e8fc1f048155426008819055610171906301e13380906101fc565b60095550610223565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156101de57600080fd5b81516001600160a01b03811681146101f557600080fd5b9392505050565b8082018082111561021d57634e487b7160e01b600052601160045260246000fd5b92915050565b61111c806102326000396000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c80637da14e501161010f578063b9f06fdd116100a2578063d6f9e89811610071578063d6f9e898146103ed578063e5385f2114610400578063f2fde38b14610413578063f68c1e6e1461042657600080fd5b8063b9f06fdd1461039e578063c6ccf542146103b1578063c925c680146103ba578063ce420f28146103cd57600080fd5b80638da5cb5b116100de5780638da5cb5b1461032557806396c82e57146103365780639de074931461033f578063a87430ba1461034757600080fd5b80637da14e50146102e157806382fbcee0146102ea57806384cb9306146102fd57806387ac8ac01461030557600080fd5b8063567e98f911610187578063715018a611610156578063715018a6146102b55780637402a85d146102bd57806379e21e5c146102c65780637b0472f0146102ce57600080fd5b8063567e98f9146102865780635a9b14911461028f5780635dcc93911461029757806364ab8675146102a257600080fd5b80632def6620116101c35780632def662014610242578063372500ab1461024a57806345cbe931146102525780635202581d1461025b57600080fd5b80630db9f294146101f55780630e32e8cf1461021b57806316c621e0146102245780632532154314610239575b600080fd5b610208610203366004610feb565b61042f565b6040519081526020015b60405180910390f35b610208600a5481565b610237610232366004611014565b6104a4565b005b610208600c5481565b610237610588565b61023761079a565b61020860075481565b60035461026e906001600160a01b031681565b6040516001600160a01b039091168152602001610212565b61020860045481565b610208600081565b6102086301e1338081565b6102086102b0366004610feb565b610939565b610237610a3c565b61020860085481565b610208600181565b6102376102dc36600461102d565b610a4e565b610208600b5481565b6102376102f836600461102d565b610ce6565b610208610d00565b610208610313366004611014565b600d6020526000908152604090205481565b6001546001600160a01b031661026e565b61020860055481565b610208600281565b61037e610355366004610feb565b600260208190526000918252604090912080546001820154928201546003909201549092919084565b604080519485526020850193909352918301526060820152608001610212565b6102086103ac36600461102d565b610d15565b61020860095481565b6102086103c8366004610feb565b610d90565b6102086103db366004611014565b600e6020526000908152604090205481565b6102376103fb366004611014565b610deb565b61023761040e36600461102d565b610e53565b610237610421366004610feb565b610e6d565b61020860065481565b60008061043b83610d90565b9050600060055482633b9aca006104529190611065565b61045c919061107c565b905061049c633b9aca00600654836104749190611065565b61047e919061107c565b6001600160a01b038616600090815260026020526040902054610d15565b949350505050565b6003546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af11580156104fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051f919061109e565b50806006600082825461053291906110c0565b92505081905550806007600082825461054b91906110c0565b909155505060405181815233907fe79ffd9a88f13c8c49fb545410401d9877ab90d9dcf7b15d4dc0601993a0d9139060200160405180910390a250565b610590610ee6565b336000908152600260205260409020546105e75760405162461bcd60e51b81526020600482015260136024820152724e6f207374616b6520746f20756e7374616b6560681b60448201526064015b60405180910390fd5b33600081815260026020818152604080842060038101548552600d83529084205494909352526001015461061b91906110c0565b42101561066a5760405162461bcd60e51b815260206004820152601760248201527f4c6f636b757020706572696f64206e6f7420656e64656400000000000000000060448201526064016105de565b61067261079a565b336000818152600260205260409020549061068c90610d90565b6005600082825461069d91906110d3565b9250508190555080600460008282546106b691906110d3565b909155505033600081815260026020819052604080832083815560018101849055600380820185905592019290925554905163a9059cbb60e01b81526004810192909252602482018390526001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610733573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610757919061109e565b5060405181815233907f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f759060200160405180910390a2506107986001600055565b565b33600090815260026020526040902080546107f75760405162461bcd60e51b815260206004820152601960248201527f4e6f207374616b6520746f20636c61696d20726577617264730000000000000060448201526064016105de565b426009541161083f5760405162461bcd60e51b815260206004820152601460248201527314dd185ada5b99c81c195c9a5bd908195b99195960621b60448201526064016105de565b600061084a33610939565b905080600003610858575050565b8082600201600082825461086c91906110c0565b92505081905550806007600082825461088591906110d3565b909155505060035460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af11580156108db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ff919061109e565b5060405181815233907f106f923f993c2149d49b4255ff723acafa1f2d94393f561d3eda32ae348f72419060200160405180910390a25050565b6001600160a01b0381166000908152600260205260408120805482036109625750600092915050565b600081600101544261097491906110d3565b9050600060085460095461098891906110d3565b905060008161099b84633b9aca00611065565b6109a5919061107c565b905060006109b287610d90565b9050600060055482633b9aca006109c99190611065565b6109d3919061107c565b90506000670de0b6b3a764000060065483866109ef9190611065565b6109f99190611065565b610a03919061107c565b90508660020154811115610a2d576002870154610a2090826110d3565b9998505050505050505050565b50600098975050505050505050565b610a44610f3f565b6107986000610f99565b610a56610ee6565b60008211610aa65760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064016105de565b6000818152600d6020526040902054610af95760405162461bcd60e51b8152602060048201526015602482015274125b9d985b1a59081b1bd8dadd5c081c195c9a5bd9605a1b60448201526064016105de565b33600090815260026020526040902060030154811015610b5b5760405162461bcd60e51b815260206004820152601d60248201527f43616e6e6f74206465637265617365206c6f636b757020706572696f6400000060448201526064016105de565b3360009081526002602052604090205415610b7857610b7861079a565b6003546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610bcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf3919061109e565b50610bfd33610d90565b60056000828254610c0e91906110d3565b90915550503360009081526002602052604081208054849290610c329084906110c0565b9091555050336000818152600260205260409020600301829055610c5590610d90565b60056000828254610c6691906110c0565b909155505033600090815260026020819052604082204260018201550181905560048054849290610c989084906110c0565b9091555050604080518381526020810183905233917f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90910160405180910390a2610ce26001600055565b5050565b610cee610f3f565b6000918252600d602052604090912055565b6000610d10600654600454610d15565b905090565b600081600003610d2757506000610d8a565b655af3107a4000600854600954610d3e91906110d3565b610d506301e13380633b9aca00611065565b610d5a919061107c565b83610d6986633b9aca00611065565b610d73919061107c565b610d7d9190611065565b610d87919061107c565b90505b92915050565b6001600160a01b038116600090815260026020526040812080548203610db95750600092915050565b60038101546000908152600e6020526040902054610dd89060646110c0565b8154610de49190611065565b9392505050565b610df3610f3f565b428111610e4e5760405162461bcd60e51b815260206004820152602360248201527f456e642074696d657374616d70206d75737420626520696e207468652066757460448201526275726560e81b60648201526084016105de565b600955565b610e5b610f3f565b6000918252600e602052604090912055565b610e75610f3f565b6001600160a01b038116610eda5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105de565b610ee381610f99565b50565b600260005403610f385760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105de565b6002600055565b6001546001600160a01b031633146107985760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105de565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600060208284031215610ffd57600080fd5b81356001600160a01b0381168114610de457600080fd5b60006020828403121561102657600080fd5b5035919050565b6000806040838503121561104057600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610d8a57610d8a61104f565b60008261109957634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156110b057600080fd5b81518015158114610de457600080fd5b80820180821115610d8a57610d8a61104f565b81810381811115610d8a57610d8a61104f56fea2646970667358221220d0d25735d5f2905218d2d1ade0b98454c275115a7f1603e71bb0da6cabf8efe864736f6c6343000817003300000000000000000000000032eca61dc25d0742f238ce523e66b68867625dad
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101f05760003560e01c80637da14e501161010f578063b9f06fdd116100a2578063d6f9e89811610071578063d6f9e898146103ed578063e5385f2114610400578063f2fde38b14610413578063f68c1e6e1461042657600080fd5b8063b9f06fdd1461039e578063c6ccf542146103b1578063c925c680146103ba578063ce420f28146103cd57600080fd5b80638da5cb5b116100de5780638da5cb5b1461032557806396c82e57146103365780639de074931461033f578063a87430ba1461034757600080fd5b80637da14e50146102e157806382fbcee0146102ea57806384cb9306146102fd57806387ac8ac01461030557600080fd5b8063567e98f911610187578063715018a611610156578063715018a6146102b55780637402a85d146102bd57806379e21e5c146102c65780637b0472f0146102ce57600080fd5b8063567e98f9146102865780635a9b14911461028f5780635dcc93911461029757806364ab8675146102a257600080fd5b80632def6620116101c35780632def662014610242578063372500ab1461024a57806345cbe931146102525780635202581d1461025b57600080fd5b80630db9f294146101f55780630e32e8cf1461021b57806316c621e0146102245780632532154314610239575b600080fd5b610208610203366004610feb565b61042f565b6040519081526020015b60405180910390f35b610208600a5481565b610237610232366004611014565b6104a4565b005b610208600c5481565b610237610588565b61023761079a565b61020860075481565b60035461026e906001600160a01b031681565b6040516001600160a01b039091168152602001610212565b61020860045481565b610208600081565b6102086301e1338081565b6102086102b0366004610feb565b610939565b610237610a3c565b61020860085481565b610208600181565b6102376102dc36600461102d565b610a4e565b610208600b5481565b6102376102f836600461102d565b610ce6565b610208610d00565b610208610313366004611014565b600d6020526000908152604090205481565b6001546001600160a01b031661026e565b61020860055481565b610208600281565b61037e610355366004610feb565b600260208190526000918252604090912080546001820154928201546003909201549092919084565b604080519485526020850193909352918301526060820152608001610212565b6102086103ac36600461102d565b610d15565b61020860095481565b6102086103c8366004610feb565b610d90565b6102086103db366004611014565b600e6020526000908152604090205481565b6102376103fb366004611014565b610deb565b61023761040e36600461102d565b610e53565b610237610421366004610feb565b610e6d565b61020860065481565b60008061043b83610d90565b9050600060055482633b9aca006104529190611065565b61045c919061107c565b905061049c633b9aca00600654836104749190611065565b61047e919061107c565b6001600160a01b038616600090815260026020526040902054610d15565b949350505050565b6003546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af11580156104fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051f919061109e565b50806006600082825461053291906110c0565b92505081905550806007600082825461054b91906110c0565b909155505060405181815233907fe79ffd9a88f13c8c49fb545410401d9877ab90d9dcf7b15d4dc0601993a0d9139060200160405180910390a250565b610590610ee6565b336000908152600260205260409020546105e75760405162461bcd60e51b81526020600482015260136024820152724e6f207374616b6520746f20756e7374616b6560681b60448201526064015b60405180910390fd5b33600081815260026020818152604080842060038101548552600d83529084205494909352526001015461061b91906110c0565b42101561066a5760405162461bcd60e51b815260206004820152601760248201527f4c6f636b757020706572696f64206e6f7420656e64656400000000000000000060448201526064016105de565b61067261079a565b336000818152600260205260409020549061068c90610d90565b6005600082825461069d91906110d3565b9250508190555080600460008282546106b691906110d3565b909155505033600081815260026020819052604080832083815560018101849055600380820185905592019290925554905163a9059cbb60e01b81526004810192909252602482018390526001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610733573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610757919061109e565b5060405181815233907f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f759060200160405180910390a2506107986001600055565b565b33600090815260026020526040902080546107f75760405162461bcd60e51b815260206004820152601960248201527f4e6f207374616b6520746f20636c61696d20726577617264730000000000000060448201526064016105de565b426009541161083f5760405162461bcd60e51b815260206004820152601460248201527314dd185ada5b99c81c195c9a5bd908195b99195960621b60448201526064016105de565b600061084a33610939565b905080600003610858575050565b8082600201600082825461086c91906110c0565b92505081905550806007600082825461088591906110d3565b909155505060035460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af11580156108db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ff919061109e565b5060405181815233907f106f923f993c2149d49b4255ff723acafa1f2d94393f561d3eda32ae348f72419060200160405180910390a25050565b6001600160a01b0381166000908152600260205260408120805482036109625750600092915050565b600081600101544261097491906110d3565b9050600060085460095461098891906110d3565b905060008161099b84633b9aca00611065565b6109a5919061107c565b905060006109b287610d90565b9050600060055482633b9aca006109c99190611065565b6109d3919061107c565b90506000670de0b6b3a764000060065483866109ef9190611065565b6109f99190611065565b610a03919061107c565b90508660020154811115610a2d576002870154610a2090826110d3565b9998505050505050505050565b50600098975050505050505050565b610a44610f3f565b6107986000610f99565b610a56610ee6565b60008211610aa65760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064016105de565b6000818152600d6020526040902054610af95760405162461bcd60e51b8152602060048201526015602482015274125b9d985b1a59081b1bd8dadd5c081c195c9a5bd9605a1b60448201526064016105de565b33600090815260026020526040902060030154811015610b5b5760405162461bcd60e51b815260206004820152601d60248201527f43616e6e6f74206465637265617365206c6f636b757020706572696f6400000060448201526064016105de565b3360009081526002602052604090205415610b7857610b7861079a565b6003546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610bcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf3919061109e565b50610bfd33610d90565b60056000828254610c0e91906110d3565b90915550503360009081526002602052604081208054849290610c329084906110c0565b9091555050336000818152600260205260409020600301829055610c5590610d90565b60056000828254610c6691906110c0565b909155505033600090815260026020819052604082204260018201550181905560048054849290610c989084906110c0565b9091555050604080518381526020810183905233917f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90910160405180910390a2610ce26001600055565b5050565b610cee610f3f565b6000918252600d602052604090912055565b6000610d10600654600454610d15565b905090565b600081600003610d2757506000610d8a565b655af3107a4000600854600954610d3e91906110d3565b610d506301e13380633b9aca00611065565b610d5a919061107c565b83610d6986633b9aca00611065565b610d73919061107c565b610d7d9190611065565b610d87919061107c565b90505b92915050565b6001600160a01b038116600090815260026020526040812080548203610db95750600092915050565b60038101546000908152600e6020526040902054610dd89060646110c0565b8154610de49190611065565b9392505050565b610df3610f3f565b428111610e4e5760405162461bcd60e51b815260206004820152602360248201527f456e642074696d657374616d70206d75737420626520696e207468652066757460448201526275726560e81b60648201526084016105de565b600955565b610e5b610f3f565b6000918252600e602052604090912055565b610e75610f3f565b6001600160a01b038116610eda5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105de565b610ee381610f99565b50565b600260005403610f385760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105de565b6002600055565b6001546001600160a01b031633146107985760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105de565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600060208284031215610ffd57600080fd5b81356001600160a01b0381168114610de457600080fd5b60006020828403121561102657600080fd5b5035919050565b6000806040838503121561104057600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610d8a57610d8a61104f565b60008261109957634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156110b057600080fd5b81518015158114610de457600080fd5b80820180821115610d8a57610d8a61104f565b81810381811115610d8a57610d8a61104f56fea2646970667358221220d0d25735d5f2905218d2d1ade0b98454c275115a7f1603e71bb0da6cabf8efe864736f6c63430008170033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000032eca61dc25d0742f238ce523e66b68867625dad
-----Decoded View---------------
Arg [0] : _fairToken (address): 0x32ECa61dC25D0742F238ce523E66b68867625dAD
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000032eca61dc25d0742f238ce523e66b68867625dad
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 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.