More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 719 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 18065817 | 509 days ago | IN | 0.00089 ETH | 0.00896293 | ||||
Emergency Withdr... | 18043531 | 512 days ago | IN | 0 ETH | 0.00477986 | ||||
Withdraw | 17826743 | 542 days ago | IN | 0.00089 ETH | 0.00747568 | ||||
Compound Reward | 17826739 | 542 days ago | IN | 0.00089 ETH | 0.00453778 | ||||
Withdraw | 17750102 | 553 days ago | IN | 0.00089 ETH | 0.0079934 | ||||
Withdraw | 17701701 | 560 days ago | IN | 0.00089 ETH | 0.00650254 | ||||
Withdraw | 17692181 | 561 days ago | IN | 0.00089 ETH | 0.02507556 | ||||
Compound Reward | 17692177 | 561 days ago | IN | 0.00089 ETH | 0.01336143 | ||||
Withdraw | 17612533 | 572 days ago | IN | 0.00089 ETH | 0.00780896 | ||||
Withdraw | 17575534 | 578 days ago | IN | 0.00089 ETH | 0.00718958 | ||||
Withdraw | 17561626 | 579 days ago | IN | 0.00089 ETH | 0.00594434 | ||||
Withdraw | 17561606 | 579 days ago | IN | 0.00089 ETH | 0.00445305 | ||||
Withdraw | 17550983 | 581 days ago | IN | 0.00089 ETH | 0.00736573 | ||||
Compound Reward | 17550626 | 581 days ago | IN | 0.00089 ETH | 0.00447688 | ||||
Withdraw | 17536905 | 583 days ago | IN | 0.00089 ETH | 0.01075584 | ||||
Withdraw | 17516789 | 586 days ago | IN | 0.00089 ETH | 0.0049183 | ||||
Compound Reward | 17516787 | 586 days ago | IN | 0.00089 ETH | 0.00297983 | ||||
Withdraw | 17516775 | 586 days ago | IN | 0.00089 ETH | 0.0045531 | ||||
Compound Reward | 17516773 | 586 days ago | IN | 0.00089 ETH | 0.00289398 | ||||
Withdraw | 17459886 | 594 days ago | IN | 0.00089 ETH | 0.00655194 | ||||
Withdraw | 17410253 | 601 days ago | IN | 0.00089 ETH | 0.009828 | ||||
Withdraw | 17410064 | 601 days ago | IN | 0.00089 ETH | 0.0096852 | ||||
Withdraw | 17387218 | 604 days ago | IN | 0.00089 ETH | 0.01040917 | ||||
Withdraw | 17307459 | 615 days ago | IN | 0.00089 ETH | 0.01411443 | ||||
Withdraw | 17240922 | 625 days ago | IN | 0.00089 ETH | 0.03074688 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
18065817 | 509 days ago | 0.00089 ETH | ||||
17826743 | 542 days ago | 0.00089 ETH | ||||
17826739 | 542 days ago | 0.00089 ETH | ||||
17750102 | 553 days ago | 0.00089 ETH | ||||
17701701 | 560 days ago | 0.00089 ETH | ||||
17692181 | 561 days ago | 0.00089 ETH | ||||
17692177 | 561 days ago | 0.00089 ETH | ||||
17612533 | 572 days ago | 0.00089 ETH | ||||
17575534 | 578 days ago | 0.00089 ETH | ||||
17561626 | 579 days ago | 0.00089 ETH | ||||
17561606 | 579 days ago | 0.00089 ETH | ||||
17550983 | 581 days ago | 0.00089 ETH | ||||
17550626 | 581 days ago | 0.00089 ETH | ||||
17536905 | 583 days ago | 0.00089 ETH | ||||
17516789 | 586 days ago | 0.00089 ETH | ||||
17516787 | 586 days ago | 0.00089 ETH | ||||
17516775 | 586 days ago | 0.00089 ETH | ||||
17516773 | 586 days ago | 0.00089 ETH | ||||
17459886 | 594 days ago | 0.00089 ETH | ||||
17410253 | 601 days ago | 0.00089 ETH | ||||
17410064 | 601 days ago | 0.00089 ETH | ||||
17387218 | 604 days ago | 0.00089 ETH | ||||
17307459 | 615 days ago | 0.00089 ETH | ||||
17240922 | 625 days ago | 0.00089 ETH | ||||
17222541 | 627 days ago | 0.00089 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x734265B5...e259f0b73 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
BrewlabsLockup
Compiler Version
v0.8.0+commit.c7dfd78e
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); } contract BrewlabsLockup is Ownable, ReentrancyGuard { using SafeERC20 for IERC20; // 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; // The block number when staking starts. uint256 public startBlock; // The block number when staking ends. uint256 public bonusEndBlock; // swap router and path, slipPage uint256 public slippageFactor = 800; // 20% default slippage tolerance uint256 public constant slippageFactorUL = 995; address public uniRouterAddress; address[] public reflectionToStakedPath; address[] public earnedToStakedPath; address public walletA; address public buyBackWallet = 0xE1f1dd010BBC2860F81c8F90Ea4E38dB949BB16F; 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; struct Lockup { uint8 stakeType; uint256 duration; uint256 depositFee; uint256 withdrawFee; uint256 rate; uint256 accTokenPerShare; uint256 lastRewardBlock; uint256 totalStaked; } 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 NewStartAndEndBlocks(uint256 startBlock, uint256 endBlock); event LockupUpdated(uint8 _type, uint256 _duration, uint256 _fee0, uint256 _fee1, uint256 _rate); event RewardsStop(uint256 blockNumber); event UpdatePoolLimit(uint256 poolLimitPerUser, bool hasLimit); event ServiceInfoUpadted(address _addr, uint256 _fee); event DurationUpdated(uint256 _duration); 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 ) 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; } /* * @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"); _transferPerformanceFee(); _updatePool(_stakeType); UserInfo storage user = userStaked[msg.sender]; Stake[] storage stakes = userStakes[msg.sender]; Lockup storage lockup = lockups[_stakeType]; uint256 pending = 0; uint256 pendingCompound = 0; uint256 pendingReflection = 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; pendingReflection = pendingReflection + ( stake.amount * accDividendPerShare / PRECISION_FACTOR_REFLECTION - stake.reflectionDebt ); uint256 _pending = stake.amount * lockup.accTokenPerShare / PRECISION_FACTOR - stake.rewardDebt; if(stake.end > block.timestamp) { pendingCompound = pendingCompound + _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; } else { 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); if(totalEarned > pending) { totalEarned = totalEarned - pending; } else { totalEarned = 0; } } if (pendingCompound > 0) { require(availableRewardTokens() >= pendingCompound, "Insufficient reward tokens"); if(totalEarned > pendingCompound) { totalEarned = totalEarned - pendingCompound; } else { totalEarned = 0; } } pendingReflection = estimateDividendAmount(pendingReflection); if (pendingReflection > 0) { if(address(dividendToken) == address(0x0)) { payable(msg.sender).transfer(pendingReflection); } else { IERC20(dividendToken).safeTransfer(address(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 (hasUserLimit) { require( realAmount + user.amount <= poolLimitPerUser, "User amount above limit" ); } if (lockup.depositFee > 0) { uint256 fee = realAmount * lockup.depositFee / 10000; if (fee > 0) { stakingToken.safeTransfer(walletA, fee); realAmount = realAmount - fee; } } _addStake(_stakeType, msg.sender, lockup.duration, realAmount); user.amount = user.amount + realAmount + compounded; lockup.totalStaked = lockup.totalStaked + realAmount + compounded; totalStaked = totalStaked + realAmount + compounded; emit Deposit(msg.sender, _stakeType, realAmount + compounded); } 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 pendingCompound = 0; uint256 pendingReflection = 0; uint256 compounded = 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 ); if(stake.end > block.timestamp) { pendingCompound = pendingCompound + _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; } else { pending = pending + _pending; 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); if(totalEarned > pending) { totalEarned = totalEarned - pending; } else { totalEarned = 0; } } if (pendingCompound > 0) { require(availableRewardTokens() >= pendingCompound, "Insufficient reward tokens"); if(totalEarned > pendingCompound) { totalEarned = totalEarned - pendingCompound; } else { totalEarned = 0; } emit Deposit(msg.sender, _stakeType, compounded); } if (pendingReflection > 0) { pendingReflection = estimateDividendAmount(pendingReflection); if(address(dividendToken) == address(0x0)) { payable(msg.sender).transfer(pendingReflection); } else { IERC20(dividendToken).safeTransfer(address(msg.sender), pendingReflection); } totalReflections = totalReflections - pendingReflection; } uint256 realAmount = _amount - remained; user.amount = user.amount - realAmount + compounded; lockup.totalStaked = lockup.totalStaked - realAmount + compounded; totalStaked = totalStaked - realAmount + compounded; if(realAmount > 0) { if (lockup.withdrawFee > 0) { uint256 fee = realAmount * lockup.withdrawFee / 10000; 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); UserInfo storage user = userStaked[msg.sender]; Stake[] storage stakes = userStakes[msg.sender]; Lockup storage lockup = lockups[_stakeType]; uint256 pending = 0; uint256 pendingCompound = 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; if(stake.end > block.timestamp) { pendingCompound = pendingCompound + _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.reflectionDebt = stake.reflectionDebt + _pending * accDividendPerShare / PRECISION_FACTOR_REFLECTION; } else { 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); if(totalEarned > pending) { totalEarned = totalEarned - pending; } else { totalEarned = 0; } } if (pendingCompound > 0) { require(availableRewardTokens() >= pendingCompound, "Insufficient reward tokens"); if(totalEarned > pendingCompound) { totalEarned = totalEarned - pendingCompound; } else { totalEarned = 0; } user.amount = user.amount + compounded; lockup.totalStaked = lockup.totalStaked + compounded; totalStaked = totalStaked + compounded; emit Deposit(msg.sender, _stakeType, compounded); } } 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) { if(address(dividendToken) == address(0x0)) { payable(msg.sender).transfer(pendingReflection); } else { IERC20(dividendToken).safeTransfer(address(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"); if(totalEarned > pending) { totalEarned = totalEarned - pending; } else { totalEarned = 0; } 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 { 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 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(block.timestamp > stake.end) { 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) { if(address(dividendToken) == address(0x0)) { payable(walletA).transfer(reflections); } else { IERC20(dividendToken).safeTransfer(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(uint _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; } /* * @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), "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 { bonusEndBlock = block.number; emit RewardsStop(bonusEndBlock); } /* * @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) 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; emit LockupUpdated(_stakeType, _duration, _depositFee, _withdrawFee, _rate); } function addLockup(uint256 _duration, uint256 _depositFee, uint256 _withdrawFee, uint256 _rate) 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; 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"); require(_fee < 0.05 ether, "fee cannot exceed 0.05 ether"); buyBackWallet = _addr; performanceFee = _fee; emit ServiceInfoUpadted(_addr, _fee); } 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); } /************************ ** 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; } 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 _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 / 1000, _path, _to, block.timestamp + 600 ); } receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.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)); } } /** * @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 v4.4.1 (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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { 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 v4.4.1 (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() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // 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 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, uint value) external returns (bool); function withdraw(uint) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount ) external returns (bool); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 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 functionCall(target, data, "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"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(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) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(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) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason 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 { // 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 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); }
{ "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":"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":"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":"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":[{"internalType":"uint256","name":"_duration","type":"uint256"},{"internalType":"uint256","name":"_depositFee","type":"uint256"},{"internalType":"uint256","name":"_withdrawFee","type":"uint256"},{"internalType":"uint256","name":"_rate","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":"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[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","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"}],"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":"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":[],"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":"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"}],"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":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint8","name":"_stakeType","type":"uint8"}],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Deployed Bytecode
0x6080604052600436106102ce5760003560e01c806376fa17d21161017b5780639f94e272116100d7578063ccd34cd511610085578063ccd34cd5146107ab578063e7a2fed7146107c0578063f2fde38b146107e0578063f6be71d114610800578063f8920ee714610820578063fbe32b3514610840578063ffbd3b1f14610860576102d5565b80639f94e272146106da578063a0b40905146106ef578063acc3a9391461070f578063b5d5b5fa1461072f578063b74cd24214610761578063b77e7da014610776578063c1e22a651461078b576102d5565b806388bbb0c11161013457806388bbb0c11461061f5780638bdf67f2146106345780638da5cb5b146106545780638e6f4fb714610669578063903d42961461069d57806392b46e5b146106b057806392e8990e146106c5576102d5565b806376fa17d21461057e57806378d57eea146105ad57806380dc0672146105c0578063817b1cd2146105d557806381b61948146105ea578063877887821461060a576102d5565b80634641257d1161022a578063689f1623116101e3578063689f1623146104e2578063693a090b146104f55780636becd6571461050a5780636e707b731461052a578063715018a61461053f57806372f702f314610554578063746c8ae114610569576102d5565b80634641257d1461045b57806348cd4cb114610470578063515bbf2c146104855780635dde4a91146104a5578063654cfdff146104ba57806366fe9f8a146104cd576102d5565b80631cd348c0116102875780631cd348c014610391578063301b2216146103a6578063304f807c146103c65780633279beab146103d9578063392e53cd146103f95780633f138d4b1461041b5780634561aaaf1461043b576102d5565b80630fb5a6b4146102da57806313c68f9014610305578063155622a41461031a5780631582358e1461033a578063167d2dbe1461035c5780631aed65531461037c576102d5565b366102d557005b600080fd5b3480156102e657600080fd5b506102ef610875565b6040516102fc919061591c565b60405180910390f35b61031861031336600461511c565b61087b565b005b34801561032657600080fd5b5061031861033536600461511c565b610a47565b34801561034657600080fd5b5061034f610c14565b6040516102fc9190615223565b34801561036857600080fd5b5061034f610377366004615005565b610c23565b34801561038857600080fd5b506102ef610c4d565b34801561039d57600080fd5b5061034f610c53565b3480156103b257600080fd5b506103186103c1366004615181565b610c62565b6103186103d436600461511c565b610dad565b3480156103e557600080fd5b506103186103f4366004615005565b611283565b34801561040557600080fd5b5061040e611352565b6040516102fc919061528e565b34801561042757600080fd5b50610318610436366004614e2f565b61135b565b34801561044757600080fd5b506103186104563660046150c7565b611522565b34801561046757600080fd5b50610318611665565b34801561047c57600080fd5b506102ef611751565b34801561049157600080fd5b506103186104a0366004614f5b565b611757565b3480156104b157600080fd5b506102ef6119e6565b6103186104c83660046150f8565b611b04565b3480156104d957600080fd5b506102ef6122cf565b6103186104f036600461511c565b6122d5565b34801561050157600080fd5b5061034f61279a565b34801561051657600080fd5b506102ef610525366004614e5a565b6127a9565b34801561053657600080fd5b5061034f6129c5565b34801561054b57600080fd5b506103186129d4565b34801561056057600080fd5b5061034f612a1d565b34801561057557600080fd5b50610318612a2c565b34801561058a57600080fd5b5061059e610599366004615154565b612b4f565b6040516102fc939291906159e8565b6103186105bb36600461511c565b612ccb565b3480156105cc57600080fd5b50610318613105565b3480156105e157600080fd5b506102ef613178565b3480156105f657600080fd5b50610318610605366004614e2f565b61317e565b34801561061657600080fd5b506102ef613246565b34801561062b57600080fd5b506102ef61324c565b34801561064057600080fd5b5061031861064f366004615005565b613252565b34801561066057600080fd5b5061034f61341a565b34801561067557600080fd5b50610689610684366004615005565b613429565b6040516102fc989796959493929190615a66565b6103186106ab3660046150f8565b613483565b3480156106bc57600080fd5b506102ef613b5d565b3480156106d157600080fd5b5061040e613b63565b3480156106e657600080fd5b506102ef613b6c565b3480156106fb57600080fd5b5061031861070a366004614f3e565b613c57565b34801561071b57600080fd5b5061059e61072a366004614df7565b613d0e565b34801561073b57600080fd5b5061074f61074a366004614e2f565b613d2f565b6040516102fc96959493929190615a39565b34801561076d57600080fd5b506102ef613d87565b34801561078257600080fd5b5061034f613d8d565b34801561079757600080fd5b5061034f6107a6366004615005565b613d9c565b3480156107b757600080fd5b506102ef613dac565b3480156107cc57600080fd5b506103186107db366004615035565b613db2565b3480156107ec57600080fd5b506103186107fb366004614df7565b613ed4565b34801561080c57600080fd5b5061031861081b366004615005565b613f42565b34801561082c57600080fd5b506102ef61083b36600461511c565b614002565b34801561084c57600080fd5b506102ef61085b366004614e5a565b614057565b34801561086c57600080fd5b506102ef614306565b60035481565b600260015414156108a75760405162461bcd60e51b815260040161089e906157c5565b60405180910390fd5b600260015560195460ff8216106108bd57610a40565b6006546108c957610a40565b6108d161430c565b6108da816143b0565b336000908152601a6020526040812090805b82548110156109bf57600083828154811061091757634e487b7160e01b600052603260045260246000fd5b60009182526020909120600690910201805490915060ff86811691161461093e57506109ad565b600181015461094d57506109ad565b806005015460105460145483600101546109679190615c3b565b6109719190615b07565b61097b9190615c5a565b6109859084615aef565b9250601054601454826001015461099c9190615c3b565b6109a69190615b07565b6005909101555b806109b781615c9d565b9150506108ec565b506109c981614561565b90508015610a3d576013546001600160a01b0316610a1457604051339082156108fc029083906000818181858888f19350505050158015610a0e573d6000803e3d6000fd5b50610a2b565b601354610a2b906001600160a01b03163383614591565b80601754610a399190615c5a565b6017555b50505b5060018055565b60026001541415610a6a5760405162461bcd60e51b815260040161089e906157c5565b600260015560195460ff821610610a8057610a40565b336000908152601b60209081526040808320601a9092528220601980549293919260ff8616908110610ac257634e487b7160e01b600052603260045260246000fd5b906000526020600020906008020190506000805b8354811015610b74576000848281548110610b0157634e487b7160e01b600052603260045260246000fd5b60009182526020909120600690910201805490915060ff888116911614610b285750610b62565b6001810154610b375750610b62565b6001810154610b469084615aef565b6000600183018190556004830181905560059092019190915591505b80610b6c81615c9d565b915050610ad6565b508015610bc857601154610b92906001600160a01b03163383614591565b8354610b9f908290615c5a565b84556007820154610bb1908290615c5a565b6007830155601554610bc4908290615c5a565b6015555b336001600160a01b03167f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd969582604051610c01919061591c565b60405180910390a2505050505060018055565b6013546001600160a01b031681565b600a8181548110610c3357600080fd5b6000918252602090912001546001600160a01b0316905081565b60075481565b600d546001600160a01b031681565b610c6a6145ec565b6001600160a01b0316610c7b61341a565b6001600160a01b031614610ca15760405162461bcd60e51b815260040161089e90615543565b60195460ff861610610cc55760405162461bcd60e51b815260040161089e906155e1565b6107d08310610ce65760405162461bcd60e51b815260040161089e90615322565b6107d08210610d075760405162461bcd60e51b815260040161089e90615378565b610d10856143b0565b600060198660ff1681548110610d3657634e487b7160e01b600052603260045260246000fd5b60009182526020909120600890910201600181018690556002810185905560038101849055600481018390556040519091507f2a9378497cb60e247e83eb6f2c7c371ba979e24ee25723c2e3275822b317175990610d9d9088908890889088908890615a11565b60405180910390a1505050505050565b60026001541415610dd05760405162461bcd60e51b815260040161089e906157c5565b600260015560195460ff821610610de657610a40565b600654610df257610a40565b610dfa61430c565b610e03816143b0565b336000908152601b60209081526040808320601a9092528220601980549293919260ff8616908110610e4557634e487b7160e01b600052603260045260246000fd5b906000526020600020906008020190506000805b835481101561121a576000848281548110610e8457634e487b7160e01b600052603260045260246000fd5b60009182526020909120600690910201805490915060ff888116911614610eab5750611208565b6001810154610eba5750611208565b600081600501546010546014548460010154610ed69190615c3b565b610ee09190615b07565b610eea9190615c5a565b9050610ef581614561565b905080601754610f059190615c5a565b6017556013546011546001600160a01b03908116911614801590610f295750600081115b1561118d576013546001600160a01b031661101357600954604080516315ab88c960e31b815290516000926001600160a01b03169163ad5c4648916004808301926020929190829003018186803b158015610f8357600080fd5b505afa158015610f97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fbb9190614e13565b9050806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015610ff857600080fd5b505af115801561100c573d6000803e3d6000fd5b5050505050505b6011546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611044903090600401615223565b60206040518083038186803b15801561105c57600080fd5b505afa158015611070573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611094919061501d565b90506110fb82600a8054806020026020016040519081016040528092919081815260200182805480156110f057602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116110d2575b5050505050306145f0565b6011546040516370a0823160e01b81526000916001600160a01b0316906370a082319061112c903090600401615223565b60206040518083038186803b15801561114457600080fd5b505afa158015611158573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117c919061501d565b90506111888282615c5a565b925050505b6111978185615aef565b93508082600101546111a99190615aef565b6001830155600f5460058601546111c09083615c3b565b6111ca9190615b07565b82600401546111d99190615aef565b600483015560105460145460018401546111f39190615c3b565b6111fd9190615b07565b826005018190555050505b8061121281615c9d565b915050610e59565b50801561127857835461122e908290615aef565b84556007820154611240908290615aef565b6007830155601554611253908290615aef565b6015556040513390600080516020615d1783398151915290610c0190889085906159fe565b505050505060018055565b61128b6145ec565b6001600160a01b031661129c61341a565b6001600160a01b0316146112c25760405162461bcd60e51b815260040161089e90615543565b60075443116112e35760405162461bcd60e51b815260040161089e9061551a565b806112ec613b6c565b101561130a5760405162461bcd60e51b815260040161089e906158ae565b601254611321906001600160a01b03163383614591565b6016541561134f5760165481111561133d57600060165561134f565b8060165461134b9190615c5a565b6016555b50565b60025460ff1681565b6113636145ec565b6001600160a01b031661137461341a565b6001600160a01b03161461139a5760405162461bcd60e51b815260040161089e90615543565b6012546001600160a01b03838116911614156113c85760405162461bcd60e51b815260040161089e90615687565b6011546001600160a01b0383811691161415611490576011546040516370a0823160e01b81526000916001600160a01b0316906370a082319061140f903090600401615223565b60206040518083038186803b15801561142757600080fd5b505afa15801561143b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145f919061501d565b90506015548161146f9190615c5a565b82111561148e5760405162461bcd60e51b815260040161089e90615441565b505b6001600160a01b0382166114d157604051339082156108fc029083906000818181858888f193505050501580156114cb573d6000803e3d6000fd5b506114e5565b6114e56001600160a01b0383163383614591565b7f74f5dcd55c394cb1c6d3b9da22c2464bcc46c38cc3865bd629ed75823249b40b8282604051611516929190615275565b60405180910390a15050565b61152a6145ec565b6001600160a01b031661153b61341a565b6001600160a01b0316146115615760405162461bcd60e51b815260040161089e90615543565b6107d083106115825760405162461bcd60e51b815260040161089e90615322565b6107d082106115a35760405162461bcd60e51b815260040161089e90615378565b601980546001908101808355600083815292916115bf91615c5a565b815481106115dd57634e487b7160e01b600052603260045260246000fd5b6000918252602090912060016008909202018181018790556002810186905560038101859055600481018490554360068201556019549092507f2a9378497cb60e247e83eb6f2c7c371ba979e24ee25723c2e3275822b31717599161164191615c5a565b86868686604051611656959493929190615a11565b60405180910390a15050505050565b61166d6145ec565b6001600160a01b031661167e61341a565b6001600160a01b0316146116a45760405162461bcd60e51b815260040161089e90615543565b6116ae60006143b0565b6116b9601854614561565b60188190551561174f576013546001600160a01b031661171557600c546018546040516001600160a01b039092169181156108fc0291906000818181858888f1935050505015801561170f573d6000803e3d6000fd5b50611736565b600c54601854601354611736926001600160a01b0391821692911690614591565b6018546017546117469190615c5a565b60175560006018555b565b60065481565b61175f6145ec565b6001600160a01b031661177061341a565b6001600160a01b0316146117965760405162461bcd60e51b815260040161089e90615543565b60025460ff16156117b95760405162461bcd60e51b815260040161089e9061574e565b6002805460ff19166001179055601180546001600160a01b038089166001600160a01b03199283161790925560128054888416908316179081905560138054888516908416179055600c805490921633179091556040805163313ce56760e01b81529051600093929092169163313ce56791600480820192602092909190829003018186803b15801561184b57600080fd5b505afa15801561185f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118839190615138565b60ff169050601e81106118a85760405162461bcd60e51b815260040161089e9061587e565b6118b3816028615c5a565b6118be90600a615b6d565b600f556013546012906001600160a01b03161561198057601360009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561192357600080fd5b505afa158015611937573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061195b9190615138565b60ff169050601e81106119805760405162461bcd60e51b815260040161089e9061587e565b61198b826028615c5a565b61199690600a615b6d565b601055600980546001600160a01b0319166001600160a01b03871617905583516119c790600b906020870190614d08565b5082516119db90600a906020860190614d08565b505050505050505050565b6013546000906001600160a01b0316611a00575047611b01565b6013546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611a31903090600401615223565b60206040518083038186803b158015611a4957600080fd5b505afa158015611a5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a81919061501d565b6012546013549192506001600160a01b0391821691161415611ac157601654811015611ab1576000915050611b01565b601654611abe9082615c5a565b90505b6011546013546001600160a01b0390811691161415611afe57601554811015611aee576000915050611b01565b601554611afb9082615c5a565b90505b90505b90565b60026001541415611b275760405162461bcd60e51b815260040161089e906157c5565b600260015560065415801590611b3e575043600654105b611b5a5760405162461bcd60e51b815260040161089e906158e5565b60008211611b7a5760405162461bcd60e51b815260040161089e90615578565b60195460ff821610611b9e5760405162461bcd60e51b815260040161089e90615852565b611ba661430c565b611baf816143b0565b336000908152601b60209081526040808320601a9092528220601980549293919260ff8616908110611bf157634e487b7160e01b600052603260045260246000fd5b9060005260206000209060080201905060008060008060005b8654811015611f25576000878281548110611c3557634e487b7160e01b600052603260045260246000fd5b60009182526020909120600690910201805490915060ff8b8116911614611c5c5750611f13565b6001810154611c6b5750611f13565b80600501546010546014548360010154611c859190615c3b565b611c8f9190615b07565b611c999190615c5a565b611ca39085615aef565b935060008160040154600f5489600501548460010154611cc39190615c3b565b611ccd9190615b07565b611cd79190615c5a565b90504282600301541115611eb657611cef8187615aef565b6012546011549197506001600160a01b03918216911614801590611d135750600081115b15611e90576011546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611d49903090600401615223565b60206040518083038186803b158015611d6157600080fd5b505afa158015611d75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d99919061501d565b9050611dfe82600b8054806020026020016040519081016040528092919081815260200182805480156110f0576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116110d2575050505050306145f0565b6011546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611e2f903090600401615223565b60206040518083038186803b158015611e4757600080fd5b505afa158015611e5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e7f919061501d565b9050611e8b8282615c5a565b925050505b611e9a8185615aef565b9350808260010154611eac9190615aef565b6001830155611ec3565b611ec08188615aef565b96505b600f5488600501548360010154611eda9190615c3b565b611ee49190615b07565b60048301556010546014546001840154611efe9190615c3b565b611f089190615b07565b826005018190555050505b80611f1d81615c9d565b915050611c0a565b508315611f905783611f35613b6c565b1015611f535760405162461bcd60e51b815260040161089e906158ae565b601254611f6a906001600160a01b03163386614591565b836016541115611f8a5783601654611f829190615c5a565b601655611f90565b60006016555b8215611fe35782611f9f613b6c565b1015611fbd5760405162461bcd60e51b815260040161089e906158ae565b826016541115611fdd5782601654611fd59190615c5a565b601655611fe3565b60006016555b611fec82614561565b91508115612060576013546001600160a01b031661203757604051339083156108fc029084906000818181858888f19350505050158015612031573d6000803e3d6000fd5b5061204e565b60135461204e906001600160a01b03163384614591565b8160175461205c9190615c5a565b6017555b6011546040516370a0823160e01b81526000916001600160a01b0316906370a0823190612091903090600401615223565b60206040518083038186803b1580156120a957600080fd5b505afa1580156120bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120e1919061501d565b6011549091506120fc906001600160a01b031633308d61479b565b6011546040516370a0823160e01b81526000916001600160a01b0316906370a082319061212d903090600401615223565b60206040518083038186803b15801561214557600080fd5b505afa158015612159573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061217d919061501d565b9050600061218b8383615c5a565b60045490915060ff16156121c6576005548a546121a89083615aef565b11156121c65760405162461bcd60e51b815260040161089e9061560b565b6002880154156122235760006127108960020154836121e59190615c3b565b6121ef9190615b07565b9050801561222157600c54601154612214916001600160a01b03918216911683614591565b61221e8183615c5a565b91505b505b6122338b338a60010154846147c2565b89548490612242908390615aef565b61224c9190615aef565b8a5560078801548490612260908390615aef565b61226a9190615aef565b6007890155601554849061227f908390615aef565b6122899190615aef565b60155533600080516020615d178339815191528c6122a78785615aef565b6040516122b59291906159fe565b60405180910390a250506001805550505050505050505050565b60055481565b600260015414156122f85760405162461bcd60e51b815260040161089e906157c5565b600260015560195460ff82161061230e57610a40565b60065461231a57610a40565b61232261430c565b61232b816143b0565b336000908152601b60209081526040808320601a9092528220601980549293919260ff861690811061236d57634e487b7160e01b600052603260045260246000fd5b906000526020600020906008020190506000806000805b855481101561266f5760008682815481106123af57634e487b7160e01b600052603260045260246000fd5b60009182526020909120600690910201805490915060ff8a81169116146123d6575061265d565b60018101546123e5575061265d565b60008160040154600f54886005015484600101546124039190615c3b565b61240d9190615b07565b6124179190615c5a565b905042826003015411156126245761242f8186615aef565b6012546011549196506001600160a01b039182169116148015906124535750600081115b156125d0576011546040516370a0823160e01b81526000916001600160a01b0316906370a0823190612489903090600401615223565b60206040518083038186803b1580156124a157600080fd5b505afa1580156124b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124d9919061501d565b905061253e82600b8054806020026020016040519081016040528092919081815260200182805480156110f0576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116110d2575050505050306145f0565b6011546040516370a0823160e01b81526000916001600160a01b0316906370a082319061256f903090600401615223565b60206040518083038186803b15801561258757600080fd5b505afa15801561259b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125bf919061501d565b90506125cb8282615c5a565b925050505b6125da8185615aef565b93508082600101546125ec9190615aef565b60018301556010546014546126019083615c3b565b61260b9190615b07565b826005015461261a9190615aef565b6005830155612631565b61262e8187615aef565b95505b600f54876005015483600101546126489190615c3b565b6126529190615b07565b826004018190555050505b8061266781615c9d565b915050612384565b5082156126da578261267f613b6c565b101561269d5760405162461bcd60e51b815260040161089e906158ae565b6012546126b4906001600160a01b03163385614591565b8260165411156126d457826016546126cc9190615c5a565b6016556126da565b60006016555b811561278d57816126e9613b6c565b10156127075760405162461bcd60e51b815260040161089e906158ae565b816016541115612727578160165461271f9190615c5a565b60165561272d565b60006016555b855461273a908290615aef565b8655600784015461274c908290615aef565b600785015560155461275f908290615aef565b6015556040513390600080516020615d1783398151915290612784908a9085906159fe565b60405180910390a25b5050505050505060018055565b6009546001600160a01b031681565b60195460009060ff8316106127c0575060006129bf565b60065415806127cf5750601554155b156127dc575060006129bf565b6001600160a01b0383166000908152601a6020908152604080832080548251818502810185019093528083529192909190849084015b8282101561287d5760008481526020908190206040805160c08101825260068602909201805460ff1683526001808201548486015260028201549284019290925260038101546060840152600481015460808401526005015460a08301529083529092019101612812565b505050509050600061288d6119e6565b905060175481101561289e57506017545b60155460006128ab613b6c565b6012546011549192506001600160a01b03918216911614156128d4576128d18183615aef565b91505b600082601054601754866128e89190615c5a565b6128f29190615c3b565b6128fc9190615b07565b6014546129099190615aef565b90506000805b86518110156129b657600087828151811061293a57634e487b7160e01b600052603260045260246000fd5b602002602001015190508960ff16816000015160ff161461295b57506129a4565b602081015161296a57506129a4565b8060a001516010548583602001516129829190615c3b565b61298c9190615b07565b6129969190615c5a565b6129a09084615aef565b9250505b806129ae81615c9d565b91505061290f565b50955050505050505b92915050565b6012546001600160a01b031681565b6129dc6145ec565b6001600160a01b03166129ed61341a565b6001600160a01b031614612a135760405162461bcd60e51b815260040161089e90615543565b61174f6000614a13565b6011546001600160a01b031681565b612a346145ec565b6001600160a01b0316612a4561341a565b6001600160a01b031614612a6b5760405162461bcd60e51b815260040161089e90615543565b60065415612a8b5760405162461bcd60e51b815260040161089e906152cc565b612a96436064615aef565b600655600354612aa89061191a615c3b565b600654612ab59190615aef565b60075560005b601954811015612b0f5760065460198281548110612ae957634e487b7160e01b600052603260045260246000fd5b600091825260209091206006600890920201015580612b0781615c9d565b915050612abb565b507f7cd0ab87d19036f3dfadadb232c78aa4879dda3f0c994a9d637532410ee2ce06600654600754604051612b4592919061599e565b60405180910390a1565b600080600080601a6000866001600160a01b03166001600160a01b03168152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015612c055760008481526020908190206040805160c08101825260068602909201805460ff1683526001808201548486015260028201549284019290925260038101546060840152600481015460808401526005015460a08301529083529092019101612b9a565b50505050905060005b8151811015612cc2576000828281518110612c3957634e487b7160e01b600052603260045260246000fd5b602002602001015190508760ff16816000015160ff1614612c5a5750612cb0565b6020810151612c695750612cb0565b6020810151612c789087615aef565b95508060600151421115612c9c576020810151612c959086615aef565b9450612cae565b6020810151612cab9085615aef565b93505b505b80612cba81615c9d565b915050612c0e565b50509250925092565b60026001541415612cee5760405162461bcd60e51b815260040161089e906157c5565b600260015560195460ff821610612d0457610a40565b600654612d1057610a40565b612d1861430c565b612d21816143b0565b336000908152601b60209081526040808320601a9092528220601980549293919260ff8616908110612d6357634e487b7160e01b600052603260045260246000fd5b9060005260206000209060080201905060008060005b8454811015613045576000858281548110612da457634e487b7160e01b600052603260045260246000fd5b60009182526020909120600690910201805490915060ff898116911614612dcb5750613033565b6001810154612dda5750613033565b60008160040154600f5487600501548460010154612df89190615c3b565b612e029190615b07565b612e0c9190615c5a565b9050612e188186615aef565b6012546011549196506001600160a01b03918216911614801590612e3c5750600081115b15612fb9576011546040516370a0823160e01b81526000916001600160a01b0316906370a0823190612e72903090600401615223565b60206040518083038186803b158015612e8a57600080fd5b505afa158015612e9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ec2919061501d565b9050612f2782600b8054806020026020016040519081016040528092919081815260200182805480156110f0576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116110d2575050505050306145f0565b6011546040516370a0823160e01b81526000916001600160a01b0316906370a0823190612f58903090600401615223565b60206040518083038186803b158015612f7057600080fd5b505afa158015612f84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fa8919061501d565b9050612fb48282615c5a565b925050505b612fc38185615aef565b9350808260010154612fd59190615aef565b60018301819055600f5460058801549091612ff09190615c3b565b612ffa9190615b07565b600483015560105460145461300f9083615c3b565b6130199190615b07565b82600501546130289190615aef565b826005018190555050505b8061303d81615c9d565b915050612d79565b5081156130f95781613055613b6c565b10156130735760405162461bcd60e51b815260040161089e906158ae565b816016541115613093578160165461308b9190615c5a565b601655613099565b60006016555b84546130a6908290615aef565b855560078301546130b8908290615aef565b60078401556015546130cb908290615aef565b6015556040513390600080516020615d17833981519152906130f090899085906159fe565b60405180910390a25b50505050505060018055565b61310d6145ec565b6001600160a01b031661311e61341a565b6001600160a01b0316146131445760405162461bcd60e51b815260040161089e90615543565b4360078190556040517ffed9fcb0ca3d1e761a4b929792bb24082fba92dca81252646ad306d30680656691612b459161591c565b60155481565b600d546001600160a01b031633146131a85760405162461bcd60e51b815260040161089e906154e7565b6001600160a01b0382166131ce5760405162461bcd60e51b815260040161089e9061534f565b66b1a2bc2ec5000081106131f45760405162461bcd60e51b815260040161089e906156e0565b600d80546001600160a01b0319166001600160a01b038416179055600e8190556040517f232f2e6280d2064b1e439bf40ecdada042d84eefbb55039e4c49e8dc4f4c90c9906115169084908490615275565b600e5481565b60105481565b61325a6145ec565b6001600160a01b031661326b61341a565b6001600160a01b0316146132915760405162461bcd60e51b815260040161089e90615543565b600260015414156132b45760405162461bcd60e51b815260040161089e906157c5565b6002600155806132d65760405162461bcd60e51b815260040161089e90615419565b6012546040516370a0823160e01b81526000916001600160a01b0316906370a0823190613307903090600401615223565b60206040518083038186803b15801561331f57600080fd5b505afa158015613333573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613357919061501d565b601254909150613372906001600160a01b031633308561479b565b6012546040516370a0823160e01b81526000916001600160a01b0316906370a08231906133a3903090600401615223565b60206040518083038186803b1580156133bb57600080fd5b505afa1580156133cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133f3919061501d565b905081816016546134049190615aef565b61340e9190615c5a565b60165550506001805550565b6000546001600160a01b031690565b6019818154811061343957600080fd5b60009182526020909120600890910201805460018201546002830154600384015460048501546005860154600687015460079097015460ff90961697509395929491939092909188565b600260015414156134a65760405162461bcd60e51b815260040161089e906157c5565b6002600155816134c85760405162461bcd60e51b815260040161089e90615578565b60195460ff8216106134ec5760405162461bcd60e51b815260040161089e90615852565b6134f461430c565b6134fd816143b0565b336000908152601b60209081526040808320601a9092528220601980549293919260ff861690811061353f57634e487b7160e01b600052603260045260246000fd5b600091825260208220600890910201915080808088815b87548110156138be57600088828154811061358157634e487b7160e01b600052603260045260246000fd5b60009182526020909120600690910201805490915060ff8c81169116146135a857506138ac565b60018101546135b757506138ac565b826135c257506138be565b60008160040154600f548a6005015484600101546135e09190615c3b565b6135ea9190615b07565b6135f49190615c5a565b9050816005015460105460145484600101546136109190615c3b565b61361a9190615b07565b6136249190615c5a565b61362e9087615aef565b9550428260030154111561380d576136468188615aef565b6012546011549198506001600160a01b0391821691161480159061366a5750600081115b156137e7576011546040516370a0823160e01b81526000916001600160a01b0316906370a08231906136a0903090600401615223565b60206040518083038186803b1580156136b857600080fd5b505afa1580156136cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136f0919061501d565b905061375582600b8054806020026020016040519081016040528092919081815260200182805480156110f0576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116110d2575050505050306145f0565b6011546040516370a0823160e01b81526000916001600160a01b0316906370a0823190613786903090600401615223565b60206040518083038186803b15801561379e57600080fd5b505afa1580156137b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137d6919061501d565b90506137e28282615c5a565b925050505b6137f18186615aef565b94508082600101546138039190615aef565b600183015561385c565b6138178189615aef565b97508382600101541115613843578382600101546138359190615c5a565b60018301556000935061385c565b60018201546138529085615c5a565b6000600184015593505b600f54896005015483600101546138739190615c3b565b61387d9190615b07565b600483015560105460145460018401546138979190615c3b565b6138a19190615b07565b826005018190555050505b806138b681615c9d565b915050613556565b50841561392957846138ce613b6c565b10156138ec5760405162461bcd60e51b815260040161089e906158ae565b601254613903906001600160a01b03163387614591565b846016541115613923578460165461391b9190615c5a565b601655613929565b60006016555b83156139ae5783613938613b6c565b10156139565760405162461bcd60e51b815260040161089e906158ae565b836016541115613976578360165461396e9190615c5a565b60165561397c565b60006016555b336001600160a01b0316600080516020615d178339815191528a846040516139a59291906159fe565b60405180910390a25b8215613a2c576139bd83614561565b6013549093506001600160a01b0316613a0357604051339084156108fc029085906000818181858888f193505050501580156139fd573d6000803e3d6000fd5b50613a1a565b601354613a1a906001600160a01b03163385614591565b82601754613a289190615c5a565b6017555b6000613a38828c615c5a565b905082818a60000154613a4b9190615c5a565b613a559190615aef565b895560078701548390613a69908390615c5a565b613a739190615aef565b60078801556015548390613a88908390615c5a565b613a929190615aef565b6015558015613b0957600387015415613af2576000612710886003015483613aba9190615c3b565b613ac49190615b07565b600c54601154919250613ae4916001600160a01b03908116911683614591565b613aee8183615c5a565b9150505b601154613b09906001600160a01b03163383614591565b336001600160a01b03167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5688b83604051613b449291906159fe565b60405180910390a2505060018055505050505050505050565b60145481565b60045460ff1681565b6013546012546000916001600160a01b0391821691161415613b915750601654611b01565b6012546040516370a0823160e01b81526000916001600160a01b0316906370a0823190613bc2903090600401615223565b60206040518083038186803b158015613bda57600080fd5b505afa158015613bee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c12919061501d565b6011546012549192506001600160a01b0391821691161415611afe57601554811015613c42576000915050611b01565b601554613c4f9082615c5a565b915050611b01565b613c5f6145ec565b6001600160a01b0316613c7061341a565b6001600160a01b031614613c965760405162461bcd60e51b815260040161089e90615543565b8115613cc7576005548111613cbd5760405162461bcd60e51b815260040161089e906155af565b6005819055613ccd565b60006005555b6004805460ff19168315151790556005546040517f19a6e21b354f2502655dd03f5ac08375f296d713847fbfbf7eec539cd22c44399161151691859061598e565b601b6020526000908152604090208054600182015460029092015490919083565b601a6020528160005260406000208181548110613d4b57600080fd5b600091825260209091206006909102018054600182015460028301546003840154600485015460059095015460ff909416965091945092909186565b6103e381565b600c546001600160a01b031681565b600b8181548110610c3357600080fd5b600f5481565b613dba6145ec565b6001600160a01b0316613dcb61341a565b6001600160a01b031614613df15760405162461bcd60e51b815260040161089e90615543565b6103e3851115613e135760405162461bcd60e51b815260040161089e9061546f565b6001600160a01b038116613e395760405162461bcd60e51b815260040161089e906156b7565b6008859055600980546001600160a01b0319166001600160a01b0386161790558151613e6c90600a906020850190614d08565b508251613e8090600b906020860190614d08565b50600c80546001600160a01b0319166001600160a01b0383161790556040517f0fae0d0e8768c1e54ef03d02ab9a3aea954cb05c643b8650d09b989b2cb27ac7906116569087908790879087908790615925565b613edc6145ec565b6001600160a01b0316613eed61341a565b6001600160a01b031614613f135760405162461bcd60e51b815260040161089e90615543565b6001600160a01b038116613f395760405162461bcd60e51b815260040161089e906153a6565b61134f81614a13565b613f4a6145ec565b6001600160a01b0316613f5b61341a565b6001600160a01b031614613f815760405162461bcd60e51b815260040161089e90615543565b60065415613fa15760405162461bcd60e51b815260040161089e906152cc565b601e811015613fc25760405162461bcd60e51b815260040161089e906153ec565b60038190556040517f91abcc2d6823e3a3f11d31b208dd3065d2c6a791f1c7c9fe96a42ce12897eac590613ff790839061591c565b60405180910390a150565b60195460009060ff83161061401957506000614052565b60198260ff168154811061403d57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600802016004015490505b919050565b60195460009060ff831610158061406e5750600654155b1561407b575060006129bf565b6001600160a01b0383166000908152601a6020908152604080832080548251818502810185019093528083529192909190849084015b8282101561411c5760008481526020908190206040805160c08101825260068602909201805460ff1683526001808201548486015260028201549284019290925260038101546060840152600481015460808401526005015460a083015290835290920191016140b1565b505050509050600060198460ff168154811061414857634e487b7160e01b600052603260045260246000fd5b600091825260209182902060408051610100810182526008909302909101805460ff1683526001810154938301939093526002830154908201526003820154606082015260048201546080820152600582015460a0820152600682015460c082015260079091015460e082018190529091506141c9576000925050506129bf565b60a081015160c0820151431180156141e4575060e082015115155b80156141f4575060008260c00151115b156142505760006142098360c0015143614a63565b9050600083608001518261421d9190615c3b565b90508360e00151600f54826142329190615c3b565b61423c9190615b07565b8460a0015161424b9190615aef565b925050505b6000805b84518110156142fb57600085828151811061427f57634e487b7160e01b600052603260045260246000fd5b602002602001015190508760ff16816000015160ff16146142a057506142e9565b60208101516142af57506142e9565b8060800151600f548583602001516142c79190615c3b565b6142d19190615b07565b6142db9190615c5a565b6142e59084615aef565b9250505b806142f381615c9d565b915050614254565b509695505050505050565b60085481565b600e5434101561432e5760405162461bcd60e51b815260040161089e9061563c565b600d54600e546040516001600160a01b039092169181156108fc0291906000818181858888f1935050505015801561436a573d6000803e3d6000fd5b50600e5434111561174f57600e5433906108fc906143889034615c5a565b6040518115909202916000818181858888f1935050505015801561134f573d6000803e3d6000fd5b601554156144935760006143c26119e6565b90506017548110156143d357506017545b60155460006143e0613b6c565b6012546011549192506001600160a01b0391821691161415614409576144068183615aef565b91505b816010546017548561441b9190615c5a565b6144259190615c3b565b61442f9190615b07565b60145461443c9190615aef565b6014556012546011546001600160a01b039081169116141561448d578181601754856144689190615c5a565b6144729190615c3b565b61447c9190615b07565b6018546144899190615aef565b6018555b50506017555b600060198260ff16815481106144b957634e487b7160e01b600052603260045260246000fd5b906000526020600020906008020190508060060154431115806144de57506006810154155b156144e9575061134f565b60078101546144fe574360069091015561134f565b600061450e826006015443614a63565b905060008260040154826145229190615c3b565b90508260070154600f54826145379190615c3b565b6145419190615b07565b83600501546145509190615aef565b600584015550504360069091015550565b60008061456c6119e6565b905060175483111561457e5760175492505b8083111561458a578092505b5090919050565b6145e78363a9059cbb60e01b84846040516024016145b0929190615275565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614a9e565b505050565b3390565b60095460405163d06ca61f60e01b81526000916001600160a01b03169063d06ca61f906146239087908790600401615975565b60006040518083038186803b15801561463b57600080fd5b505afa15801561464f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526146779190810190614e92565b90506000816001835161468a9190615c5a565b815181106146a857634e487b7160e01b600052603260045260246000fd5b6020026020010151905061470d600960009054906101000a90046001600160a01b031686866000815181106146ed57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316614b2d9092919063ffffffff16565b6009546008546001600160a01b0390911690635c11d7959087906103e8906147359086615c3b565b61473f9190615b07565b878761474d42610258615aef565b6040518663ffffffff1660e01b815260040161476d9594939291906159ac565b600060405180830381600087803b15801561478757600080fd5b505af11580156119db573d6000803e3d6000fd5b6147bc846323b872dd60e01b8585856040516024016145b093929190615251565b50505050565b6001600160a01b0383166000908152601a60205260408120906147e88462015180615c3b565b6147f29042615aef565b825490915061010081106148185760405162461bcd60e51b815260040161089e906152fe565b8254600101835560008390525b801580159061486e5750818361483c600184615c5a565b8154811061485a57634e487b7160e01b600052603260045260246000fd5b906000526020600020906006020160030154115b15614935578261487f600183615c5a565b8154811061489d57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600602018382815481106148cb57634e487b7160e01b600052603260045260246000fd5b600091825260209091208254600690920201805460ff191660ff90921691909117815560018083015481830155600280840154908301556003808401549083015560048084015490830155600592830154929091019190915561492e9082615c5a565b9050614825565b600060198860ff168154811061495b57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600802019050600084838154811061498d57634e487b7160e01b600052603260045260246000fd5b60009182526020909120600690910201805460ff191660ff8b16178155600281018890556003810185905560018101879055600f546005840154919250906149d59088615c3b565b6149df9190615b07565b600482015560105460145460018301546149f99190615c3b565b614a039190615b07565b6005909101555050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006007548211614a7f57614a788383615c5a565b90506129bf565b6007548310614a90575060006129bf565b82600754614a789190615c5a565b6000614af3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614bf09092919063ffffffff16565b8051909150156145e75780806020019051810190614b119190614f22565b6145e75760405162461bcd60e51b815260040161089e9061577b565b801580614bb55750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e90614b639030908690600401615237565b60206040518083038186803b158015614b7b57600080fd5b505afa158015614b8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614bb3919061501d565b155b614bd15760405162461bcd60e51b815260040161089e906157fc565b6145e78363095ea7b360e01b84846040516024016145b0929190615275565b6060614bff8484600085614c09565b90505b9392505050565b606082471015614c2b5760405162461bcd60e51b815260040161089e906154a1565b614c3485614cc9565b614c505760405162461bcd60e51b815260040161089e90615717565b600080866001600160a01b03168587604051614c6c9190615207565b60006040518083038185875af1925050503d8060008114614ca9576040519150601f19603f3d011682016040523d82523d6000602084013e614cae565b606091505b5091509150614cbe828286614ccf565b979650505050505050565b3b151590565b60608315614cde575081614c02565b825115614cee5782518084602001fd5b8160405162461bcd60e51b815260040161089e9190615299565b828054828255906000526020600020908101928215614d5d579160200282015b82811115614d5d57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614d28565b50614d69929150614d6d565b5090565b5b80821115614d695760008155600101614d6e565b600082601f830112614d92578081fd5b81356020614da7614da283615acb565b615aa1565b8281528181019085830183850287018401881015614dc3578586fd5b855b85811015614dea578135614dd881615ce4565b84529284019290840190600101614dc5565b5090979650505050505050565b600060208284031215614e08578081fd5b8135614c0281615ce4565b600060208284031215614e24578081fd5b8151614c0281615ce4565b60008060408385031215614e41578081fd5b8235614e4c81615ce4565b946020939093013593505050565b60008060408385031215614e6c578182fd5b8235614e7781615ce4565b91506020830135614e8781615d07565b809150509250929050565b60006020808385031215614ea4578182fd5b825167ffffffffffffffff811115614eba578283fd5b8301601f81018513614eca578283fd5b8051614ed8614da282615acb565b8181528381019083850185840285018601891015614ef4578687fd5b8694505b83851015614f16578051835260019490940193918501918501614ef8565b50979650505050505050565b600060208284031215614f33578081fd5b8151614c0281615cf9565b60008060408385031215614f50578182fd5b8235614e4c81615cf9565b60008060008060008060c08789031215614f73578182fd5b8635614f7e81615ce4565b95506020870135614f8e81615ce4565b94506040870135614f9e81615ce4565b93506060870135614fae81615ce4565b9250608087013567ffffffffffffffff80821115614fca578384fd5b614fd68a838b01614d82565b935060a0890135915080821115614feb578283fd5b50614ff889828a01614d82565b9150509295509295509295565b600060208284031215615016578081fd5b5035919050565b60006020828403121561502e578081fd5b5051919050565b600080600080600060a0868803121561504c578081fd5b85359450602086013561505e81615ce4565b9350604086013567ffffffffffffffff8082111561507a578283fd5b61508689838a01614d82565b9450606088013591508082111561509b578283fd5b506150a888828901614d82565b92505060808601356150b981615ce4565b809150509295509295909350565b600080600080608085870312156150dc578182fd5b5050823594602084013594506040840135936060013592509050565b6000806040838503121561510a578182fd5b823591506020830135614e8781615d07565b60006020828403121561512d578081fd5b8135614c0281615d07565b600060208284031215615149578081fd5b8151614c0281615d07565b60008060408385031215615166578182fd5b823561517181615d07565b91506020830135614e8781615ce4565b600080600080600060a08688031215615198578283fd5b85356151a381615d07565b97602087013597506040870135966060810135965060800135945092505050565b6000815180845260208085019450808401835b838110156151fc5781516001600160a01b0316875295820195908201906001016151d7565b509495945050505050565b60008251615219818460208701615c71565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b60006020825282518060208401526152b8816040850160208701615c71565b601f01601f19169190910160400192915050565b602080825260189082015277141bdbdb081dd85cc8185b1c9958591e481cdd185c9d195960421b604082015260600190565b6020808252600a90820152694d6178207374616b657360b01b604082015260600190565b602080825260139082015272496e76616c6964206465706f7369742066656560681b604082015260600190565b6020808252600f908201526e496e76616c6964206164647265737360881b604082015260600190565b602080825260149082015273496e76616c69642077697468647261772066656560601b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601390820152721b1bddd95c881b1a5b5a5d081c995858da1959606a1b604082015260600190565b6020808252600e908201526d1a5b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b602080825260149082015273496e73756666696369656e742062616c616e636560601b604082015260600190565b6020808252601890820152770bee6d8d2e0e0c2ceca8cc2c6e8dee440e8dede40d0d2ced60431b604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b60208082526019908201527839b2ba29b2b93b34b1b2a4b733379d102327a92124a22222a760391b604082015260600190565b6020808252600f908201526e506f6f6c2069732072756e6e696e6760881b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f416d6f756e742073686f756c642062652067726561746f72207468616e203000604082015260600190565b6020808252601890820152772732bb903634b6b4ba1036bab9ba103132903434b3b432b960411b604082015260600190565b60208082526010908201526f131bd8dadd5c08139bdd08199bdd5b9960821b604082015260600190565b602080825260179082015276155cd95c88185b5bdd5b9d0818589bdd99481b1a5b5a5d604a1b604082015260600190565b6020808252602b908201527f73686f756c642070617920736d616c6c2067617320746f20636f6d706f756e6460408201526a081bdc881a185c9d995cdd60aa1b606082015260800190565b60208082526016908201527521b0b73737ba103132903932bbb0b932103a37b5b2b760511b604082015260600190565b6020808252600f908201526e496e76616c6964204164647265737360881b604082015260600190565b6020808252601c908201527f6665652063616e6e6f742065786365656420302e303520657468657200000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b602080825260139082015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b602080825260129082015271496e76616c6964207374616b65207479706560701b604082015260600190565b60208082526016908201527504d75737420626520696e666572696f7220746f2033360541b604082015260600190565b6020808252601a908201527f496e73756666696369656e742072657761726420746f6b656e73000000000000604082015260600190565b6020808252601a908201527f5374616b696e67206861736e2774207374617274656420796574000000000000604082015260600190565b90815260200190565b600086825260018060a01b03808716602084015260a0604084015261594d60a08401876151c4565b838103606085015261595f81876151c4565b9250508084166080840152509695505050505050565b600083825260406020830152614bff60408301846151c4565b9182521515602082015260400190565b918252602082015260400190565b600086825285602083015260a060408301526159cb60a08301866151c4565b6001600160a01b0394909416606083015250608001529392505050565b9283526020830191909152604082015260600190565b60ff929092168252602082015260400190565b60ff959095168552602085019390935260408401919091526060830152608082015260a00190565b60ff969096168652602086019490945260408501929092526060840152608083015260a082015260c00190565b60ff989098168852602088019690965260408701949094526060860192909252608085015260a084015260c083015260e08201526101000190565b60405181810167ffffffffffffffff81118282101715615ac357615ac3615cce565b604052919050565b600067ffffffffffffffff821115615ae557615ae5615cce565b5060209081020190565b60008219821115615b0257615b02615cb8565b500190565b600082615b2257634e487b7160e01b81526012600452602481fd5b500490565b80825b6001808611615b395750615b64565b818704821115615b4b57615b4b615cb8565b80861615615b5857918102915b9490941c938002615b2a565b94509492505050565b6000614c026000198484600082615b8657506001614c02565b81615b9357506000614c02565b8160018114615ba95760028114615bb357615be0565b6001915050614c02565b60ff841115615bc457615bc4615cb8565b6001841b915084821115615bda57615bda615cb8565b50614c02565b5060208310610133831016604e8410600b8410161715615c13575081810a83811115615c0e57615c0e615cb8565b614c02565b615c208484846001615b27565b808604821115615c3257615c32615cb8565b02949350505050565b6000816000190483118215151615615c5557615c55615cb8565b500290565b600082821015615c6c57615c6c615cb8565b500390565b60005b83811015615c8c578181015183820152602001615c74565b838111156147bc5750506000910152565b6000600019821415615cb157615cb1615cb8565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461134f57600080fd5b801515811461134f57600080fd5b60ff8116811461134f57600080fdfe90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15a2646970667358221220feb3ed98338093f576d80e88355bffb383fb4dfc3057b28967d5ee4a514d560c64736f6c63430008000033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.