More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 304 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Emergency Withdr... | 18926029 | 240 days ago | IN | 0 ETH | 0.00888086 | ||||
Emergency Withdr... | 18838572 | 252 days ago | IN | 0 ETH | 0.00087968 | ||||
Transfer Ownersh... | 18838566 | 252 days ago | IN | 0 ETH | 0.00061455 | ||||
Emergency Withdr... | 18838497 | 252 days ago | IN | 0 ETH | 0.00087012 | ||||
Emergency Withdr... | 18838367 | 252 days ago | IN | 0 ETH | 0.00081045 | ||||
Emergency Withdr... | 16858680 | 530 days ago | IN | 0 ETH | 0.00230259 | ||||
Emergency Withdr... | 16822104 | 535 days ago | IN | 0 ETH | 0.00339072 | ||||
Emergency Withdr... | 16821529 | 535 days ago | IN | 0 ETH | 0.00422059 | ||||
Emergency Withdr... | 16758157 | 544 days ago | IN | 0 ETH | 0.00354011 | ||||
Emergency Withdr... | 16753542 | 545 days ago | IN | 0 ETH | 0.00258709 | ||||
Emergency Withdr... | 16700681 | 552 days ago | IN | 0 ETH | 0.00463694 | ||||
Emergency Withdr... | 16679746 | 555 days ago | IN | 0 ETH | 0.00600113 | ||||
Emergency Withdr... | 16663058 | 557 days ago | IN | 0 ETH | 0.00378127 | ||||
Emergency Withdr... | 16658650 | 558 days ago | IN | 0 ETH | 0.0035557 | ||||
Emergency Withdr... | 16658224 | 558 days ago | IN | 0 ETH | 0.00413271 | ||||
Emergency Withdr... | 16653711 | 559 days ago | IN | 0 ETH | 0.00512991 | ||||
Emergency Withdr... | 16651717 | 559 days ago | IN | 0 ETH | 0.00467023 | ||||
Emergency Withdr... | 16651673 | 559 days ago | IN | 0 ETH | 0.00561149 | ||||
Emergency Withdr... | 16650353 | 559 days ago | IN | 0 ETH | 0.00668877 | ||||
Emergency Withdr... | 16647339 | 560 days ago | IN | 0 ETH | 0.00346216 | ||||
Emergency Withdr... | 16644951 | 560 days ago | IN | 0 ETH | 0.00446149 | ||||
Emergency Withdr... | 16644810 | 560 days ago | IN | 0 ETH | 0.00098676 | ||||
Emergency Withdr... | 16644784 | 560 days ago | IN | 0 ETH | 0.00115141 | ||||
Emergency Withdr... | 16643078 | 560 days ago | IN | 0 ETH | 0.00587176 | ||||
Emergency Withdr... | 16642258 | 560 days ago | IN | 0 ETH | 0.00642309 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
16605318 | 565 days ago | 0.00089 ETH | ||||
16602819 | 566 days ago | 0.00089 ETH | ||||
16601428 | 566 days ago | 0.00089 ETH | ||||
16598893 | 566 days ago | 0.00089 ETH | ||||
16598500 | 566 days ago | 0.00089 ETH | ||||
16598359 | 566 days ago | 0.00089 ETH | ||||
16598315 | 566 days ago | 0.00089 ETH | ||||
16598258 | 566 days ago | 0.00089 ETH | ||||
16598013 | 567 days ago | 0.00089 ETH | ||||
16597937 | 567 days ago | 0.00089 ETH | ||||
16597880 | 567 days ago | 0.00089 ETH | ||||
16597855 | 567 days ago | 0.00089 ETH | ||||
16597851 | 567 days ago | 0.00089 ETH | ||||
16597827 | 567 days ago | 0.00089 ETH | ||||
16596770 | 567 days ago | 0.00089 ETH | ||||
16596766 | 567 days ago | 0.00089 ETH | ||||
16596142 | 567 days ago | 0.00089 ETH | ||||
16596110 | 567 days ago | 0.00089 ETH | ||||
16595077 | 567 days ago | 0.00089 ETH | ||||
16594926 | 567 days ago | 0.00089 ETH | ||||
16594789 | 567 days ago | 0.00089 ETH | ||||
16594782 | 567 days ago | 0.00089 ETH | ||||
16594780 | 567 days ago | 0.00089 ETH | ||||
16592969 | 567 days ago | 0.00089 ETH | ||||
16592212 | 567 days ago | 0.00089 ETH |
Loading...
Loading
Contract Name:
BrewlabsLockup
Compiler Version
v0.8.14+commit.80d49f37
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./libs/IUniRouter02.sol"; import "./libs/IWETH.sol"; interface IToken { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the token decimals. */ function decimals() external view returns (uint8); /** * @dev Returns the token symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the token name. */ function name() external view returns (string memory); } interface WhiteList { function whitelisted(address _address) external view returns (bool); } contract BrewlabsLockup is Ownable, ReentrancyGuard { using SafeERC20 for IERC20; uint256 private constant PERCENT_PRECISION = 10000; // Whether it is initialized bool public isInitialized; uint256 public duration = 365; // 365 days // Whether a limit is set for users bool public hasUserLimit; // The pool limit (0 if none) uint256 public poolLimitPerUser; address public whiteList; // The block number when staking starts. uint256 public startBlock; // The block number when staking ends. uint256 public bonusEndBlock; bool public activeEmergencyWithdraw = false; // swap router and path, slipPage uint256 public slippageFactor = 8000; // 20% default slippage tolerance uint256 public constant slippageFactorUL = 9950; address public uniRouterAddress; address[] public reflectionToStakedPath; address[] public earnedToStakedPath; address public walletA; address public buyBackWallet = 0x64961Ffd0d84b2355eC2B5d35B0d8D8825A774dc; uint256 public performanceFee = 0.00089 ether; // The precision factor uint256 public PRECISION_FACTOR; uint256 public PRECISION_FACTOR_REFLECTION; // The staked token IERC20 public stakingToken; // The earned token IERC20 public earnedToken; // The dividend token of staking token address public dividendToken; // Accrued token per share uint256 public accDividendPerShare; uint256 public totalStaked; uint256 private totalEarned; uint256 private totalReflections; uint256 private reflections; uint256 private paidRewards; uint256 private shouldTotalPaid; struct Lockup { uint8 stakeType; uint256 duration; uint256 depositFee; uint256 withdrawFee; uint256 rate; uint256 accTokenPerShare; uint256 lastRewardBlock; uint256 totalStaked; uint256 totalStakedLimit; } struct UserInfo { uint256 amount; // How many staked tokens the user has provided uint256 locked; uint256 available; } struct Stake { uint8 stakeType; uint256 amount; // amount to stake uint256 duration; // the lockup duration of the stake uint256 end; // when does the staking period end uint256 rewardDebt; // Reward debt uint256 reflectionDebt; // Reflection debt } uint256 constant MAX_STAKES = 256; Lockup[] public lockups; mapping(address => Stake[]) public userStakes; mapping(address => UserInfo) public userStaked; event Deposit(address indexed user, uint256 stakeType, uint256 amount); event Withdraw(address indexed user, uint256 stakeType, uint256 amount); event EmergencyWithdraw(address indexed user, uint256 amount); event AdminTokenRecovered(address tokenRecovered, uint256 amount); event SetEmergencyWithdrawStatus(bool status); event NewStartAndEndBlocks(uint256 startBlock, uint256 endBlock); event LockupUpdated(uint8 _type, uint256 _duration, uint256 _fee0, uint256 _fee1, uint256 _rate); event RewardsStop(uint256 blockNumber); event EndBlockUpdated(uint256 blockNumber); event UpdatePoolLimit(uint256 poolLimitPerUser, bool hasLimit); event ServiceInfoUpadted(address _addr, uint256 _fee); event DurationUpdated(uint256 _duration); event SetWhiteList(address _whitelist); event SetSettings( uint256 _slippageFactor, address _uniRouter, address[] _path0, address[] _path1, address _walletA ); constructor() {} /* * @notice Initialize the contract * @param _stakingToken: staked token address * @param _earnedToken: earned token address * @param _dividendToken: reflection token address * @param _uniRouter: uniswap router address for swap tokens * @param _earnedToStakedPath: swap path to compound (earned -> staking path) * @param _reflectionToStakedPath: swap path to compound (reflection -> staking path) */ function initialize( IERC20 _stakingToken, IERC20 _earnedToken, address _dividendToken, address _uniRouter, address[] memory _earnedToStakedPath, address[] memory _reflectionToStakedPath, address _whiteList ) external onlyOwner { require(!isInitialized, "Already initialized"); // Make this contract initialized isInitialized = true; stakingToken = _stakingToken; earnedToken = _earnedToken; dividendToken = _dividendToken; walletA = msg.sender; uint256 decimalsRewardToken = uint256(IToken(address(earnedToken)).decimals()); require(decimalsRewardToken < 30, "Must be inferior to 30"); PRECISION_FACTOR = uint256(10 ** (40 - decimalsRewardToken)); uint256 decimalsdividendToken = 18; if (address(dividendToken) != address(0x0)) { decimalsdividendToken = uint256(IToken(address(dividendToken)).decimals()); require(decimalsdividendToken < 30, "Must be inferior to 30"); } PRECISION_FACTOR_REFLECTION = uint256(10 ** (40 - decimalsRewardToken)); uniRouterAddress = _uniRouter; earnedToStakedPath = _earnedToStakedPath; reflectionToStakedPath = _reflectionToStakedPath; whiteList = _whiteList; } /* * @notice Deposit staked tokens and collect reward tokens (if any) * @param _amount: amount to withdraw (in earnedToken) */ function deposit(uint256 _amount, uint8 _stakeType) external payable nonReentrant { require(startBlock > 0 && startBlock < block.number, "Staking hasn't started yet"); require(_amount > 0, "Amount should be greator than 0"); require(_stakeType < lockups.length, "Invalid stake type"); if (whiteList != address(0x0)) { require(WhiteList(whiteList).whitelisted(msg.sender), "not whitelisted"); } _transferPerformanceFee(); _updatePool(_stakeType); UserInfo storage user = userStaked[msg.sender]; Stake[] storage stakes = userStakes[msg.sender]; Lockup storage lockup = lockups[_stakeType]; if (lockup.totalStakedLimit > 0) { require(lockup.totalStaked < lockup.totalStakedLimit, "Total staked limit exceeded"); if (lockup.totalStaked + _amount > lockup.totalStakedLimit) { _amount = lockup.totalStakedLimit - lockup.totalStaked; } } uint256 pending = 0; uint256 pendingReflection = 0; for (uint256 j = 0; j < stakes.length; j++) { Stake storage stake = stakes[j]; if (stake.stakeType != _stakeType) continue; if (stake.amount == 0) continue; pendingReflection = pendingReflection + ((stake.amount * accDividendPerShare) / PRECISION_FACTOR_REFLECTION - stake.reflectionDebt); uint256 _pending = (stake.amount * lockup.accTokenPerShare) / PRECISION_FACTOR - stake.rewardDebt; pending = pending + _pending; stake.rewardDebt = (stake.amount * lockup.accTokenPerShare) / PRECISION_FACTOR; stake.reflectionDebt = (stake.amount * accDividendPerShare) / PRECISION_FACTOR_REFLECTION; } if (pending > 0) { require(availableRewardTokens() >= pending, "Insufficient reward tokens"); earnedToken.safeTransfer(address(msg.sender), pending); _updateEarned(pending); paidRewards = paidRewards + pending; } pendingReflection = estimateDividendAmount(pendingReflection); if (pendingReflection > 0) { _transferToken(dividendToken, msg.sender, pendingReflection); totalReflections = totalReflections - pendingReflection; } uint256 beforeAmount = stakingToken.balanceOf(address(this)); stakingToken.safeTransferFrom(address(msg.sender), address(this), _amount); uint256 afterAmount = stakingToken.balanceOf(address(this)); uint256 realAmount = afterAmount - beforeAmount; if (realAmount > _amount) realAmount = _amount; if (hasUserLimit) { require(realAmount + user.amount <= poolLimitPerUser, "User amount above limit"); } if (lockup.depositFee > 0) { uint256 fee = (realAmount * lockup.depositFee) / PERCENT_PRECISION; if (fee > 0) { stakingToken.safeTransfer(walletA, fee); realAmount = realAmount - fee; } } _addStake(_stakeType, msg.sender, lockup.duration, realAmount); user.amount = user.amount + realAmount; lockup.totalStaked = lockup.totalStaked + realAmount; totalStaked = totalStaked + realAmount; emit Deposit(msg.sender, _stakeType, realAmount); } function _addStake(uint8 _stakeType, address _account, uint256 _duration, uint256 _amount) internal { Stake[] storage stakes = userStakes[_account]; uint256 end = block.timestamp + _duration * 1 days; uint256 i = stakes.length; require(i < MAX_STAKES, "Max stakes"); stakes.push(); // grow the array // find the spot where we can insert the current stake // this should make an increasing list sorted by end while (i != 0 && stakes[i - 1].end > end) { // shift it back one stakes[i] = stakes[i - 1]; i -= 1; } Lockup storage lockup = lockups[_stakeType]; // insert the stake Stake storage newStake = stakes[i]; newStake.stakeType = _stakeType; newStake.duration = _duration; newStake.end = end; newStake.amount = _amount; newStake.rewardDebt = (newStake.amount * lockup.accTokenPerShare) / PRECISION_FACTOR; newStake.reflectionDebt = (newStake.amount * accDividendPerShare) / PRECISION_FACTOR_REFLECTION; } /* * @notice Withdraw staked tokens and collect reward tokens * @param _amount: amount to withdraw (in earnedToken) */ function withdraw(uint256 _amount, uint8 _stakeType) external payable nonReentrant { require(_amount > 0, "Amount should be greator than 0"); require(_stakeType < lockups.length, "Invalid stake type"); _transferPerformanceFee(); _updatePool(_stakeType); UserInfo storage user = userStaked[msg.sender]; Stake[] storage stakes = userStakes[msg.sender]; Lockup storage lockup = lockups[_stakeType]; uint256 pending = 0; uint256 pendingReflection = 0; uint256 remained = _amount; for (uint256 j = 0; j < stakes.length; j++) { Stake storage stake = stakes[j]; if (stake.stakeType != _stakeType) continue; if (stake.amount == 0) continue; if (remained == 0) break; uint256 _pending = (stake.amount * lockup.accTokenPerShare) / PRECISION_FACTOR - stake.rewardDebt; pendingReflection = pendingReflection + ((stake.amount * accDividendPerShare) / PRECISION_FACTOR_REFLECTION - stake.reflectionDebt); pending = pending + _pending; if (stake.end < block.timestamp || bonusEndBlock < block.number) { if (stake.amount > remained) { stake.amount = stake.amount - remained; remained = 0; } else { remained = remained - stake.amount; stake.amount = 0; } } stake.rewardDebt = (stake.amount * lockup.accTokenPerShare) / PRECISION_FACTOR; stake.reflectionDebt = (stake.amount * accDividendPerShare) / PRECISION_FACTOR_REFLECTION; } if (pending > 0) { require(availableRewardTokens() >= pending, "Insufficient reward tokens"); earnedToken.safeTransfer(address(msg.sender), pending); _updateEarned(pending); paidRewards = paidRewards + pending; } if (pendingReflection > 0) { pendingReflection = estimateDividendAmount(pendingReflection); _transferToken(dividendToken, msg.sender, pendingReflection); totalReflections = totalReflections - pendingReflection; } uint256 realAmount = _amount - remained; user.amount = user.amount - realAmount; lockup.totalStaked = lockup.totalStaked - realAmount; totalStaked = totalStaked - realAmount; if (realAmount > 0) { if (lockup.withdrawFee > 0) { uint256 fee = (realAmount * lockup.withdrawFee) / PERCENT_PRECISION; stakingToken.safeTransfer(walletA, fee); realAmount = realAmount - fee; } stakingToken.safeTransfer(address(msg.sender), realAmount); } emit Withdraw(msg.sender, _stakeType, realAmount); } function claimReward(uint8 _stakeType) external payable nonReentrant { if (_stakeType >= lockups.length) return; if (startBlock == 0) return; _transferPerformanceFee(); _updatePool(_stakeType); Stake[] storage stakes = userStakes[msg.sender]; Lockup storage lockup = lockups[_stakeType]; uint256 pending = 0; for (uint256 j = 0; j < stakes.length; j++) { Stake storage stake = stakes[j]; if (stake.stakeType != _stakeType) continue; if (stake.amount == 0) continue; uint256 _pending = (stake.amount * lockup.accTokenPerShare) / PRECISION_FACTOR - stake.rewardDebt; pending = pending + _pending; stake.rewardDebt = (stake.amount * lockup.accTokenPerShare) / PRECISION_FACTOR; } if (pending > 0) { require(availableRewardTokens() >= pending, "Insufficient reward tokens"); earnedToken.safeTransfer(address(msg.sender), pending); _updateEarned(pending); paidRewards = paidRewards + pending; } } function claimDividend(uint8 _stakeType) external payable nonReentrant { if (_stakeType >= lockups.length) return; if (startBlock == 0) return; _transferPerformanceFee(); _updatePool(_stakeType); Stake[] storage stakes = userStakes[msg.sender]; uint256 pendingReflection = 0; for (uint256 j = 0; j < stakes.length; j++) { Stake storage stake = stakes[j]; if (stake.stakeType != _stakeType) continue; if (stake.amount == 0) continue; pendingReflection = pendingReflection + ((stake.amount * accDividendPerShare) / PRECISION_FACTOR_REFLECTION - stake.reflectionDebt); stake.reflectionDebt = (stake.amount * accDividendPerShare) / PRECISION_FACTOR_REFLECTION; } pendingReflection = estimateDividendAmount(pendingReflection); if (pendingReflection > 0) { _transferToken(dividendToken, msg.sender, pendingReflection); totalReflections = totalReflections - pendingReflection; } } function compoundReward(uint8 _stakeType) external payable nonReentrant { if (_stakeType >= lockups.length) return; if (startBlock == 0) return; _transferPerformanceFee(); _updatePool(_stakeType); UserInfo storage user = userStaked[msg.sender]; Stake[] storage stakes = userStakes[msg.sender]; Lockup storage lockup = lockups[_stakeType]; uint256 pending = 0; uint256 compounded = 0; for (uint256 j = 0; j < stakes.length; j++) { Stake storage stake = stakes[j]; if (stake.stakeType != _stakeType) continue; if (stake.amount == 0) continue; uint256 _pending = (stake.amount * lockup.accTokenPerShare) / PRECISION_FACTOR - stake.rewardDebt; pending = pending + _pending; if (address(stakingToken) != address(earnedToken) && _pending > 0) { uint256 _beforeAmount = stakingToken.balanceOf(address(this)); _safeSwap(_pending, earnedToStakedPath, address(this)); uint256 _afterAmount = stakingToken.balanceOf(address(this)); _pending = _afterAmount - _beforeAmount; } compounded = compounded + _pending; stake.amount = stake.amount + _pending; stake.rewardDebt = (stake.amount * lockup.accTokenPerShare) / PRECISION_FACTOR; stake.reflectionDebt = stake.reflectionDebt + (_pending * accDividendPerShare) / PRECISION_FACTOR_REFLECTION; } if (pending > 0) { require(availableRewardTokens() >= pending, "Insufficient reward tokens"); _updateEarned(pending); paidRewards = paidRewards + pending; user.amount = user.amount + compounded; lockup.totalStaked = lockup.totalStaked + compounded; totalStaked = totalStaked + compounded; emit Deposit(msg.sender, _stakeType, compounded); } } function compoundDividend(uint8 _stakeType) external payable nonReentrant { if (_stakeType >= lockups.length) return; if (startBlock == 0) return; _transferPerformanceFee(); _updatePool(_stakeType); UserInfo storage user = userStaked[msg.sender]; Stake[] storage stakes = userStakes[msg.sender]; Lockup storage lockup = lockups[_stakeType]; uint256 compounded = 0; for (uint256 j = 0; j < stakes.length; j++) { Stake storage stake = stakes[j]; if (stake.stakeType != _stakeType) continue; if (stake.amount == 0) continue; uint256 _pending = (stake.amount * accDividendPerShare) / PRECISION_FACTOR_REFLECTION - stake.reflectionDebt; _pending = estimateDividendAmount(_pending); totalReflections = totalReflections - _pending; if (address(stakingToken) != address(dividendToken) && _pending > 0) { if (address(dividendToken) == address(0x0)) { address wethAddress = IUniRouter02(uniRouterAddress).WETH(); IWETH(wethAddress).deposit{value: _pending}(); } uint256 _beforeAmount = stakingToken.balanceOf(address(this)); _safeSwap(_pending, reflectionToStakedPath, address(this)); uint256 _afterAmount = stakingToken.balanceOf(address(this)); _pending = _afterAmount - _beforeAmount; } compounded = compounded + _pending; stake.amount = stake.amount + _pending; stake.rewardDebt = stake.rewardDebt + (_pending * lockup.accTokenPerShare) / PRECISION_FACTOR; stake.reflectionDebt = (stake.amount * accDividendPerShare) / PRECISION_FACTOR_REFLECTION; } if (compounded > 0) { user.amount = user.amount + compounded; lockup.totalStaked = lockup.totalStaked + compounded; totalStaked = totalStaked + compounded; emit Deposit(msg.sender, _stakeType, compounded); } } function _transferPerformanceFee() internal { require(msg.value >= performanceFee, "should pay small gas to compound or harvest"); payable(buyBackWallet).transfer(performanceFee); if (msg.value > performanceFee) { payable(msg.sender).transfer(msg.value - performanceFee); } } /* * @notice Withdraw staked tokens without caring about rewards * @dev Needs to be for emergency. */ function emergencyWithdraw(uint8 _stakeType) external nonReentrant { require(activeEmergencyWithdraw, "Emergnecy withdraw not enabled"); if (_stakeType >= lockups.length) return; UserInfo storage user = userStaked[msg.sender]; Stake[] storage stakes = userStakes[msg.sender]; Lockup storage lockup = lockups[_stakeType]; uint256 amountToTransfer = 0; for (uint256 j = 0; j < stakes.length; j++) { Stake storage stake = stakes[j]; if (stake.stakeType != _stakeType) continue; if (stake.amount == 0) continue; amountToTransfer = amountToTransfer + stake.amount; stake.amount = 0; stake.rewardDebt = 0; stake.reflectionDebt = 0; } if (amountToTransfer > 0) { stakingToken.safeTransfer(address(msg.sender), amountToTransfer); user.amount = user.amount - amountToTransfer; lockup.totalStaked = lockup.totalStaked - amountToTransfer; totalStaked = totalStaked - amountToTransfer; } emit EmergencyWithdraw(msg.sender, amountToTransfer); } function rewardPerBlock(uint8 _stakeType) external view returns (uint256) { if (_stakeType >= lockups.length) return 0; return lockups[_stakeType].rate; } /** * @notice Available amount of reward token */ function availableRewardTokens() public view returns (uint256) { if (address(earnedToken) == address(dividendToken)) return totalEarned; uint256 _amount = earnedToken.balanceOf(address(this)); if (address(earnedToken) == address(stakingToken)) { if (_amount < totalStaked) return 0; return _amount - totalStaked; } return _amount; } /** * @notice Available amount of reflection token */ function availableDividendTokens() public view returns (uint256) { if (address(dividendToken) == address(0x0)) { return address(this).balance; } uint256 _amount = IERC20(dividendToken).balanceOf(address(this)); if (address(dividendToken) == address(earnedToken)) { if (_amount < totalEarned) return 0; _amount = _amount - totalEarned; } if (address(dividendToken) == address(stakingToken)) { if (_amount < totalStaked) return 0; _amount = _amount - totalStaked; } return _amount; } function insufficientRewards() external view returns (uint256) { uint256 adjustedShouldTotalPaid = shouldTotalPaid; uint256 remainRewards = availableRewardTokens() + paidRewards; for (uint256 i = 0; i < lockups.length; i++) { if (startBlock == 0) { adjustedShouldTotalPaid = adjustedShouldTotalPaid + lockups[i].rate * duration * 6426; } else { uint256 remainBlocks = _getMultiplier(lockups[i].lastRewardBlock, bonusEndBlock); adjustedShouldTotalPaid = adjustedShouldTotalPaid + lockups[i].rate * remainBlocks; } } if (remainRewards >= adjustedShouldTotalPaid) return 0; return adjustedShouldTotalPaid - remainRewards; } function userInfo(uint8 _stakeType, address _account) external view returns (uint256 amount, uint256 available, uint256 locked) { Stake[] memory stakes = userStakes[_account]; for (uint256 i = 0; i < stakes.length; i++) { Stake memory stake = stakes[i]; if (stake.stakeType != _stakeType) continue; if (stake.amount == 0) continue; amount = amount + stake.amount; if (stake.end < block.timestamp || bonusEndBlock < block.number) { available = available + stake.amount; } else { locked = locked + stake.amount; } } } /* * @notice View function to see pending reward on frontend. * @param _user: user address * @return Pending reward for a given user */ function pendingReward(address _account, uint8 _stakeType) external view returns (uint256) { if (_stakeType >= lockups.length || startBlock == 0) return 0; Stake[] memory stakes = userStakes[_account]; Lockup memory lockup = lockups[_stakeType]; if (lockup.totalStaked == 0) return 0; uint256 adjustedTokenPerShare = lockup.accTokenPerShare; if (block.number > lockup.lastRewardBlock && lockup.totalStaked != 0 && lockup.lastRewardBlock > 0) { uint256 multiplier = _getMultiplier(lockup.lastRewardBlock, block.number); uint256 reward = multiplier * lockup.rate; adjustedTokenPerShare = lockup.accTokenPerShare + (reward * PRECISION_FACTOR) / lockup.totalStaked; } uint256 pending = 0; for (uint256 i = 0; i < stakes.length; i++) { Stake memory stake = stakes[i]; if (stake.stakeType != _stakeType) continue; if (stake.amount == 0) continue; pending = pending + ((stake.amount * adjustedTokenPerShare) / PRECISION_FACTOR - stake.rewardDebt); } return pending; } function pendingDividends(address _account, uint8 _stakeType) external view returns (uint256) { if (_stakeType >= lockups.length) return 0; if (startBlock == 0 || totalStaked == 0) return 0; Stake[] memory stakes = userStakes[_account]; uint256 reflectionAmount = availableDividendTokens(); if (reflectionAmount < totalReflections) { reflectionAmount = totalReflections; } uint256 sTokenBal = totalStaked; uint256 eTokenBal = availableRewardTokens(); if (address(stakingToken) == address(earnedToken)) { sTokenBal = sTokenBal + eTokenBal; } uint256 adjustedReflectionPerShare = accDividendPerShare + (((reflectionAmount - totalReflections) * PRECISION_FACTOR_REFLECTION) / sTokenBal); uint256 pendingReflection = 0; for (uint256 i = 0; i < stakes.length; i++) { Stake memory stake = stakes[i]; if (stake.stakeType != _stakeType) continue; if (stake.amount == 0) continue; pendingReflection = pendingReflection + ((stake.amount * adjustedReflectionPerShare) / PRECISION_FACTOR_REFLECTION - stake.reflectionDebt); } return pendingReflection; } /** * * Admin Methods * */ function harvest() external onlyOwner { _updatePool(0); reflections = estimateDividendAmount(reflections); if (reflections > 0) { _transferToken(dividendToken, walletA, reflections); totalReflections = totalReflections - reflections; reflections = 0; } } /* * @notice Deposit reward token * @dev Only call by owner. Needs to be for deposit of reward token when reflection token is same with reward token. */ function depositRewards(uint256 _amount) external onlyOwner nonReentrant { require(_amount > 0, "invalid amount"); uint256 beforeAmt = earnedToken.balanceOf(address(this)); earnedToken.safeTransferFrom(msg.sender, address(this), _amount); uint256 afterAmt = earnedToken.balanceOf(address(this)); totalEarned = totalEarned + afterAmt - beforeAmt; } function increaseEmissionRate(uint8 _stakeType, uint256 _amount) external onlyOwner { require(startBlock > 0, "pool is not started"); require(bonusEndBlock > block.number, "pool was already finished"); require(_amount > 0, "invalid amount"); _updatePool(_stakeType); uint256 beforeAmt = earnedToken.balanceOf(address(this)); earnedToken.safeTransferFrom(msg.sender, address(this), _amount); uint256 afterAmt = earnedToken.balanceOf(address(this)); totalEarned = totalEarned + afterAmt - beforeAmt; uint256 remainRewards = availableRewardTokens() + paidRewards; uint256 adjustedShouldTotalPaid = shouldTotalPaid; for (uint256 i = 0; i < lockups.length; i++) { if (i == _stakeType) continue; if (startBlock == 0) { adjustedShouldTotalPaid = adjustedShouldTotalPaid + lockups[i].rate * duration * 6426; } else { uint256 remainBlocks = _getMultiplier(lockups[i].lastRewardBlock, bonusEndBlock); adjustedShouldTotalPaid = adjustedShouldTotalPaid + lockups[i].rate * remainBlocks; } } if (remainRewards > shouldTotalPaid) { remainRewards = remainRewards - adjustedShouldTotalPaid; uint256 remainBlocks = bonusEndBlock - block.number; lockups[_stakeType].rate = remainRewards / remainBlocks; emit LockupUpdated( _stakeType, lockups[_stakeType].duration, lockups[_stakeType].depositFee, lockups[_stakeType].withdrawFee, lockups[_stakeType].rate ); } } /* * @notice Withdraw reward token * @dev Only callable by owner. Needs to be for emergency. */ function emergencyRewardWithdraw(uint256 _amount) external onlyOwner { require(block.number > bonusEndBlock, "Pool is running"); require(availableRewardTokens() >= _amount, "Insufficient reward tokens"); earnedToken.safeTransfer(address(msg.sender), _amount); if (totalEarned > 0) { if (_amount > totalEarned) { totalEarned = 0; } else { totalEarned = totalEarned - _amount; } } } /** * @notice It allows the admin to recover wrong tokens sent to the contract * @param _tokenAddress: the address of the token to withdraw * @param _tokenAmount: the number of tokens to withdraw * @dev This function is only callable by admin. */ function recoverWrongTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner { require(_tokenAddress != address(earnedToken) || _tokenAddress == dividendToken, "Cannot be reward token"); if (_tokenAddress == address(stakingToken)) { uint256 tokenBal = stakingToken.balanceOf(address(this)); require(_tokenAmount <= tokenBal - totalStaked, "Insufficient balance"); } if (_tokenAddress == address(0x0)) { payable(msg.sender).transfer(_tokenAmount); } else { IERC20(_tokenAddress).safeTransfer(address(msg.sender), _tokenAmount); } emit AdminTokenRecovered(_tokenAddress, _tokenAmount); } function startReward() external onlyOwner { require(startBlock == 0, "Pool was already started"); startBlock = block.number + 100; bonusEndBlock = startBlock + duration * 6426; for (uint256 i = 0; i < lockups.length; i++) { lockups[i].lastRewardBlock = startBlock; } emit NewStartAndEndBlocks(startBlock, bonusEndBlock); } function stopReward() external onlyOwner { for (uint8 i = 0; i < lockups.length; i++) { _updatePool(i); } uint256 remainRewards = availableRewardTokens() + paidRewards; if (remainRewards > shouldTotalPaid) { remainRewards = remainRewards - shouldTotalPaid; earnedToken.transfer(msg.sender, remainRewards); _updateEarned(remainRewards); } bonusEndBlock = block.number; emit RewardsStop(bonusEndBlock); } function updateEndBlock(uint256 _endBlock) external onlyOwner { require(startBlock > 0, "Pool is not started"); require(bonusEndBlock > block.number, "Pool was already finished"); require(_endBlock > block.number && _endBlock > startBlock, "Invalid end block"); bonusEndBlock = _endBlock; emit EndBlockUpdated(_endBlock); } /* * @notice Update pool limit per user * @dev Only callable by owner. * @param _hasUserLimit: whether the limit remains forced * @param _poolLimitPerUser: new pool limit per user */ function updatePoolLimitPerUser(bool _hasUserLimit, uint256 _poolLimitPerUser) external onlyOwner { if (_hasUserLimit) { require(_poolLimitPerUser > poolLimitPerUser, "New limit must be higher"); poolLimitPerUser = _poolLimitPerUser; } else { poolLimitPerUser = 0; } hasUserLimit = _hasUserLimit; emit UpdatePoolLimit(poolLimitPerUser, _hasUserLimit); } function updateLockup( uint8 _stakeType, uint256 _duration, uint256 _depositFee, uint256 _withdrawFee, uint256 _rate, uint256 _totalStakedLimit ) external onlyOwner { // require(block.number < startBlock, "Pool was already started"); require(_stakeType < lockups.length, "Lockup Not found"); require(_depositFee < 2000, "Invalid deposit fee"); require(_withdrawFee < 2000, "Invalid withdraw fee"); _updatePool(_stakeType); Lockup storage _lockup = lockups[_stakeType]; _lockup.duration = _duration; _lockup.depositFee = _depositFee; _lockup.withdrawFee = _withdrawFee; _lockup.rate = _rate; _lockup.totalStakedLimit = _totalStakedLimit; emit LockupUpdated(_stakeType, _duration, _depositFee, _withdrawFee, _rate); } function addLockup( uint256 _duration, uint256 _depositFee, uint256 _withdrawFee, uint256 _rate, uint256 _totalStakedLimit ) external onlyOwner { require(_depositFee < 2000, "Invalid deposit fee"); require(_withdrawFee < 2000, "Invalid withdraw fee"); lockups.push(); Lockup storage _lockup = lockups[lockups.length - 1]; _lockup.duration = _duration; _lockup.depositFee = _depositFee; _lockup.withdrawFee = _withdrawFee; _lockup.rate = _rate; _lockup.lastRewardBlock = block.number; _lockup.totalStakedLimit = _totalStakedLimit; emit LockupUpdated(uint8(lockups.length - 1), _duration, _depositFee, _withdrawFee, _rate); } function setServiceInfo(address _addr, uint256 _fee) external { require(msg.sender == buyBackWallet, "setServiceInfo: FORBIDDEN"); require(_addr != address(0x0), "Invalid address"); buyBackWallet = _addr; performanceFee = _fee; emit ServiceInfoUpadted(_addr, _fee); } function setEmergencyWithdraw(bool _status) external { require(msg.sender == buyBackWallet || msg.sender == owner(), "setEmergencyWithdraw: FORBIDDEN"); activeEmergencyWithdraw = _status; emit SetEmergencyWithdrawStatus(_status); } function setDuration(uint256 _duration) external onlyOwner { require(startBlock == 0, "Pool was already started"); require(_duration >= 30, "lower limit reached"); duration = _duration; emit DurationUpdated(_duration); } function setSettings( uint256 _slippageFactor, address _uniRouter, address[] memory _earnedToStakedPath, address[] memory _reflectionToStakedPath, address _feeAddr ) external onlyOwner { require(_slippageFactor <= slippageFactorUL, "_slippageFactor too high"); require(_feeAddr != address(0x0), "Invalid Address"); slippageFactor = _slippageFactor; uniRouterAddress = _uniRouter; reflectionToStakedPath = _reflectionToStakedPath; earnedToStakedPath = _earnedToStakedPath; walletA = _feeAddr; emit SetSettings(_slippageFactor, _uniRouter, _earnedToStakedPath, _reflectionToStakedPath, _feeAddr); } function setWhitelist(address _whitelist) external onlyOwner { whiteList = _whitelist; emit SetWhiteList(_whitelist); } /** * * Internal Methods * */ /* * @notice Update reward variables of the given pool to be up-to-date. */ function _updatePool(uint8 _stakeType) internal { // calc reflection rate if (totalStaked > 0) { uint256 reflectionAmount = availableDividendTokens(); if (reflectionAmount < totalReflections) { reflectionAmount = totalReflections; } uint256 sTokenBal = totalStaked; uint256 eTokenBal = availableRewardTokens(); if (address(stakingToken) == address(earnedToken)) { sTokenBal = sTokenBal + eTokenBal; } accDividendPerShare = accDividendPerShare + (((reflectionAmount - totalReflections) * PRECISION_FACTOR_REFLECTION) / sTokenBal); if (address(stakingToken) == address(earnedToken)) { reflections = reflections + ((reflectionAmount - totalReflections) * eTokenBal) / sTokenBal; } totalReflections = reflectionAmount; } Lockup storage lockup = lockups[_stakeType]; if (block.number <= lockup.lastRewardBlock || lockup.lastRewardBlock == 0) return; if (lockup.totalStaked == 0) { lockup.lastRewardBlock = block.number; return; } uint256 multiplier = _getMultiplier(lockup.lastRewardBlock, block.number); uint256 _reward = multiplier * lockup.rate; lockup.accTokenPerShare = lockup.accTokenPerShare + ((_reward * PRECISION_FACTOR) / lockup.totalStaked); lockup.lastRewardBlock = block.number; shouldTotalPaid = shouldTotalPaid + _reward; } function estimateDividendAmount(uint256 amount) internal view returns (uint256) { uint256 dTokenBal = availableDividendTokens(); if (amount > totalReflections) amount = totalReflections; if (amount > dTokenBal) amount = dTokenBal; return amount; } /* * @notice Return reward multiplier over the given _from to _to block. * @param _from: block to start * @param _to: block to finish */ function _getMultiplier(uint256 _from, uint256 _to) internal view returns (uint256) { if (_to <= bonusEndBlock) { return _to - _from; } else if (_from >= bonusEndBlock) { return 0; } else { return bonusEndBlock - _from; } } function _transferToken(address _token, address _to, uint256 _amount) internal { if (_token == address(0x0)) { payable(_to).transfer(_amount); } else { IERC20(_token).transfer(_to, _amount); } } function _updateEarned(uint256 _amount) internal { if (totalEarned > _amount) { totalEarned = totalEarned - _amount; } else { totalEarned = 0; } } function _safeSwap(uint256 _amountIn, address[] memory _path, address _to) internal { uint256[] memory amounts = IUniRouter02(uniRouterAddress).getAmountsOut(_amountIn, _path); uint256 amountOut = amounts[amounts.length - 1]; IERC20(_path[0]).safeApprove(uniRouterAddress, _amountIn); IUniRouter02(uniRouterAddress).swapExactTokensForTokensSupportingFeeOnTransferTokens( _amountIn, (amountOut * slippageFactor) / PERCENT_PRECISION, _path, _to, block.timestamp + 600 ); } receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IUniRouter01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); function removeLiquidity( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETH( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountToken, uint256 amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETHWithPermit( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountToken, uint256 amountETH); function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapTokensForExactTokens( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactETHForTokens(uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external payable returns (uint256[] memory amounts); function swapTokensForExactETH( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactTokensForETH( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapETHForExactTokens(uint256 amountOut, address[] calldata path, address to, uint256 deadline) external payable returns (uint256[] memory amounts); function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) external pure returns (uint256 amountOut); function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) external pure returns (uint256 amountIn); function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts); function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IUniRouter01.sol"; interface IUniRouter02 is IUniRouter01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0; interface IWETH { function deposit() external payable; function transfer(address to, uint256 value) external returns (bool); function withdraw(uint256) external; }
{ "optimizer": { "enabled": true, "runs": 100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenRecovered","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AdminTokenRecovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"stakeType","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"DurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"EndBlockUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"_type","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"_duration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_fee0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_fee1","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"LockupUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"}],"name":"NewStartAndEndBlocks","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"RewardsStop","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_addr","type":"address"},{"indexed":false,"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"ServiceInfoUpadted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"SetEmergencyWithdrawStatus","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_slippageFactor","type":"uint256"},{"indexed":false,"internalType":"address","name":"_uniRouter","type":"address"},{"indexed":false,"internalType":"address[]","name":"_path0","type":"address[]"},{"indexed":false,"internalType":"address[]","name":"_path1","type":"address[]"},{"indexed":false,"internalType":"address","name":"_walletA","type":"address"}],"name":"SetSettings","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_whitelist","type":"address"}],"name":"SetWhiteList","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"poolLimitPerUser","type":"uint256"},{"indexed":false,"internalType":"bool","name":"hasLimit","type":"bool"}],"name":"UpdatePoolLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"stakeType","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"PRECISION_FACTOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRECISION_FACTOR_REFLECTION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accDividendPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"activeEmergencyWithdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_duration","type":"uint256"},{"internalType":"uint256","name":"_depositFee","type":"uint256"},{"internalType":"uint256","name":"_withdrawFee","type":"uint256"},{"internalType":"uint256","name":"_rate","type":"uint256"},{"internalType":"uint256","name":"_totalStakedLimit","type":"uint256"}],"name":"addLockup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"availableDividendTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"availableRewardTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bonusEndBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyBackWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_stakeType","type":"uint8"}],"name":"claimDividend","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_stakeType","type":"uint8"}],"name":"claimReward","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_stakeType","type":"uint8"}],"name":"compoundDividend","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_stakeType","type":"uint8"}],"name":"compoundReward","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint8","name":"_stakeType","type":"uint8"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dividendToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"duration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"earnedToStakedPath","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"earnedToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"emergencyRewardWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_stakeType","type":"uint8"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"hasUserLimit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_stakeType","type":"uint8"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"increaseEmissionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_stakingToken","type":"address"},{"internalType":"contract IERC20","name":"_earnedToken","type":"address"},{"internalType":"address","name":"_dividendToken","type":"address"},{"internalType":"address","name":"_uniRouter","type":"address"},{"internalType":"address[]","name":"_earnedToStakedPath","type":"address[]"},{"internalType":"address[]","name":"_reflectionToStakedPath","type":"address[]"},{"internalType":"address","name":"_whiteList","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"insufficientRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isInitialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lockups","outputs":[{"internalType":"uint8","name":"stakeType","type":"uint8"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"depositFee","type":"uint256"},{"internalType":"uint256","name":"withdrawFee","type":"uint256"},{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"accTokenPerShare","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"totalStaked","type":"uint256"},{"internalType":"uint256","name":"totalStakedLimit","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint8","name":"_stakeType","type":"uint8"}],"name":"pendingDividends","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint8","name":"_stakeType","type":"uint8"}],"name":"pendingReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"performanceFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLimitPerUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_tokenAmount","type":"uint256"}],"name":"recoverWrongTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"reflectionToStakedPath","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_stakeType","type":"uint8"}],"name":"rewardPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"setDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setEmergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setServiceInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_slippageFactor","type":"uint256"},{"internalType":"address","name":"_uniRouter","type":"address"},{"internalType":"address[]","name":"_earnedToStakedPath","type":"address[]"},{"internalType":"address[]","name":"_reflectionToStakedPath","type":"address[]"},{"internalType":"address","name":"_feeAddr","type":"address"}],"name":"setSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_whitelist","type":"address"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"slippageFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slippageFactorUL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniRouterAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_endBlock","type":"uint256"}],"name":"updateEndBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_stakeType","type":"uint8"},{"internalType":"uint256","name":"_duration","type":"uint256"},{"internalType":"uint256","name":"_depositFee","type":"uint256"},{"internalType":"uint256","name":"_withdrawFee","type":"uint256"},{"internalType":"uint256","name":"_rate","type":"uint256"},{"internalType":"uint256","name":"_totalStakedLimit","type":"uint256"}],"name":"updateLockup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_hasUserLimit","type":"bool"},{"internalType":"uint256","name":"_poolLimitPerUser","type":"uint256"}],"name":"updatePoolLimitPerUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_stakeType","type":"uint8"},{"internalType":"address","name":"_account","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"available","type":"uint256"},{"internalType":"uint256","name":"locked","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userStaked","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"locked","type":"uint256"},{"internalType":"uint256","name":"available","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userStakes","outputs":[{"internalType":"uint8","name":"stakeType","type":"uint8"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"reflectionDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"walletA","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whiteList","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint8","name":"_stakeType","type":"uint8"}],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405261016d6003556009805460ff19169055611f40600a55600f80546001600160a01b0319167364961ffd0d84b2355ec2b5d35b0d8d8825a774dc1790556603297345d9a0006010553480156200005857600080fd5b5062000064336200006e565b60018055620000be565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61595180620000ce6000396000f3fe60806040526004361061031a5760003560e01c806378d57eea1161019c578063a0b40905116100e2578063ccd34cd511610090578063ccd34cd51461098a578063e7a2fed7146109a0578063f2fde38b146109c0578063f3aeb31d146109e0578063f6be71d1146109f5578063f8920ee714610a15578063fbe32b3514610a35578063ffbd3b1f14610a5557600080fd5b8063a0b4090514610867578063acc3a93914610887578063b5d5b5fa146108c3578063b74cd24214610914578063b77e7da01461092a578063c1e22a651461094a578063c7dd6f071461096a57600080fd5b806388bbb0c11161014a57806388bbb0c1146107535780638bdf67f2146107695780638da5cb5b146107895780638e6f4fb7146107a7578063903d42961461080f57806392b46e5b1461082257806392e8990e146108385780639f94e2721461085257600080fd5b806378d57eea146106a557806380dc0672146106b8578063817b1cd2146106cd57806381b61948146106e3578063854cff2f1461070357806385a8bd3614610723578063877887821461073d57600080fd5b80634641257d11610261578063689f16231161020f578063689f1623146105ad578063693a090b146105c05780636becd657146105e05780636e707b7314610600578063715018a61461062057806372f702f314610635578063746c8ae11461065557806376fa17d21461066a57600080fd5b80634641257d1461050457806348cd4cb11461051957806353314fae1461052f578063595e173a1461054f5780635dde4a911461056f578063654cfdff1461058457806366fe9f8a1461059757600080fd5b80631aed6553116102c95780631aed6553146104115780631cd348c0146104275780632a9d7a7a14610447578063304f807c146104675780633279beab1461047a5780633544a8641461049a578063392e53cd146104ba5780633f138d4b146104e457600080fd5b80626f0231146103265780630bf8a6a4146103485780630fb5a6b41461036857806313c68f9014610391578063155622a4146103a45780631582358e146103c4578063167d2dbe146103f157600080fd5b3661032157005b600080fd5b34801561033257600080fd5b50610346610341366004614e99565b610a6b565b005b34801561035457600080fd5b50610346610363366004614eb2565b610b99565b34801561037457600080fd5b5061037e60035481565b6040519081526020015b60405180910390f35b61034661039f366004614efc565b610c8d565b3480156103b057600080fd5b506103466103bf366004614efc565b610ddf565b3480156103d057600080fd5b506015546103e4906001600160a01b031681565b6040516103889190614f20565b3480156103fd57600080fd5b506103e461040c366004614e99565b610fb8565b34801561041d57600080fd5b5061037e60085481565b34801561043357600080fd5b50600f546103e4906001600160a01b031681565b34801561045357600080fd5b5061034661046236600461501d565b610fe2565b610346610475366004614efc565b611261565b34801561048657600080fd5b50610346610495366004614e99565b6116d2565b3480156104a657600080fd5b506006546103e4906001600160a01b031681565b3480156104c657600080fd5b506002546104d49060ff1681565b6040519015158152602001610388565b3480156104f057600080fd5b506103466104ff3660046150e0565b611789565b34801561051057600080fd5b50610346611972565b34801561052557600080fd5b5061037e60075481565b34801561053b57600080fd5b5061034661054a36600461510c565b6119d4565b34801561055b57600080fd5b5061034661056a366004615158565b611af3565b34801561057b57600080fd5b5061037e611f0f565b610346610592366004615176565b612015565b3480156105a357600080fd5b5061037e60055481565b6103466105bb366004614efc565b61269c565b3480156105cc57600080fd5b50600b546103e4906001600160a01b031681565b3480156105ec57600080fd5b5061037e6105fb3660046151a6565b612847565b34801561060c57600080fd5b506014546103e4906001600160a01b031681565b34801561062c57600080fd5b50610346612a57565b34801561064157600080fd5b506013546103e4906001600160a01b031681565b34801561066157600080fd5b50610346612a69565b34801561067657600080fd5b5061068a6106853660046151d4565b612b50565b60408051938452602084019290925290820152606001610388565b6103466106b3366004614efc565b612ccd565b3480156106c457600080fd5b506103466130a0565b3480156106d957600080fd5b5061037e60175481565b3480156106ef57600080fd5b506103466106fe3660046150e0565b6131ba565b34801561070f57600080fd5b5061034661071e366004615202565b6132aa565b34801561072f57600080fd5b506009546104d49060ff1681565b34801561074957600080fd5b5061037e60105481565b34801561075f57600080fd5b5061037e60125481565b34801561077557600080fd5b50610346610784366004614e99565b6132fd565b34801561079557600080fd5b506000546001600160a01b03166103e4565b3480156107b357600080fd5b506107c76107c2366004614e99565b613453565b6040805160ff909a168a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c084015260e083015261010082015261012001610388565b61034661081d366004615176565b6134b2565b34801561082e57600080fd5b5061037e60165481565b34801561084457600080fd5b506004546104d49060ff1681565b34801561085e57600080fd5b5061037e613894565b34801561087357600080fd5b5061034661088236600461522d565b613968565b34801561089357600080fd5b5061068a6108a2366004615202565b601f6020526000908152604090208054600182015460029092015490919083565b3480156108cf57600080fd5b506108e36108de3660046150e0565b613a1d565b6040805160ff90971687526020870195909552938501929092526060840152608083015260a082015260c001610388565b34801561092057600080fd5b5061037e6126de81565b34801561093657600080fd5b50600e546103e4906001600160a01b031681565b34801561095657600080fd5b506103e4610965366004614e99565b613a75565b34801561097657600080fd5b5061034661098536600461524b565b613a85565b34801561099657600080fd5b5061037e60115481565b3480156109ac57600080fd5b506103466109bb366004615268565b613b35565b3480156109cc57600080fd5b506103466109db366004615202565b613c7c565b3480156109ec57600080fd5b5061037e613cf2565b348015610a0157600080fd5b50610346610a10366004614e99565b613e05565b348015610a2157600080fd5b5061037e610a30366004614efc565b613ea9565b348015610a4157600080fd5b5061037e610a503660046151a6565b613eef565b348015610a6157600080fd5b5061037e600a5481565b610a73614191565b600060075411610ac05760405162461bcd60e51b8152602060048201526013602482015272141bdbdb081a5cc81b9bdd081cdd185c9d1959606a1b60448201526064015b60405180910390fd5b4360085411610b0d5760405162461bcd60e51b8152602060048201526019602482015278141bdbdb081dd85cc8185b1c9958591e48199a5b9a5cda1959603a1b6044820152606401610ab7565b4381118015610b1d575060075481115b610b5d5760405162461bcd60e51b8152602060048201526011602482015270496e76616c696420656e6420626c6f636b60781b6044820152606401610ab7565b60088190556040518181527f0972575658363b3e7c472ab3a6a918726742c853b732f6a4a2763e2e3a94c977906020015b60405180910390a150565b610ba1614191565b6107d08410610bc25760405162461bcd60e51b8152600401610ab7906152fd565b6107d08310610be35760405162461bcd60e51b8152600401610ab79061532a565b601d8054600190810180835560008381529291610bff9161536e565b81548110610c0f57610c0f615385565b60009182526020909120600160099092020181810188905560028101879055600381018690556004810185905543600682015560088101849055601d549092506000805160206158dc83398151915291610c689161536e565b87878787604051610c7d95949392919061539b565b60405180910390a1505050505050565b610c956141eb565b601d5460ff82161015610dd35760075415610dd357610cb2614244565b610cbb8161432c565b336000908152601e6020526040812090805b8254811015610d95576000838281548110610cea57610cea615385565b60009182526020909120600690910201805490915060ff868116911614610d115750610d83565b8060010154600003610d235750610d83565b80600501546012546016548360010154610d3d91906153c3565b610d4791906153e2565b610d51919061536e565b610d5b9084615404565b92506012546016548260010154610d7291906153c3565b610d7c91906153e2565b6005909101555b80610d8d8161541c565b915050610ccd565b50610d9f816144dd565b90508015610dd057601554610dbe906001600160a01b0316338361450d565b80601954610dcc919061536e565b6019555b50505b610ddc60018055565b50565b610de76141eb565b60095460ff16610e395760405162461bcd60e51b815260206004820152601e60248201527f456d6572676e656379207769746864726177206e6f7420656e61626c656400006044820152606401610ab7565b601d5460ff82161015610dd357336000908152601f60209081526040808320601e9092528220601d80549293919260ff8616908110610e7a57610e7a615385565b906000526020600020906009020190506000805b8354811015610f21576000848281548110610eab57610eab615385565b60009182526020909120600690910201805490915060ff888116911614610ed25750610f0f565b8060010154600003610ee45750610f0f565b6001810154610ef39084615404565b6000600183018190556004830181905560059092019190915591505b80610f198161541c565b915050610e8e565b508015610f7557601354610f3f906001600160a01b031633836145cd565b8354610f4c90829061536e565b84556007820154610f5e90829061536e565b6007830155601754610f7190829061536e565b6017555b60405181815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695906020015b60405180910390a250505050610ddc60018055565b600c8181548110610fc857600080fd5b6000918252602090912001546001600160a01b0316905081565b610fea614191565b60025460ff16156110335760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610ab7565b6002805460ff19166001179055601380546001600160a01b03808a166001600160a01b0319928316179092556014805489841690831681179091556015805493891693831693909317909255600e8054909116331790556040805163313ce56760e01b815290516000929163313ce5679160048083019260209291908290030181865afa1580156110c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ec9190615435565b60ff169050601e81106111115760405162461bcd60e51b8152600401610ab790615452565b61111c81602861536e565b61112790600a615566565b6011556015546012906001600160a01b0316156111da57601560009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611191573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b59190615435565b60ff169050601e81106111da5760405162461bcd60e51b8152600401610ab790615452565b6111e582602861536e565b6111f090600a615566565b601255600b80546001600160a01b0319166001600160a01b038816179055845161122190600d906020880190614e1f565b50835161123590600c906020870190614e1f565b5050600680546001600160a01b0319166001600160a01b03939093169290921790915550505050505050565b6112696141eb565b601d5460ff82161015610dd35760075415610dd357611286614244565b61128f8161432c565b336000908152601f60209081526040808320601e9092528220601d80549293919260ff86169081106112c3576112c3615385565b906000526020600020906009020190506000805b83548110156116605760008482815481106112f4576112f4615385565b60009182526020909120600690910201805490915060ff88811691161461131b575061164e565b806001015460000361132d575061164e565b60008160050154601254601654846001015461134991906153c3565b61135391906153e2565b61135d919061536e565b9050611368816144dd565b905080601954611378919061536e565b6019556015546013546001600160a01b0390811691161480159061139c5750600081115b156115d3576015546001600160a01b031661147757600b54604080516315ab88c960e31b815290516000926001600160a01b03169163ad5c46489160048083019260209291908290030181865afa1580156113fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141f9190615572565b9050806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561145c57600080fd5b505af1158015611470573d6000803e3d6000fd5b5050505050505b6013546040516370a0823160e01b81526000916001600160a01b0316906370a08231906114a8903090600401614f20565b602060405180830381865afa1580156114c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e9919061558f565b905061155082600c80548060200260200160405190810160405280929190818152602001828054801561154557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611527575b505050505030614623565b6013546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611581903090600401614f20565b602060405180830381865afa15801561159e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115c2919061558f565b90506115ce828261536e565b925050505b6115dd8185615404565b93508082600101546115ef9190615404565b6001830155601154600586015461160690836153c3565b61161091906153e2565b826004015461161f9190615404565b6004830155601254601654600184015461163991906153c3565b61164391906153e2565b826005018190555050505b806116588161541c565b9150506112d7565b5080156116c5578354611674908290615404565b84556007820154611686908290615404565b6007830155601754611699908290615404565b6017556040805160ff871681526020810183905233916000805160206158fc8339815191529101610fa3565b50505050610ddc60018055565b6116da614191565b600854431161171d5760405162461bcd60e51b815260206004820152600f60248201526e506f6f6c2069732072756e6e696e6760881b6044820152606401610ab7565b80611726613894565b10156117445760405162461bcd60e51b8152600401610ab7906155a8565b60145461175b906001600160a01b031633836145cd565b60185415610ddc5760185481111561177557600060185550565b80601854611783919061536e565b60185550565b611791614191565b6014546001600160a01b0383811691161415806117bb57506015546001600160a01b038381169116145b6118005760405162461bcd60e51b815260206004820152601660248201527521b0b73737ba103132903932bbb0b932103a37b5b2b760511b6044820152606401610ab7565b6013546001600160a01b03908116908316036118e0576013546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611847903090600401614f20565b602060405180830381865afa158015611864573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611888919061558f565b905060175481611898919061536e565b8211156118de5760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606401610ab7565b505b6001600160a01b03821661192157604051339082156108fc029083906000818181858888f1935050505015801561191b573d6000803e3d6000fd5b50611935565b6119356001600160a01b03831633836145cd565b7f74f5dcd55c394cb1c6d3b9da22c2464bcc46c38cc3865bd629ed75823249b40b82826040516119669291906155df565b60405180910390a15050565b61197a614191565b611984600061432c565b61198f601a546144dd565b601a819055156119d257601554600e54601a546119b9926001600160a01b0390811692169061450d565b601a546019546119c9919061536e565b6019556000601a555b565b6119dc614191565b601d5460ff871610611a235760405162461bcd60e51b815260206004820152601060248201526f131bd8dadd5c08139bdd08199bdd5b9960821b6044820152606401610ab7565b6107d08410611a445760405162461bcd60e51b8152600401610ab7906152fd565b6107d08310611a655760405162461bcd60e51b8152600401610ab79061532a565b611a6e8661432c565b6000601d8760ff1681548110611a8657611a86615385565b6000918252602090912060099091020160018101879055600281018690556003810185905560048101849055600881018390556040519091506000805160206158dc83398151915290611ae2908990899089908990899061539b565b60405180910390a150505050505050565b611afb614191565b600060075411611b435760405162461bcd60e51b81526020600482015260136024820152721c1bdbdb081a5cc81b9bdd081cdd185c9d1959606a1b6044820152606401610ab7565b4360085411611b905760405162461bcd60e51b81526020600482015260196024820152781c1bdbdb081dd85cc8185b1c9958591e48199a5b9a5cda1959603a1b6044820152606401610ab7565b60008111611bb05760405162461bcd60e51b8152600401610ab7906155f8565b611bb98261432c565b6014546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611bea903090600401614f20565b602060405180830381865afa158015611c07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c2b919061558f565b601454909150611c46906001600160a01b03163330856147ae565b6014546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611c77903090600401614f20565b602060405180830381865afa158015611c94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cb8919061558f565b90508181601854611cc99190615404565b611cd3919061536e565b601855601b54600090611ce4613894565b611cee9190615404565b601c5490915060005b601d54811015611de85760ff87168114611dd657600754600003611d6457600354601d8281548110611d2b57611d2b615385565b906000526020600020906009020160040154611d4791906153c3565b611d539061191a6153c3565b611d5d9083615404565b9150611dd6565b6000611d96601d8381548110611d7c57611d7c615385565b9060005260206000209060090201600601546008546147e6565b905080601d8381548110611dac57611dac615385565b906000526020600020906009020160040154611dc891906153c3565b611dd29084615404565b9250505b80611de08161541c565b915050611cf7565b50601c54821115611f0757611dfd818361536e565b9150600043600854611e0f919061536e565b9050611e1b81846153e2565b601d8860ff1681548110611e3157611e31615385565b9060005260206000209060090201600401819055506000805160206158dc83398151915287601d8960ff1681548110611e6c57611e6c615385565b906000526020600020906009020160010154601d8a60ff1681548110611e9457611e94615385565b906000526020600020906009020160020154601d8b60ff1681548110611ebc57611ebc615385565b906000526020600020906009020160030154601d8c60ff1681548110611ee457611ee4615385565b906000526020600020906009020160040154604051611ae295949392919061539b565b505050505050565b6015546000906001600160a01b0316611f2757504790565b6015546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611f58903090600401614f20565b602060405180830381865afa158015611f75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f99919061558f565b6014546015549192506001600160a01b03908116911603611fd657601854811015611fc657600091505090565b601854611fd3908261536e565b90505b6013546015546001600160a01b039182169116036120105760175481101561200057600091505090565b60175461200d908261536e565b90505b919050565b61201d6141eb565b6000600754118015612030575043600754105b61207c5760405162461bcd60e51b815260206004820152601a60248201527f5374616b696e67206861736e27742073746172746564207965740000000000006044820152606401610ab7565b6000821161209c5760405162461bcd60e51b8152600401610ab790615620565b601d5460ff8216106120c05760405162461bcd60e51b8152600401610ab790615657565b6006546001600160a01b03161561218057600654604051636c9b2a3f60e11b81526001600160a01b039091169063d936547e90612101903390600401614f20565b602060405180830381865afa15801561211e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121429190615683565b6121805760405162461bcd60e51b815260206004820152600f60248201526e1b9bdd081dda1a5d195b1a5cdd1959608a1b6044820152606401610ab7565b612188614244565b6121918161432c565b336000908152601f60209081526040808320601e9092528220601d80549293919260ff86169081106121c5576121c5615385565b9060005260206000209060090201905060008160080154111561226b5780600801548160070154106122395760405162461bcd60e51b815260206004820152601b60248201527f546f74616c207374616b6564206c696d697420657863656564656400000000006044820152606401610ab7565b806008015485826007015461224e9190615404565b111561226b5780600701548160080154612268919061536e565b94505b60008060005b84548110156123a357600085828154811061228e5761228e615385565b60009182526020909120600690910201805490915060ff8981169116146122b55750612391565b80600101546000036122c75750612391565b806005015460125460165483600101546122e191906153c3565b6122eb91906153e2565b6122f5919061536e565b6122ff9084615404565b9250600081600401546011548760050154846001015461231f91906153c3565b61232991906153e2565b612333919061536e565b905061233f8186615404565b94506011548660050154836001015461235891906153c3565b61236291906153e2565b6004830155601254601654600184015461237c91906153c3565b61238691906153e2565b826005018190555050505b8061239b8161541c565b915050612271565b50811561240357816123b3613894565b10156123d15760405162461bcd60e51b8152600401610ab7906155a8565b6014546123e8906001600160a01b031633846145cd565b6123f182614821565b81601b546123ff9190615404565b601b555b61240c816144dd565b9050801561243d5760155461242b906001600160a01b0316338361450d565b80601954612439919061536e565b6019555b6013546040516370a0823160e01b81526000916001600160a01b0316906370a082319061246e903090600401614f20565b602060405180830381865afa15801561248b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124af919061558f565b6013549091506124ca906001600160a01b031633308b6147ae565b6013546040516370a0823160e01b81526000916001600160a01b0316906370a08231906124fb903090600401614f20565b602060405180830381865afa158015612518573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061253c919061558f565b9050600061254a838361536e565b9050898111156125575750885b60045460ff16156125b95760055488546125719083615404565b11156125b95760405162461bcd60e51b8152602060048201526017602482015276155cd95c88185b5bdd5b9d0818589bdd99481b1a5b5a5d604a1b6044820152606401610ab7565b6002860154156126165760006127108760020154836125d891906153c3565b6125e291906153e2565b9050801561261457600e54601354612607916001600160a01b039182169116836145cd565b612611818361536e565b91505b505b6126268933886001015484614841565b8754612633908290615404565b88556007860154612645908290615404565b6007870155601754612658908290615404565b6017556040805160ff8b1681526020810183905233916000805160206158fc833981519152910160405180910390a2505050505050505061269860018055565b5050565b6126a46141eb565b601d5460ff82161015610dd35760075415610dd3576126c1614244565b6126ca8161432c565b336000908152601e60205260408120601d805491929160ff85169081106126f3576126f3615385565b906000526020600020906009020190506000805b83548110156127db57600084828154811061272457612724615385565b60009182526020909120600690910201805490915060ff87811691161461274b57506127c9565b806001015460000361275d57506127c9565b600081600401546011548660050154846001015461277b91906153c3565b61278591906153e2565b61278f919061536e565b905061279b8185615404565b9350601154856005015483600101546127b491906153c3565b6127be91906153e2565b826004018190555050505b806127d38161541c565b915050612707565b50801561283b57806127eb613894565b10156128095760405162461bcd60e51b8152600401610ab7906155a8565b601454612820906001600160a01b031633836145cd565b61282981614821565b80601b546128379190615404565b601b555b505050610ddc60018055565b601d5460009060ff83161061285e57506000612a51565b600754158061286d5750601754155b1561287a57506000612a51565b6001600160a01b0383166000908152601e6020908152604080832080548251818502810185019093528083529192909190849084015b8282101561291b5760008481526020908190206040805160c08101825260068602909201805460ff1683526001808201548486015260028201549284019290925260038101546060840152600481015460808401526005015460a083015290835290920191016128b0565b505050509050600061292b611f0f565b905060195481101561293c57506019545b6017546000612949613894565b6014546013549192506001600160a01b039081169116036129715761296e8183615404565b91505b60008260125460195486612985919061536e565b61298f91906153c3565b61299991906153e2565b6016546129a69190615404565b90506000805b8651811015612a485760008782815181106129c9576129c9615385565b602002602001015190508960ff16816000015160ff16146129ea5750612a36565b80602001516000036129fc5750612a36565b8060a00151601254858360200151612a1491906153c3565b612a1e91906153e2565b612a28919061536e565b612a329084615404565b9250505b80612a408161541c565b9150506129ac565b50955050505050505b92915050565b612a5f614191565b6119d26000614a69565b612a71614191565b60075415612a915760405162461bcd60e51b8152600401610ab7906156a0565b612a9c436064615404565b600755600354612aae9061191a6153c3565b600754612abb9190615404565b60085560005b601d54811015612b0757600754601d8281548110612ae157612ae1615385565b600091825260209091206006600990920201015580612aff8161541c565b915050612ac1565b507f7cd0ab87d19036f3dfadadb232c78aa4879dda3f0c994a9d637532410ee2ce06600754600854604051612b46929190918252602082015260400190565b60405180910390a1565b600080600080601e6000866001600160a01b03166001600160a01b03168152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015612c065760008481526020908190206040805160c08101825260068602909201805460ff1683526001808201548486015260028201549284019290925260038101546060840152600481015460808401526005015460a08301529083529092019101612b9b565b50505050905060005b8151811015612cc4576000828281518110612c2c57612c2c615385565b602002602001015190508760ff16816000015160ff1614612c4d5750612cb2565b8060200151600003612c5f5750612cb2565b6020810151612c6e9087615404565b95504281606001511080612c83575043600854105b15612c9e576020810151612c979086615404565b9450612cb0565b6020810151612cad9085615404565b93505b505b80612cbc8161541c565b915050612c0f565b50509250925092565b612cd56141eb565b601d5460ff82161015610dd35760075415610dd357612cf2614244565b612cfb8161432c565b336000908152601f60209081526040808320601e9092528220601d80549293919260ff8616908110612d2f57612d2f615385565b9060005260206000209060090201905060008060005b8454811015612fe8576000858281548110612d6257612d62615385565b60009182526020909120600690910201805490915060ff898116911614612d895750612fd6565b8060010154600003612d9b5750612fd6565b6000816004015460115487600501548460010154612db991906153c3565b612dc391906153e2565b612dcd919061536e565b9050612dd98186615404565b6014546013549196506001600160a01b03918216911614801590612dfd5750600081115b15612f5c576013546040516370a0823160e01b81526000916001600160a01b0316906370a0823190612e33903090600401614f20565b602060405180830381865afa158015612e50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e74919061558f565b9050612ed982600d805480602002602001604051908101604052809291908181526020018280548015611545576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161152757505050505030614623565b6013546040516370a0823160e01b81526000916001600160a01b0316906370a0823190612f0a903090600401614f20565b602060405180830381865afa158015612f27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f4b919061558f565b9050612f57828261536e565b925050505b612f668185615404565b9350808260010154612f789190615404565b6001830181905560115460058801549091612f9391906153c3565b612f9d91906153e2565b6004830155601254601654612fb290836153c3565b612fbc91906153e2565b8260050154612fcb9190615404565b826005018190555050505b80612fe08161541c565b915050612d45565b5081156130925781612ff8613894565b10156130165760405162461bcd60e51b8152600401610ab7906155a8565b61301f82614821565b81601b5461302d9190615404565b601b55845461303d908290615404565b8555600783015461304f908290615404565b6007840155601754613062908290615404565b6017556040805160ff881681526020810183905233916000805160206158fc833981519152910160405180910390a25b5050505050610ddc60018055565b6130a8614191565b60005b601d5460ff821610156130d3576130c18161432c565b806130cb816156d2565b9150506130ab565b506000601b546130e1613894565b6130eb9190615404565b9050601c5481111561318457601c54613104908261536e565b60145460405163a9059cbb60e01b81529192506001600160a01b03169063a9059cbb9061313790339085906004016155df565b6020604051808303816000875af1158015613156573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061317a9190615683565b5061318481614821565b4360088190556040519081527ffed9fcb0ca3d1e761a4b929792bb24082fba92dca81252646ad306d30680656690602001610b8e565b600f546001600160a01b031633146132105760405162461bcd60e51b815260206004820152601960248201527839b2ba29b2b93b34b1b2a4b733379d102327a92124a22222a760391b6044820152606401610ab7565b6001600160a01b0382166132585760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610ab7565b600f80546001600160a01b0319166001600160a01b03841617905560108190556040517f232f2e6280d2064b1e439bf40ecdada042d84eefbb55039e4c49e8dc4f4c90c99061196690849084906155df565b6132b2614191565b600680546001600160a01b0319166001600160a01b0383161790556040517f3990e3e141b903f4f5602428874be692206642a653b416f336d965e2f04813ce90610b8e908390614f20565b613305614191565b61330d6141eb565b6000811161332d5760405162461bcd60e51b8152600401610ab7906155f8565b6014546040516370a0823160e01b81526000916001600160a01b0316906370a082319061335e903090600401614f20565b602060405180830381865afa15801561337b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061339f919061558f565b6014549091506133ba906001600160a01b03163330856147ae565b6014546040516370a0823160e01b81526000916001600160a01b0316906370a08231906133eb903090600401614f20565b602060405180830381865afa158015613408573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061342c919061558f565b9050818160185461343d9190615404565b613447919061536e565b60185550506001805550565b601d818154811061346357600080fd5b600091825260209091206009909102018054600182015460028301546003840154600485015460058601546006870154600788015460089098015460ff90971698509496939592949193909289565b6134ba6141eb565b600082116134da5760405162461bcd60e51b8152600401610ab790615620565b601d5460ff8216106134fe5760405162461bcd60e51b8152600401610ab790615657565b613506614244565b61350f8161432c565b336000908152601f60209081526040808320601e9092528220601d80549293919260ff861690811061354357613543615385565b60009182526020822060099091020191508086815b85548110156136f357600086828154811061357557613575615385565b60009182526020909120600690910201805490915060ff8a811691161461359c57506136e1565b80600101546000036135ae57506136e1565b826000036135bc57506136f3565b60008160040154601154886005015484600101546135da91906153c3565b6135e491906153e2565b6135ee919061536e565b90508160050154601254601654846001015461360a91906153c3565b61361491906153e2565b61361e919061536e565b6136289086615404565b94506136348187615404565b95504282600301541080613649575043600854105b156136915783826001015411156136785783826001015461366a919061536e565b600183015560009350613691565b6001820154613687908561536e565b6000600184015593505b601154876005015483600101546136a891906153c3565b6136b291906153e2565b600483015560125460165460018401546136cc91906153c3565b6136d691906153e2565b826005018190555050505b806136eb8161541c565b915050613558565b5082156137535782613703613894565b10156137215760405162461bcd60e51b8152600401610ab7906155a8565b601454613738906001600160a01b031633856145cd565b61374183614821565b82601b5461374f9190615404565b601b555b811561378e57613762826144dd565b60155490925061377c906001600160a01b0316338461450d565b8160195461378a919061536e565b6019555b600061379a828a61536e565b87549091506137aa90829061536e565b875560078501546137bc90829061536e565b60078601556017546137cf90829061536e565b60175580156138465760038501541561382f5760006127108660030154836137f791906153c3565b61380191906153e2565b600e54601354919250613821916001600160a01b039081169116836145cd565b61382b818361536e565b9150505b601354613846906001600160a01b031633836145cd565b6040805160ff8a1681526020810183905233917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a25050505050505061269860018055565b6015546014546000916001600160a01b039081169116036138b6575060185490565b6014546040516370a0823160e01b81526000916001600160a01b0316906370a08231906138e7903090600401614f20565b602060405180830381865afa158015613904573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613928919061558f565b6013546014549192506001600160a01b039081169116036120105760175481101561395557600091505090565b601754613962908261536e565b91505090565b613970614191565b81156139cc5760055481116139c25760405162461bcd60e51b81526020600482015260186024820152772732bb903634b6b4ba1036bab9ba103132903434b3b432b960411b6044820152606401610ab7565b60058190556139d2565b60006005555b6004805460ff19168315159081179091556005546040805191825260208201929092527f19a6e21b354f2502655dd03f5ac08375f296d713847fbfbf7eec539cd22c44399101611966565b601e6020528160005260406000208181548110613a3957600080fd5b600091825260209091206006909102018054600182015460028301546003840154600485015460059095015460ff909416965091945092909186565b600d8181548110610fc857600080fd5b600f546001600160a01b0316331480613aa857506000546001600160a01b031633145b613af45760405162461bcd60e51b815260206004820152601f60248201527f736574456d657267656e637957697468647261773a20464f5242494444454e006044820152606401610ab7565b6009805460ff19168215159081179091556040519081527f5b2697cb95c640d5b3b3c3057cdf64a82edf003ae88e056bed97b3fad62b88e990602001610b8e565b613b3d614191565b6126de851115613b8a5760405162461bcd60e51b81526020600482015260186024820152770bee6d8d2e0e0c2ceca8cc2c6e8dee440e8dede40d0d2ced60431b6044820152606401610ab7565b6001600160a01b038116613bd25760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964204164647265737360881b6044820152606401610ab7565b600a859055600b80546001600160a01b0319166001600160a01b0386161790558151613c0590600c906020850190614e1f565b508251613c1990600d906020860190614e1f565b50600e80546001600160a01b0319166001600160a01b0383161790556040517f0fae0d0e8768c1e54ef03d02ab9a3aea954cb05c643b8650d09b989b2cb27ac790613c6d9087908790879087908790615735565b60405180910390a15050505050565b613c84614191565b6001600160a01b038116613ce95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ab7565b610ddc81614a69565b600080601c5490506000601b54613d07613894565b613d119190615404565b905060005b601d54811015613de357600754600003613d7957600354601d8281548110613d4057613d40615385565b906000526020600020906009020160040154613d5c91906153c3565b613d689061191a6153c3565b613d729084615404565b9250613dd1565b6000613d91601d8381548110611d7c57611d7c615385565b905080601d8381548110613da757613da7615385565b906000526020600020906009020160040154613dc391906153c3565b613dcd9085615404565b9350505b80613ddb8161541c565b915050613d16565b50818110613df45760009250505090565b613dfe818361536e565b9250505090565b613e0d614191565b60075415613e2d5760405162461bcd60e51b8152600401610ab7906156a0565b601e811015613e745760405162461bcd60e51b81526020600482015260136024820152721b1bddd95c881b1a5b5a5d081c995858da1959606a1b6044820152606401610ab7565b60038190556040518181527f91abcc2d6823e3a3f11d31b208dd3065d2c6a791f1c7c9fe96a42ce12897eac590602001610b8e565b601d5460009060ff831610613ec057506000919050565b601d8260ff1681548110613ed657613ed6615385565b9060005260206000209060090201600401549050919050565b601d5460009060ff8316101580613f065750600754155b15613f1357506000612a51565b6001600160a01b0383166000908152601e6020908152604080832080548251818502810185019093528083529192909190849084015b82821015613fb45760008481526020908190206040805160c08101825260068602909201805460ff1683526001808201548486015260028201549284019290925260038101546060840152600481015460808401526005015460a08301529083529092019101613f49565b5050505090506000601d8460ff1681548110613fd257613fd2615385565b6000918252602080832060408051610120810182526009909402909101805460ff1684526001810154928401929092526002820154908301526003810154606083015260048101546080830152600581015460a0830152600681015460c0830152600781015460e08301819052600890910154610100830152909250900361405f57600092505050612a51565b60a081015160c08201514311801561407a575060e082015115155b801561408a575060008260c00151115b156140e657600061409f8360c00151436147e6565b905060008360800151826140b391906153c3565b90508360e00151601154826140c891906153c3565b6140d291906153e2565b8460a001516140e19190615404565b925050505b6000805b845181101561418657600085828151811061410757614107615385565b602002602001015190508760ff16816000015160ff16146141285750614174565b806020015160000361413a5750614174565b806080015160115485836020015161415291906153c3565b61415c91906153e2565b614166919061536e565b6141709084615404565b9250505b8061417e8161541c565b9150506140ea565b509695505050505050565b6000546001600160a01b031633146119d25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ab7565b60026001540361423d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ab7565b6002600155565b6010543410156142aa5760405162461bcd60e51b815260206004820152602b60248201527f73686f756c642070617920736d616c6c2067617320746f20636f6d706f756e6460448201526a081bdc881a185c9d995cdd60aa1b6064820152608401610ab7565b600f546010546040516001600160a01b039092169181156108fc0291906000818181858888f193505050501580156142e6573d6000803e3d6000fd5b506010543411156119d25760105433906108fc90614304903461536e565b6040518115909202916000818181858888f19350505050158015610ddc573d6000803e3d6000fd5b6017541561440d57600061433e611f0f565b905060195481101561434f57506019545b601754600061435c613894565b6014546013549192506001600160a01b03908116911603614384576143818183615404565b91505b8160125460195485614396919061536e565b6143a091906153c3565b6143aa91906153e2565b6016546143b79190615404565b6016556014546013546001600160a01b03918216911603614407578181601954856143e2919061536e565b6143ec91906153c3565b6143f691906153e2565b601a546144039190615404565b601a555b50506019555b6000601d8260ff168154811061442557614425615385565b9060005260206000209060090201905080600601544311158061444a57506006810154155b15614453575050565b8060070154600003614469574360069091015550565b60006144798260060154436147e6565b9050600082600401548261448d91906153c3565b90508260070154601154826144a291906153c3565b6144ac91906153e2565b83600501546144bb9190615404565b6005840155436006840155601c546144d4908290615404565b601c5550505050565b6000806144e8611f0f565b90506019548311156144fa5760195492505b80831115614506578092505b5090919050565b6001600160a01b038316614557576040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015614551573d6000803e3d6000fd5b50505050565b60405163a9059cbb60e01b81526001600160a01b0384169063a9059cbb9061458590859085906004016155df565b6020604051808303816000875af11580156145a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145519190615683565b505050565b6145c88363a9059cbb60e01b84846040516024016145ec9291906155df565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614ab9565b600b5460405163d06ca61f60e01b81526000916001600160a01b03169063d06ca61f906146569087908790600401615785565b600060405180830381865afa158015614673573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261469b919081019061579e565b9050600081600183516146ae919061536e565b815181106146be576146be615385565b60200260200101519050614715600b60009054906101000a90046001600160a01b031686866000815181106146f5576146f5615385565b60200260200101516001600160a01b0316614b8b9092919063ffffffff16565b600b54600a546001600160a01b0390911690635c11d7959087906127109061473d90866153c3565b61474791906153e2565b878761475542610258615404565b6040518663ffffffff1660e01b8152600401614775959493929190615824565b600060405180830381600087803b15801561478f57600080fd5b505af11580156147a3573d6000803e3d6000fd5b505050505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526145519085906323b872dd60e01b906084016145ec565b60006008548211614802576147fb838361536e565b9050612a51565b600854831061481357506000612a51565b826008546147fb919061536e565b8060185411156148395780601854611783919061536e565b600060185550565b6001600160a01b0383166000908152601e602052604081209061486784620151806153c3565b6148719042615404565b825490915061010081106148b45760405162461bcd60e51b815260206004820152600a6024820152694d6178207374616b657360b01b6044820152606401610ab7565b8254600101835560008390525b80158015906148fc575081836148d860018461536e565b815481106148e8576148e8615385565b906000526020600020906006020160030154115b156149a7578261490d60018361536e565b8154811061491d5761491d615385565b906000526020600020906006020183828154811061493d5761493d615385565b600091825260209091208254600690920201805460ff191660ff9092169190911781556001808301548183015560028084015490830155600380840154908301556004808401549083015560059283015492909101919091556149a0908261536e565b90506148c1565b6000601d8860ff16815481106149bf576149bf615385565b9060005260206000209060090201905060008483815481106149e3576149e3615385565b60009182526020909120600690910201805460ff191660ff8b16178155600281018890556003810185905560018101879055601154600584015491925090614a2b90886153c3565b614a3591906153e2565b60048201556012546016546001830154614a4f91906153c3565b614a5991906153e2565b6005909101555050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000614b0e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614c8f9092919063ffffffff16565b8051909150156145c85780806020019051810190614b2c9190615683565b6145c85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610ab7565b801580614c055750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015614bdf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614c03919061558f565b155b614c705760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610ab7565b6145c88363095ea7b360e01b84846040516024016145ec9291906155df565b6060614c9e8484600085614ca6565b949350505050565b606082471015614d075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610ab7565b600080866001600160a01b03168587604051614d23919061588c565b60006040518083038185875af1925050503d8060008114614d60576040519150601f19603f3d011682016040523d82523d6000602084013e614d65565b606091505b5091509150614d7687838387614d81565b979650505050505050565b60608315614df0578251600003614de9576001600160a01b0385163b614de95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ab7565b5081614c9e565b614c9e8383815115614e055781518083602001fd5b8060405162461bcd60e51b8152600401610ab791906158a8565b828054828255906000526020600020908101928215614e74579160200282015b82811115614e7457825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614e3f565b50614e80929150614e84565b5090565b5b80821115614e805760008155600101614e85565b600060208284031215614eab57600080fd5b5035919050565b600080600080600060a08688031215614eca57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60ff81168114610ddc57600080fd5b600060208284031215614f0e57600080fd5b8135614f1981614eed565b9392505050565b6001600160a01b0391909116815260200190565b6001600160a01b0381168114610ddc57600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715614f8857614f88614f49565b604052919050565b600067ffffffffffffffff821115614faa57614faa614f49565b5060051b60200190565b600082601f830112614fc557600080fd5b81356020614fda614fd583614f90565b614f5f565b82815260059290921b84018101918181019086841115614ff957600080fd5b8286015b8481101561418657803561501081614f34565b8352918301918301614ffd565b600080600080600080600060e0888a03121561503857600080fd5b873561504381614f34565b9650602088013561505381614f34565b9550604088013561506381614f34565b9450606088013561507381614f34565b9350608088013567ffffffffffffffff8082111561509057600080fd5b61509c8b838c01614fb4565b945060a08a01359150808211156150b257600080fd5b506150bf8a828b01614fb4565b92505060c08801356150d081614f34565b8091505092959891949750929550565b600080604083850312156150f357600080fd5b82356150fe81614f34565b946020939093013593505050565b60008060008060008060c0878903121561512557600080fd5b863561513081614eed565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b6000806040838503121561516b57600080fd5b82356150fe81614eed565b6000806040838503121561518957600080fd5b82359150602083013561519b81614eed565b809150509250929050565b600080604083850312156151b957600080fd5b82356151c481614f34565b9150602083013561519b81614eed565b600080604083850312156151e757600080fd5b82356151f281614eed565b9150602083013561519b81614f34565b60006020828403121561521457600080fd5b8135614f1981614f34565b8015158114610ddc57600080fd5b6000806040838503121561524057600080fd5b82356150fe8161521f565b60006020828403121561525d57600080fd5b8135614f198161521f565b600080600080600060a0868803121561528057600080fd5b85359450602086013561529281614f34565b9350604086013567ffffffffffffffff808211156152af57600080fd5b6152bb89838a01614fb4565b945060608801359150808211156152d157600080fd5b506152de88828901614fb4565b92505060808601356152ef81614f34565b809150509295509295909350565b602080825260139082015272496e76616c6964206465706f7369742066656560681b604082015260600190565b602080825260149082015273496e76616c69642077697468647261772066656560601b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008282101561538057615380615358565b500390565b634e487b7160e01b600052603260045260246000fd5b60ff959095168552602085019390935260408401919091526060830152608082015260a00190565b60008160001904831182151516156153dd576153dd615358565b500290565b6000826153ff57634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561541757615417615358565b500190565b60006001820161542e5761542e615358565b5060010190565b60006020828403121561544757600080fd5b8151614f1981614eed565b60208082526016908201527504d75737420626520696e666572696f7220746f2033360541b604082015260600190565b600181815b808511156154bd5781600019048211156154a3576154a3615358565b808516156154b057918102915b93841c9390800290615487565b509250929050565b6000826154d457506001612a51565b816154e157506000612a51565b81600181146154f757600281146155015761551d565b6001915050612a51565b60ff84111561551257615512615358565b50506001821b612a51565b5060208310610133831016604e8410600b8410161715615540575081810a612a51565b61554a8383615482565b806000190482111561555e5761555e615358565b029392505050565b6000614f1983836154c5565b60006020828403121561558457600080fd5b8151614f1981614f34565b6000602082840312156155a157600080fd5b5051919050565b6020808252601a908201527f496e73756666696369656e742072657761726420746f6b656e73000000000000604082015260600190565b6001600160a01b03929092168252602082015260400190565b6020808252600e908201526d1a5b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b6020808252601f908201527f416d6f756e742073686f756c642062652067726561746f72207468616e203000604082015260600190565b602080825260129082015271496e76616c6964207374616b65207479706560701b604082015260600190565b60006020828403121561569557600080fd5b8151614f198161521f565b602080825260189082015277141bdbdb081dd85cc8185b1c9958591e481cdd185c9d195960421b604082015260600190565b600060ff821660ff81036156e8576156e8615358565b60010192915050565b600081518084526020808501945080840160005b8381101561572a5781516001600160a01b031687529582019590820190600101615705565b509495945050505050565b858152600060018060a01b03808716602084015260a0604084015261575d60a08401876156f1565b838103606085015261576f81876156f1565b9250508084166080840152509695505050505050565b828152604060208201526000614c9e60408301846156f1565b600060208083850312156157b157600080fd5b825167ffffffffffffffff8111156157c857600080fd5b8301601f810185136157d957600080fd5b80516157e7614fd582614f90565b81815260059190911b8201830190838101908783111561580657600080fd5b928401925b82841015614d765783518252928401929084019061580b565b85815284602082015260a06040820152600061584360a08301866156f1565b6001600160a01b0394909416606083015250608001529392505050565b60005b8381101561587b578181015183820152602001615863565b838111156145515750506000910152565b6000825161589e818460208701615860565b9190910192915050565b60208152600082518060208401526158c7816040850160208701615860565b601f01601f1916919091016040019291505056fe2a9378497cb60e247e83eb6f2c7c371ba979e24ee25723c2e3275822b317175990890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15a2646970667358221220f67ba297cc26e9a18e556a8bc7948ceb5bdc7601565042e4fbc65b136200af5f64736f6c634300080e0033
Deployed Bytecode
0x60806040526004361061031a5760003560e01c806378d57eea1161019c578063a0b40905116100e2578063ccd34cd511610090578063ccd34cd51461098a578063e7a2fed7146109a0578063f2fde38b146109c0578063f3aeb31d146109e0578063f6be71d1146109f5578063f8920ee714610a15578063fbe32b3514610a35578063ffbd3b1f14610a5557600080fd5b8063a0b4090514610867578063acc3a93914610887578063b5d5b5fa146108c3578063b74cd24214610914578063b77e7da01461092a578063c1e22a651461094a578063c7dd6f071461096a57600080fd5b806388bbb0c11161014a57806388bbb0c1146107535780638bdf67f2146107695780638da5cb5b146107895780638e6f4fb7146107a7578063903d42961461080f57806392b46e5b1461082257806392e8990e146108385780639f94e2721461085257600080fd5b806378d57eea146106a557806380dc0672146106b8578063817b1cd2146106cd57806381b61948146106e3578063854cff2f1461070357806385a8bd3614610723578063877887821461073d57600080fd5b80634641257d11610261578063689f16231161020f578063689f1623146105ad578063693a090b146105c05780636becd657146105e05780636e707b7314610600578063715018a61461062057806372f702f314610635578063746c8ae11461065557806376fa17d21461066a57600080fd5b80634641257d1461050457806348cd4cb11461051957806353314fae1461052f578063595e173a1461054f5780635dde4a911461056f578063654cfdff1461058457806366fe9f8a1461059757600080fd5b80631aed6553116102c95780631aed6553146104115780631cd348c0146104275780632a9d7a7a14610447578063304f807c146104675780633279beab1461047a5780633544a8641461049a578063392e53cd146104ba5780633f138d4b146104e457600080fd5b80626f0231146103265780630bf8a6a4146103485780630fb5a6b41461036857806313c68f9014610391578063155622a4146103a45780631582358e146103c4578063167d2dbe146103f157600080fd5b3661032157005b600080fd5b34801561033257600080fd5b50610346610341366004614e99565b610a6b565b005b34801561035457600080fd5b50610346610363366004614eb2565b610b99565b34801561037457600080fd5b5061037e60035481565b6040519081526020015b60405180910390f35b61034661039f366004614efc565b610c8d565b3480156103b057600080fd5b506103466103bf366004614efc565b610ddf565b3480156103d057600080fd5b506015546103e4906001600160a01b031681565b6040516103889190614f20565b3480156103fd57600080fd5b506103e461040c366004614e99565b610fb8565b34801561041d57600080fd5b5061037e60085481565b34801561043357600080fd5b50600f546103e4906001600160a01b031681565b34801561045357600080fd5b5061034661046236600461501d565b610fe2565b610346610475366004614efc565b611261565b34801561048657600080fd5b50610346610495366004614e99565b6116d2565b3480156104a657600080fd5b506006546103e4906001600160a01b031681565b3480156104c657600080fd5b506002546104d49060ff1681565b6040519015158152602001610388565b3480156104f057600080fd5b506103466104ff3660046150e0565b611789565b34801561051057600080fd5b50610346611972565b34801561052557600080fd5b5061037e60075481565b34801561053b57600080fd5b5061034661054a36600461510c565b6119d4565b34801561055b57600080fd5b5061034661056a366004615158565b611af3565b34801561057b57600080fd5b5061037e611f0f565b610346610592366004615176565b612015565b3480156105a357600080fd5b5061037e60055481565b6103466105bb366004614efc565b61269c565b3480156105cc57600080fd5b50600b546103e4906001600160a01b031681565b3480156105ec57600080fd5b5061037e6105fb3660046151a6565b612847565b34801561060c57600080fd5b506014546103e4906001600160a01b031681565b34801561062c57600080fd5b50610346612a57565b34801561064157600080fd5b506013546103e4906001600160a01b031681565b34801561066157600080fd5b50610346612a69565b34801561067657600080fd5b5061068a6106853660046151d4565b612b50565b60408051938452602084019290925290820152606001610388565b6103466106b3366004614efc565b612ccd565b3480156106c457600080fd5b506103466130a0565b3480156106d957600080fd5b5061037e60175481565b3480156106ef57600080fd5b506103466106fe3660046150e0565b6131ba565b34801561070f57600080fd5b5061034661071e366004615202565b6132aa565b34801561072f57600080fd5b506009546104d49060ff1681565b34801561074957600080fd5b5061037e60105481565b34801561075f57600080fd5b5061037e60125481565b34801561077557600080fd5b50610346610784366004614e99565b6132fd565b34801561079557600080fd5b506000546001600160a01b03166103e4565b3480156107b357600080fd5b506107c76107c2366004614e99565b613453565b6040805160ff909a168a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c084015260e083015261010082015261012001610388565b61034661081d366004615176565b6134b2565b34801561082e57600080fd5b5061037e60165481565b34801561084457600080fd5b506004546104d49060ff1681565b34801561085e57600080fd5b5061037e613894565b34801561087357600080fd5b5061034661088236600461522d565b613968565b34801561089357600080fd5b5061068a6108a2366004615202565b601f6020526000908152604090208054600182015460029092015490919083565b3480156108cf57600080fd5b506108e36108de3660046150e0565b613a1d565b6040805160ff90971687526020870195909552938501929092526060840152608083015260a082015260c001610388565b34801561092057600080fd5b5061037e6126de81565b34801561093657600080fd5b50600e546103e4906001600160a01b031681565b34801561095657600080fd5b506103e4610965366004614e99565b613a75565b34801561097657600080fd5b5061034661098536600461524b565b613a85565b34801561099657600080fd5b5061037e60115481565b3480156109ac57600080fd5b506103466109bb366004615268565b613b35565b3480156109cc57600080fd5b506103466109db366004615202565b613c7c565b3480156109ec57600080fd5b5061037e613cf2565b348015610a0157600080fd5b50610346610a10366004614e99565b613e05565b348015610a2157600080fd5b5061037e610a30366004614efc565b613ea9565b348015610a4157600080fd5b5061037e610a503660046151a6565b613eef565b348015610a6157600080fd5b5061037e600a5481565b610a73614191565b600060075411610ac05760405162461bcd60e51b8152602060048201526013602482015272141bdbdb081a5cc81b9bdd081cdd185c9d1959606a1b60448201526064015b60405180910390fd5b4360085411610b0d5760405162461bcd60e51b8152602060048201526019602482015278141bdbdb081dd85cc8185b1c9958591e48199a5b9a5cda1959603a1b6044820152606401610ab7565b4381118015610b1d575060075481115b610b5d5760405162461bcd60e51b8152602060048201526011602482015270496e76616c696420656e6420626c6f636b60781b6044820152606401610ab7565b60088190556040518181527f0972575658363b3e7c472ab3a6a918726742c853b732f6a4a2763e2e3a94c977906020015b60405180910390a150565b610ba1614191565b6107d08410610bc25760405162461bcd60e51b8152600401610ab7906152fd565b6107d08310610be35760405162461bcd60e51b8152600401610ab79061532a565b601d8054600190810180835560008381529291610bff9161536e565b81548110610c0f57610c0f615385565b60009182526020909120600160099092020181810188905560028101879055600381018690556004810185905543600682015560088101849055601d549092506000805160206158dc83398151915291610c689161536e565b87878787604051610c7d95949392919061539b565b60405180910390a1505050505050565b610c956141eb565b601d5460ff82161015610dd35760075415610dd357610cb2614244565b610cbb8161432c565b336000908152601e6020526040812090805b8254811015610d95576000838281548110610cea57610cea615385565b60009182526020909120600690910201805490915060ff868116911614610d115750610d83565b8060010154600003610d235750610d83565b80600501546012546016548360010154610d3d91906153c3565b610d4791906153e2565b610d51919061536e565b610d5b9084615404565b92506012546016548260010154610d7291906153c3565b610d7c91906153e2565b6005909101555b80610d8d8161541c565b915050610ccd565b50610d9f816144dd565b90508015610dd057601554610dbe906001600160a01b0316338361450d565b80601954610dcc919061536e565b6019555b50505b610ddc60018055565b50565b610de76141eb565b60095460ff16610e395760405162461bcd60e51b815260206004820152601e60248201527f456d6572676e656379207769746864726177206e6f7420656e61626c656400006044820152606401610ab7565b601d5460ff82161015610dd357336000908152601f60209081526040808320601e9092528220601d80549293919260ff8616908110610e7a57610e7a615385565b906000526020600020906009020190506000805b8354811015610f21576000848281548110610eab57610eab615385565b60009182526020909120600690910201805490915060ff888116911614610ed25750610f0f565b8060010154600003610ee45750610f0f565b6001810154610ef39084615404565b6000600183018190556004830181905560059092019190915591505b80610f198161541c565b915050610e8e565b508015610f7557601354610f3f906001600160a01b031633836145cd565b8354610f4c90829061536e565b84556007820154610f5e90829061536e565b6007830155601754610f7190829061536e565b6017555b60405181815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695906020015b60405180910390a250505050610ddc60018055565b600c8181548110610fc857600080fd5b6000918252602090912001546001600160a01b0316905081565b610fea614191565b60025460ff16156110335760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610ab7565b6002805460ff19166001179055601380546001600160a01b03808a166001600160a01b0319928316179092556014805489841690831681179091556015805493891693831693909317909255600e8054909116331790556040805163313ce56760e01b815290516000929163313ce5679160048083019260209291908290030181865afa1580156110c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ec9190615435565b60ff169050601e81106111115760405162461bcd60e51b8152600401610ab790615452565b61111c81602861536e565b61112790600a615566565b6011556015546012906001600160a01b0316156111da57601560009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611191573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b59190615435565b60ff169050601e81106111da5760405162461bcd60e51b8152600401610ab790615452565b6111e582602861536e565b6111f090600a615566565b601255600b80546001600160a01b0319166001600160a01b038816179055845161122190600d906020880190614e1f565b50835161123590600c906020870190614e1f565b5050600680546001600160a01b0319166001600160a01b03939093169290921790915550505050505050565b6112696141eb565b601d5460ff82161015610dd35760075415610dd357611286614244565b61128f8161432c565b336000908152601f60209081526040808320601e9092528220601d80549293919260ff86169081106112c3576112c3615385565b906000526020600020906009020190506000805b83548110156116605760008482815481106112f4576112f4615385565b60009182526020909120600690910201805490915060ff88811691161461131b575061164e565b806001015460000361132d575061164e565b60008160050154601254601654846001015461134991906153c3565b61135391906153e2565b61135d919061536e565b9050611368816144dd565b905080601954611378919061536e565b6019556015546013546001600160a01b0390811691161480159061139c5750600081115b156115d3576015546001600160a01b031661147757600b54604080516315ab88c960e31b815290516000926001600160a01b03169163ad5c46489160048083019260209291908290030181865afa1580156113fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141f9190615572565b9050806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561145c57600080fd5b505af1158015611470573d6000803e3d6000fd5b5050505050505b6013546040516370a0823160e01b81526000916001600160a01b0316906370a08231906114a8903090600401614f20565b602060405180830381865afa1580156114c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e9919061558f565b905061155082600c80548060200260200160405190810160405280929190818152602001828054801561154557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611527575b505050505030614623565b6013546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611581903090600401614f20565b602060405180830381865afa15801561159e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115c2919061558f565b90506115ce828261536e565b925050505b6115dd8185615404565b93508082600101546115ef9190615404565b6001830155601154600586015461160690836153c3565b61161091906153e2565b826004015461161f9190615404565b6004830155601254601654600184015461163991906153c3565b61164391906153e2565b826005018190555050505b806116588161541c565b9150506112d7565b5080156116c5578354611674908290615404565b84556007820154611686908290615404565b6007830155601754611699908290615404565b6017556040805160ff871681526020810183905233916000805160206158fc8339815191529101610fa3565b50505050610ddc60018055565b6116da614191565b600854431161171d5760405162461bcd60e51b815260206004820152600f60248201526e506f6f6c2069732072756e6e696e6760881b6044820152606401610ab7565b80611726613894565b10156117445760405162461bcd60e51b8152600401610ab7906155a8565b60145461175b906001600160a01b031633836145cd565b60185415610ddc5760185481111561177557600060185550565b80601854611783919061536e565b60185550565b611791614191565b6014546001600160a01b0383811691161415806117bb57506015546001600160a01b038381169116145b6118005760405162461bcd60e51b815260206004820152601660248201527521b0b73737ba103132903932bbb0b932103a37b5b2b760511b6044820152606401610ab7565b6013546001600160a01b03908116908316036118e0576013546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611847903090600401614f20565b602060405180830381865afa158015611864573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611888919061558f565b905060175481611898919061536e565b8211156118de5760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606401610ab7565b505b6001600160a01b03821661192157604051339082156108fc029083906000818181858888f1935050505015801561191b573d6000803e3d6000fd5b50611935565b6119356001600160a01b03831633836145cd565b7f74f5dcd55c394cb1c6d3b9da22c2464bcc46c38cc3865bd629ed75823249b40b82826040516119669291906155df565b60405180910390a15050565b61197a614191565b611984600061432c565b61198f601a546144dd565b601a819055156119d257601554600e54601a546119b9926001600160a01b0390811692169061450d565b601a546019546119c9919061536e565b6019556000601a555b565b6119dc614191565b601d5460ff871610611a235760405162461bcd60e51b815260206004820152601060248201526f131bd8dadd5c08139bdd08199bdd5b9960821b6044820152606401610ab7565b6107d08410611a445760405162461bcd60e51b8152600401610ab7906152fd565b6107d08310611a655760405162461bcd60e51b8152600401610ab79061532a565b611a6e8661432c565b6000601d8760ff1681548110611a8657611a86615385565b6000918252602090912060099091020160018101879055600281018690556003810185905560048101849055600881018390556040519091506000805160206158dc83398151915290611ae2908990899089908990899061539b565b60405180910390a150505050505050565b611afb614191565b600060075411611b435760405162461bcd60e51b81526020600482015260136024820152721c1bdbdb081a5cc81b9bdd081cdd185c9d1959606a1b6044820152606401610ab7565b4360085411611b905760405162461bcd60e51b81526020600482015260196024820152781c1bdbdb081dd85cc8185b1c9958591e48199a5b9a5cda1959603a1b6044820152606401610ab7565b60008111611bb05760405162461bcd60e51b8152600401610ab7906155f8565b611bb98261432c565b6014546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611bea903090600401614f20565b602060405180830381865afa158015611c07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c2b919061558f565b601454909150611c46906001600160a01b03163330856147ae565b6014546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611c77903090600401614f20565b602060405180830381865afa158015611c94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cb8919061558f565b90508181601854611cc99190615404565b611cd3919061536e565b601855601b54600090611ce4613894565b611cee9190615404565b601c5490915060005b601d54811015611de85760ff87168114611dd657600754600003611d6457600354601d8281548110611d2b57611d2b615385565b906000526020600020906009020160040154611d4791906153c3565b611d539061191a6153c3565b611d5d9083615404565b9150611dd6565b6000611d96601d8381548110611d7c57611d7c615385565b9060005260206000209060090201600601546008546147e6565b905080601d8381548110611dac57611dac615385565b906000526020600020906009020160040154611dc891906153c3565b611dd29084615404565b9250505b80611de08161541c565b915050611cf7565b50601c54821115611f0757611dfd818361536e565b9150600043600854611e0f919061536e565b9050611e1b81846153e2565b601d8860ff1681548110611e3157611e31615385565b9060005260206000209060090201600401819055506000805160206158dc83398151915287601d8960ff1681548110611e6c57611e6c615385565b906000526020600020906009020160010154601d8a60ff1681548110611e9457611e94615385565b906000526020600020906009020160020154601d8b60ff1681548110611ebc57611ebc615385565b906000526020600020906009020160030154601d8c60ff1681548110611ee457611ee4615385565b906000526020600020906009020160040154604051611ae295949392919061539b565b505050505050565b6015546000906001600160a01b0316611f2757504790565b6015546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611f58903090600401614f20565b602060405180830381865afa158015611f75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f99919061558f565b6014546015549192506001600160a01b03908116911603611fd657601854811015611fc657600091505090565b601854611fd3908261536e565b90505b6013546015546001600160a01b039182169116036120105760175481101561200057600091505090565b60175461200d908261536e565b90505b919050565b61201d6141eb565b6000600754118015612030575043600754105b61207c5760405162461bcd60e51b815260206004820152601a60248201527f5374616b696e67206861736e27742073746172746564207965740000000000006044820152606401610ab7565b6000821161209c5760405162461bcd60e51b8152600401610ab790615620565b601d5460ff8216106120c05760405162461bcd60e51b8152600401610ab790615657565b6006546001600160a01b03161561218057600654604051636c9b2a3f60e11b81526001600160a01b039091169063d936547e90612101903390600401614f20565b602060405180830381865afa15801561211e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121429190615683565b6121805760405162461bcd60e51b815260206004820152600f60248201526e1b9bdd081dda1a5d195b1a5cdd1959608a1b6044820152606401610ab7565b612188614244565b6121918161432c565b336000908152601f60209081526040808320601e9092528220601d80549293919260ff86169081106121c5576121c5615385565b9060005260206000209060090201905060008160080154111561226b5780600801548160070154106122395760405162461bcd60e51b815260206004820152601b60248201527f546f74616c207374616b6564206c696d697420657863656564656400000000006044820152606401610ab7565b806008015485826007015461224e9190615404565b111561226b5780600701548160080154612268919061536e565b94505b60008060005b84548110156123a357600085828154811061228e5761228e615385565b60009182526020909120600690910201805490915060ff8981169116146122b55750612391565b80600101546000036122c75750612391565b806005015460125460165483600101546122e191906153c3565b6122eb91906153e2565b6122f5919061536e565b6122ff9084615404565b9250600081600401546011548760050154846001015461231f91906153c3565b61232991906153e2565b612333919061536e565b905061233f8186615404565b94506011548660050154836001015461235891906153c3565b61236291906153e2565b6004830155601254601654600184015461237c91906153c3565b61238691906153e2565b826005018190555050505b8061239b8161541c565b915050612271565b50811561240357816123b3613894565b10156123d15760405162461bcd60e51b8152600401610ab7906155a8565b6014546123e8906001600160a01b031633846145cd565b6123f182614821565b81601b546123ff9190615404565b601b555b61240c816144dd565b9050801561243d5760155461242b906001600160a01b0316338361450d565b80601954612439919061536e565b6019555b6013546040516370a0823160e01b81526000916001600160a01b0316906370a082319061246e903090600401614f20565b602060405180830381865afa15801561248b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124af919061558f565b6013549091506124ca906001600160a01b031633308b6147ae565b6013546040516370a0823160e01b81526000916001600160a01b0316906370a08231906124fb903090600401614f20565b602060405180830381865afa158015612518573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061253c919061558f565b9050600061254a838361536e565b9050898111156125575750885b60045460ff16156125b95760055488546125719083615404565b11156125b95760405162461bcd60e51b8152602060048201526017602482015276155cd95c88185b5bdd5b9d0818589bdd99481b1a5b5a5d604a1b6044820152606401610ab7565b6002860154156126165760006127108760020154836125d891906153c3565b6125e291906153e2565b9050801561261457600e54601354612607916001600160a01b039182169116836145cd565b612611818361536e565b91505b505b6126268933886001015484614841565b8754612633908290615404565b88556007860154612645908290615404565b6007870155601754612658908290615404565b6017556040805160ff8b1681526020810183905233916000805160206158fc833981519152910160405180910390a2505050505050505061269860018055565b5050565b6126a46141eb565b601d5460ff82161015610dd35760075415610dd3576126c1614244565b6126ca8161432c565b336000908152601e60205260408120601d805491929160ff85169081106126f3576126f3615385565b906000526020600020906009020190506000805b83548110156127db57600084828154811061272457612724615385565b60009182526020909120600690910201805490915060ff87811691161461274b57506127c9565b806001015460000361275d57506127c9565b600081600401546011548660050154846001015461277b91906153c3565b61278591906153e2565b61278f919061536e565b905061279b8185615404565b9350601154856005015483600101546127b491906153c3565b6127be91906153e2565b826004018190555050505b806127d38161541c565b915050612707565b50801561283b57806127eb613894565b10156128095760405162461bcd60e51b8152600401610ab7906155a8565b601454612820906001600160a01b031633836145cd565b61282981614821565b80601b546128379190615404565b601b555b505050610ddc60018055565b601d5460009060ff83161061285e57506000612a51565b600754158061286d5750601754155b1561287a57506000612a51565b6001600160a01b0383166000908152601e6020908152604080832080548251818502810185019093528083529192909190849084015b8282101561291b5760008481526020908190206040805160c08101825260068602909201805460ff1683526001808201548486015260028201549284019290925260038101546060840152600481015460808401526005015460a083015290835290920191016128b0565b505050509050600061292b611f0f565b905060195481101561293c57506019545b6017546000612949613894565b6014546013549192506001600160a01b039081169116036129715761296e8183615404565b91505b60008260125460195486612985919061536e565b61298f91906153c3565b61299991906153e2565b6016546129a69190615404565b90506000805b8651811015612a485760008782815181106129c9576129c9615385565b602002602001015190508960ff16816000015160ff16146129ea5750612a36565b80602001516000036129fc5750612a36565b8060a00151601254858360200151612a1491906153c3565b612a1e91906153e2565b612a28919061536e565b612a329084615404565b9250505b80612a408161541c565b9150506129ac565b50955050505050505b92915050565b612a5f614191565b6119d26000614a69565b612a71614191565b60075415612a915760405162461bcd60e51b8152600401610ab7906156a0565b612a9c436064615404565b600755600354612aae9061191a6153c3565b600754612abb9190615404565b60085560005b601d54811015612b0757600754601d8281548110612ae157612ae1615385565b600091825260209091206006600990920201015580612aff8161541c565b915050612ac1565b507f7cd0ab87d19036f3dfadadb232c78aa4879dda3f0c994a9d637532410ee2ce06600754600854604051612b46929190918252602082015260400190565b60405180910390a1565b600080600080601e6000866001600160a01b03166001600160a01b03168152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015612c065760008481526020908190206040805160c08101825260068602909201805460ff1683526001808201548486015260028201549284019290925260038101546060840152600481015460808401526005015460a08301529083529092019101612b9b565b50505050905060005b8151811015612cc4576000828281518110612c2c57612c2c615385565b602002602001015190508760ff16816000015160ff1614612c4d5750612cb2565b8060200151600003612c5f5750612cb2565b6020810151612c6e9087615404565b95504281606001511080612c83575043600854105b15612c9e576020810151612c979086615404565b9450612cb0565b6020810151612cad9085615404565b93505b505b80612cbc8161541c565b915050612c0f565b50509250925092565b612cd56141eb565b601d5460ff82161015610dd35760075415610dd357612cf2614244565b612cfb8161432c565b336000908152601f60209081526040808320601e9092528220601d80549293919260ff8616908110612d2f57612d2f615385565b9060005260206000209060090201905060008060005b8454811015612fe8576000858281548110612d6257612d62615385565b60009182526020909120600690910201805490915060ff898116911614612d895750612fd6565b8060010154600003612d9b5750612fd6565b6000816004015460115487600501548460010154612db991906153c3565b612dc391906153e2565b612dcd919061536e565b9050612dd98186615404565b6014546013549196506001600160a01b03918216911614801590612dfd5750600081115b15612f5c576013546040516370a0823160e01b81526000916001600160a01b0316906370a0823190612e33903090600401614f20565b602060405180830381865afa158015612e50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e74919061558f565b9050612ed982600d805480602002602001604051908101604052809291908181526020018280548015611545576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161152757505050505030614623565b6013546040516370a0823160e01b81526000916001600160a01b0316906370a0823190612f0a903090600401614f20565b602060405180830381865afa158015612f27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f4b919061558f565b9050612f57828261536e565b925050505b612f668185615404565b9350808260010154612f789190615404565b6001830181905560115460058801549091612f9391906153c3565b612f9d91906153e2565b6004830155601254601654612fb290836153c3565b612fbc91906153e2565b8260050154612fcb9190615404565b826005018190555050505b80612fe08161541c565b915050612d45565b5081156130925781612ff8613894565b10156130165760405162461bcd60e51b8152600401610ab7906155a8565b61301f82614821565b81601b5461302d9190615404565b601b55845461303d908290615404565b8555600783015461304f908290615404565b6007840155601754613062908290615404565b6017556040805160ff881681526020810183905233916000805160206158fc833981519152910160405180910390a25b5050505050610ddc60018055565b6130a8614191565b60005b601d5460ff821610156130d3576130c18161432c565b806130cb816156d2565b9150506130ab565b506000601b546130e1613894565b6130eb9190615404565b9050601c5481111561318457601c54613104908261536e565b60145460405163a9059cbb60e01b81529192506001600160a01b03169063a9059cbb9061313790339085906004016155df565b6020604051808303816000875af1158015613156573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061317a9190615683565b5061318481614821565b4360088190556040519081527ffed9fcb0ca3d1e761a4b929792bb24082fba92dca81252646ad306d30680656690602001610b8e565b600f546001600160a01b031633146132105760405162461bcd60e51b815260206004820152601960248201527839b2ba29b2b93b34b1b2a4b733379d102327a92124a22222a760391b6044820152606401610ab7565b6001600160a01b0382166132585760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610ab7565b600f80546001600160a01b0319166001600160a01b03841617905560108190556040517f232f2e6280d2064b1e439bf40ecdada042d84eefbb55039e4c49e8dc4f4c90c99061196690849084906155df565b6132b2614191565b600680546001600160a01b0319166001600160a01b0383161790556040517f3990e3e141b903f4f5602428874be692206642a653b416f336d965e2f04813ce90610b8e908390614f20565b613305614191565b61330d6141eb565b6000811161332d5760405162461bcd60e51b8152600401610ab7906155f8565b6014546040516370a0823160e01b81526000916001600160a01b0316906370a082319061335e903090600401614f20565b602060405180830381865afa15801561337b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061339f919061558f565b6014549091506133ba906001600160a01b03163330856147ae565b6014546040516370a0823160e01b81526000916001600160a01b0316906370a08231906133eb903090600401614f20565b602060405180830381865afa158015613408573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061342c919061558f565b9050818160185461343d9190615404565b613447919061536e565b60185550506001805550565b601d818154811061346357600080fd5b600091825260209091206009909102018054600182015460028301546003840154600485015460058601546006870154600788015460089098015460ff90971698509496939592949193909289565b6134ba6141eb565b600082116134da5760405162461bcd60e51b8152600401610ab790615620565b601d5460ff8216106134fe5760405162461bcd60e51b8152600401610ab790615657565b613506614244565b61350f8161432c565b336000908152601f60209081526040808320601e9092528220601d80549293919260ff861690811061354357613543615385565b60009182526020822060099091020191508086815b85548110156136f357600086828154811061357557613575615385565b60009182526020909120600690910201805490915060ff8a811691161461359c57506136e1565b80600101546000036135ae57506136e1565b826000036135bc57506136f3565b60008160040154601154886005015484600101546135da91906153c3565b6135e491906153e2565b6135ee919061536e565b90508160050154601254601654846001015461360a91906153c3565b61361491906153e2565b61361e919061536e565b6136289086615404565b94506136348187615404565b95504282600301541080613649575043600854105b156136915783826001015411156136785783826001015461366a919061536e565b600183015560009350613691565b6001820154613687908561536e565b6000600184015593505b601154876005015483600101546136a891906153c3565b6136b291906153e2565b600483015560125460165460018401546136cc91906153c3565b6136d691906153e2565b826005018190555050505b806136eb8161541c565b915050613558565b5082156137535782613703613894565b10156137215760405162461bcd60e51b8152600401610ab7906155a8565b601454613738906001600160a01b031633856145cd565b61374183614821565b82601b5461374f9190615404565b601b555b811561378e57613762826144dd565b60155490925061377c906001600160a01b0316338461450d565b8160195461378a919061536e565b6019555b600061379a828a61536e565b87549091506137aa90829061536e565b875560078501546137bc90829061536e565b60078601556017546137cf90829061536e565b60175580156138465760038501541561382f5760006127108660030154836137f791906153c3565b61380191906153e2565b600e54601354919250613821916001600160a01b039081169116836145cd565b61382b818361536e565b9150505b601354613846906001600160a01b031633836145cd565b6040805160ff8a1681526020810183905233917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a25050505050505061269860018055565b6015546014546000916001600160a01b039081169116036138b6575060185490565b6014546040516370a0823160e01b81526000916001600160a01b0316906370a08231906138e7903090600401614f20565b602060405180830381865afa158015613904573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613928919061558f565b6013546014549192506001600160a01b039081169116036120105760175481101561395557600091505090565b601754613962908261536e565b91505090565b613970614191565b81156139cc5760055481116139c25760405162461bcd60e51b81526020600482015260186024820152772732bb903634b6b4ba1036bab9ba103132903434b3b432b960411b6044820152606401610ab7565b60058190556139d2565b60006005555b6004805460ff19168315159081179091556005546040805191825260208201929092527f19a6e21b354f2502655dd03f5ac08375f296d713847fbfbf7eec539cd22c44399101611966565b601e6020528160005260406000208181548110613a3957600080fd5b600091825260209091206006909102018054600182015460028301546003840154600485015460059095015460ff909416965091945092909186565b600d8181548110610fc857600080fd5b600f546001600160a01b0316331480613aa857506000546001600160a01b031633145b613af45760405162461bcd60e51b815260206004820152601f60248201527f736574456d657267656e637957697468647261773a20464f5242494444454e006044820152606401610ab7565b6009805460ff19168215159081179091556040519081527f5b2697cb95c640d5b3b3c3057cdf64a82edf003ae88e056bed97b3fad62b88e990602001610b8e565b613b3d614191565b6126de851115613b8a5760405162461bcd60e51b81526020600482015260186024820152770bee6d8d2e0e0c2ceca8cc2c6e8dee440e8dede40d0d2ced60431b6044820152606401610ab7565b6001600160a01b038116613bd25760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964204164647265737360881b6044820152606401610ab7565b600a859055600b80546001600160a01b0319166001600160a01b0386161790558151613c0590600c906020850190614e1f565b508251613c1990600d906020860190614e1f565b50600e80546001600160a01b0319166001600160a01b0383161790556040517f0fae0d0e8768c1e54ef03d02ab9a3aea954cb05c643b8650d09b989b2cb27ac790613c6d9087908790879087908790615735565b60405180910390a15050505050565b613c84614191565b6001600160a01b038116613ce95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ab7565b610ddc81614a69565b600080601c5490506000601b54613d07613894565b613d119190615404565b905060005b601d54811015613de357600754600003613d7957600354601d8281548110613d4057613d40615385565b906000526020600020906009020160040154613d5c91906153c3565b613d689061191a6153c3565b613d729084615404565b9250613dd1565b6000613d91601d8381548110611d7c57611d7c615385565b905080601d8381548110613da757613da7615385565b906000526020600020906009020160040154613dc391906153c3565b613dcd9085615404565b9350505b80613ddb8161541c565b915050613d16565b50818110613df45760009250505090565b613dfe818361536e565b9250505090565b613e0d614191565b60075415613e2d5760405162461bcd60e51b8152600401610ab7906156a0565b601e811015613e745760405162461bcd60e51b81526020600482015260136024820152721b1bddd95c881b1a5b5a5d081c995858da1959606a1b6044820152606401610ab7565b60038190556040518181527f91abcc2d6823e3a3f11d31b208dd3065d2c6a791f1c7c9fe96a42ce12897eac590602001610b8e565b601d5460009060ff831610613ec057506000919050565b601d8260ff1681548110613ed657613ed6615385565b9060005260206000209060090201600401549050919050565b601d5460009060ff8316101580613f065750600754155b15613f1357506000612a51565b6001600160a01b0383166000908152601e6020908152604080832080548251818502810185019093528083529192909190849084015b82821015613fb45760008481526020908190206040805160c08101825260068602909201805460ff1683526001808201548486015260028201549284019290925260038101546060840152600481015460808401526005015460a08301529083529092019101613f49565b5050505090506000601d8460ff1681548110613fd257613fd2615385565b6000918252602080832060408051610120810182526009909402909101805460ff1684526001810154928401929092526002820154908301526003810154606083015260048101546080830152600581015460a0830152600681015460c0830152600781015460e08301819052600890910154610100830152909250900361405f57600092505050612a51565b60a081015160c08201514311801561407a575060e082015115155b801561408a575060008260c00151115b156140e657600061409f8360c00151436147e6565b905060008360800151826140b391906153c3565b90508360e00151601154826140c891906153c3565b6140d291906153e2565b8460a001516140e19190615404565b925050505b6000805b845181101561418657600085828151811061410757614107615385565b602002602001015190508760ff16816000015160ff16146141285750614174565b806020015160000361413a5750614174565b806080015160115485836020015161415291906153c3565b61415c91906153e2565b614166919061536e565b6141709084615404565b9250505b8061417e8161541c565b9150506140ea565b509695505050505050565b6000546001600160a01b031633146119d25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ab7565b60026001540361423d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ab7565b6002600155565b6010543410156142aa5760405162461bcd60e51b815260206004820152602b60248201527f73686f756c642070617920736d616c6c2067617320746f20636f6d706f756e6460448201526a081bdc881a185c9d995cdd60aa1b6064820152608401610ab7565b600f546010546040516001600160a01b039092169181156108fc0291906000818181858888f193505050501580156142e6573d6000803e3d6000fd5b506010543411156119d25760105433906108fc90614304903461536e565b6040518115909202916000818181858888f19350505050158015610ddc573d6000803e3d6000fd5b6017541561440d57600061433e611f0f565b905060195481101561434f57506019545b601754600061435c613894565b6014546013549192506001600160a01b03908116911603614384576143818183615404565b91505b8160125460195485614396919061536e565b6143a091906153c3565b6143aa91906153e2565b6016546143b79190615404565b6016556014546013546001600160a01b03918216911603614407578181601954856143e2919061536e565b6143ec91906153c3565b6143f691906153e2565b601a546144039190615404565b601a555b50506019555b6000601d8260ff168154811061442557614425615385565b9060005260206000209060090201905080600601544311158061444a57506006810154155b15614453575050565b8060070154600003614469574360069091015550565b60006144798260060154436147e6565b9050600082600401548261448d91906153c3565b90508260070154601154826144a291906153c3565b6144ac91906153e2565b83600501546144bb9190615404565b6005840155436006840155601c546144d4908290615404565b601c5550505050565b6000806144e8611f0f565b90506019548311156144fa5760195492505b80831115614506578092505b5090919050565b6001600160a01b038316614557576040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015614551573d6000803e3d6000fd5b50505050565b60405163a9059cbb60e01b81526001600160a01b0384169063a9059cbb9061458590859085906004016155df565b6020604051808303816000875af11580156145a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145519190615683565b505050565b6145c88363a9059cbb60e01b84846040516024016145ec9291906155df565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614ab9565b600b5460405163d06ca61f60e01b81526000916001600160a01b03169063d06ca61f906146569087908790600401615785565b600060405180830381865afa158015614673573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261469b919081019061579e565b9050600081600183516146ae919061536e565b815181106146be576146be615385565b60200260200101519050614715600b60009054906101000a90046001600160a01b031686866000815181106146f5576146f5615385565b60200260200101516001600160a01b0316614b8b9092919063ffffffff16565b600b54600a546001600160a01b0390911690635c11d7959087906127109061473d90866153c3565b61474791906153e2565b878761475542610258615404565b6040518663ffffffff1660e01b8152600401614775959493929190615824565b600060405180830381600087803b15801561478f57600080fd5b505af11580156147a3573d6000803e3d6000fd5b505050505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526145519085906323b872dd60e01b906084016145ec565b60006008548211614802576147fb838361536e565b9050612a51565b600854831061481357506000612a51565b826008546147fb919061536e565b8060185411156148395780601854611783919061536e565b600060185550565b6001600160a01b0383166000908152601e602052604081209061486784620151806153c3565b6148719042615404565b825490915061010081106148b45760405162461bcd60e51b815260206004820152600a6024820152694d6178207374616b657360b01b6044820152606401610ab7565b8254600101835560008390525b80158015906148fc575081836148d860018461536e565b815481106148e8576148e8615385565b906000526020600020906006020160030154115b156149a7578261490d60018361536e565b8154811061491d5761491d615385565b906000526020600020906006020183828154811061493d5761493d615385565b600091825260209091208254600690920201805460ff191660ff9092169190911781556001808301548183015560028084015490830155600380840154908301556004808401549083015560059283015492909101919091556149a0908261536e565b90506148c1565b6000601d8860ff16815481106149bf576149bf615385565b9060005260206000209060090201905060008483815481106149e3576149e3615385565b60009182526020909120600690910201805460ff191660ff8b16178155600281018890556003810185905560018101879055601154600584015491925090614a2b90886153c3565b614a3591906153e2565b60048201556012546016546001830154614a4f91906153c3565b614a5991906153e2565b6005909101555050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000614b0e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614c8f9092919063ffffffff16565b8051909150156145c85780806020019051810190614b2c9190615683565b6145c85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610ab7565b801580614c055750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015614bdf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614c03919061558f565b155b614c705760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610ab7565b6145c88363095ea7b360e01b84846040516024016145ec9291906155df565b6060614c9e8484600085614ca6565b949350505050565b606082471015614d075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610ab7565b600080866001600160a01b03168587604051614d23919061588c565b60006040518083038185875af1925050503d8060008114614d60576040519150601f19603f3d011682016040523d82523d6000602084013e614d65565b606091505b5091509150614d7687838387614d81565b979650505050505050565b60608315614df0578251600003614de9576001600160a01b0385163b614de95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ab7565b5081614c9e565b614c9e8383815115614e055781518083602001fd5b8060405162461bcd60e51b8152600401610ab791906158a8565b828054828255906000526020600020908101928215614e74579160200282015b82811115614e7457825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614e3f565b50614e80929150614e84565b5090565b5b80821115614e805760008155600101614e85565b600060208284031215614eab57600080fd5b5035919050565b600080600080600060a08688031215614eca57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60ff81168114610ddc57600080fd5b600060208284031215614f0e57600080fd5b8135614f1981614eed565b9392505050565b6001600160a01b0391909116815260200190565b6001600160a01b0381168114610ddc57600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715614f8857614f88614f49565b604052919050565b600067ffffffffffffffff821115614faa57614faa614f49565b5060051b60200190565b600082601f830112614fc557600080fd5b81356020614fda614fd583614f90565b614f5f565b82815260059290921b84018101918181019086841115614ff957600080fd5b8286015b8481101561418657803561501081614f34565b8352918301918301614ffd565b600080600080600080600060e0888a03121561503857600080fd5b873561504381614f34565b9650602088013561505381614f34565b9550604088013561506381614f34565b9450606088013561507381614f34565b9350608088013567ffffffffffffffff8082111561509057600080fd5b61509c8b838c01614fb4565b945060a08a01359150808211156150b257600080fd5b506150bf8a828b01614fb4565b92505060c08801356150d081614f34565b8091505092959891949750929550565b600080604083850312156150f357600080fd5b82356150fe81614f34565b946020939093013593505050565b60008060008060008060c0878903121561512557600080fd5b863561513081614eed565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b6000806040838503121561516b57600080fd5b82356150fe81614eed565b6000806040838503121561518957600080fd5b82359150602083013561519b81614eed565b809150509250929050565b600080604083850312156151b957600080fd5b82356151c481614f34565b9150602083013561519b81614eed565b600080604083850312156151e757600080fd5b82356151f281614eed565b9150602083013561519b81614f34565b60006020828403121561521457600080fd5b8135614f1981614f34565b8015158114610ddc57600080fd5b6000806040838503121561524057600080fd5b82356150fe8161521f565b60006020828403121561525d57600080fd5b8135614f198161521f565b600080600080600060a0868803121561528057600080fd5b85359450602086013561529281614f34565b9350604086013567ffffffffffffffff808211156152af57600080fd5b6152bb89838a01614fb4565b945060608801359150808211156152d157600080fd5b506152de88828901614fb4565b92505060808601356152ef81614f34565b809150509295509295909350565b602080825260139082015272496e76616c6964206465706f7369742066656560681b604082015260600190565b602080825260149082015273496e76616c69642077697468647261772066656560601b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008282101561538057615380615358565b500390565b634e487b7160e01b600052603260045260246000fd5b60ff959095168552602085019390935260408401919091526060830152608082015260a00190565b60008160001904831182151516156153dd576153dd615358565b500290565b6000826153ff57634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561541757615417615358565b500190565b60006001820161542e5761542e615358565b5060010190565b60006020828403121561544757600080fd5b8151614f1981614eed565b60208082526016908201527504d75737420626520696e666572696f7220746f2033360541b604082015260600190565b600181815b808511156154bd5781600019048211156154a3576154a3615358565b808516156154b057918102915b93841c9390800290615487565b509250929050565b6000826154d457506001612a51565b816154e157506000612a51565b81600181146154f757600281146155015761551d565b6001915050612a51565b60ff84111561551257615512615358565b50506001821b612a51565b5060208310610133831016604e8410600b8410161715615540575081810a612a51565b61554a8383615482565b806000190482111561555e5761555e615358565b029392505050565b6000614f1983836154c5565b60006020828403121561558457600080fd5b8151614f1981614f34565b6000602082840312156155a157600080fd5b5051919050565b6020808252601a908201527f496e73756666696369656e742072657761726420746f6b656e73000000000000604082015260600190565b6001600160a01b03929092168252602082015260400190565b6020808252600e908201526d1a5b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b6020808252601f908201527f416d6f756e742073686f756c642062652067726561746f72207468616e203000604082015260600190565b602080825260129082015271496e76616c6964207374616b65207479706560701b604082015260600190565b60006020828403121561569557600080fd5b8151614f198161521f565b602080825260189082015277141bdbdb081dd85cc8185b1c9958591e481cdd185c9d195960421b604082015260600190565b600060ff821660ff81036156e8576156e8615358565b60010192915050565b600081518084526020808501945080840160005b8381101561572a5781516001600160a01b031687529582019590820190600101615705565b509495945050505050565b858152600060018060a01b03808716602084015260a0604084015261575d60a08401876156f1565b838103606085015261576f81876156f1565b9250508084166080840152509695505050505050565b828152604060208201526000614c9e60408301846156f1565b600060208083850312156157b157600080fd5b825167ffffffffffffffff8111156157c857600080fd5b8301601f810185136157d957600080fd5b80516157e7614fd582614f90565b81815260059190911b8201830190838101908783111561580657600080fd5b928401925b82841015614d765783518252928401929084019061580b565b85815284602082015260a06040820152600061584360a08301866156f1565b6001600160a01b0394909416606083015250608001529392505050565b60005b8381101561587b578181015183820152602001615863565b838111156145515750506000910152565b6000825161589e818460208701615860565b9190910192915050565b60208152600082518060208401526158c7816040850160208701615860565b601f01601f1916919091016040019291505056fe2a9378497cb60e247e83eb6f2c7c371ba979e24ee25723c2e3275822b317175990890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15a2646970667358221220f67ba297cc26e9a18e556a8bc7948ceb5bdc7601565042e4fbc65b136200af5f64736f6c634300080e0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.