More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 888 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Deposit | 11897302 | 1 min ago | IN | 0 S | 0.00717676 | ||||
Withdraw | 11897209 | 2 mins ago | IN | 0 S | 0.00779414 | ||||
Deposit | 11897028 | 3 mins ago | IN | 0 S | 0.00596345 | ||||
Deposit | 11896754 | 4 mins ago | IN | 0 S | 0.00481199 | ||||
Deposit | 11896581 | 5 mins ago | IN | 0 S | 0.00575454 | ||||
Deposit | 11896069 | 9 mins ago | IN | 0 S | 0.00622652 | ||||
Deposit | 11895310 | 13 mins ago | IN | 0 S | 0.00576438 | ||||
Deposit | 11895010 | 15 mins ago | IN | 0 S | 0.00545512 | ||||
Deposit | 11894417 | 19 mins ago | IN | 0 S | 0.00545512 | ||||
Deposit | 11894266 | 20 mins ago | IN | 0 S | 0.00584505 | ||||
Deposit | 11894250 | 20 mins ago | IN | 0 S | 0.00681004 | ||||
Deposit | 11893846 | 22 mins ago | IN | 0 S | 0.00615847 | ||||
Deposit | 11893062 | 27 mins ago | IN | 0 S | 0.00764875 | ||||
Deposit | 11892425 | 30 mins ago | IN | 0 S | 0.00594711 | ||||
Deposit | 11891957 | 33 mins ago | IN | 0 S | 0.00594773 | ||||
Deposit | 11891516 | 36 mins ago | IN | 0 S | 0.00764941 | ||||
Deposit | 11891392 | 37 mins ago | IN | 0 S | 0.00500905 | ||||
Deposit | 11891321 | 37 mins ago | IN | 0 S | 0.00552754 | ||||
Deposit | 11890321 | 44 mins ago | IN | 0 S | 0.00545512 | ||||
Deposit | 11889367 | 51 mins ago | IN | 0 S | 0.00672245 | ||||
Deposit | 11889103 | 53 mins ago | IN | 0 S | 0.00741886 | ||||
Deposit | 11888843 | 55 mins ago | IN | 0 S | 0.00670621 | ||||
Deposit | 11888332 | 58 mins ago | IN | 0 S | 0.00590386 | ||||
Deposit | 11888222 | 1 hrs ago | IN | 0 S | 0.00717886 | ||||
Deposit | 11887959 | 1 hr ago | IN | 0 S | 0.00590386 |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
GHogRewardPool
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 /* @@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@JG@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@# &@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@& ^@5J@@@@@@@@&5G@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@J #G J&@@&B?^7&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@&BGPPY^ 5@ 7#@&@@@@@@@@@@@&P5&@@@@@P5&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@P^~@@@@@@@@@@@@@@@@@@@P~::Y@@@@@@@@B5JJYG&@@@@@@@@@@@@@@@@@@@@&^^#@ @&#GY??JPG5?~...~&@G. .~5GJ7B@@@@@@@@@@@@G 5@@@@B Y@@@&###&@@@@&&&@&##@@@@@@@&##@? &@@@@@@@@&###@@@@@J JP&@@@@@&! :~!~. Y@@@@&###&@@@@@@&##&G G@ @@@@@@#J. :7#@@@@@@@@@P: .@@@@@@@@@@@@@@B 7BGGBJ 5@@!.^^: .G@@~ ... ^@@@7 .:. &@@@@@@P: .:. :G@~ ::#@@@@@. .&@@@@@&@@@P: .:. :P@@Y. .:.. G@ @@@@@@@@@Y .@@@@@@@@G .&@@@@@@@@@@@@@B .::::. 5@@#5YYY. @@~ #@@B J@! #@@@~ &@@@@@G 5@@@5 G@? &@@@@@@& 7@@@@@5.~@G 5@@@5 BG P@@@Y G@ @@@@@@@@@P !&@@@@@@@@@P~. ^P&@@@@@@@@@@B 5@@@@B Y@5 YBG. @@~ .@@@& ?@J P@@&: &@@@@@B ?@@@7 #@? &@@@@@@@7 ?#@@@^ @B ?@@@7 #B ?@@&7 G@ @@@@@@@&57PG?: ~@@P...:!YPG5J?J5B&@@@@@@B P@@@@# P@&^.:~!^ .@@! :@@@&. Y@@P: ..:: .&@@@@@@#!.....!#@@Y .&@@@@@@@@#!. ....^Y@@#!.....!#@@B^ ...^. B@ @@@@@@&&&P: !@. 75PGG#@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&@@@@@@@@@@@@@@@@@@@@@&@@@@@@@@@@@@@@@@&@@@@@@@@@@@@@@@@@@@@@@&&@@@@@@@@@@&@@@@@@@@@@&@@@@@@ @@@@@@@G^~P&@@@#: @~ &@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@&PG@@@@@@@@@^@# ^@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@#@@J.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@7&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ The Elysium is a core pillar of Hand of God, designed to incentivize liquidity provision while ensuring the stability and sustainable growth of the protocol. */ pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "../interfaces/IBasisAsset.sol"; import "../interfaces/swapx/ISwapXGauge.sol"; contract GHogRewardPool is ReentrancyGuard { using SafeMath for uint256; using SafeERC20 for IERC20; // governance address public operator; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. } // Info of each pool. struct PoolInfo { IERC20 token; // Address of LP token contract. uint256 withFee; // withdraw fee that is applied to created pool. uint256 allocPoint; // How many allocation points assigned to this pool. GHOGs to distribute per block. uint256 lastRewardTime; // Last time that GHOGs distribution occurs. uint256 accGhogPerShare; // Accumulated GHOGs per share, times 1e18. See below. bool isStarted; // if lastRewardTime has passed address gauge; } IERC20 public ghog; address public devFund; // Info of each pool. PoolInfo[] public poolInfo; // Info of each user that stakes LP tokens. mapping(uint256 => mapping(address => UserInfo)) public userInfo; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 public totalAllocPoint = 0; // The time when GHOG mining starts. uint256 public poolStartTime; // The time when GHOG mining ends. uint256 public poolEndTime; uint256 public sharePerSecond = 0.00186122 ether; uint256 public runningTime = 370 days; address public swapxToken = 0xA04BC7140c26fc9BB1F36B1A604C7A5a88fb0E70; // Add these mappings at contract level mapping(address => uint256) public lastClaimed; // Track when user last claimed mapping(uint256 => uint256) public weeklyShareRate; // Store share rate for each week event Deposit(address indexed user, uint256 indexed pid, uint256 amount); event Withdraw(address indexed user, uint256 indexed pid, uint256 amount); event EmergencyWithdraw( address indexed user, uint256 indexed pid, uint256 amount ); event RewardPaid(address indexed user, uint256 amount); event DevFundUpdated(address devFund); event SharePerSecondUpdated(uint256 oldRate, uint256 newRate, uint256 timestamp); constructor( address _ghog, address _devFund, uint256 _poolStartTime ) { require( block.timestamp < _poolStartTime, "pool cant be started in the past" ); if (_ghog != address(0)) ghog = IERC20(_ghog); if (_devFund != address(0)) devFund = _devFund; poolStartTime = _poolStartTime; poolEndTime = _poolStartTime + runningTime; operator = msg.sender; devFund = _devFund; // create all the pools add(0, 50, IERC20(0x784DD93F3c42DCbF88D45E6ad6D3CC20dA169a60), false, 0, address(0)); // Hog-S add(0, 50, IERC20(0xD1CB1622a50506F0fDdf329CB857a0935C7FbbF9), false, 0, address(0)); // GHog-S } modifier onlyOperator() { require( operator == msg.sender, "GHogRewardPool: caller is not the operator" ); _; } function poolLength() external view returns (uint256) { return poolInfo.length; } function checkPoolDuplicate(IERC20 _token) internal view { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { require( poolInfo[pid].token != _token, "GHogRewardPool: existing pool?" ); } } // Add new lp to the pool. Can only be called by operator. function add( uint256 _allocPoint, uint256 _withFee, IERC20 _token, bool _withUpdate, uint256 _lastRewardTime, address _gauge ) public onlyOperator { checkPoolDuplicate(_token); if (_withUpdate) { massUpdatePools(); } if (block.timestamp < poolStartTime) { // chef is sleeping if (_lastRewardTime == 0) { _lastRewardTime = poolStartTime; } else { if (_lastRewardTime < poolStartTime) { _lastRewardTime = poolStartTime; } } } else { // chef is cooking if (_lastRewardTime == 0 || _lastRewardTime < block.timestamp) { _lastRewardTime = block.timestamp; } } bool _isStarted = (_lastRewardTime <= poolStartTime) || (_lastRewardTime <= block.timestamp); poolInfo.push( PoolInfo({ token: _token, withFee: _withFee, allocPoint: _allocPoint, lastRewardTime: _lastRewardTime, accGhogPerShare: 0, isStarted: _isStarted, gauge: _gauge }) ); if (_isStarted) { totalAllocPoint = totalAllocPoint.add(_allocPoint); } } // Update the given pool's GHOG allocation point. Can only be called by the operator. function set( uint256 _pid, uint256 _allocPoint, uint256 _withFee, address _gauge ) public onlyOperator { massUpdatePools(); PoolInfo storage pool = poolInfo[_pid]; require(_withFee <= 200, "withdraw fee cant be more than 2%"); pool.withFee = _withFee; if (pool.isStarted) { totalAllocPoint = totalAllocPoint.sub(pool.allocPoint).add( _allocPoint ); } pool.allocPoint = _allocPoint; pool.gauge = _gauge; } // AI-CONTROLLED: Updates the emission rate every 7 days based on protocol conditions // This function allows the AI to adjust the reward distribution rate function setSharePerSecond(uint256 _sharePerSecond) external onlyOperator { uint256 oldSharePerSecond = sharePerSecond; sharePerSecond = _sharePerSecond; // Store rate for current week uint256 currentWeek = (block.timestamp - poolStartTime) / 1 weeks; weeklyShareRate[currentWeek] = _sharePerSecond; emit SharePerSecondUpdated(oldSharePerSecond, _sharePerSecond, block.timestamp); massUpdatePools(); } // Add helper function to calculate rewards across rate changes function getGeneratedReward(uint256 _fromTime, uint256 _toTime) public view returns (uint256) { if (_fromTime >= _toTime) return 0; uint256 totalRewards = 0; uint256 totalWeeks = (_toTime - _fromTime) / 1 weeks; uint256 startWeek = (_fromTime - poolStartTime) / 1 weeks; // Iterate through weeks and add up rewards for (uint256 i = 0; i <= totalWeeks; i++) { uint256 weekNumber = startWeek + i; uint256 weekRate = weeklyShareRate[weekNumber]; if (weekRate == 0) { weekRate = sharePerSecond; // Use current rate if no specific rate set } uint256 weekStart = _fromTime + (i * 1 weeks); uint256 weekEnd = weekStart + 1 weeks; if (weekEnd > _toTime) weekEnd = _toTime; totalRewards = totalRewards.add( (weekEnd - weekStart).mul(weekRate) ); } return totalRewards; } // Modified pendingShare to use new getGeneratedReward function pendingShare(uint256 _pid, address _user) public view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accGhogPerShare = pool.accGhogPerShare; uint256 tokenSupply = pool.gauge != address(0) ? ISwapxGauge(pool.gauge).balanceOf(address(this)) : pool.token.balanceOf(address(this)); if (block.timestamp > pool.lastRewardTime && tokenSupply != 0) { uint256 _generatedReward = getGeneratedReward( pool.lastRewardTime, block.timestamp ); uint256 _ghogReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint); accGhogPerShare = accGhogPerShare.add(_ghogReward.mul(1e18).div(tokenSupply)); } return user.amount.mul(accGhogPerShare).div(1e18).sub(user.rewardDebt); } function massUpdatePools() public { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { updatePool(pid); } } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) public { depositToGauge(_pid); PoolInfo storage pool = poolInfo[_pid]; if (block.timestamp <= pool.lastRewardTime) { return; } uint256 tokenSupply = pool.gauge != address(0) ? ISwapxGauge(pool.gauge).balanceOf(address(this)) : pool.token.balanceOf(address(this)); if (tokenSupply == 0) { pool.lastRewardTime = block.timestamp; return; } if (!pool.isStarted) { pool.isStarted = true; totalAllocPoint = totalAllocPoint.add(pool.allocPoint); } if (totalAllocPoint > 0) { // This now correctly accounts for all emission rate changes uint256 _generatedReward = getGeneratedReward( pool.lastRewardTime, block.timestamp ); uint256 _ghogReward = _generatedReward.mul(pool.allocPoint).div( totalAllocPoint ); pool.accGhogPerShare = pool.accGhogPerShare.add( _ghogReward.mul(1e18).div(tokenSupply) ); } pool.lastRewardTime = block.timestamp; } // Deposit LP tokens. function deposit(uint256 _pid, uint256 _amount) public nonReentrant { address _sender = msg.sender; PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_sender]; updatePool(_pid); if (user.amount > 0) { uint256 _pending = user .amount .mul(pool.accGhogPerShare) .div(1e18) .sub(user.rewardDebt); if (_pending > 0) { safeGhogTransfer(_sender, _pending); lastClaimed[_sender] = block.timestamp; // Update last claim time emit RewardPaid(_sender, _pending); } } if (_amount > 0) { pool.token.safeTransferFrom(_sender, address(this), _amount); user.amount = user.amount.add(_amount); depositToGauge(_pid); } user.rewardDebt = user.amount.mul(pool.accGhogPerShare).div(1e18); emit Deposit(_sender, _pid, _amount); } // Withdraw LP tokens. function withdraw(uint256 _pid, uint256 _amount) public nonReentrant { address _sender = msg.sender; PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_sender]; require(user.amount >= _amount, "withdraw: not good"); updatePool(_pid); uint256 _pending = user.amount.mul(pool.accGhogPerShare).div(1e18).sub( user.rewardDebt ); if (_pending > 0) { safeGhogTransfer(_sender, _pending); lastClaimed[_sender] = block.timestamp; // Update last claim time emit RewardPaid(_sender, _pending); } if (_amount > 0) { user.amount = user.amount.sub(_amount); withdrawFromGauge(_pid, _amount); // Calculate the fee and transfer it to the devFund uint256 fee = _amount.mul(pool.withFee).div(10000); // Assuming withFee is in basis points (e.g., 100 = 1%) uint256 amountAfterFee = _amount.sub(fee); if (fee > 0) { pool.token.safeTransfer(devFund, fee); } pool.token.safeTransfer(_sender, amountAfterFee); } user.rewardDebt = user.amount.mul(pool.accGhogPerShare).div(1e18); emit Withdraw(_sender, _pid, _amount); } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public nonReentrant { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; uint256 _amount = user.amount; user.amount = 0; user.rewardDebt = 0; withdrawFromGauge(_pid, _amount); uint256 fee = _amount.mul(pool.withFee).div(10000); // Assuming withFee is in basis points (e.g., 100 = 1%) uint256 amountAfterFee = _amount.sub(fee); if (fee > 0) { pool.token.safeTransfer(devFund, fee); } pool.token.safeTransfer(msg.sender, amountAfterFee); emit EmergencyWithdraw(msg.sender, _pid, _amount); } // Safe ghog transfer function, just in case if rounding error causes pool to not have enough Ghog. function safeGhogTransfer(address _to, uint256 _amount) internal { uint256 _ghogBal = ghog.balanceOf(address(this)); if (_ghogBal > 0) { if (_amount > _ghogBal) { ghog.safeTransfer(_to, _ghogBal); } else { ghog.safeTransfer(_to, _amount); } } } function setOperator(address _operator) external onlyOperator { require(_operator != address(0), "Cannot set operator to zero address"); operator = _operator; } function setDevFund(address _devFund) external onlyOperator { require(_devFund != address(0), "Cannot set devFund to zero address"); devFund = _devFund; emit DevFundUpdated(_devFund); } function governanceRecoverUnsupported( IERC20 _token, uint256 amount, address to ) external onlyOperator { if (block.timestamp < poolEndTime + 10 days) { // do not allow to drain core token (tSHARE or lps) if less than 10 days after pool ends require(_token != ghog, "ghog"); uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { PoolInfo storage pool = poolInfo[pid]; require(_token != pool.token, "pool.token"); } } _token.safeTransfer(to, amount); } // Calculate total GHOG emitted from pool start until now function getTotalEmittedShares() public view returns (uint256) { if (block.timestamp <= poolStartTime) return 0; uint256 endTime = block.timestamp; if (endTime > poolEndTime) { endTime = poolEndTime; } return getGeneratedReward(poolStartTime, endTime); } // Calculate total GHOG emitted between any two timestamps function getTotalEmittedSharesBetween(uint256 _fromTime, uint256 _toTime) public view returns (uint256) { require(_fromTime < _toTime, "Invalid time range"); // Bound times within pool's active period if (_fromTime < poolStartTime) { _fromTime = poolStartTime; } if (_toTime > poolEndTime) { _toTime = poolEndTime; } return getGeneratedReward(_fromTime, _toTime); } function depositToGauge(uint256 _pid) internal { PoolInfo storage pool = poolInfo[_pid]; address gauge = pool.gauge; uint256 balance = pool.token.balanceOf(address(this)); // Do nothing if this pool doesn't have a gauge if (pool.gauge != address(0)) { // Do nothing if the LP token in the MC is empty if (balance > 0) { // Approve to the gauge if (pool.token.allowance(address(this), gauge) < balance ){ pool.token.approve(gauge, type(uint256).max); } ISwapxGauge(pool.gauge).deposit(balance); } } } function claimSwapxRewards(uint256 _pid) public onlyOperator { PoolInfo storage pool = poolInfo[_pid]; ISwapxGauge(pool.gauge).getReward(); // claim the swapx rewards IERC20 rewardToken = IERC20(swapxToken); uint256 rewardAmount = rewardToken.balanceOf(address(this)); if (rewardAmount > 0) { rewardToken.safeTransfer(devFund, rewardAmount); } } function withdrawFromGauge(uint256 _pid, uint256 _amount) internal { PoolInfo storage pool = poolInfo[_pid]; // Do nothing if this pool doesn't have a gauge if (pool.gauge != address(0)) { // Withdraw from the gauge ISwapxGauge(pool.gauge).withdraw(_amount); } } }
// 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.4) (token/ERC20/extensions/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. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated 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.3) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/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; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.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)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ 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"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ 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"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation 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). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/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 (last updated v4.9.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IBasisAsset { function mint(address recipient, uint256 amount) external returns (bool); function burn(uint256 amount) external; function burnFrom(address from, uint256 amount) external; function isOperator() external returns (bool); function operator() external view returns (address); function transferOperator(address newOperator_) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface ISwapxGauge { function notifyRewardAmount(address token, uint amount) external; // function getReward(address account, address[] memory tokens) external; function getReward(address account) external; function getReward() external; function deposit(uint256 amount) external; function withdraw(uint256 amount) external; function claimFees() external returns (uint claimed0, uint claimed1); function left(address token) external view returns (uint); function rewardRate(address _pair) external view returns (uint); function balanceOf(address _account) external view returns (uint); function isForPair() external view returns (bool); function totalSupply() external view returns (uint); function earned(address token, address account) external view returns (uint); function emergencyWithdrawAmount(uint256 _amount) external; }
{ "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
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_ghog","type":"address"},{"internalType":"address","name":"_devFund","type":"address"},{"internalType":"uint256","name":"_poolStartTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"devFund","type":"address"}],"name":"DevFundUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"SharePerSecondUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint256","name":"_withFee","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"},{"internalType":"uint256","name":"_lastRewardTime","type":"uint256"},{"internalType":"address","name":"_gauge","type":"address"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"claimSwapxRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devFund","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromTime","type":"uint256"},{"internalType":"uint256","name":"_toTime","type":"uint256"}],"name":"getGeneratedReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalEmittedShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromTime","type":"uint256"},{"internalType":"uint256","name":"_toTime","type":"uint256"}],"name":"getTotalEmittedSharesBetween","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ghog","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"governanceRecoverUnsupported","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"withFee","type":"uint256"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardTime","type":"uint256"},{"internalType":"uint256","name":"accGhogPerShare","type":"uint256"},{"internalType":"bool","name":"isStarted","type":"bool"},{"internalType":"address","name":"gauge","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"runningTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint256","name":"_withFee","type":"uint256"},{"internalType":"address","name":"_gauge","type":"address"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_devFund","type":"address"}],"name":"setDevFund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sharePerSecond","type":"uint256"}],"name":"setSharePerSecond","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sharePerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapxToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"weeklyShareRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600060065566069cc50cf2e8006009556301e7cb00600a55600b80546001600160a01b03191673a04bc7140c26fc9bb1f36b1a604c7a5a88fb0e7017905534801561004e57600080fd5b50604051612dff380380612dff83398101604081905261006d91610a4e565b60016000554281116100c65760405162461bcd60e51b815260206004820181905260248201527f706f6f6c2063616e74206265207374617274656420696e20746865207061737460448201526064015b60405180910390fd5b6001600160a01b038316156100f157600280546001600160a01b0319166001600160a01b0385161790555b6001600160a01b0382161561011c57600380546001600160a01b0319166001600160a01b0384161790555b6007819055600a5461012e9082610aa3565b60085560018054336001600160a01b031991821617909155600380549091166001600160a01b03841617905561017e6000603273784dd93f3c42dcbf88d45e6ad6d3cc20da169a608280806101aa565b6101a26000603273d1cb1622a50506f0fddf329cb857a0935c7fbbf98280806101aa565b505050610b73565b6001546001600160a01b031633146102175760405162461bcd60e51b815260206004820152602a60248201527f47486f67526577617264506f6f6c3a2063616c6c6572206973206e6f74207468604482015269329037b832b930ba37b960b11b60648201526084016100bd565b6102208461042c565b821561022e5761022e6104cb565b60075442101561025f578160000361024a576007549150610274565b60075482101561025a5760075491505b610274565b81158061026b57504282105b15610274574291505b6000600754831115806102875750428311155b6040805160e0810182526001600160a01b038881168252602082018a81529282018b8152606083018881526000608085018181528715801560a088019081528b871660c0890190815260048054600181018255955297517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b600690950294850180546001600160a01b03191691891691909117905597517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c84015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d83015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e82015590517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f82015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd1a0909401805493516001600160a81b0319909416941515610100600160a81b031916949094176101009390921692909202179091559091506104235760065461041f90886104ee565b6006555b50505050505050565b60045460005b818110156104c657826001600160a01b03166004828154811061045757610457610ab6565b60009182526020909120600690910201546001600160a01b0316036104be5760405162461bcd60e51b815260206004820152601e60248201527f47486f67526577617264506f6f6c3a206578697374696e6720706f6f6c3f000060448201526064016100bd565b600101610432565b505050565b60045460005b818110156104ea576104e281610503565b6001016104d1565b5050565b60006104fa8284610aa3565b90505b92915050565b61050c816106ff565b60006004828154811061052157610521610ab6565b9060005260206000209060060201905080600301544211610540575050565b600581015460009061010090046001600160a01b03166105ca5781546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156105a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c59190610acc565b61063c565b60058201546040516370a0823160e01b81523060048201526101009091046001600160a01b0316906370a0823190602401602060405180830381865afa158015610618573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061063c9190610acc565b90508060000361065157504260039091015550565b600582015460ff166106815760058201805460ff19166001179055600282015460065461067d916104ee565b6006555b600654156106f457600061069f83600301544261091f60201b60201c565b905060006106c66006546106c0866002015485610a1a60201b90919060201c565b90610a26565b90506106ec6106e1846106c084670de0b6b3a7640000610a1a565b6004860154906104ee565b600485015550505b504260039091015550565b60006004828154811061071457610714610ab6565b60009182526020822060069190910201600581015481546040516370a0823160e01b81523060048201529294506101009091046001600160a01b0390811693929116906370a0823190602401602060405180830381865afa15801561077d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a19190610acc565b600584015490915061010090046001600160a01b031615610919578015610919578254604051636eb1769f60e11b81523060048201526001600160a01b0384811660248301528392169063dd62ed3e90604401602060405180830381865afa158015610811573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108359190610acc565b10156108b457825460405163095ea7b360e01b81526001600160a01b03848116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af115801561088e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b29190610ae5565b505b600583015460405163b6b55f2560e01b8152600481018390526101009091046001600160a01b03169063b6b55f2590602401600060405180830381600087803b15801561090057600080fd5b505af1158015610914573d6000803e3d6000fd5b505050505b50505050565b6000818310610930575060006104fd565b60008062093a806109418686610b0e565b61094b9190610b21565b9050600062093a80600754876109619190610b0e565b61096b9190610b21565b905060005b828111610a0f5760006109838284610aa3565b6000818152600d60205260408120549192508190036109a157506009545b60006109b08462093a80610b43565b6109ba908b610aa3565b905060006109cb8262093a80610aa3565b9050898111156109d85750885b6109f66109ef846109e98585610b0e565b90610a1a565b89906104ee565b9750505050508080610a0790610b5a565b915050610970565b509195945050505050565b60006104fa8284610b43565b60006104fa8284610b21565b80516001600160a01b0381168114610a4957600080fd5b919050565b600080600060608486031215610a6357600080fd5b610a6c84610a32565b9250610a7a60208501610a32565b6040949094015192959394509192915050565b634e487b7160e01b600052601160045260246000fd5b808201808211156104fd576104fd610a8d565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610ade57600080fd5b5051919050565b600060208284031215610af757600080fd5b81518015158114610b0757600080fd5b9392505050565b818103818111156104fd576104fd610a8d565b600082610b3e57634e487b7160e01b600052601260045260246000fd5b500490565b80820281158282048414176104fd576104fd610a8d565b600060018201610b6c57610b6c610a8d565b5060010190565b61227d80610b826000396000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80635312ea8e1161010457806393f1a40b116100a2578063b3ab15fb11610071578063b3ab15fb14610438578063cf4b55cb1461044b578063e2bbb1581461045e578063e52d37e31461047157600080fd5b806393f1a40b146103c2578063943f013d14610409578063ac7d600214610412578063ae4db9191461042557600080fd5b80635752933a116100de5780635752933a1461039f5780635f96dc11146103a8578063630b5ba1146103b15780636e271dd5146103b957600080fd5b80635312ea8e1461036657806354575af414610379578063570ca7351461038c57600080fd5b8063231f0c6a1161017c5780634390d2a81161014b5780634390d2a81461030d578063441a3e701461032057806351eb05a61461033357806352b512341461034657600080fd5b8063231f0c6a146102c15780632b9de31f146102d45780633bede98e146102e75780633c403cb3146102fa57600080fd5b806313484106116101b8578063134841061461022f5780631526fe271461025a57806317caf6f1146102b05780631861075a146102b957600080fd5b8063013eba92146101df578063051ba35114610212578063081e3eda14610227575b600080fd5b6101ff6101ed366004611f30565b600c6020526000908152604090205481565b6040519081526020015b60405180910390f35b610225610220366004611f4d565b610484565b005b6004546101ff565b600254610242906001600160a01b031681565b6040516001600160a01b039091168152602001610209565b61026d610268366004611f8e565b6105b0565b604080516001600160a01b039889168152602081019790975286019490945260608501929092526080840152151560a083015290911660c082015260e001610209565b6101ff60065481565b6101ff61060e565b6101ff6102cf366004611fa7565b610642565b600b54610242906001600160a01b031681565b6102256102f5366004611f8e565b61073f565b6101ff610308366004611fa7565b610891565b600354610242906001600160a01b031681565b61022561032e366004611fa7565b610908565b610225610341366004611f8e565b610b4c565b6101ff610354366004611f8e565b600d6020526000908152604090205481565b610225610374366004611f8e565b610d3c565b610225610387366004611fc9565b610e48565b600154610242906001600160a01b031681565b6101ff60095481565b6101ff60075481565b610225610f75565b6101ff60085481565b6103f46103d036600461200b565b60056020908152600092835260408084209091529082529020805460019091015482565b60408051928352602083019190915201610209565b6101ff600a5481565b610225610420366004612049565b610f94565b610225610433366004611f30565b6111d3565b610225610446366004611f30565b6112b2565b6101ff61045936600461200b565b611360565b61022561046c366004611fa7565b61154d565b61022561047f366004611f8e565b6116ef565b6001546001600160a01b031633146104b75760405162461bcd60e51b81526004016104ae906120b0565b60405180910390fd5b6104bf610f75565b6000600485815481106104d4576104d46120fa565b9060005260206000209060060201905060c883111561053f5760405162461bcd60e51b815260206004820152602160248201527f7769746864726177206665652063616e74206265206d6f7265207468616e20326044820152602560f81b60648201526084016104ae565b60018101839055600581015460ff161561057a5761057684610570836002015460065461179d90919063ffffffff16565b906117a9565b6006555b6002810193909355600590920180546001600160a01b0390931661010002610100600160a81b0319909316929092179091555050565b600481815481106105c057600080fd5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b03948516965092949193909260ff8116916101009091041687565b6000600754421161061f5750600090565b600854429081111561063057506008545b61063c60075482610642565b91505090565b600081831061065357506000610739565b60008062093a806106648686612126565b61066e9190612139565b9050600062093a80600754876106849190612126565b61068e9190612139565b905060005b8281116107325760006106a6828461215b565b6000818152600d60205260408120549192508190036106c457506009545b60006106d38462093a8061216e565b6106dd908b61215b565b905060006106ee8262093a8061215b565b9050898111156106fb5750885b6107196107128461070c8585612126565b906117b5565b89906117a9565b975050505050808061072a90612185565b915050610693565b5091925050505b92915050565b6001546001600160a01b031633146107695760405162461bcd60e51b81526004016104ae906120b0565b60006004828154811061077e5761077e6120fa565b906000526020600020906006020190508060050160019054906101000a90046001600160a01b03166001600160a01b0316633d18b9126040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156107e057600080fd5b505af11580156107f4573d6000803e3d6000fd5b5050600b546040516370a0823160e01b81523060048201526001600160a01b0390911692506000915082906370a0823190602401602060405180830381865afa158015610845573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610869919061219e565b9050801561088b5760035461088b906001600160a01b038481169116836117c1565b50505050565b60008183106108d75760405162461bcd60e51b8152602060048201526012602482015271496e76616c69642074696d652072616e676560701b60448201526064016104ae565b6007548310156108e75760075492505b6008548211156108f75760085491505b6109018383610642565b9392505050565b610910611824565b600033905060006004848154811061092a5761092a6120fa565b600091825260208083208784526005825260408085206001600160a01b038816865290925292208054600690920290920192508411156109a15760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b60448201526064016104ae565b6109aa85610b4c565b60006109e782600101546109e1670de0b6b3a76400006109db876004015487600001546117b590919063ffffffff16565b9061187d565b9061179d565b90508015610a4f576109f98482611889565b6001600160a01b0384166000818152600c602052604090819020429055517fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048690610a469084815260200190565b60405180910390a25b8415610ad7578154610a61908661179d565b8255610a6d8686611934565b6000610a8c6127106109db8660010154896117b590919063ffffffff16565b90506000610a9a878361179d565b90508115610abe576003548554610abe916001600160a01b039182169116846117c1565b8454610ad4906001600160a01b031687836117c1565b50505b60048301548254610af591670de0b6b3a7640000916109db916117b5565b600183015560405185815286906001600160a01b038616907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a350505050610b486001600055565b5050565b610b55816119d5565b600060048281548110610b6a57610b6a6120fa565b9060005260206000209060060201905080600301544211610b89575050565b600581015460009061010090046001600160a01b0316610c135781546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610bea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0e919061219e565b610c85565b60058201546040516370a0823160e01b81523060048201526101009091046001600160a01b0316906370a0823190602401602060405180830381865afa158015610c61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c85919061219e565b905080600003610c9a57504260039091015550565b600582015460ff16610cca5760058201805460ff191660011790556002820154600654610cc6916117a9565b6006555b60065415610d31576000610ce2836003015442610642565b90506000610d036006546109db8660020154856117b590919063ffffffff16565b9050610d29610d1e846109db84670de0b6b3a76400006117b5565b6004860154906117a9565b600485015550505b504260039091015550565b610d44611824565b600060048281548110610d5957610d596120fa565b6000918252602080832085845260058252604080852033865290925290832080548482556001820194909455600690920201925090610d988482611934565b6000610db76127106109db8660010154856117b590919063ffffffff16565b90506000610dc5838361179d565b90508115610de9576003548554610de9916001600160a01b039182169116846117c1565b8454610dff906001600160a01b031633836117c1565b604051838152869033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a35050505050610e456001600055565b50565b6001546001600160a01b03163314610e725760405162461bcd60e51b81526004016104ae906120b0565b600854610e8290620d2f0061215b565b421015610f5c576002546001600160a01b0390811690841603610ed05760405162461bcd60e51b81526004016104ae9060208082526004908201526367686f6760e01b604082015260600190565b60045460005b81811015610f5957600060048281548110610ef357610ef36120fa565b6000918252602090912060069091020180549091506001600160a01b0390811690871603610f505760405162461bcd60e51b815260206004820152600a6024820152693837b7b6173a37b5b2b760b11b60448201526064016104ae565b50600101610ed6565b50505b610f706001600160a01b03841682846117c1565b505050565b60045460005b81811015610b4857610f8c81610b4c565b600101610f7b565b6001546001600160a01b03163314610fbe5760405162461bcd60e51b81526004016104ae906120b0565b610fc784611bf4565b8215610fd557610fd5610f75565b6007544210156110065781600003610ff157600754915061101b565b6007548210156110015760075491505b61101b565b81158061101257504282105b1561101b574291505b60006007548311158061102e5750428311155b6040805160e0810182526001600160a01b038881168252602082018a81529282018b8152606083018881526000608085018181528715801560a088019081528b871660c0890190815260048054600181018255955297517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b600690950294850180546001600160a01b03191691891691909117905597517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c84015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d83015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e82015590517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f82015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd1a0909401805493516001600160a81b0319909416941515610100600160a81b031916949094176101009390921692909202179091559091506111ca576006546111c690886117a9565b6006555b50505050505050565b6001546001600160a01b031633146111fd5760405162461bcd60e51b81526004016104ae906120b0565b6001600160a01b03811661125e5760405162461bcd60e51b815260206004820152602260248201527f43616e6e6f74207365742064657646756e6420746f207a65726f206164647265604482015261737360f01b60648201526084016104ae565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527f76238c711356e13e6b0a381b5c1103783d65515e5fc402cbd2266925fdddb3ef9060200160405180910390a150565b6001546001600160a01b031633146112dc5760405162461bcd60e51b81526004016104ae906120b0565b6001600160a01b03811661133e5760405162461bcd60e51b815260206004820152602360248201527f43616e6e6f7420736574206f70657261746f7220746f207a65726f206164647260448201526265737360e81b60648201526084016104ae565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060048481548110611376576113766120fa565b60009182526020808320878452600580835260408086206001600160a01b03808b16885294528520600460069095029092019384015490840154939550909390929091610100909104166114345783546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa15801561140b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061142f919061219e565b6114a6565b60058401546040516370a0823160e01b81523060048201526101009091046001600160a01b0316906370a0823190602401602060405180830381865afa158015611482573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a6919061219e565b90508360030154421180156114ba57508015155b156115175760006114cf856003015442610642565b905060006114f06006546109db8860020154856117b590919063ffffffff16565b905061151261150b846109db84670de0b6b3a76400006117b5565b85906117a9565b935050505b61154283600101546109e1670de0b6b3a76400006109db8688600001546117b590919063ffffffff16565b979650505050505050565b611555611824565b600033905060006004848154811061156f5761156f6120fa565b600091825260208083208784526005825260408085206001600160a01b03881686529092529220600690910290910191506115a985610b4c565b80541561164b5760006115e182600101546109e1670de0b6b3a76400006109db876004015487600001546117b590919063ffffffff16565b90508015611649576115f38482611889565b6001600160a01b0384166000818152600c602052604090819020429055517fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486906116409084815260200190565b60405180910390a25b505b831561167f578154611668906001600160a01b0316843087611c8e565b805461167490856117a9565b815561167f856119d5565b6004820154815461169d91670de0b6b3a7640000916109db916117b5565b600182015560405184815285906001600160a01b038516907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a3505050610b486001600055565b6001546001600160a01b031633146117195760405162461bcd60e51b81526004016104ae906120b0565b600980549082905560075460009062093a80906117369042612126565b6117409190612139565b6000818152600d60209081526040918290208690558151858152908101869052428183015290519192507f443293130c56b3b55f3c344cb6c81273a4dea2cddc9538892805dfb047b818e7919081900360600190a1610f70610f75565b60006109018284612126565b6000610901828461215b565b6000610901828461216e565b6040516001600160a01b038316602482015260448101829052610f7090849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611cc6565b6002600054036118765760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104ae565b6002600055565b60006109018284612139565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156118d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f6919061219e565b90508015610f70578082111561191d57600254610f70906001600160a01b031684836117c1565b600254610f70906001600160a01b031684846117c1565b600060048381548110611949576119496120fa565b6000918252602090912060056006909202019081015490915061010090046001600160a01b031615610f70576005810154604051632e1a7d4d60e01b8152600481018490526101009091046001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156119c157600080fd5b505af11580156111ca573d6000803e3d6000fd5b6000600482815481106119ea576119ea6120fa565b60009182526020822060069190910201600581015481546040516370a0823160e01b81523060048201529294506101009091046001600160a01b0390811693929116906370a0823190602401602060405180830381865afa158015611a53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a77919061219e565b600584015490915061010090046001600160a01b03161561088b57801561088b578254604051636eb1769f60e11b81523060048201526001600160a01b0384811660248301528392169063dd62ed3e90604401602060405180830381865afa158015611ae7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0b919061219e565b1015611b8a57825460405163095ea7b360e01b81526001600160a01b03848116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af1158015611b64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8891906121b7565b505b600583015460405163b6b55f2560e01b8152600481018390526101009091046001600160a01b03169063b6b55f2590602401600060405180830381600087803b158015611bd657600080fd5b505af1158015611bea573d6000803e3d6000fd5b5050505050505050565b60045460005b81811015610f7057826001600160a01b031660048281548110611c1f57611c1f6120fa565b60009182526020909120600690910201546001600160a01b031603611c865760405162461bcd60e51b815260206004820152601e60248201527f47486f67526577617264506f6f6c3a206578697374696e6720706f6f6c3f000060448201526064016104ae565b600101611bfa565b6040516001600160a01b038085166024830152831660448201526064810182905261088b9085906323b872dd60e01b906084016117ed565b6000611d1b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611d9b9092919063ffffffff16565b9050805160001480611d3c575080806020019051810190611d3c91906121b7565b610f705760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104ae565b6060611daa8484600085611db2565b949350505050565b606082471015611e135760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016104ae565b600080866001600160a01b03168587604051611e2f91906121f8565b60006040518083038185875af1925050503d8060008114611e6c576040519150601f19603f3d011682016040523d82523d6000602084013e611e71565b606091505b50915091506115428783838760608315611eec578251600003611ee5576001600160a01b0385163b611ee55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104ae565b5081611daa565b611daa8383815115611f015781518083602001fd5b8060405162461bcd60e51b81526004016104ae9190612214565b6001600160a01b0381168114610e4557600080fd5b600060208284031215611f4257600080fd5b813561090181611f1b565b60008060008060808587031215611f6357600080fd5b8435935060208501359250604085013591506060850135611f8381611f1b565b939692955090935050565b600060208284031215611fa057600080fd5b5035919050565b60008060408385031215611fba57600080fd5b50508035926020909101359150565b600080600060608486031215611fde57600080fd5b8335611fe981611f1b565b925060208401359150604084013561200081611f1b565b809150509250925092565b6000806040838503121561201e57600080fd5b82359150602083013561203081611f1b565b809150509250929050565b8015158114610e4557600080fd5b60008060008060008060c0878903121561206257600080fd5b8635955060208701359450604087013561207b81611f1b565b9350606087013561208b8161203b565b92506080870135915060a08701356120a281611f1b565b809150509295509295509295565b6020808252602a908201527f47486f67526577617264506f6f6c3a2063616c6c6572206973206e6f74207468604082015269329037b832b930ba37b960b11b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561073957610739612110565b60008261215657634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561073957610739612110565b808202811582820484141761073957610739612110565b60006001820161219757612197612110565b5060010190565b6000602082840312156121b057600080fd5b5051919050565b6000602082840312156121c957600080fd5b81516109018161203b565b60005b838110156121ef5781810151838201526020016121d7565b50506000910152565b6000825161220a8184602087016121d4565b9190910192915050565b60208152600082518060208401526122338160408501602087016121d4565b601f01601f1916919091016040019291505056fea26469706673582212205f1620e0b6a30e92c7697f0b39c8e483d001728581150621b8c0b1e121a1070664736f6c634300081a00330000000000000000000000000e899da2ad0817ed850ce68f7f489688e4d42d9d000000000000000000000000e71aa3699db23fa2c3c8d0ad329f39573619a6b70000000000000000000000000000000000000000000000000000000067c8d770
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101da5760003560e01c80635312ea8e1161010457806393f1a40b116100a2578063b3ab15fb11610071578063b3ab15fb14610438578063cf4b55cb1461044b578063e2bbb1581461045e578063e52d37e31461047157600080fd5b806393f1a40b146103c2578063943f013d14610409578063ac7d600214610412578063ae4db9191461042557600080fd5b80635752933a116100de5780635752933a1461039f5780635f96dc11146103a8578063630b5ba1146103b15780636e271dd5146103b957600080fd5b80635312ea8e1461036657806354575af414610379578063570ca7351461038c57600080fd5b8063231f0c6a1161017c5780634390d2a81161014b5780634390d2a81461030d578063441a3e701461032057806351eb05a61461033357806352b512341461034657600080fd5b8063231f0c6a146102c15780632b9de31f146102d45780633bede98e146102e75780633c403cb3146102fa57600080fd5b806313484106116101b8578063134841061461022f5780631526fe271461025a57806317caf6f1146102b05780631861075a146102b957600080fd5b8063013eba92146101df578063051ba35114610212578063081e3eda14610227575b600080fd5b6101ff6101ed366004611f30565b600c6020526000908152604090205481565b6040519081526020015b60405180910390f35b610225610220366004611f4d565b610484565b005b6004546101ff565b600254610242906001600160a01b031681565b6040516001600160a01b039091168152602001610209565b61026d610268366004611f8e565b6105b0565b604080516001600160a01b039889168152602081019790975286019490945260608501929092526080840152151560a083015290911660c082015260e001610209565b6101ff60065481565b6101ff61060e565b6101ff6102cf366004611fa7565b610642565b600b54610242906001600160a01b031681565b6102256102f5366004611f8e565b61073f565b6101ff610308366004611fa7565b610891565b600354610242906001600160a01b031681565b61022561032e366004611fa7565b610908565b610225610341366004611f8e565b610b4c565b6101ff610354366004611f8e565b600d6020526000908152604090205481565b610225610374366004611f8e565b610d3c565b610225610387366004611fc9565b610e48565b600154610242906001600160a01b031681565b6101ff60095481565b6101ff60075481565b610225610f75565b6101ff60085481565b6103f46103d036600461200b565b60056020908152600092835260408084209091529082529020805460019091015482565b60408051928352602083019190915201610209565b6101ff600a5481565b610225610420366004612049565b610f94565b610225610433366004611f30565b6111d3565b610225610446366004611f30565b6112b2565b6101ff61045936600461200b565b611360565b61022561046c366004611fa7565b61154d565b61022561047f366004611f8e565b6116ef565b6001546001600160a01b031633146104b75760405162461bcd60e51b81526004016104ae906120b0565b60405180910390fd5b6104bf610f75565b6000600485815481106104d4576104d46120fa565b9060005260206000209060060201905060c883111561053f5760405162461bcd60e51b815260206004820152602160248201527f7769746864726177206665652063616e74206265206d6f7265207468616e20326044820152602560f81b60648201526084016104ae565b60018101839055600581015460ff161561057a5761057684610570836002015460065461179d90919063ffffffff16565b906117a9565b6006555b6002810193909355600590920180546001600160a01b0390931661010002610100600160a81b0319909316929092179091555050565b600481815481106105c057600080fd5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b03948516965092949193909260ff8116916101009091041687565b6000600754421161061f5750600090565b600854429081111561063057506008545b61063c60075482610642565b91505090565b600081831061065357506000610739565b60008062093a806106648686612126565b61066e9190612139565b9050600062093a80600754876106849190612126565b61068e9190612139565b905060005b8281116107325760006106a6828461215b565b6000818152600d60205260408120549192508190036106c457506009545b60006106d38462093a8061216e565b6106dd908b61215b565b905060006106ee8262093a8061215b565b9050898111156106fb5750885b6107196107128461070c8585612126565b906117b5565b89906117a9565b975050505050808061072a90612185565b915050610693565b5091925050505b92915050565b6001546001600160a01b031633146107695760405162461bcd60e51b81526004016104ae906120b0565b60006004828154811061077e5761077e6120fa565b906000526020600020906006020190508060050160019054906101000a90046001600160a01b03166001600160a01b0316633d18b9126040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156107e057600080fd5b505af11580156107f4573d6000803e3d6000fd5b5050600b546040516370a0823160e01b81523060048201526001600160a01b0390911692506000915082906370a0823190602401602060405180830381865afa158015610845573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610869919061219e565b9050801561088b5760035461088b906001600160a01b038481169116836117c1565b50505050565b60008183106108d75760405162461bcd60e51b8152602060048201526012602482015271496e76616c69642074696d652072616e676560701b60448201526064016104ae565b6007548310156108e75760075492505b6008548211156108f75760085491505b6109018383610642565b9392505050565b610910611824565b600033905060006004848154811061092a5761092a6120fa565b600091825260208083208784526005825260408085206001600160a01b038816865290925292208054600690920290920192508411156109a15760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b60448201526064016104ae565b6109aa85610b4c565b60006109e782600101546109e1670de0b6b3a76400006109db876004015487600001546117b590919063ffffffff16565b9061187d565b9061179d565b90508015610a4f576109f98482611889565b6001600160a01b0384166000818152600c602052604090819020429055517fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048690610a469084815260200190565b60405180910390a25b8415610ad7578154610a61908661179d565b8255610a6d8686611934565b6000610a8c6127106109db8660010154896117b590919063ffffffff16565b90506000610a9a878361179d565b90508115610abe576003548554610abe916001600160a01b039182169116846117c1565b8454610ad4906001600160a01b031687836117c1565b50505b60048301548254610af591670de0b6b3a7640000916109db916117b5565b600183015560405185815286906001600160a01b038616907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a350505050610b486001600055565b5050565b610b55816119d5565b600060048281548110610b6a57610b6a6120fa565b9060005260206000209060060201905080600301544211610b89575050565b600581015460009061010090046001600160a01b0316610c135781546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610bea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0e919061219e565b610c85565b60058201546040516370a0823160e01b81523060048201526101009091046001600160a01b0316906370a0823190602401602060405180830381865afa158015610c61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c85919061219e565b905080600003610c9a57504260039091015550565b600582015460ff16610cca5760058201805460ff191660011790556002820154600654610cc6916117a9565b6006555b60065415610d31576000610ce2836003015442610642565b90506000610d036006546109db8660020154856117b590919063ffffffff16565b9050610d29610d1e846109db84670de0b6b3a76400006117b5565b6004860154906117a9565b600485015550505b504260039091015550565b610d44611824565b600060048281548110610d5957610d596120fa565b6000918252602080832085845260058252604080852033865290925290832080548482556001820194909455600690920201925090610d988482611934565b6000610db76127106109db8660010154856117b590919063ffffffff16565b90506000610dc5838361179d565b90508115610de9576003548554610de9916001600160a01b039182169116846117c1565b8454610dff906001600160a01b031633836117c1565b604051838152869033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a35050505050610e456001600055565b50565b6001546001600160a01b03163314610e725760405162461bcd60e51b81526004016104ae906120b0565b600854610e8290620d2f0061215b565b421015610f5c576002546001600160a01b0390811690841603610ed05760405162461bcd60e51b81526004016104ae9060208082526004908201526367686f6760e01b604082015260600190565b60045460005b81811015610f5957600060048281548110610ef357610ef36120fa565b6000918252602090912060069091020180549091506001600160a01b0390811690871603610f505760405162461bcd60e51b815260206004820152600a6024820152693837b7b6173a37b5b2b760b11b60448201526064016104ae565b50600101610ed6565b50505b610f706001600160a01b03841682846117c1565b505050565b60045460005b81811015610b4857610f8c81610b4c565b600101610f7b565b6001546001600160a01b03163314610fbe5760405162461bcd60e51b81526004016104ae906120b0565b610fc784611bf4565b8215610fd557610fd5610f75565b6007544210156110065781600003610ff157600754915061101b565b6007548210156110015760075491505b61101b565b81158061101257504282105b1561101b574291505b60006007548311158061102e5750428311155b6040805160e0810182526001600160a01b038881168252602082018a81529282018b8152606083018881526000608085018181528715801560a088019081528b871660c0890190815260048054600181018255955297517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b600690950294850180546001600160a01b03191691891691909117905597517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c84015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d83015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e82015590517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f82015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd1a0909401805493516001600160a81b0319909416941515610100600160a81b031916949094176101009390921692909202179091559091506111ca576006546111c690886117a9565b6006555b50505050505050565b6001546001600160a01b031633146111fd5760405162461bcd60e51b81526004016104ae906120b0565b6001600160a01b03811661125e5760405162461bcd60e51b815260206004820152602260248201527f43616e6e6f74207365742064657646756e6420746f207a65726f206164647265604482015261737360f01b60648201526084016104ae565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527f76238c711356e13e6b0a381b5c1103783d65515e5fc402cbd2266925fdddb3ef9060200160405180910390a150565b6001546001600160a01b031633146112dc5760405162461bcd60e51b81526004016104ae906120b0565b6001600160a01b03811661133e5760405162461bcd60e51b815260206004820152602360248201527f43616e6e6f7420736574206f70657261746f7220746f207a65726f206164647260448201526265737360e81b60648201526084016104ae565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060048481548110611376576113766120fa565b60009182526020808320878452600580835260408086206001600160a01b03808b16885294528520600460069095029092019384015490840154939550909390929091610100909104166114345783546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa15801561140b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061142f919061219e565b6114a6565b60058401546040516370a0823160e01b81523060048201526101009091046001600160a01b0316906370a0823190602401602060405180830381865afa158015611482573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a6919061219e565b90508360030154421180156114ba57508015155b156115175760006114cf856003015442610642565b905060006114f06006546109db8860020154856117b590919063ffffffff16565b905061151261150b846109db84670de0b6b3a76400006117b5565b85906117a9565b935050505b61154283600101546109e1670de0b6b3a76400006109db8688600001546117b590919063ffffffff16565b979650505050505050565b611555611824565b600033905060006004848154811061156f5761156f6120fa565b600091825260208083208784526005825260408085206001600160a01b03881686529092529220600690910290910191506115a985610b4c565b80541561164b5760006115e182600101546109e1670de0b6b3a76400006109db876004015487600001546117b590919063ffffffff16565b90508015611649576115f38482611889565b6001600160a01b0384166000818152600c602052604090819020429055517fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486906116409084815260200190565b60405180910390a25b505b831561167f578154611668906001600160a01b0316843087611c8e565b805461167490856117a9565b815561167f856119d5565b6004820154815461169d91670de0b6b3a7640000916109db916117b5565b600182015560405184815285906001600160a01b038516907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a3505050610b486001600055565b6001546001600160a01b031633146117195760405162461bcd60e51b81526004016104ae906120b0565b600980549082905560075460009062093a80906117369042612126565b6117409190612139565b6000818152600d60209081526040918290208690558151858152908101869052428183015290519192507f443293130c56b3b55f3c344cb6c81273a4dea2cddc9538892805dfb047b818e7919081900360600190a1610f70610f75565b60006109018284612126565b6000610901828461215b565b6000610901828461216e565b6040516001600160a01b038316602482015260448101829052610f7090849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611cc6565b6002600054036118765760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104ae565b6002600055565b60006109018284612139565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156118d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f6919061219e565b90508015610f70578082111561191d57600254610f70906001600160a01b031684836117c1565b600254610f70906001600160a01b031684846117c1565b600060048381548110611949576119496120fa565b6000918252602090912060056006909202019081015490915061010090046001600160a01b031615610f70576005810154604051632e1a7d4d60e01b8152600481018490526101009091046001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156119c157600080fd5b505af11580156111ca573d6000803e3d6000fd5b6000600482815481106119ea576119ea6120fa565b60009182526020822060069190910201600581015481546040516370a0823160e01b81523060048201529294506101009091046001600160a01b0390811693929116906370a0823190602401602060405180830381865afa158015611a53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a77919061219e565b600584015490915061010090046001600160a01b03161561088b57801561088b578254604051636eb1769f60e11b81523060048201526001600160a01b0384811660248301528392169063dd62ed3e90604401602060405180830381865afa158015611ae7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0b919061219e565b1015611b8a57825460405163095ea7b360e01b81526001600160a01b03848116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af1158015611b64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8891906121b7565b505b600583015460405163b6b55f2560e01b8152600481018390526101009091046001600160a01b03169063b6b55f2590602401600060405180830381600087803b158015611bd657600080fd5b505af1158015611bea573d6000803e3d6000fd5b5050505050505050565b60045460005b81811015610f7057826001600160a01b031660048281548110611c1f57611c1f6120fa565b60009182526020909120600690910201546001600160a01b031603611c865760405162461bcd60e51b815260206004820152601e60248201527f47486f67526577617264506f6f6c3a206578697374696e6720706f6f6c3f000060448201526064016104ae565b600101611bfa565b6040516001600160a01b038085166024830152831660448201526064810182905261088b9085906323b872dd60e01b906084016117ed565b6000611d1b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611d9b9092919063ffffffff16565b9050805160001480611d3c575080806020019051810190611d3c91906121b7565b610f705760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104ae565b6060611daa8484600085611db2565b949350505050565b606082471015611e135760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016104ae565b600080866001600160a01b03168587604051611e2f91906121f8565b60006040518083038185875af1925050503d8060008114611e6c576040519150601f19603f3d011682016040523d82523d6000602084013e611e71565b606091505b50915091506115428783838760608315611eec578251600003611ee5576001600160a01b0385163b611ee55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104ae565b5081611daa565b611daa8383815115611f015781518083602001fd5b8060405162461bcd60e51b81526004016104ae9190612214565b6001600160a01b0381168114610e4557600080fd5b600060208284031215611f4257600080fd5b813561090181611f1b565b60008060008060808587031215611f6357600080fd5b8435935060208501359250604085013591506060850135611f8381611f1b565b939692955090935050565b600060208284031215611fa057600080fd5b5035919050565b60008060408385031215611fba57600080fd5b50508035926020909101359150565b600080600060608486031215611fde57600080fd5b8335611fe981611f1b565b925060208401359150604084013561200081611f1b565b809150509250925092565b6000806040838503121561201e57600080fd5b82359150602083013561203081611f1b565b809150509250929050565b8015158114610e4557600080fd5b60008060008060008060c0878903121561206257600080fd5b8635955060208701359450604087013561207b81611f1b565b9350606087013561208b8161203b565b92506080870135915060a08701356120a281611f1b565b809150509295509295509295565b6020808252602a908201527f47486f67526577617264506f6f6c3a2063616c6c6572206973206e6f74207468604082015269329037b832b930ba37b960b11b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561073957610739612110565b60008261215657634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561073957610739612110565b808202811582820484141761073957610739612110565b60006001820161219757612197612110565b5060010190565b6000602082840312156121b057600080fd5b5051919050565b6000602082840312156121c957600080fd5b81516109018161203b565b60005b838110156121ef5781810151838201526020016121d7565b50506000910152565b6000825161220a8184602087016121d4565b9190910192915050565b60208152600082518060208401526122338160408501602087016121d4565b601f01601f1916919091016040019291505056fea26469706673582212205f1620e0b6a30e92c7697f0b39c8e483d001728581150621b8c0b1e121a1070664736f6c634300081a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000e899da2ad0817ed850ce68f7f489688e4d42d9d000000000000000000000000e71aa3699db23fa2c3c8d0ad329f39573619a6b70000000000000000000000000000000000000000000000000000000067c8d770
-----Decoded View---------------
Arg [0] : _ghog (address): 0x0e899dA2aD0817ed850ce68f7f489688E4D42D9D
Arg [1] : _devFund (address): 0xe71AA3699DB23fa2c3c8D0ad329F39573619a6b7
Arg [2] : _poolStartTime (uint256): 1741215600
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000000e899da2ad0817ed850ce68f7f489688e4d42d9d
Arg [1] : 000000000000000000000000e71aa3699db23fa2c3c8d0ad329f39573619a6b7
Arg [2] : 0000000000000000000000000000000000000000000000000000000067c8d770
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.