Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 769 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim LP | 19424580 | 304 days ago | IN | 0 ETH | 0.00810561 | ||||
Claim | 11465557 | 1487 days ago | IN | 0 ETH | 0.20077504 | ||||
Claim LP | 11465517 | 1487 days ago | IN | 0 ETH | 0.00471325 | ||||
Stake | 11433521 | 1492 days ago | IN | 0.075 ETH | 0.00877829 | ||||
Stake To Hugo | 11433518 | 1492 days ago | IN | 0 ETH | 0.00619725 | ||||
Claim LP | 11433309 | 1492 days ago | IN | 0 ETH | 0.00143115 | ||||
Withdraw | 11433129 | 1492 days ago | IN | 0 ETH | 0.08307916 | ||||
Claim | 11433128 | 1492 days ago | IN | 0 ETH | 0.12240172 | ||||
Claim LP | 11432181 | 1492 days ago | IN | 0 ETH | 0.00219443 | ||||
Claim LP | 11432139 | 1492 days ago | IN | 0 ETH | 0.00532313 | ||||
Claim LP | 11431687 | 1492 days ago | IN | 0 ETH | 0.00162197 | ||||
Withdraw | 11431665 | 1492 days ago | IN | 0 ETH | 0.06211602 | ||||
Claim | 11431661 | 1492 days ago | IN | 0 ETH | 0.08378314 | ||||
Claim | 11431432 | 1492 days ago | IN | 0 ETH | 0.08494846 | ||||
Claim LP | 11431299 | 1492 days ago | IN | 0 ETH | 0.00213197 | ||||
Claim | 11431170 | 1492 days ago | IN | 0 ETH | 0.06562517 | ||||
Claim | 11431070 | 1492 days ago | IN | 0 ETH | 0.00969552 | ||||
Claim | 11431063 | 1492 days ago | IN | 0 ETH | 0.00224935 | ||||
Withdraw | 11431058 | 1492 days ago | IN | 0 ETH | 0.09978875 | ||||
Withdraw | 11431026 | 1492 days ago | IN | 0 ETH | 0.10230875 | ||||
Claim | 11430908 | 1492 days ago | IN | 0 ETH | 0.13305655 | ||||
Claim | 11430906 | 1492 days ago | IN | 0 ETH | 0.14587787 | ||||
Stake | 11430894 | 1492 days ago | IN | 0.001 ETH | 0.01777084 | ||||
Claim | 11430891 | 1492 days ago | IN | 0 ETH | 0.02508473 | ||||
Stake | 11430863 | 1492 days ago | IN | 0 ETH | 0.01818336 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
19424580 | 304 days ago | 0.05588417 ETH | ||||
11465557 | 1487 days ago | 0.07402913 ETH | ||||
11465557 | 1487 days ago | 0.07402913 ETH | ||||
11465557 | 1487 days ago | 0.16805995 ETH | ||||
11465557 | 1487 days ago | 0.16805995 ETH | ||||
11465517 | 1487 days ago | 0.29544162 ETH | ||||
11433521 | 1492 days ago | 1 wei | ||||
11433521 | 1492 days ago | 0.075 ETH | ||||
11433309 | 1492 days ago | 0.00130407 ETH | ||||
11433128 | 1492 days ago | 0.00009394 ETH | ||||
11433128 | 1492 days ago | 0.00009394 ETH | ||||
11433128 | 1492 days ago | 0.00632812 ETH | ||||
11433128 | 1492 days ago | 0.00632812 ETH | ||||
11432181 | 1492 days ago | 0.00737189 ETH | ||||
11431687 | 1492 days ago | 0.02185967 ETH | ||||
11431665 | 1492 days ago | 0.00000495 ETH | ||||
11431665 | 1492 days ago | 0.00000021 ETH | ||||
11431665 | 1492 days ago | 0.00000538 ETH | ||||
11431661 | 1492 days ago | 0.00090324 ETH | ||||
11431661 | 1492 days ago | 0.00000034 ETH | ||||
11431661 | 1492 days ago | 0.00000034 ETH | ||||
11431661 | 1492 days ago | 0.00077206 ETH | ||||
11431661 | 1492 days ago | 0.00077206 ETH | ||||
11431432 | 1492 days ago | 0.21654143 ETH | ||||
11431432 | 1492 days ago | 0.01097909 ETH |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
CategoryFive
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import "./interfaces/IERC20.sol"; import "./interfaces/IUniswap.sol"; import "./interfaces/IWETH.sol"; import "./lib/ReentrancyGuard.sol"; import "./lib/Ownable.sol"; import "./lib/SafeMath.sol"; import "./lib/Math.sol"; import "./lib/Address.sol"; import "./lib/SafeERC20.sol"; import "./lib/FeeHelpers.sol"; import "./Cane.sol"; import "./Hugo.sol"; // File: contracts/CategoryFive.sol contract CategoryFive is ReentrancyGuard, Ownable { using SafeMath for uint256; using Address for address; using SafeERC20 for IERC20; event Staked(address indexed from, uint256 amount, uint256 amountLP); event Withdrawn(address indexed to, uint256 poolId, uint256 amount, uint256 amountLP); event Claimed(address indexed to, uint256 poolId, uint256 amount); event ClaimedAndStaked(address indexed to, uint256 poolId, uint256 amount); event Halving(uint256 amount); event Received(address indexed from, uint256 amount); event EmergencyWithdraw(address indexed to, uint256 poolId, uint256 amount); event ClaimedLPReward(address indexed to, uint256 poolId, uint256 lpEthReward, uint256 lpCaneReward); Cane public cane; // Hurricane farming token Hugo public hugo; // Hurricane governance token IUniswapV2Factory public factory; IUniswapV2Router02 public router; address public weth; address payable public treasury; struct AccountInfo { uint256 index; uint256 balance; uint256 maxBalance; uint256 lastWithdrawTimestamp; uint256 lastStakedTimestamp; uint256 reward; uint256 rewardPerTokenPaid; uint256 lpEthReward; uint256 lpEthRewardPaid; uint256 lpCaneReward; uint256 lpCaneRewardPaid; } struct PoolInfo { IERC20 pairAddress; // Address of LP token contract IERC20 otherToken; // Reference to other token in pair (e.g. 'weth') uint256 rewardAllocation; // Rewards allocated for this pool uint256 totalSupply; // Total supply of tokens in pool uint256 borrowedSupply; // Total CANE token borrowed for pool } // Info of each pool. PoolInfo[] public poolInfo; // Info of each user that stakes LP tokens. mapping(uint256 => mapping(address => AccountInfo)) public accountInfos; // List for supporting accountInfos interation mapping(uint256 => address payable[]) public accountInfosIndex; uint256 public constant HALVING_DURATION = 14 days; uint256 public rewardAllocation = 5000 * 10 ** 18; uint256 public halvingTimestamp = 0; uint256 public lastUpdateTimestamp = 0; uint256 public rewardRate = 0; uint256 public rewardPerTokenStored = 0; // configurable parameters via gov voting (days 30+ parameters only) uint256 public rewardHalvingPercent = 50; uint256 public claimBurnFee = 1; uint256 public claimTreasuryFeePercent = 2; uint256 public claimLPFeePercent = 2; uint256 public claimLiquidBalancePercent = 95; uint256 public unstakeLPFeePercent = 2; uint256 public unstakeTreasuryFeePercent = 2; uint256 public unstakeBurnFeePercent = 1; uint256 public withdrawalLimitPercent = 20; uint256 public katrinaExitFeePercent = 4; // Goal is for farming to be started as early as this timestamp // Date and time (GMT): Monday, December 7, 2020 6:50|7:00 PM UTC uint256 public farmingStartTimestamp = 1607367000; bool public farmingStarted = false; // References to our 2 core pools uint256 private constant HUGO_POOL_ID = 0; uint256 private constant KATRINA_POOL_ID = 1; // Burn address address constant BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD; // Uniswap Router Address address constant ROUTER_ADDRESS = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; // Whitelist for initial LPs to improve stability at launch mapping (address => bool) public whitelists; mapping (address => uint256) public whitelistBalance; uint256 public whitelistEndTimestamp = 0; uint256 public constant WHITELIST_STAKE_LIMIT = 100 ether; // Allow chance to stabilize liquidity up to 10 mins after farming opens uint256 public constant WHITELIST_DURATION = 10 minutes; constructor(address payable _treasury) public { cane = new Cane(address(this)); hugo = new Hugo(address(this)); router = IUniswapV2Router02(ROUTER_ADDRESS); factory = IUniswapV2Factory(router.factory()); weth = router.WETH(); treasury = _treasury; whitelistEndTimestamp = farmingStartTimestamp.add(WHITELIST_DURATION); // Calc initial reward rate rewardRate = rewardAllocation.div(HALVING_DURATION); // Initialize CANE staking pool w/ 30% of rewards at launch // New allocations can be set dynamically via governance poolInfo.push(PoolInfo({ pairAddress: cane, otherToken: cane, rewardAllocation: rewardAllocation.mul(30).div(100), borrowedSupply: 0, totalSupply: 0 })); // Initialize Katrina liquidity pool w/ 70% of rewards at launch // New allocations can be set dynamically via governance poolInfo.push(PoolInfo({ pairAddress: IERC20(factory.createPair(address(cane), weth)), otherToken: IERC20(weth), rewardAllocation: rewardAllocation.mul(70).div(100), borrowedSupply: 0, totalSupply: 0 })); } receive() external payable { emit Received(msg.sender, msg.value); } function stakeToHugo(uint256 _amount, bool _claimAndStakeRewards) external nonReentrant { _checkFarming(); _updateReward(HUGO_POOL_ID); _halving(HUGO_POOL_ID); // Retrieve pool & account Info PoolInfo storage pool = poolInfo[HUGO_POOL_ID]; AccountInfo storage account = accountInfos[HUGO_POOL_ID][msg.sender]; // find user rewards due in each pool and auto claim if (_claimAndStakeRewards) { uint256 rewardsDue = account.reward; // current reward due in Hugo for (uint256 pid = 1; pid < poolInfo.length; ++ pid) { if (accountInfos[pid][msg.sender].reward > 0) { rewardsDue = rewardsDue.add(accountInfos[pid][msg.sender].reward); accountInfos[pid][msg.sender].reward = 0; } } if (rewardsDue > 0) { // transfer to Hugo staking pool directly without any fees // mint rewards directly to pool, plus send equiv Hugo gov tokens to user cane.mint(address(this), rewardsDue); hugo.mint(msg.sender, rewardsDue); emit ClaimedAndStaked(msg.sender, HUGO_POOL_ID, rewardsDue); account.balance = account.balance.add(rewardsDue); // Track to always allow full withdrawals against withdrawalLimit if (account.balance > account.maxBalance) { account.maxBalance = account.balance; } account.lastStakedTimestamp = block.timestamp; if (account.index == 0) { accountInfosIndex[HUGO_POOL_ID].push(msg.sender); account.index = accountInfosIndex[HUGO_POOL_ID].length; } pool.totalSupply = pool.totalSupply.add(rewardsDue); if (account.reward > 0) { account.reward = 0; } } } if (_amount > 0) { // allows staking only rewards to Hugo require(cane.balanceOf(msg.sender) >= _amount, 'Invalid balance'); cane.transferFrom(msg.sender, address(this), _amount); // Add balance to pool's total supply pool.totalSupply = pool.totalSupply.add(_amount); // Add to iterator tracker if not exists account.balance = account.balance.add(_amount); // Track to always allow full withdrawals against withdrawalLimit if (account.balance > account.maxBalance) { account.maxBalance = account.balance; } account.lastStakedTimestamp = block.timestamp; if (account.index == 0) { accountInfosIndex[HUGO_POOL_ID].push(msg.sender); account.index = accountInfosIndex[HUGO_POOL_ID].length; } // Mint equivalent number of our gov token for user hugo.mint(msg.sender, _amount); emit Staked(msg.sender, _amount, 0); } } function stake(uint256 _poolId, uint256 _amount) external payable nonReentrant { _checkFarming(); _updateReward(_poolId); _halving(_poolId); uint256 stakeAmount; if (_poolId == KATRINA_POOL_ID) { stakeAmount = msg.value; } else { stakeAmount = _amount; } require(stakeAmount > 0, 'Invalid amount'); require(!address(msg.sender).isContract(), 'Invalid user'); require(_poolId < poolInfo.length, 'Invalid pool'); require(_poolId > HUGO_POOL_ID, 'Stake in Hugo'); // White list check if (whitelistEndTimestamp >= block.timestamp) { require(whitelists[msg.sender], 'Still building liquidity'); whitelistBalance[msg.sender] = whitelistBalance[msg.sender].add(msg.value); require(whitelistBalance[msg.sender] <= WHITELIST_STAKE_LIMIT, 'Whitelist stake limit reached'); } PoolInfo storage pool = poolInfo[_poolId]; AccountInfo storage account = accountInfos[_poolId][msg.sender]; uint256 caneTokenAmount = IERC20(cane).balanceOf(address(pool.pairAddress)); uint256 otherTokenAmount = IERC20(pool.otherToken).balanceOf(address(pool.pairAddress)); // If otherTokenAmount = 0 then set initial price to 1 ETH = 10 CANE (valid for eth/CANE pool) uint256 amountCaneTokenDesired = 0; if (_poolId == KATRINA_POOL_ID) { amountCaneTokenDesired = (otherTokenAmount == 0) ? stakeAmount * 10 : stakeAmount.mul(caneTokenAmount).div(otherTokenAmount); } else { require(otherTokenAmount > 0, "Pool not started"); // require manual add for new LPs amountCaneTokenDesired = stakeAmount.mul(caneTokenAmount).div(otherTokenAmount); } // Mint borrowed cane and update borrowed amount in pool cane.mint(address(this), amountCaneTokenDesired); pool.borrowedSupply = pool.borrowedSupply.add(amountCaneTokenDesired); // Add liquidity in uniswap IERC20(cane).approve(address(router), amountCaneTokenDesired); uint256 liquidity; if (_poolId == KATRINA_POOL_ID) { // use addLiquidityETH (,, liquidity) = router.addLiquidityETH{value : stakeAmount}( address(cane), amountCaneTokenDesired, 0, 0, address(this), block.timestamp + 1 days); } else { // use addLiquidity for token/cane liquidity IERC20(pool.otherToken).approve(address(router), stakeAmount); (,, liquidity) = router.addLiquidity( address(pool.otherToken), address(cane), stakeAmount, amountCaneTokenDesired, 0, 0, address(this), block.timestamp + 1 days); } // Add LP token to total supply pool.totalSupply = pool.totalSupply.add(liquidity); // Add to balance and iterator tracker if not exists account.balance = account.balance.add(liquidity); // Track to always allow full withdrawals against withdrawalLimit if (account.balance > account.maxBalance) { account.maxBalance = account.balance; } if (account.index == 0) { accountInfosIndex[_poolId].push(msg.sender); account.index = accountInfosIndex[_poolId].length; } // Set stake timestamp as last withdraw timestamp // to prevent withdraw immediately after first staking account.lastStakedTimestamp = block.timestamp; if (account.lastWithdrawTimestamp == 0) { account.lastWithdrawTimestamp = block.timestamp; } emit Staked(msg.sender, stakeAmount, liquidity); } function withdraw(uint256 _poolId) external nonReentrant { _checkFarming(); _updateReward(_poolId); _halving(_poolId); require(_poolId < poolInfo.length, 'Invalid pool'); // Retrieve account in pool PoolInfo storage pool = poolInfo[_poolId]; AccountInfo storage account = accountInfos[_poolId][msg.sender]; require(account.lastWithdrawTimestamp + 12 hours <= block.timestamp, 'Invalid withdraw time'); require(account.balance > 0, 'Invalid balance'); uint256 _amount = account.maxBalance.mul(withdrawalLimitPercent).div(100); if (account.balance < _amount) { _amount = account.balance; } // Reduce total supply in pool pool.totalSupply = pool.totalSupply.sub(_amount); // Reduce user's balance account.balance = account.balance.sub(_amount); // Update user's withdraw timestamp account.lastWithdrawTimestamp = block.timestamp; uint256[] memory totalToken = new uint256[](2); uint256 otherTokenAmountMinusFees = 0; if (_poolId == HUGO_POOL_ID) { // burn Hugo totalToken[1] = _amount; hugo.burn(msg.sender, _amount); uint256 burnFee = _amount.div(FeeHelpers.getUnstakeBurnFee(account.lastStakedTimestamp, unstakeBurnFeePercent)); // calculate fee cane.burn(BURN_ADDRESS, burnFee); otherTokenAmountMinusFees = _amount.sub(burnFee); } else { // Remove liquidity in uniswap IERC20(pool.pairAddress).approve(address(router), _amount); if (_poolId == KATRINA_POOL_ID) { (uint256 caneTokenAmount, uint256 otherTokenAmount) = router.removeLiquidityETH(address(cane), _amount, 0, 0, address(this), block.timestamp + 1 days); totalToken[0] = caneTokenAmount; totalToken[1] = otherTokenAmount; } else { (uint256 caneTokenAmount, uint256 otherTokenAmount) = router.removeLiquidity(address(cane), address(pool.otherToken), _amount, 0, 0, address(this), block.timestamp + 1 days); totalToken[0] = caneTokenAmount; totalToken[1] = otherTokenAmount; } // Burn borrowed cane and update count cane.burn(address(this), totalToken[0]); pool.borrowedSupply = pool.borrowedSupply.sub(totalToken[0]); } // Calculate and transfer withdrawal fee to treasury uint256 treasuryFee = 0; if (_poolId == KATRINA_POOL_ID) { treasuryFee = FeeHelpers.getKatrinaExitFee(farmingStartTimestamp, katrinaExitFeePercent); treasuryFee = totalToken[1].div(treasuryFee); treasury.transfer(treasuryFee); } else { treasuryFee = FeeHelpers.getUnstakeTreasuryFee(account.lastStakedTimestamp, unstakeTreasuryFeePercent); treasuryFee = totalToken[1].div(treasuryFee); pool.otherToken.transfer(treasury, treasuryFee); } if (_poolId == HUGO_POOL_ID) { otherTokenAmountMinusFees = otherTokenAmountMinusFees.sub(treasuryFee); } else { otherTokenAmountMinusFees = totalToken[1].sub(treasuryFee); } // Calculate and transfer withdrawal fee for distribution to other LPs if (accountInfosIndex[_poolId].length > 0 && pool.totalSupply > 0) { uint256 lpFee = 0; if (_poolId == KATRINA_POOL_ID) { lpFee = FeeHelpers.getKatrinaExitFee(farmingStartTimestamp, katrinaExitFeePercent); } else { lpFee = FeeHelpers.getUnstakeLPFee(account.lastStakedTimestamp, unstakeLPFeePercent); } lpFee = totalToken[1].div(lpFee); for (uint256 i = 0; i < accountInfosIndex[_poolId].length; i ++) { AccountInfo storage lpAccount = accountInfos[_poolId][accountInfosIndex[_poolId][i]]; // Send portion of fee and track amounts if we have an LP balance and is not sender if (lpAccount.balance > 0 && accountInfosIndex[_poolId][i] != msg.sender) { if (_poolId == KATRINA_POOL_ID) { lpAccount.lpEthReward = lpAccount.lpEthReward.add(lpAccount.balance.mul(lpFee).div(pool.totalSupply)); } else { lpAccount.lpCaneReward = lpAccount.lpCaneReward.add(lpAccount.balance.mul(lpFee).div(pool.totalSupply)); } } } otherTokenAmountMinusFees = otherTokenAmountMinusFees.sub(lpFee); } totalToken[1] = otherTokenAmountMinusFees; if (_poolId == KATRINA_POOL_ID) { msg.sender.transfer(totalToken[1]); } else { pool.otherToken.transfer(msg.sender, totalToken[1]); } // Remove from list if balance is zero if (account.balance == 0 && account.index > 0 && account.index <= accountInfosIndex[_poolId].length) { uint256 accountIndex = account.index - 1; // Fetch real index in array accountInfos[_poolId][accountInfosIndex[_poolId][accountInfosIndex[_poolId].length - 1]].index = accountIndex + 1; // Give it my index accountInfosIndex[_poolId][accountIndex] = accountInfosIndex[_poolId][accountInfosIndex[_poolId].length - 1]; // Give it my address accountInfosIndex[_poolId].pop(); account.index = 0; // Keep struct ref valid, but remove from tracking list of active LPs } emit Withdrawn(msg.sender, _poolId, _amount, totalToken[1]); } // Claim functions for extracting pool rewards function claim(uint256 _poolId) external nonReentrant { _checkFarming(); _updateReward(_poolId); _halving(_poolId); // Retrieve account in pool PoolInfo storage pool = poolInfo[_poolId]; AccountInfo storage account = accountInfos[_poolId][msg.sender]; uint256 reward = account.reward; require(reward > 0, 'No rewards'); if (reward > 0) { // Reduce rewards due account.reward = 0; // Apply variable % burn fee cane.mint(BURN_ADDRESS, reward.div(FeeHelpers.getClaimBurnFee(account.lastStakedTimestamp, claimBurnFee))); // Extract liquid qty and send liquid to user wallet cane.mint(msg.sender, reward.div(FeeHelpers.getClaimLiquidBalancePcnt(account.lastStakedTimestamp, claimLiquidBalancePercent))); // Extract treasury fee and send cane.mint(address(treasury), reward.div(FeeHelpers.getClaimTreasuryFee(account.lastStakedTimestamp, claimTreasuryFeePercent))); // Extract LPs fees amount and distribute if (accountInfosIndex[_poolId].length > 0 && pool.totalSupply > 0) { for (uint256 i = 0; i < accountInfosIndex[_poolId].length; i ++) { AccountInfo storage lpAccount = accountInfos[_poolId][accountInfosIndex[_poolId][i]]; // Send portion of fee and track amounts if we have an LP balance and is not sender if (lpAccount.balance > 0 && accountInfosIndex[_poolId][i] != msg.sender) { lpAccount.lpCaneReward = lpAccount.lpCaneReward.add(lpAccount.balance .mul(reward.div(FeeHelpers.getClaimLPFee(account.lastStakedTimestamp, claimLPFeePercent))) .div(pool.totalSupply)); } } } // Remove liquid and treasury/lp/burn fees, then remainder goes back to LP uint256[] memory rewardAmounts = new uint256[](2); rewardAmounts[0] = reward .sub(reward.div(FeeHelpers.getClaimBurnFee(account.lastStakedTimestamp, claimBurnFee))) .sub(reward.div(FeeHelpers.getClaimLiquidBalancePcnt(account.lastStakedTimestamp, claimLiquidBalancePercent))) .sub(reward.div(FeeHelpers.getClaimTreasuryFee(account.lastStakedTimestamp, claimTreasuryFeePercent))) .sub(reward.div(FeeHelpers.getClaimLPFee(account.lastStakedTimestamp, claimLPFeePercent))); rewardAmounts[1] = rewardAmounts[0].div(2); // Mint [ALL] the qty of tokens needed to buy ETH and add LP cane.mint(address(this), rewardAmounts[0]); // Build swap pair from token to token (eg: WETH) address[] memory swapPath = new address[](2); swapPath[0] = address(cane); swapPath[1] = address(weth); // Sell minted half for ETH equivalent IERC20(cane).safeApprove(address(router), 0); IERC20(cane).safeApprove(address(router), rewardAmounts[1]); uint256[] memory swappedTokens = router.swapExactTokensForETH(rewardAmounts[1], uint(0), swapPath, address(this), block.timestamp + 1 days); // Use other minted half for CANE part, add to lp uint256[] memory totalLp = new uint256[](3); IERC20(cane).safeApprove(address(router), 0); IERC20(cane).safeApprove(address(router), rewardAmounts[1]); (totalLp[0], totalLp[1], totalLp[2]) = router.addLiquidityETH{value: swappedTokens[swappedTokens.length - 1]} (address(cane), rewardAmounts[1], 0, 0, address(this), block.timestamp + 5 minutes); // Check for any leftover CANE amounts, return to user if (rewardAmounts[1].sub(totalLp[0]) > 0) { cane.mint(msg.sender, rewardAmounts[1].sub(totalLp[0])); } // Check for any leftover ETH amounts, return to user if (swappedTokens[swappedTokens.length - 1].sub(totalLp[1]) > 0) { msg.sender.transfer(swappedTokens[swappedTokens.length - 1].sub(totalLp[1])); } // Add LP token to total and borrowed supply to KAT pool PoolInfo storage katPool = poolInfo[KATRINA_POOL_ID]; AccountInfo storage katAccount = accountInfos[KATRINA_POOL_ID][msg.sender]; katPool.totalSupply = katPool.totalSupply.add(totalLp[2]); katPool.borrowedSupply = katPool.borrowedSupply.add(totalLp[0]); // Add to balance and iterator if not already in pool katAccount.balance = katAccount.balance.add(totalLp[2]); if (katAccount.index == 0) { accountInfosIndex[KATRINA_POOL_ID].push(msg.sender); katAccount.index = accountInfosIndex[KATRINA_POOL_ID].length; } emit Claimed(msg.sender, _poolId, reward); } // Claim LP fee rewards automatically if (account.lpEthReward > 0 || account.lpCaneReward > 0) { claimLP(_poolId); } } // allow LPs to claim fee rewards with no penalties function claimLP(uint256 _poolId) public { AccountInfo storage account = accountInfos[_poolId][msg.sender]; require (account.lpEthReward > 0 || account.lpCaneReward > 0, 'No LP rewards'); emit ClaimedLPReward(msg.sender, _poolId, account.lpEthReward, account.lpCaneReward); if (account.lpEthReward > 0) { // Reduce rewards due, track total paid, and send ETH account.lpEthRewardPaid = account.lpEthRewardPaid.add(account.lpEthReward); msg.sender.transfer(account.lpEthReward); account.lpEthReward = 0; } if (account.lpCaneReward > 0) { account.lpCaneRewardPaid = account.lpCaneRewardPaid.add(account.lpCaneReward); cane.mint(msg.sender, account.lpCaneReward); account.lpCaneReward = 0; } } // Add a new lp to the pool. Can only be called by the owner. // XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do. // _rewardAllocation must be % number (e.g. 15 means 15%) function add( uint256 _rewardAllocation, IERC20 _pairAddress, IERC20 _otherToken ) external onlyOwner { require (_rewardAllocation <= 100, "Invalid allocation"); uint256 _totalAllocation = rewardAllocation.mul(_rewardAllocation).div(100); for (uint256 pid = 0; pid < poolInfo.length; ++ pid) { _totalAllocation = _totalAllocation.add(poolInfo[pid].rewardAllocation); } require (_totalAllocation <= rewardAllocation, "Allocation exceeded"); poolInfo.push(PoolInfo({ pairAddress: _pairAddress, otherToken: _otherToken, rewardAllocation: rewardAllocation.mul(_rewardAllocation).div(100), borrowedSupply: 0, totalSupply: 0 })); } // Update the given pool's CANE rewards. Can only be called by the owner. // _rewardAllocation must be % number (e.g. 15 means 15%) function set(uint256 _poolId, uint256 _rewardAllocation) external onlyOwner { require (_rewardAllocation <= 100, "Invalid allocation"); uint256 totalAllocation = rewardAllocation.sub(poolInfo[_poolId].rewardAllocation).add( rewardAllocation.mul(_rewardAllocation).div(100) ); require (totalAllocation <= rewardAllocation, "Allocation exceeded"); if (poolInfo[_poolId].rewardAllocation != rewardAllocation.mul(_rewardAllocation).div(100)) { poolInfo[_poolId].rewardAllocation = rewardAllocation.mul(_rewardAllocation).div(100); } } // Fetches length of accounts in a pool // Allows easy front end iteration of accountInfos function accountInfosLength(uint256 _poolId) external view returns (uint256) { require(_poolId < poolInfo.length, 'Invalid pool'); return accountInfosIndex[_poolId].length; } // Fetches details of account in the pool specified // Allows easy front end iteration of accountInfos function accountInfosByIndex(uint256 _poolId, uint256 _index) external view returns ( uint256 index, uint256 balance, uint256 lastWithdrawTimestamp, uint256 lastStakedTimestamp, uint256 reward, uint256 rewardPerTokenPaid, uint256 lpEthReward, uint256 lpEthRewardPaid, uint256 lpCaneReward, uint256 lpCaneRewardPaid, address userAddress) { require(_poolId < poolInfo.length, 'Invalid pool'); userAddress = accountInfosIndex[_poolId][_index]; AccountInfo memory account = accountInfos[_poolId][userAddress]; return ( account.index, account.balance, account.lastWithdrawTimestamp, account.lastStakedTimestamp, account.reward, account.rewardPerTokenPaid, account.lpEthReward, account.lpEthRewardPaid, account.lpCaneReward, account.lpCaneRewardPaid, userAddress ); } // Fetches individual balances for each token in a pair function balanceOfPool(uint256 _poolId) external view returns (uint256, uint256) { require(_poolId < poolInfo.length, 'Invalid pool'); PoolInfo storage pool = poolInfo[_poolId]; uint256 otherTokenAmount = IERC20(pool.otherToken).balanceOf(address(pool.pairAddress)); uint256 caneTokenAmount = IERC20(cane).balanceOf(address(pool.pairAddress)); return (otherTokenAmount, caneTokenAmount); } function poolLength() external view returns (uint256) { return poolInfo.length; } function burnedTokenAmount() external view returns (uint256) { return cane.balanceOf(BURN_ADDRESS); } function rewardPerToken(uint256 _poolId) public view returns (uint256) { require(_poolId < poolInfo.length, 'Invalid pool'); PoolInfo storage pool = poolInfo[_poolId]; if (pool.totalSupply == 0) { return rewardPerTokenStored; } uint256 poolRewardRate = pool.rewardAllocation.mul(rewardRate).div(rewardAllocation); return rewardPerTokenStored .add( lastRewardTimestamp() .sub(lastUpdateTimestamp) .mul(poolRewardRate) .mul(1e18) .div(pool.totalSupply) ); } function lastRewardTimestamp() public view returns (uint256) { return Math.min(block.timestamp, halvingTimestamp); } function rewardEarned(uint256 _poolId, address account) public view returns (uint256) { return accountInfos[_poolId][account].balance.mul( rewardPerToken(_poolId).sub(accountInfos[_poolId][account].rewardPerTokenPaid) ) .div(1e18) .add(accountInfos[_poolId][account].reward); } // Token price in eth function tokenPrice(uint256 _poolId) external view returns (uint256) { PoolInfo storage pool = poolInfo[_poolId]; uint256 ethAmount = IERC20(weth).balanceOf(address(pool.pairAddress)); uint256 tokenAmount = IERC20(cane).balanceOf(address(pool.pairAddress)); return tokenAmount > 0 ? // Current price ethAmount.mul(1e18).div(tokenAmount) : // Initial price (uint256(1e18).div(10)); } // Set all configurable parameters function setGoverningParameters(uint256[] memory _parameters) external onlyOwner { require(_parameters[0] >= 5 && _parameters[0] <= 50, "Invalid range"); //_parameters[0] _rewardHalvingPercent require(_parameters[1] >= 10 && _parameters[1] <= 50, "Invalid range"); //_parameters[1] _withdrawalLimitPercent require(_parameters[2] >= 1 && _parameters[2] <= 5, "Invalid range"); //_parameters[2] _claimBurnFee require(_parameters[3] >= 1 && _parameters[3] <= 5, "Invalid range"); //_parameters[3] _claimTreasuryFeePercent require(_parameters[4] >= 1 && _parameters[4] <= 5, "Invalid range"); //_parameters[4] _claimLPFeePercent require(_parameters[5] >= 25 && _parameters[5] <= 95, "Invalid range"); //_parameters[5] _claimLiquidBalancePercent require(_parameters[6] >= 1 && _parameters[6] <= 5, "Invalid range"); //_parameters[6] _unstakeBurnFeePercent require(_parameters[7] >= 1 && _parameters[7] <= 5, "Invalid range"); //_parameters[7] _unstakeTreasuryFeePercent require(_parameters[8] >= 1 && _parameters[8] <= 5, "Invalid range"); //_parameters[8] _unstakeLPFeePercent require(_parameters[9] >= 2 && _parameters[9] <= 10, "Invalid range"); //_parameters[9] _katrinaExitFeePercent require(_parameters[2] // _claimBurnFee .add(_parameters[3]) // _claimTreasuryFeePercent .add(_parameters[4]) // _claimLPFeePercent .add(_parameters[5]) // _claimLiquidBalancePercent == 100, 'Invalid claim fees'); rewardHalvingPercent = _parameters[0]; withdrawalLimitPercent = _parameters[1]; claimBurnFee = _parameters[2]; claimTreasuryFeePercent = _parameters[3]; claimLPFeePercent = _parameters[4]; claimLiquidBalancePercent = _parameters[5]; unstakeBurnFeePercent = _parameters[6]; unstakeTreasuryFeePercent = _parameters[7]; unstakeLPFeePercent = _parameters[8]; katrinaExitFeePercent = _parameters[9]; } // Only allow our farmingStartTimestamp to be changed between 72 hours // of the original schedule. Gives us flexibility in when to go live // if some unexpected circumstances happens (such as high gas prices) // // We must start farming somewhere between Dec 07, 2020 and Dec 10, 2020 19:00 GMT // Thanks Karl (Cat3) for the suggestion ;-) function setFarmingStartTimestamp(uint256 _farmingStartTimestamp) external onlyOwner { require(!farmingStarted && _farmingStartTimestamp >= 1607349600 && _farmingStartTimestamp <= 1607626800, "Invalid range"); farmingStartTimestamp = _farmingStartTimestamp; whitelistEndTimestamp = _farmingStartTimestamp.add(WHITELIST_DURATION); } // Initial LP stability providers function setWhitelist(address[] calldata addresses) external onlyOwner { require(whitelistEndTimestamp >= block.timestamp, 'Too late for whitelist'); for (uint256 i = 0; i < addresses.length; i++) { whitelists[addresses[i]] = true; } } // Update user rewards function _updateReward(uint256 _poolId) internal { rewardPerTokenStored = rewardPerToken(_poolId); lastUpdateTimestamp = lastRewardTimestamp(); if (msg.sender != address(0)) { accountInfos[_poolId][msg.sender].reward = rewardEarned(_poolId, msg.sender); accountInfos[_poolId][msg.sender].rewardPerTokenPaid = rewardPerTokenStored; } } // Do halving when timestamp reached function _halving(uint256 _poolId) internal { if (block.timestamp >= halvingTimestamp) { rewardAllocation = rewardAllocation.mul(rewardHalvingPercent).div(100); rewardRate = rewardAllocation.div(HALVING_DURATION); halvingTimestamp = halvingTimestamp.add(HALVING_DURATION); _updateReward(_poolId); emit Halving(rewardAllocation); } } // Check if farming is started function _checkFarming() internal { require(farmingStartTimestamp <= block.timestamp, 'Farming has not yet started. Try again later.'); if (!farmingStarted) { // We made it to this line, so farming has finally started! The Hurricane.Finance team // would love to thank the following team members for their unwavering support: // Kart (Cat3); Foxtrot Delta; Storm Wins; psychologist; Lito; and Lizzie // ...and of course, me, Meteorologist - hehehe. // // Let's go, Hurricanes! farmingStarted = true; halvingTimestamp = block.timestamp.add(HALVING_DURATION); lastUpdateTimestamp = block.timestamp; } } }
pragma solidity ^0.6.12; import "./lib/ERC20.sol"; // File: contracts/Cane.sol contract Cane is ERC20 { address minter; modifier onlyMinter { require(msg.sender == minter, 'Only minter can call this function.'); _; } constructor(address _minter) public ERC20('Hurricane', 'CANE') { minter = _minter; } function mint(address account, uint256 amount) external onlyMinter { _mint(account, amount); } function burn(address account, uint256 amount) external onlyMinter { _burn(account, amount); } }
pragma solidity ^0.6.12; import "./lib/ERC20.sol"; // File: contracts/Hugo.sol contract Hugo is ERC20 { address minter; modifier onlyMinter { require(msg.sender == minter, 'Only minter can call this function.'); _; } constructor(address _minter) public ERC20('Hurricane.Hugo', 'HUGO') { minter = _minter; } function mint(address account, uint256 amount) external onlyMinter { _mint(account, amount); } function burn(address account, uint256 amount) external onlyMinter { _burn(account, amount); } }
pragma solidity ^0.6.12; /** * @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); }
pragma solidity ^0.6.12; // File: contracts/uniswapv2/interfaces/IUniswapV2Factory.sol interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } // File: contracts/uniswapv2/interfaces/IUniswapV2Pair.sol interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } // File: contracts/uniswapv2/interfaces/IUniswapV2Router01.sol interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } // File: contracts/uniswapv2/interfaces/IUniswapV2Router02.sol interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; }
pragma solidity ^0.6.12; // File: contracts/uniswapv2/interfaces/IWETH.sol interface IWETH { function deposit() external payable; function transfer(address to, uint value) external returns (bool); function withdraw(uint) external; }
pragma solidity ^0.6.12; // File: @openzeppelin/contracts/utils/Address.sol /** * @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 in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly 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"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (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"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); 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 // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
pragma solidity ^0.6.12; // File: @openzeppelin/contracts/GSN/Context.sol /* * @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 GSN 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 payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
pragma solidity ^0.6.12; import "./Address.sol"; import "./Context.sol"; import "./SafeMath.sol"; import "../interfaces/IERC20.sol"; // File: @openzeppelin/contracts/token/ERC20/ERC20.sol /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name, string memory symbol) public { _name = name; _symbol = symbol; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
pragma solidity ^0.6.12; import "./SafeMath.sol"; import "./Math.sol"; // helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false library FeeHelpers { using SafeMath for uint256; function getClaimBurnFee(uint256 lastStakedTimestamp, uint256 claimBurnFee) public view returns (uint256) { uint256 base = 1; if (block.timestamp < lastStakedTimestamp + 1 days) { return base.mul(100).div(25); } else if (block.timestamp < lastStakedTimestamp + 2 days) { return base.mul(100).div(20); } else if (block.timestamp < lastStakedTimestamp + 3 days) { return base.mul(100).div(10); } else if (block.timestamp < lastStakedTimestamp + 4 days) { return base.mul(100).div(5); } else { return base.mul(100).div(claimBurnFee); } } function getClaimTreasuryFee(uint256 lastStakedTimestamp, uint256 claimTreasuryFeePercent) public view returns (uint256) { uint256 base = 1; if (block.timestamp < lastStakedTimestamp + 1 days) { return base.mul(100).div(9); } else if (block.timestamp < lastStakedTimestamp + 2 days) { return base.mul(100).div(8); } else if (block.timestamp < lastStakedTimestamp + 3 days || block.timestamp < lastStakedTimestamp + 4 days) { return base.mul(100).div(5); } else if (block.timestamp > lastStakedTimestamp + 4 days && block.timestamp < lastStakedTimestamp + 29 days) { return base.mul(100).div(4); } else { return base.mul(100).div(claimTreasuryFeePercent); } } function getClaimLPFee(uint256 lastStakedTimestamp, uint256 claimLPFeePercent) public view returns (uint256) { uint256 base = 1; if (block.timestamp < lastStakedTimestamp + 1 days) { return base.mul(100).div(15); } else if (block.timestamp < lastStakedTimestamp + 2 days) { return base.mul(100).div(12); } else if (block.timestamp < lastStakedTimestamp + 3 days || block.timestamp < lastStakedTimestamp + 4 days) { return base.mul(100).div(10); } else if (block.timestamp > lastStakedTimestamp + 4 days && block.timestamp < lastStakedTimestamp + 29 days) { return base.mul(100).div(5); } else { return base.mul(100).div(claimLPFeePercent); } } function getClaimLiquidBalancePcnt(uint256 lastStakedTimestamp, uint256 claimLiquidBalancePercent) public view returns (uint256) { uint256 base = 1; if (block.timestamp < lastStakedTimestamp + 1 days) { return base.mul(100).div(1); } else if (block.timestamp < lastStakedTimestamp + 2 days) { return base.mul(100).div(10); } else if (block.timestamp < lastStakedTimestamp + 3 days) { return base.mul(100).div(15); } else if (block.timestamp > lastStakedTimestamp + 3 days && block.timestamp < lastStakedTimestamp + 29 days) { return base.mul(100).div(20); } else { return base.mul(100).div(claimLiquidBalancePercent); } } function getUnstakeBurnFee(uint256 lastStakedTimestamp, uint256 unstakeBurnFeePercent) public view returns (uint256) { uint256 base = 1; if (block.timestamp < lastStakedTimestamp + 1 days || block.timestamp < lastStakedTimestamp + 2 days) { return base.mul(100).div(25); } else if (block.timestamp < lastStakedTimestamp + 3 days) { return base.mul(100).div(20); } else if (block.timestamp < lastStakedTimestamp + 4 days) { return base.mul(100).div(15); } else if (block.timestamp > lastStakedTimestamp + 4 days && block.timestamp < lastStakedTimestamp + 29 days) { return base.mul(100).div(5); } else { return base.mul(100).div(unstakeBurnFeePercent); } } function getUnstakeTreasuryFee(uint256 lastStakedTimestamp, uint256 unstakeTreasuryFeePercent) public view returns (uint256) { uint256 base = 1; if (block.timestamp < lastStakedTimestamp + 1 days || block.timestamp < lastStakedTimestamp + 2 days) { return base.mul(100).div(25); } else if (block.timestamp < lastStakedTimestamp + 3 days) { return base.mul(100).div(20); } else if (block.timestamp < lastStakedTimestamp + 4 days) { return base.mul(100).div(15); } else if (block.timestamp > lastStakedTimestamp + 4 days && block.timestamp < lastStakedTimestamp + 29 days) { return base.mul(100).div(5); } else { return base.mul(100).div(unstakeTreasuryFeePercent); } } function getUnstakeLPFee(uint256 lastStakedTimestamp, uint256 unstakeLPFeePercent) public view returns (uint256) { uint256 base = 1; if (block.timestamp < lastStakedTimestamp + 1 days || block.timestamp < lastStakedTimestamp + 2 days) { return base.mul(100).div(25); } else if (block.timestamp < lastStakedTimestamp + 3 days) { return base.mul(100).div(20); } else if (block.timestamp < lastStakedTimestamp + 4 days) { return base.mul(100).div(15); } else if (block.timestamp > lastStakedTimestamp + 4 days && block.timestamp < lastStakedTimestamp + 29 days) { return base.mul(100).div(10); } else { return base.mul(100).div(unstakeLPFeePercent); } } function getKatrinaExitFee(uint256 farmingStartTimestamp, uint256 katrinaExitFeePercent) public view returns (uint256) { uint256 base = 1; if (block.timestamp < farmingStartTimestamp + 29 days) { return 25; } else { return base.mul(100).div(katrinaExitFeePercent); } } }
pragma solidity ^0.6.12; // File: @openzeppelin/contracts/math/Math.sol /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } }
pragma solidity ^0.6.12; /** * @title Owned * @dev Basic contract for authorization control. * @author dicether */ contract Ownable { address public owner; address public pendingOwner; event LogOwnerShipTransferred(address indexed previousOwner, address indexed newOwner); event LogOwnerShipTransferInitiated(address indexed previousOwner, address indexed newOwner); /** * @dev Modifier, which throws if called by other account than owner. */ modifier onlyOwner { require(msg.sender == owner); _; } /** * @dev Modifier throws if called by any account other than the pendingOwner. */ modifier onlyPendingOwner() { require(msg.sender == pendingOwner); _; } /** * @dev Set contract creator as initial owner */ constructor() public { owner = msg.sender; pendingOwner = address(0); } /** * @dev Allows the current owner to set the pendingOwner address. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { pendingOwner = _newOwner; emit LogOwnerShipTransferInitiated(owner, _newOwner); } /** * @dev PendingOwner can accept ownership. */ function claimOwnership() public onlyPendingOwner { owner = pendingOwner; pendingOwner = address(0); emit LogOwnerShipTransferred(owner, pendingOwner); } }
pragma solidity ^0.6.12; // File: @openzeppelin/contracts/utils/ReentrancyGuard.sol /** * @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]. */ 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 () internal { _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 make 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; } }
pragma solidity ^0.6.12; import "./Address.sol"; import "./SafeMath.sol"; import "../interfaces/IERC20.sol"; // File: @openzeppelin/contracts/token/ERC20/SafeERC20.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 SafeMath for uint256; 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' // solhint-disable-next-line max-line-length 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).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _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 // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
pragma solidity ^0.6.12; // File: @openzeppelin/contracts/math/SafeMath.sol /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "libraries": { "": { "FeeHelpers": "0x247730B7f828BF883a0582aB47A980d6C822b6Ee" } }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address payable","name":"_treasury","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ClaimedAndStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpEthReward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpCaneReward","type":"uint256"}],"name":"ClaimedLPReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Halving","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"LogOwnerShipTransferInitiated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"LogOwnerShipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Received","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountLP","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountLP","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"HALVING_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITELIST_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITELIST_STAKE_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"accountInfos","outputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"maxBalance","type":"uint256"},{"internalType":"uint256","name":"lastWithdrawTimestamp","type":"uint256"},{"internalType":"uint256","name":"lastStakedTimestamp","type":"uint256"},{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"uint256","name":"rewardPerTokenPaid","type":"uint256"},{"internalType":"uint256","name":"lpEthReward","type":"uint256"},{"internalType":"uint256","name":"lpEthRewardPaid","type":"uint256"},{"internalType":"uint256","name":"lpCaneReward","type":"uint256"},{"internalType":"uint256","name":"lpCaneRewardPaid","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"accountInfosByIndex","outputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"lastWithdrawTimestamp","type":"uint256"},{"internalType":"uint256","name":"lastStakedTimestamp","type":"uint256"},{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"uint256","name":"rewardPerTokenPaid","type":"uint256"},{"internalType":"uint256","name":"lpEthReward","type":"uint256"},{"internalType":"uint256","name":"lpEthRewardPaid","type":"uint256"},{"internalType":"uint256","name":"lpCaneReward","type":"uint256"},{"internalType":"uint256","name":"lpCaneRewardPaid","type":"uint256"},{"internalType":"address","name":"userAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"accountInfosIndex","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"accountInfosLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardAllocation","type":"uint256"},{"internalType":"contract IERC20","name":"_pairAddress","type":"address"},{"internalType":"contract IERC20","name":"_otherToken","type":"address"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"balanceOfPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnedTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cane","outputs":[{"internalType":"contract Cane","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimBurnFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"claimLP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimLPFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimLiquidBalancePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimTreasuryFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"contract IUniswapV2Factory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"farmingStartTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"farmingStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"halvingTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hugo","outputs":[{"internalType":"contract Hugo","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"katrinaExitFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastRewardTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"pairAddress","type":"address"},{"internalType":"contract IERC20","name":"otherToken","type":"address"},{"internalType":"uint256","name":"rewardAllocation","type":"uint256"},{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"uint256","name":"borrowedSupply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"rewardEarned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardHalvingPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"},{"internalType":"uint256","name":"_rewardAllocation","type":"uint256"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_farmingStartTimestamp","type":"uint256"}],"name":"setFarmingStartTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_parameters","type":"uint256[]"}],"name":"setGoverningParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_claimAndStakeRewards","type":"bool"}],"name":"stakeToHugo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"tokenPrice","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":"treasury","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unstakeBurnFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unstakeLPFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unstakeTreasuryFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistEndTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawalLimitPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405269010f0cf064dd59200000600c556000600d819055600e819055600f8190556010819055603260115560016012819055600260138190556014818155605f60155560168290556017919091556018919091556019556004601a55635fce7958601b55601c805460ff19169055601f553480156200008057600080fd5b5060405162007d6538038062007d6583398181016040526020811015620000a657600080fd5b50516001600081905580546001600160a01b031990811633179091556002805490911690556040513090620000db90620006f1565b6001600160a01b03909116815260405190819003602001906000f08015801562000109573d6000803e3d6000fd5b50600380546001600160a01b0319166001600160a01b039290921691909117905560405130906200013a90620006ff565b6001600160a01b03909116815260405190819003602001906000f08015801562000168573d6000803e3d6000fd5b50600480546001600160a01b039283166001600160a01b031991821617825560068054909116737a250d5630b4cf539739df2c5dacb4c659f2488d17908190556040805163c45a015560e01b81529051919093169263c45a01559281810192602092909190829003018186803b158015620001e257600080fd5b505afa158015620001f7573d6000803e3d6000fd5b505050506040513d60208110156200020e57600080fd5b5051600580546001600160a01b0319166001600160a01b03928316179055600654604080516315ab88c960e31b81529051919092169163ad5c4648916004808301926020929190829003018186803b1580156200026a57600080fd5b505afa1580156200027f573d6000803e3d6000fd5b505050506040513d60208110156200029657600080fd5b5051600780546001600160a01b03199081166001600160a01b039384161790915560088054909116918316919091179055601b54620002e4906102586200053e602090811b62004f8917901c565b601f819055506200030962127500600c54620005a260201b62004fe31790919060201c565b600f556040805160a0810182526003546001600160a01b0316808252602080830191909152600c546009938301916200036b91606491620003579190601e9062005025620005ec821b17901c565b620005a260201b62004fe31790919060201c565b81526000602080830182905260409283018290528454600180820187559583528183208551600592830290910180546001600160a01b03199081166001600160a01b03938416178255878501519882018054909116988316989098179097558585015160028801556060860151600380890191909155608090960151600490970196909655835160a08101808652915495546007546364e329cb60e11b909352871660a482015290861660c4820152925160099593948594169263c9c653969260e480870193919282880390910190829087803b1580156200044c57600080fd5b505af115801562000461573d6000803e3d6000fd5b505050506040513d60208110156200047857600080fd5b50516001600160a01b03908116825260075416602082810191909152600c54604090920191620004bc91606491620003579160469062005025620005ec821b17901c565b815260006020808301829052604092830182905284546001818101875595835291819020845160059093020180546001600160a01b039384166001600160a01b0319918216178255918501519581018054969093169590911694909417905581015160028301556060810151600383015560800151600490910155506200070d565b60008282018381101562000599576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b60006200059983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506200064a60201b60201c565b600082620005fd575060006200059c565b828202828482816200060b57fe5b0414620005995760405162461bcd60e51b815260040180806020018281038252602181526020018062007d446021913960400191505060405180910390fd5b60008183620006da5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156200069e57818101518382015260200162000684565b50505050905090810190601f168015620006cc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581620006e757fe5b0495945050505050565b610f298062005eed83390190565b610f2e8062006e1683390190565b6157d0806200071d6000396000f3fe6080604052600436106103545760003560e01c806367739387116101c6578063c45a0155116100f7578063ef08bf4811610095578063f8077fae1161006f578063f8077fae14610b9e578063f887ea4014610bb3578063fc926a0914610bc8578063fd7e584814610c5757610391565b8063ef08bf4814610ad9578063f2fde38b14610aee578063f421764814610b2157610391565b8063d4ddce8a116100d1578063d4ddce8a14610a70578063df136d6514610a9a578063e0493f8c14610aaf578063e30c397814610ac457610391565b8063c45a0155146109f8578063cdfa2c3614610a0d578063d43cdb6214610a4657610391565b80638da5cb5b116101645780639d06c5631161013e5780639d06c56314610978578063ab12f4641461098d578063ab7de098146109a2578063b415a2d6146109e357610391565b80638da5cb5b1461093957806395a2a0431461094e5780639ca6fbb41461096357610391565b80637b0472f0116101a05780637b0472f0146108a55780637b0a47ee146108c8578063868a8988146108dd578063874c120b1461090f57610391565b8063677393871461084b578063721a033f14610860578063777d5c7b1461087557610391565b80632e1a7d4d116102a05780633fc8cef31161023e578063571b1f8a11610218578063571b1f8a1461076857806361d027b31461077d57806361edc2a9146107925780636631fa46146107bc57610391565b80633fc8cef31461068e5780634011962e146106a35780634e71e0c81461075357610391565b8063368e18611161027a578063368e1861146105d6578063379607f5146106095780633bba00c4146106335780633e6ec0c61461065d57610391565b80632e1a7d4d146105825780632f60f525146105ac578063346cfb27146105c157610391565b80631526fe271161030d5780631e7be210116102e75780631e7be210146104fc5780631f353cec1461054357806325798e61146105585780632cbe0a271461056d57610391565b80631526fe27146104545780631ab06ee5146104b55780631b67d229146104e757610391565b806302683fa914610396578063081e3eda146103bd5780630a2e5c75146103d25780630c2cd50c146103e75780630d749cec146103fc57806314bcec9f1461043f57610391565b366103915760408051348152905133917f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874919081900360200190a2005b600080fd5b3480156103a257600080fd5b506103ab610c6c565b60408051918252519081900360200190f35b3480156103c957600080fd5b506103ab610c72565b3480156103de57600080fd5b506103ab610c78565b3480156103f357600080fd5b506103ab610c7e565b34801561040857600080fd5b506104266004803603602081101561041f57600080fd5b5035610c84565b6040805192835260208301919091528051918290030190f35b34801561044b57600080fd5b506103ab610df7565b34801561046057600080fd5b5061047e6004803603602081101561047757600080fd5b5035610dfd565b604080516001600160a01b039687168152949095166020850152838501929092526060830152608082015290519081900360a00190f35b3480156104c157600080fd5b506104e5600480360360408110156104d857600080fd5b5080359060200135610e47565b005b3480156104f357600080fd5b506103ab610fd6565b34801561050857600080fd5b5061052f6004803603602081101561051f57600080fd5b50356001600160a01b0316610fdc565b604080519115158252519081900360200190f35b34801561054f57600080fd5b506103ab610ff1565b34801561056457600080fd5b506103ab610ff7565b34801561057957600080fd5b506103ab610ffe565b34801561058e57600080fd5b506104e5600480360360208110156105a557600080fd5b5035611004565b3480156105b857600080fd5b506103ab611eb0565b3480156105cd57600080fd5b506103ab611eb6565b3480156105e257600080fd5b506103ab600480360360208110156105f957600080fd5b50356001600160a01b0316611ebc565b34801561061557600080fd5b506104e56004803603602081101561062c57600080fd5b5035611ece565b34801561063f57600080fd5b506104e56004803603602081101561065657600080fd5b5035612e6f565b34801561066957600080fd5b50610672612f05565b604080516001600160a01b039092168252519081900360200190f35b34801561069a57600080fd5b50610672612f14565b3480156106af57600080fd5b506104e5600480360360208110156106c657600080fd5b8101906020810181356401000000008111156106e157600080fd5b8201836020820111156106f357600080fd5b8035906020019184602083028401116401000000008311171561071557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612f23945050505050565b34801561075f57600080fd5b506104e56135cd565b34801561077457600080fd5b506103ab61363e565b34801561078957600080fd5b50610672613644565b34801561079e57600080fd5b506104e5600480360360208110156107b557600080fd5b5035613653565b3480156107c857600080fd5b506107ec600480360360408110156107df57600080fd5b508035906020013561380a565b604080519b8c5260208c019a909a528a8a019890985260608a0196909652608089019490945260a088019290925260c087015260e08601526101008501526101208401526001600160a01b031661014083015251908190036101600190f35b34801561085757600080fd5b506103ab6139a8565b34801561086c57600080fd5b506103ab6139ae565b34801561088157600080fd5b506106726004803603604081101561089857600080fd5b50803590602001356139b4565b6104e5600480360360408110156108bb57600080fd5b50803590602001356139e9565b3480156108d457600080fd5b506103ab61421a565b3480156108e957600080fd5b506104e56004803603604081101561090057600080fd5b50803590602001351515614220565b34801561091b57600080fd5b506103ab6004803603602081101561093257600080fd5b50356147f4565b34801561094557600080fd5b506106726148d7565b34801561095a57600080fd5b506103ab6148e6565b34801561096f57600080fd5b5061052f614964565b34801561098457600080fd5b506103ab61496d565b34801561099957600080fd5b50610672614973565b3480156109ae57600080fd5b506104e5600480360360608110156109c557600080fd5b508035906001600160a01b0360208201358116916040013516614982565b3480156109ef57600080fd5b506103ab614b5e565b348015610a0457600080fd5b50610672614b6b565b348015610a1957600080fd5b506103ab60048036036040811015610a3057600080fd5b50803590602001356001600160a01b0316614b7a565b348015610a5257600080fd5b506103ab60048036036020811015610a6957600080fd5b5035614c00565b348015610a7c57600080fd5b506103ab60048036036020811015610a9357600080fd5b5035614c5b565b348015610aa657600080fd5b506103ab614db3565b348015610abb57600080fd5b506103ab614db9565b348015610ad057600080fd5b50610672614dbf565b348015610ae557600080fd5b506103ab614dce565b348015610afa57600080fd5b506104e560048036036020811015610b1157600080fd5b50356001600160a01b0316614dd4565b348015610b2d57600080fd5b506104e560048036036020811015610b4457600080fd5b810190602081018135640100000000811115610b5f57600080fd5b820183602082011115610b7157600080fd5b80359060200191846020830284011164010000000083111715610b9357600080fd5b509092509050614e3d565b348015610baa57600080fd5b506103ab614efa565b348015610bbf57600080fd5b50610672614f0d565b348015610bd457600080fd5b50610c0160048036036040811015610beb57600080fd5b50803590602001356001600160a01b0316614f1c565b604080519b8c5260208c019a909a528a8a019890985260608a0196909652608089019490945260a088019290925260c087015260e086015261010085015261012084015261014083015251908190036101600190f35b348015610c6357600080fd5b506103ab614f83565b60135481565b60095490565b60185481565b601f5481565b60095460009081908310610cce576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b600060098481548110610cdd57fe5b6000918252602080832060059290920290910160018101548154604080516370a0823160e01b81526001600160a01b03928316600482015290519396509116926370a0823192602480840193829003018186803b158015610d3d57600080fd5b505afa158015610d51573d6000803e3d6000fd5b505050506040513d6020811015610d6757600080fd5b50516003548354604080516370a0823160e01b81526001600160a01b039283166004820152905193945060009391909216916370a08231916024808301926020929190829003018186803b158015610dbe57600080fd5b505afa158015610dd2573d6000803e3d6000fd5b505050506040513d6020811015610de857600080fd5b50519194509092505050915091565b600e5481565b60098181548110610e0a57fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b03938416955091909216929085565b6001546001600160a01b03163314610e5e57600080fd5b6064811115610ea9576040805162461bcd60e51b815260206004820152601260248201527124b73b30b634b21030b63637b1b0ba34b7b760711b604482015290519081900360640190fd5b6000610f07610ece6064610ec885600c5461502590919063ffffffff16565b90614fe3565b610f0160098681548110610ede57fe5b906000526020600020906005020160020154600c5461507e90919063ffffffff16565b90614f89565b9050600c54811115610f56576040805162461bcd60e51b8152602060048201526013602482015272105b1b1bd8d85d1a5bdb88195e18d959591959606a1b604482015290519081900360640190fd5b610f706064610ec884600c5461502590919063ffffffff16565b60098481548110610f7d57fe5b90600052602060002090600502016002015414610fd157610fae6064610ec884600c5461502590919063ffffffff16565b60098481548110610fbb57fe5b9060005260206000209060050201600201819055505b505050565b60115481565b601d6020526000908152604090205460ff1681565b60195481565b6212750081565b601a5481565b6002600054141561104a576040805162461bcd60e51b815260206004820152601f60248201526000805160206156fa833981519152604482015290519081900360640190fd5b60026000556110576150c0565b6110608161512f565b61106981615184565b60095481106110ae576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b6000600982815481106110bd57fe5b60009182526020808320858452600a8252604080852033865290925292206003810154600590920290920192504261a8c0909101111561113c576040805162461bcd60e51b8152602060048201526015602482015274496e76616c69642077697468647261772074696d6560581b604482015290519081900360640190fd5b6000816001015411611187576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c69642062616c616e636560881b604482015290519081900360640190fd5b60006111a76064610ec8601954856002015461502590919063ffffffff16565b905080826001015410156111bc575060018101545b60038301546111cb908261507e565b600384015560018201546111df908261507e565b600183015542600383015560408051600280825260608083018452926020830190803683370190505090506000856113b657828260018151811061121f57fe5b60209081029190910101526004805460408051632770a7eb60e21b8152339381019390935260248301869052516001600160a01b0390911691639dc29fac91604480830192600092919082900301818387803b15801561127e57600080fd5b505af1158015611292573d6000803e3d6000fd5b50505050600061132b73247730b7f828bf883a0582ab47a980d6c822b6ee637c18f69687600401546018546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156112f857600080fd5b505af415801561130c573d6000803e3d6000fd5b505050506040513d602081101561132257600080fd5b50518590614fe3565b60035460408051632770a7eb60e21b815261dead60048201526024810184905290519293506001600160a01b0390911691639dc29fac9160448082019260009290919082900301818387803b15801561138357600080fd5b505af1158015611397573d6000803e3d6000fd5b505050506113ae818561507e90919063ffffffff16565b9150506116db565b84546006546040805163095ea7b360e01b81526001600160a01b039283166004820152602481018790529051919092169163095ea7b39160448083019260209291908290030181600087803b15801561140e57600080fd5b505af1158015611422573d6000803e3d6000fd5b505050506040513d602081101561143857600080fd5b5050600186141561152c5760065460035460408051629d473b60e21b81526001600160a01b039283166004820152602481018790526000604482018190526064820181905230608483015262015180420160a483015282519094859416926302751cec9260c4808201939182900301818787803b1580156114b857600080fd5b505af11580156114cc573d6000803e3d6000fd5b505050506040513d60408110156114e257600080fd5b50805160209091015185519193509150829085906000906114ff57fe5b602002602001018181525050808460018151811061151957fe5b6020026020010181815250505050611620565b600654600354600187015460408051635d5155ef60e11b81526001600160a01b039384166004820152918316602483015260448201879052600060648301819052608483018190523060a484015262015180420160c4840152815190948594169263baa2abde9260e480830193919282900301818787803b1580156115b057600080fd5b505af11580156115c4573d6000803e3d6000fd5b505050506040513d60408110156115da57600080fd5b50805160209091015185519193509150829085906000906115f757fe5b602002602001018181525050808460018151811061161157fe5b60200260200101818152505050505b60035482516001600160a01b0390911690639dc29fac903090859060009061164457fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561169257600080fd5b505af11580156116a6573d6000803e3d6000fd5b505050506116d5826000815181106116ba57fe5b6020026020010151866004015461507e90919063ffffffff16565b60048601555b600060018714156117dc5773247730b7f828bf883a0582ab47a980d6c822b6ee63cdc345ca601b54601a546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561174157600080fd5b505af4158015611755573d6000803e3d6000fd5b505050506040513d602081101561176b57600080fd5b5051835190915061179b9082908590600190811061178557fe5b6020026020010151614fe390919063ffffffff16565b6008546040519192506001600160a01b03169082156108fc029083906000818181858888f193505050501580156117d6573d6000803e3d6000fd5b50611907565b73247730b7f828bf883a0582ab47a980d6c822b6ee631915579886600401546017546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561183957600080fd5b505af415801561184d573d6000803e3d6000fd5b505050506040513d602081101561186357600080fd5b5051835190915061187d9082908590600190811061178557fe5b60018701546008546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101859052905193945091169163a9059cbb916044808201926020929091908290030181600087803b1580156118da57600080fd5b505af11580156118ee573d6000803e3d6000fd5b505050506040513d602081101561190457600080fd5b50505b8661191d57611916828261507e565b9150611947565b611944818460018151811061192e57fe5b602002602001015161507e90919063ffffffff16565b91505b6000878152600b602052604090205415801590611968575060008660030154115b15611bdf5760006001881415611a065773247730b7f828bf883a0582ab47a980d6c822b6ee63cdc345ca601b54601a546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156119d357600080fd5b505af41580156119e7573d6000803e3d6000fd5b505050506040513d60208110156119fd57600080fd5b50519050611a92565b73247730b7f828bf883a0582ab47a980d6c822b6ee6397c0f28887600401546016546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015611a6357600080fd5b505af4158015611a77573d6000803e3d6000fd5b505050506040513d6020811015611a8d57600080fd5b505190505b611aa3818560018151811061178557fe5b905060005b6000898152600b6020526040902054811015611bd0576000898152600a60209081526040808320600b9092528220805483919085908110611ae557fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020600181015490915015801590611b4f575060008a8152600b60205260409020805433919084908110611b3757fe5b6000918252602090912001546001600160a01b031614155b15611bc75760018a1415611b9457611b8a611b7f8a60030154610ec886856001015461502590919063ffffffff16565b600783015490614f89565b6007820155611bc7565b611bc1611bb68a60030154610ec886856001015461502590919063ffffffff16565b600983015490614f89565b60098201555b50600101611aa8565b50611bdb838261507e565b9250505b8183600181518110611bed57fe5b6020026020010181815250506001871415611c5557336001600160a01b03166108fc84600181518110611c1c57fe5b60200260200101519081150290604051600060405180830381858888f19350505050158015611c4f573d6000803e3d6000fd5b50611cf6565b60018087015484516001600160a01b039091169163a9059cbb91339187918110611c7b57fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611cc957600080fd5b505af1158015611cdd573d6000803e3d6000fd5b505050506040513d6020811015611cf357600080fd5b50505b6001850154158015611d085750845415155b8015611d2357506000878152600b6020526040902054855411155b15611e3d5784546000888152600a60209081526040808320600b9092528220805460001980860195949291908101908110611d5a57fe5b60009182526020808320909101546001600160a01b031683528281019390935260409182018120939093558a8352600b909152902080546000198101908110611d9f57fe5b60009182526020808320909101548a8352600b909152604090912080546001600160a01b039092169183908110611dd257fe5b600091825260208083209190910180546001600160a01b0319166001600160a01b039490941693909317909255898152600b90915260409020805480611e1457fe5b600082815260208120820160001990810180546001600160a01b03191690559091019091558655505b336001600160a01b03167f75e161b3e824b114fc1a33274bd7091918dd4e639cede50b78b15a4eea956a21888686600181518110611e7757fe5b602002602001015160405180848152602001838152602001828152602001935050505060405180910390a2505060016000555050505050565b600d5481565b60165481565b601e6020526000908152604090205481565b60026000541415611f14576040805162461bcd60e51b815260206004820152601f60248201526000805160206156fa833981519152604482015290519081900360640190fd5b6002600055611f216150c0565b611f2a8161512f565b611f3381615184565b600060098281548110611f4257fe5b60009182526020808320858452600a8252604080852033865290925292206005818101549202909201925080611fac576040805162461bcd60e51b815260206004820152600a6024820152694e6f207265776172647360b01b604482015290519081900360640190fd5b8015612e3f57600060058301556003546004808401546012546040805163d572676d60e01b8152938401929092526024830152516001600160a01b03909216916340c10f199161dead916120369173247730b7f828bf883a0582ab47a980d6c822b6ee9163d572676d91604480820192602092909190829003018186803b1580156112f857600080fd5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561207c57600080fd5b505af1158015612090573d6000803e3d6000fd5b50505050600360009054906101000a90046001600160a01b03166001600160a01b03166340c10f193361211973247730b7f828bf883a0582ab47a980d6c822b6ee6310d8c9aa87600401546015546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156112f857600080fd5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561215f57600080fd5b505af1158015612173573d6000803e3d6000fd5b50506003546008546004808701546013546040805163f1dc0cc360e01b8152938401929092526024830152516001600160a01b0393841695506340c10f19945091909216916121f79173247730b7f828bf883a0582ab47a980d6c822b6ee9163f1dc0cc3916044808301926020929190829003018186803b1580156112f857600080fd5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561223d57600080fd5b505af1158015612251573d6000803e3d6000fd5b5050506000858152600b60205260409020541580159150612276575060008360030154115b156123e75760005b6000858152600b60205260409020548110156123e5576000858152600a60209081526040808320600b90925282208054839190859081106122bb57fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902060018101549091501580159061232557506000868152600b6020526040902080543391908490811061230d57fe5b6000918252602090912001546001600160a01b031614155b156123dc576123d6611bb68660030154610ec86123cb73247730b7f828bf883a0582ab47a980d6c822b6ee63f6286ae18a600401546014546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561239857600080fd5b505af41580156123ac573d6000803e3d6000fd5b505050506040513d60208110156123c257600080fd5b50518890614fe3565b600186015490615025565b60098201555b5060010161227e565b505b604080516002808252606080830184529260208301908036833701905050905061263961249d73247730b7f828bf883a0582ab47a980d6c822b6ee63f6286ae186600401546014546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561246a57600080fd5b505af415801561247e573d6000803e3d6000fd5b505050506040513d602081101561249457600080fd5b50518490614fe3565b61263361253373247730b7f828bf883a0582ab47a980d6c822b6ee63f1dc0cc388600401546013546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561250057600080fd5b505af4158015612514573d6000803e3d6000fd5b505050506040513d602081101561252a57600080fd5b50518690614fe3565b61263361259673247730b7f828bf883a0582ab47a980d6c822b6ee6310d8c9aa8a600401546015546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561239857600080fd5b61263361262c73247730b7f828bf883a0582ab47a980d6c822b6ee63d572676d8c600401546012546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156125f957600080fd5b505af415801561260d573d6000803e3d6000fd5b505050506040513d602081101561262357600080fd5b50518a90614fe3565b899061507e565b9061507e565b8160008151811061264657fe5b60200260200101818152505061266460028260008151811061178557fe5b8160018151811061267157fe5b602090810291909101015260035481516001600160a01b03909116906340c10f1990309084906000906126a057fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156126ee57600080fd5b505af1158015612702573d6000803e3d6000fd5b505060408051600280825260608083018452945090925090602083019080368337505060035482519293506001600160a01b03169183915060009061274357fe5b6001600160a01b03928316602091820292909201015260075482519116908290600190811061276e57fe5b6001600160a01b03928316602091820292909201015260065460035461279a9290811691166000615212565b60065482516127d8916001600160a01b031690849060019081106127ba57fe5b60209081029190910101516003546001600160a01b03169190615212565b60065482516060916001600160a01b0316906318cbafe590859060019081106127fd57fe5b6020026020010151600085304262015180016040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561287f578181015183820152602001612867565b505050509050019650505050505050600060405180830381600087803b1580156128a857600080fd5b505af11580156128bc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156128e557600080fd5b810190808051604051939291908464010000000082111561290557600080fd5b90830190602082018581111561291a57600080fd5b825186602082028301116401000000008211171561293757600080fd5b82525081516020918201928201910280838360005b8381101561296457818101518382015260200161294c565b5050505090500160405250505090506060600367ffffffffffffffff8111801561298d57600080fd5b506040519080825280602002602001820160405280156129b7578160200160208202803683370190505b506006546003549192506129d9916001600160a01b0390811691166000615212565b60065484516129f9916001600160a01b031690869060019081106127ba57fe5b60065482516001600160a01b039091169063f305d7199084906000198101908110612a2057fe5b6020026020010151600360009054906101000a90046001600160a01b031687600181518110612a4b57fe5b6020026020010151600080304261012c016040518863ffffffff1660e01b815260040180876001600160a01b03168152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200196505050505050506060604051808303818588803b158015612ac657600080fd5b505af1158015612ada573d6000803e3d6000fd5b50505050506040513d6060811015612af157600080fd5b508051602082015160409092015183519192918490600090612b0f57fe5b6020026020010184600181518110612b2357fe5b6020026020010185600281518110612b3757fe5b602002602001018381525083815250838152505050506000612b7482600081518110612b5f57fe5b60200260200101518660018151811061192e57fe5b1115612c165760035481516001600160a01b03909116906340c10f19903390612bb7908590600090612ba257fe5b60200260200101518860018151811061192e57fe5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015612bfd57600080fd5b505af1158015612c11573d6000803e3d6000fd5b505050505b6000612c4082600181518110612c2857fe5b60200260200101518460018651038151811061192e57fe5b1115612ca557336001600160a01b03166108fc612c7b83600181518110612c6357fe5b60200260200101518560018751038151811061192e57fe5b6040518115909202916000818181858888f19350505050158015612ca3573d6000803e3d6000fd5b505b60006009600181548110612cb557fe5b600091825260208083203384527fbbc70db1b6c7afd11e79c0fb0051300458f1a3acb8ee9789d9b6b26c61ad9bc79091526040909220845160059092029092019250612d239084906002908110612d0857fe5b60200260200101518360030154614f8990919063ffffffff16565b8260030181905550612d5683600081518110612d3b57fe5b60200260200101518360040154614f8990919063ffffffff16565b8260040181905550612d8983600281518110612d6e57fe5b60200260200101518260010154614f8990919063ffffffff16565b60018201558054612dfe57600b6020527f72c6bfb7988af3a1efa6568f02a999bc52252641c659d85961ca3d372b57d5cf8054600181810183557ffc2858506235d5502cafdfae2dcc7804b97258f4d77357c39b0f2a32aa2e6a5090910180546001600160a01b031916331790556000525481555b604080518b815260208101899052815133927f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a928290030190a25050505050505b600082600701541180612e56575060008260090154115b15612e6457612e6484613653565b505060016000555050565b6001546001600160a01b03163314612e8657600080fd5b601c5460ff16158015612e9d5750635fce35608110155b8015612ead5750635fd270308111155b612eee576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b601b819055612eff81610258614f89565b601f5550565b6004546001600160a01b031681565b6007546001600160a01b031681565b6001546001600160a01b03163314612f3a57600080fd5b600581600081518110612f4957fe5b602002602001015110158015612f745750603281600081518110612f6957fe5b602002602001015111155b612fb5576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b600a81600181518110612fc457fe5b602002602001015110158015612fef5750603281600181518110612fe457fe5b602002602001015111155b613030576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b60018160028151811061303f57fe5b60200260200101511015801561306a575060058160028151811061305f57fe5b602002602001015111155b6130ab576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b6001816003815181106130ba57fe5b6020026020010151101580156130e557506005816003815181106130da57fe5b602002602001015111155b613126576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b60018160048151811061313557fe5b602002602001015110158015613160575060058160048151811061315557fe5b602002602001015111155b6131a1576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b6019816005815181106131b057fe5b6020026020010151101580156131db5750605f816005815181106131d057fe5b602002602001015111155b61321c576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b60018160068151811061322b57fe5b602002602001015110158015613256575060058160068151811061324b57fe5b602002602001015111155b613297576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b6001816007815181106132a657fe5b6020026020010151101580156132d157506005816007815181106132c657fe5b602002602001015111155b613312576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b60018160088151811061332157fe5b60200260200101511015801561334c575060058160088151811061334157fe5b602002602001015111155b61338d576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b60028160098151811061339c57fe5b6020026020010151101580156133c75750600a816009815181106133bc57fe5b602002602001015111155b613408576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b6134738160058151811061341857fe5b6020026020010151610f018360048151811061343057fe5b6020026020010151610f018560038151811061344857fe5b60200260200101518660028151811061345d57fe5b6020026020010151614f8990919063ffffffff16565b6064146134bc576040805162461bcd60e51b8152602060048201526012602482015271496e76616c696420636c61696d206665657360701b604482015290519081900360640190fd5b806000815181106134c957fe5b6020026020010151601181905550806001815181106134e457fe5b6020026020010151601981905550806002815181106134ff57fe5b60200260200101516012819055508060038151811061351a57fe5b60200260200101516013819055508060048151811061353557fe5b60200260200101516014819055508060058151811061355057fe5b60200260200101516015819055508060068151811061356b57fe5b60200260200101516018819055508060078151811061358657fe5b6020026020010151601781905550806008815181106135a157fe5b6020026020010151601681905550806009815181106135bc57fe5b6020026020010151601a8190555050565b6002546001600160a01b031633146135e457600080fd5b60028054600180546001600160a01b038084166001600160a01b031992831617928390559216909255604051600092909116907f897d3c8bbea11029ba3b26eb993fe8edb14c2c4c0d2ecceccce41d1d83d3e359908390a3565b61025881565b6008546001600160a01b031681565b6000818152600a6020908152604080832033845290915290206007810154151580613682575060008160090154115b6136c3576040805162461bcd60e51b815260206004820152600d60248201526c4e6f204c50207265776172647360981b604482015290519081900360640190fd5b60078101546009820154604080518581526020810193909352828101919091525133917f3eebddb24765187145dfd33b309fe37cda5b88eea08993213266bcf045d5765e919081900360600190a260078101541561376c576007810154600882015461372e91614f89565b60088201556007810154604051339180156108fc02916000818181858888f19350505050158015613763573d6000803e3d6000fd5b50600060078201555b600981015415613806576009810154600a82015461378991614f89565b600a8201556003546009820154604080516340c10f1960e01b81523360048201526024810192909252516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b1580156137e657600080fd5b505af11580156137fa573d6000803e3d6000fd5b50506000600984015550505b5050565b60008060008060008060008060008060006009805490508d10613863576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b60008d8152600b6020526040902080548d90811061387d57fe5b6000918252602090912001546001600160a01b0316905061389c615672565b600a60008f81526020019081526020016000206000836001600160a01b03166001600160a01b031681526020019081526020016000206040518061016001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a82015481525050905080600001518160200151826060015183608001518460a001518560c001518660e001518761010001518861012001518961014001519b509b509b509b509b509b509b509b509b509b50509295989b509295989b9093969950565b600c5481565b60155481565b600b60205281600052604060002081815481106139cd57fe5b6000918252602090912001546001600160a01b03169150829050565b60026000541415613a2f576040805162461bcd60e51b815260206004820152601f60248201526000805160206156fa833981519152604482015290519081900360640190fd5b6002600055613a3c6150c0565b613a458261512f565b613a4e82615184565b60006001831415613a60575034613a63565b50805b60008111613aa9576040805162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b604482015290519081900360640190fd5b613ab233615325565b15613af3576040805162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103ab9b2b960a11b604482015290519081900360640190fd5b6009548310613b38576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b60008311613b7d576040805162461bcd60e51b815260206004820152600d60248201526c5374616b6520696e204875676f60981b604482015290519081900360640190fd5b42601f5410613c7357336000908152601d602052604090205460ff16613bea576040805162461bcd60e51b815260206004820152601860248201527f5374696c6c206275696c64696e67206c69717569646974790000000000000000604482015290519081900360640190fd5b336000908152601e6020526040902054613c049034614f89565b336000908152601e6020526040902081905568056bc75e2d631000001015613c73576040805162461bcd60e51b815260206004820152601d60248201527f57686974656c697374207374616b65206c696d69742072656163686564000000604482015290519081900360640190fd5b600060098481548110613c8257fe5b60009182526020808320878452600a8252604080852033865283528085206003546005909502909201805482516370a0823160e01b81526001600160a01b0391821660048201529251919750929594909216926370a0823192602480840193829003018186803b158015613cf557600080fd5b505afa158015613d09573d6000803e3d6000fd5b505050506040513d6020811015613d1f57600080fd5b505160018401548454604080516370a0823160e01b81526001600160a01b039283166004820152905193945060009391909216916370a08231916024808301926020929190829003018186803b158015613d7857600080fd5b505afa158015613d8c573d6000803e3d6000fd5b505050506040513d6020811015613da257600080fd5b5051905060006001881415613dd6578115613dca57613dc582610ec88886615025565b613dcf565b85600a025b9050613e2f565b60008211613e1e576040805162461bcd60e51b815260206004820152601060248201526f141bdbdb081b9bdd081cdd185c9d195960821b604482015290519081900360640190fd5b613e2c82610ec88886615025565b90505b600354604080516340c10f1960e01b81523060048201526024810184905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b158015613e8257600080fd5b505af1158015613e96573d6000803e3d6000fd5b5050506004860154613ea9915082614f89565b6004808701919091556003546006546040805163095ea7b360e01b81526001600160a01b0392831694810194909452602484018590525191169163095ea7b39160448083019260209291908290030181600087803b158015613f0a57600080fd5b505af1158015613f1e573d6000803e3d6000fd5b505050506040513d6020811015613f3457600080fd5b50600090506001891415613ff3576006546003546040805163f305d71960e01b81526001600160a01b03928316600482015260248101869052600060448201819052606482015230608482015262015180420160a48201529051919092169163f305d719918a9160c48082019260609290919082900301818588803b158015613fbc57600080fd5b505af1158015613fd0573d6000803e3d6000fd5b50505050506040513d6060811015613fe757600080fd5b5060400151905061413b565b60018601546006546040805163095ea7b360e01b81526001600160a01b039283166004820152602481018b90529051919092169163095ea7b39160448083019260209291908290030181600087803b15801561404e57600080fd5b505af1158015614062573d6000803e3d6000fd5b505050506040513d602081101561407857600080fd5b505060065460018701546003546040805162e8e33760e81b81526001600160a01b0393841660048201529183166024830152604482018b90526064820186905260006084830181905260a483018190523060c484015262015180420160e48401529051929093169263e8e3370092610104808401936060939083900390910190829087803b15801561410957600080fd5b505af115801561411d573d6000803e3d6000fd5b505050506040513d606081101561413357600080fd5b506040015190505b600386015461414a9082614f89565b6003870155600185015461415e9082614f89565b600186018190556002860154101561417b57600185015460028601555b84546141ba576000898152600b602090815260408220805460018101825581845291832090910180546001600160a01b03191633179055908a90525485555b42600486015560038501546141d0574260038601555b6040805188815260208101839052815133927f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90928290030190a25050600160005550505050505050565b600f5481565b60026000541415614266576040805162461bcd60e51b815260206004820152601f60248201526000805160206156fa833981519152604482015290519081900360640190fd5b60026000556142736150c0565b61427d600061512f565b6142876000615184565b6000600960008154811061429757fe5b600091825260208083203384527f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e3909152604090922060059091029091019150821561454557600581015460015b600954811015614361576000818152600a6020908152604080832033845290915290206005015415614359576000818152600a60209081526040808320338452909152902060050154614339908390614f89565b6000828152600a6020908152604080832033845290915281206005015591505b6001016142e5565b50801561454357600354604080516340c10f1960e01b81523060048201526024810184905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b1580156143bb57600080fd5b505af11580156143cf573d6000803e3d6000fd5b505060048054604080516340c10f1960e01b8152339381019390935260248301869052516001600160a01b0390911693506340c10f199250604480830192600092919082900301818387803b15801561442757600080fd5b505af115801561443b573d6000803e3d6000fd5b505060408051600081526020810185905281513394507ff3a03193094a1b3c41754b7de76a0833a26ad4ee4b4e896eb27162f09831073093509081900390910190a2600182015461448c9082614f89565b60018301819055600283015410156144a957600182015460028301555b426004830155815461451d57600b6020527fdf7de25b7f1fd6d0b5205f0e18f1f35bd7b8d84cce336588d184533ce43a6f7680546001810182557f4335e144cd35056e5b3aebd10c5e62566e9af1617088f92a0f803bf15715d84a0180546001600160a01b03191633179055600080525482555b600383015461452c9082614f89565b600384015560058201541561454357600060058301555b505b8315612e6457600354604080516370a0823160e01b8152336004820152905186926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561459557600080fd5b505afa1580156145a9573d6000803e3d6000fd5b505050506040513d60208110156145bf57600080fd5b50511015614606576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c69642062616c616e636560881b604482015290519081900360640190fd5b600354604080516323b872dd60e01b81523360048201523060248201526044810187905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b15801561466057600080fd5b505af1158015614674573d6000803e3d6000fd5b505050506040513d602081101561468a57600080fd5b5050600382015461469b9085614f89565b600383015560018101546146af9085614f89565b60018201819055600282015410156146cc57600181015460028201555b426004820155805461474057600b6020527fdf7de25b7f1fd6d0b5205f0e18f1f35bd7b8d84cce336588d184533ce43a6f7680546001810182557f4335e144cd35056e5b3aebd10c5e62566e9af1617088f92a0f803bf15715d84a0180546001600160a01b03191633179055600080525481555b60048054604080516340c10f1960e01b8152339381019390935260248301879052516001600160a01b03909116916340c10f1991604480830192600092919082900301818387803b15801561479457600080fd5b505af11580156147a8573d6000803e3d6000fd5b5050604080518781526000602082015281513394507f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee9093509081900390910190a2505060016000555050565b600954600090821061483c576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b60006009838154811061484b57fe5b906000526020600020906005020190508060030154600014156148725750506010546148d2565b6000614893600c54610ec8600f54856002015461502590919063ffffffff16565b90506148cd6148c48360030154610ec8670de0b6b3a76400006148be866148be600e54612633614efa565b90615025565b60105490614f89565b925050505b919050565b6001546001600160a01b031681565b600354604080516370a0823160e01b815261dead600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561493357600080fd5b505afa158015614947573d6000803e3d6000fd5b505050506040513d602081101561495d57600080fd5b5051905090565b601c5460ff1681565b601b5481565b6003546001600160a01b031681565b6001546001600160a01b0316331461499957600080fd5b60648311156149e4576040805162461bcd60e51b815260206004820152601260248201527124b73b30b634b21030b63637b1b0ba34b7b760711b604482015290519081900360640190fd5b6000614a006064610ec886600c5461502590919063ffffffff16565b905060005b600954811015614a4a57614a4060098281548110614a1f57fe5b90600052602060002090600502016002015483614f8990919063ffffffff16565b9150600101614a05565b50600c54811115614a98576040805162461bcd60e51b8152602060048201526013602482015272105b1b1bd8d85d1a5bdb88195e18d959591959606a1b604482015290519081900360640190fd5b60096040518060a00160405280856001600160a01b03168152602001846001600160a01b03168152602001614add6064610ec889600c5461502590919063ffffffff16565b815260006020808301829052604092830182905284546001818101875595835291819020845160059093020180546001600160a01b039384166001600160a01b031991821617825591850151958101805496909316959091169490941790558101516002830155606081015160038301556080015160049091015550505050565b68056bc75e2d6310000081565b6005546001600160a01b031681565b6000828152600a602090815260408083206001600160a01b038516845290915281206005810154600690910154614bf79190610f0190670de0b6b3a764000090610ec890614bcb906126338a6147f4565b6000898152600a602090815260408083206001600160a01b038c16845290915290206001015490615025565b90505b92915050565b6009546000908210614c48576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b506000908152600b602052604090205490565b60008060098381548110614c6b57fe5b600091825260208083206007546005909302018054604080516370a0823160e01b81526001600160a01b03928316600482015290519296509316926370a08231926024808301939192829003018186803b158015614cc857600080fd5b505afa158015614cdc573d6000803e3d6000fd5b505050506040513d6020811015614cf257600080fd5b50516003548354604080516370a0823160e01b81526001600160a01b039283166004820152905193945060009391909216916370a08231916024808301926020929190829003018186803b158015614d4957600080fd5b505afa158015614d5d573d6000803e3d6000fd5b505050506040513d6020811015614d7357600080fd5b5051905080614d9457614d8f670de0b6b3a7640000600a614fe3565b614daa565b614daa81610ec884670de0b6b3a7640000615025565b95945050505050565b60105481565b60125481565b6002546001600160a01b031681565b60145481565b6001546001600160a01b03163314614deb57600080fd5b600280546001600160a01b0319166001600160a01b03838116918217909255600154604051919216907f83ada3430836f9d4bd6f7bc690ffbba5199cb19b37393dd64c2299302135359690600090a350565b6001546001600160a01b03163314614e5457600080fd5b42601f541015614ea4576040805162461bcd60e51b8152602060048201526016602482015275151bdbc81b185d1948199bdc881dda1a5d195b1a5cdd60521b604482015290519081900360640190fd5b60005b81811015610fd1576001601d6000858585818110614ec157fe5b602090810292909201356001600160a01b0316835250810191909152604001600020805460ff1916911515919091179055600101614ea7565b6000614f0842600d5461532b565b905090565b6006546001600160a01b031681565b600a6020528160005260406000206020528060005260406000206000915091505080600001549080600101549080600201549080600301549080600401549080600501549080600601549080600701549080600801549080600901549080600a015490508b565b60175481565b600082820183811015614bf7576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000614bf783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615341565b60008261503457506000614bfa565b8282028284828161504157fe5b0414614bf75760405162461bcd60e51b815260040180806020018281038252602181526020018061571a6021913960400191505060405180910390fd5b6000614bf783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506153e3565b42601b5411156151015760405162461bcd60e51b815260040180806020018281038252602d8152602001806156cd602d913960400191505060405180910390fd5b601c5460ff1661512d57601c805460ff191660011790556151254262127500614f89565b600d5542600e555b565b615138816147f4565b601055615143614efa565b600e553315615181576151568133614b7a565b6000828152600a60209081526040808320338452909152902060058101919091556010546006909101555b50565b600d544210615181576151a96064610ec8601154600c5461502590919063ffffffff16565b600c8190556151bb9062127500614fe3565b600f55600d546151ce9062127500614f89565b600d556151da8161512f565b600c5460408051918252517ffafb0ec84dbe5a6bf08f4fec2f970b66d402032cdfea2008b11e11eb5c3990f09181900360200190a150565b801580615298575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561526a57600080fd5b505afa15801561527e573d6000803e3d6000fd5b505050506040513d602081101561529457600080fd5b5051155b6152d35760405162461bcd60e51b81526004018080602001828103825260368152602001806157656036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610fd190849061543d565b3b151590565b600081831061533a5781614bf7565b5090919050565b600081836153cd5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561539257818101518382015260200161537a565b50505050905090810190601f1680156153bf5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816153d957fe5b0495945050505050565b600081848411156154355760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561539257818101518382015260200161537a565b505050900390565b6060615492826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166154ee9092919063ffffffff16565b805190915015610fd1578080602001905160208110156154b157600080fd5b5051610fd15760405162461bcd60e51b815260040180806020018281038252602a81526020018061573b602a913960400191505060405180910390fd5b60606154fd8484600085615505565b949350505050565b606061551085615325565b615561576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106155a05780518252601f199092019160209182019101615581565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114615602576040519150601f19603f3d011682016040523d82523d6000602084013e615607565b606091505b5091509150811561561b5791506154fd9050565b80511561562b5780518082602001fd5b60405162461bcd60e51b815260206004820181815286516024840152865187939192839260440191908501908083836000831561539257818101518382015260200161537a565b6040518061016001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe4661726d696e6720686173206e6f742079657420737461727465642e2054727920616761696e206c617465722e5265656e7472616e637947756172643a207265656e7472616e742063616c6c00536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212205ce19d33a315e33494a60dde2708df79a05b786e14704a44c52a8dc69c1f8a5f64736f6c634300060c0033608060405234801561001057600080fd5b50604051610f29380380610f298339818101604052602081101561003357600080fd5b50516040805180820182526009815268487572726963616e6560b81b60208281019182528351808501909452600484526343414e4560e01b908401528151919291610080916003916100cd565b5080516100949060049060208401906100cd565b5050600580546001600160a01b0390931661010002610100600160a81b031960ff19909416601217939093169290921790915550610160565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010e57805160ff191683800117855561013b565b8280016001018555821561013b579182015b8281111561013b578251825591602001919060010190610120565b5061014792915061014b565b5090565b5b80821115610147576000815560010161014c565b610dba8061016f6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c806340c10f191161008c5780639dc29fac116100665780639dc29fac14610287578063a457c2d7146102b3578063a9059cbb146102df578063dd62ed3e1461030b576100cf565b806340c10f191461022b57806370a082311461025957806395d89b411461027f576100cf565b806306fdde03146100d4578063095ea7b31461015157806318160ddd1461019157806323b872dd146101ab578063313ce567146101e157806339509351146101ff575b600080fd5b6100dc610339565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101165781810151838201526020016100fe565b50505050905090810190601f1680156101435780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561016757600080fd5b506001600160a01b0381351690602001356103cf565b604080519115158252519081900360200190f35b6101996103ec565b60408051918252519081900360200190f35b61017d600480360360608110156101c157600080fd5b506001600160a01b038135811691602081013590911690604001356103f2565b6101e9610479565b6040805160ff9092168252519081900360200190f35b61017d6004803603604081101561021557600080fd5b506001600160a01b038135169060200135610482565b6102576004803603604081101561024157600080fd5b506001600160a01b0381351690602001356104d0565b005b6101996004803603602081101561026f57600080fd5b50356001600160a01b031661052c565b6100dc610547565b6102576004803603604081101561029d57600080fd5b506001600160a01b0381351690602001356105a8565b61017d600480360360408110156102c957600080fd5b506001600160a01b038135169060200135610600565b61017d600480360360408110156102f557600080fd5b506001600160a01b038135169060200135610668565b6101996004803603604081101561032157600080fd5b506001600160a01b038135811691602001351661067c565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103c55780601f1061039a576101008083540402835291602001916103c5565b820191906000526020600020905b8154815290600101906020018083116103a857829003601f168201915b5050505050905090565b60006103e36103dc6106a7565b84846106ab565b50600192915050565b60025490565b60006103ff848484610797565b61046f8461040b6106a7565b61046a85604051806060016040528060288152602001610cce602891396001600160a01b038a166000908152600160205260408120906104496106a7565b6001600160a01b0316815260208101919091526040016000205491906108f2565b6106ab565b5060019392505050565b60055460ff1690565b60006103e361048f6106a7565b8461046a85600160006104a06106a7565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610989565b60055461010090046001600160a01b0316331461051e5760405162461bcd60e51b8152600401808060200182810382526023815260200180610c856023913960400191505060405180910390fd5b61052882826109ea565b5050565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103c55780601f1061039a576101008083540402835291602001916103c5565b60055461010090046001600160a01b031633146105f65760405162461bcd60e51b8152600401808060200182810382526023815260200180610c856023913960400191505060405180910390fd5b6105288282610ada565b60006103e361060d6106a7565b8461046a85604051806060016040528060258152602001610d6060259139600160006106376106a7565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906108f2565b60006103e36106756106a7565b8484610797565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166106f05760405162461bcd60e51b8152600401808060200182810382526024815260200180610d3c6024913960400191505060405180910390fd5b6001600160a01b0382166107355760405162461bcd60e51b8152600401808060200182810382526022815260200180610c636022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166107dc5760405162461bcd60e51b8152600401808060200182810382526025815260200180610d176025913960400191505060405180910390fd5b6001600160a01b0382166108215760405162461bcd60e51b8152600401808060200182810382526023815260200180610c1e6023913960400191505060405180910390fd5b61082c838383610bd6565b61086981604051806060016040528060268152602001610ca8602691396001600160a01b03861660009081526020819052604090205491906108f2565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546108989082610989565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156109815760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561094657818101518382015260200161092e565b50505050905090810190601f1680156109735780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156109e3576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216610a45576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b610a5160008383610bd6565b600254610a5e9082610989565b6002556001600160a01b038216600090815260208190526040902054610a849082610989565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b038216610b1f5760405162461bcd60e51b8152600401808060200182810382526021815260200180610cf66021913960400191505060405180910390fd5b610b2b82600083610bd6565b610b6881604051806060016040528060228152602001610c41602291396001600160a01b03851660009081526020819052604090205491906108f2565b6001600160a01b038316600090815260208190526040902055600254610b8e9082610bdb565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b505050565b60006109e383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506108f256fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f20616464726573734f6e6c79206d696e7465722063616e2063616c6c20746869732066756e6374696f6e2e45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122068012cd70becce49502f9802fd39b5d151695333d222558c3bccdeb186020e2c64736f6c634300060c0033608060405234801561001057600080fd5b50604051610f2e380380610f2e8339818101604052602081101561003357600080fd5b5051604080518082018252600e81526d487572726963616e652e4875676f60901b6020828101918252835180850190945260048452634855474f60e01b908401528151919291610085916003916100d2565b5080516100999060049060208401906100d2565b5050600580546001600160a01b0390931661010002610100600160a81b031960ff19909416601217939093169290921790915550610165565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061011357805160ff1916838001178555610140565b82800160010185558215610140579182015b82811115610140578251825591602001919060010190610125565b5061014c929150610150565b5090565b5b8082111561014c5760008155600101610151565b610dba806101746000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c806340c10f191161008c5780639dc29fac116100665780639dc29fac14610287578063a457c2d7146102b3578063a9059cbb146102df578063dd62ed3e1461030b576100cf565b806340c10f191461022b57806370a082311461025957806395d89b411461027f576100cf565b806306fdde03146100d4578063095ea7b31461015157806318160ddd1461019157806323b872dd146101ab578063313ce567146101e157806339509351146101ff575b600080fd5b6100dc610339565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101165781810151838201526020016100fe565b50505050905090810190601f1680156101435780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561016757600080fd5b506001600160a01b0381351690602001356103cf565b604080519115158252519081900360200190f35b6101996103ec565b60408051918252519081900360200190f35b61017d600480360360608110156101c157600080fd5b506001600160a01b038135811691602081013590911690604001356103f2565b6101e9610479565b6040805160ff9092168252519081900360200190f35b61017d6004803603604081101561021557600080fd5b506001600160a01b038135169060200135610482565b6102576004803603604081101561024157600080fd5b506001600160a01b0381351690602001356104d0565b005b6101996004803603602081101561026f57600080fd5b50356001600160a01b031661052c565b6100dc610547565b6102576004803603604081101561029d57600080fd5b506001600160a01b0381351690602001356105a8565b61017d600480360360408110156102c957600080fd5b506001600160a01b038135169060200135610600565b61017d600480360360408110156102f557600080fd5b506001600160a01b038135169060200135610668565b6101996004803603604081101561032157600080fd5b506001600160a01b038135811691602001351661067c565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103c55780601f1061039a576101008083540402835291602001916103c5565b820191906000526020600020905b8154815290600101906020018083116103a857829003601f168201915b5050505050905090565b60006103e36103dc6106a7565b84846106ab565b50600192915050565b60025490565b60006103ff848484610797565b61046f8461040b6106a7565b61046a85604051806060016040528060288152602001610cce602891396001600160a01b038a166000908152600160205260408120906104496106a7565b6001600160a01b0316815260208101919091526040016000205491906108f2565b6106ab565b5060019392505050565b60055460ff1690565b60006103e361048f6106a7565b8461046a85600160006104a06106a7565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610989565b60055461010090046001600160a01b0316331461051e5760405162461bcd60e51b8152600401808060200182810382526023815260200180610c856023913960400191505060405180910390fd5b61052882826109ea565b5050565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103c55780601f1061039a576101008083540402835291602001916103c5565b60055461010090046001600160a01b031633146105f65760405162461bcd60e51b8152600401808060200182810382526023815260200180610c856023913960400191505060405180910390fd5b6105288282610ada565b60006103e361060d6106a7565b8461046a85604051806060016040528060258152602001610d6060259139600160006106376106a7565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906108f2565b60006103e36106756106a7565b8484610797565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166106f05760405162461bcd60e51b8152600401808060200182810382526024815260200180610d3c6024913960400191505060405180910390fd5b6001600160a01b0382166107355760405162461bcd60e51b8152600401808060200182810382526022815260200180610c636022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166107dc5760405162461bcd60e51b8152600401808060200182810382526025815260200180610d176025913960400191505060405180910390fd5b6001600160a01b0382166108215760405162461bcd60e51b8152600401808060200182810382526023815260200180610c1e6023913960400191505060405180910390fd5b61082c838383610bd6565b61086981604051806060016040528060268152602001610ca8602691396001600160a01b03861660009081526020819052604090205491906108f2565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546108989082610989565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156109815760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561094657818101518382015260200161092e565b50505050905090810190601f1680156109735780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156109e3576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216610a45576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b610a5160008383610bd6565b600254610a5e9082610989565b6002556001600160a01b038216600090815260208190526040902054610a849082610989565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b038216610b1f5760405162461bcd60e51b8152600401808060200182810382526021815260200180610cf66021913960400191505060405180910390fd5b610b2b82600083610bd6565b610b6881604051806060016040528060228152602001610c41602291396001600160a01b03851660009081526020819052604090205491906108f2565b6001600160a01b038316600090815260208190526040902055600254610b8e9082610bdb565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b505050565b60006109e383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506108f256fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f20616464726573734f6e6c79206d696e7465722063616e2063616c6c20746869732066756e6374696f6e2e45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212200161c323c7fbf534ad1e65218879f4b45e230de2287e2b5b8c20688b5439d88364736f6c634300060c0033536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f770000000000000000000000001b5ed7c13eb64819f7b0c7b2d810daba93dfc2e0
Deployed Bytecode
0x6080604052600436106103545760003560e01c806367739387116101c6578063c45a0155116100f7578063ef08bf4811610095578063f8077fae1161006f578063f8077fae14610b9e578063f887ea4014610bb3578063fc926a0914610bc8578063fd7e584814610c5757610391565b8063ef08bf4814610ad9578063f2fde38b14610aee578063f421764814610b2157610391565b8063d4ddce8a116100d1578063d4ddce8a14610a70578063df136d6514610a9a578063e0493f8c14610aaf578063e30c397814610ac457610391565b8063c45a0155146109f8578063cdfa2c3614610a0d578063d43cdb6214610a4657610391565b80638da5cb5b116101645780639d06c5631161013e5780639d06c56314610978578063ab12f4641461098d578063ab7de098146109a2578063b415a2d6146109e357610391565b80638da5cb5b1461093957806395a2a0431461094e5780639ca6fbb41461096357610391565b80637b0472f0116101a05780637b0472f0146108a55780637b0a47ee146108c8578063868a8988146108dd578063874c120b1461090f57610391565b8063677393871461084b578063721a033f14610860578063777d5c7b1461087557610391565b80632e1a7d4d116102a05780633fc8cef31161023e578063571b1f8a11610218578063571b1f8a1461076857806361d027b31461077d57806361edc2a9146107925780636631fa46146107bc57610391565b80633fc8cef31461068e5780634011962e146106a35780634e71e0c81461075357610391565b8063368e18611161027a578063368e1861146105d6578063379607f5146106095780633bba00c4146106335780633e6ec0c61461065d57610391565b80632e1a7d4d146105825780632f60f525146105ac578063346cfb27146105c157610391565b80631526fe271161030d5780631e7be210116102e75780631e7be210146104fc5780631f353cec1461054357806325798e61146105585780632cbe0a271461056d57610391565b80631526fe27146104545780631ab06ee5146104b55780631b67d229146104e757610391565b806302683fa914610396578063081e3eda146103bd5780630a2e5c75146103d25780630c2cd50c146103e75780630d749cec146103fc57806314bcec9f1461043f57610391565b366103915760408051348152905133917f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874919081900360200190a2005b600080fd5b3480156103a257600080fd5b506103ab610c6c565b60408051918252519081900360200190f35b3480156103c957600080fd5b506103ab610c72565b3480156103de57600080fd5b506103ab610c78565b3480156103f357600080fd5b506103ab610c7e565b34801561040857600080fd5b506104266004803603602081101561041f57600080fd5b5035610c84565b6040805192835260208301919091528051918290030190f35b34801561044b57600080fd5b506103ab610df7565b34801561046057600080fd5b5061047e6004803603602081101561047757600080fd5b5035610dfd565b604080516001600160a01b039687168152949095166020850152838501929092526060830152608082015290519081900360a00190f35b3480156104c157600080fd5b506104e5600480360360408110156104d857600080fd5b5080359060200135610e47565b005b3480156104f357600080fd5b506103ab610fd6565b34801561050857600080fd5b5061052f6004803603602081101561051f57600080fd5b50356001600160a01b0316610fdc565b604080519115158252519081900360200190f35b34801561054f57600080fd5b506103ab610ff1565b34801561056457600080fd5b506103ab610ff7565b34801561057957600080fd5b506103ab610ffe565b34801561058e57600080fd5b506104e5600480360360208110156105a557600080fd5b5035611004565b3480156105b857600080fd5b506103ab611eb0565b3480156105cd57600080fd5b506103ab611eb6565b3480156105e257600080fd5b506103ab600480360360208110156105f957600080fd5b50356001600160a01b0316611ebc565b34801561061557600080fd5b506104e56004803603602081101561062c57600080fd5b5035611ece565b34801561063f57600080fd5b506104e56004803603602081101561065657600080fd5b5035612e6f565b34801561066957600080fd5b50610672612f05565b604080516001600160a01b039092168252519081900360200190f35b34801561069a57600080fd5b50610672612f14565b3480156106af57600080fd5b506104e5600480360360208110156106c657600080fd5b8101906020810181356401000000008111156106e157600080fd5b8201836020820111156106f357600080fd5b8035906020019184602083028401116401000000008311171561071557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612f23945050505050565b34801561075f57600080fd5b506104e56135cd565b34801561077457600080fd5b506103ab61363e565b34801561078957600080fd5b50610672613644565b34801561079e57600080fd5b506104e5600480360360208110156107b557600080fd5b5035613653565b3480156107c857600080fd5b506107ec600480360360408110156107df57600080fd5b508035906020013561380a565b604080519b8c5260208c019a909a528a8a019890985260608a0196909652608089019490945260a088019290925260c087015260e08601526101008501526101208401526001600160a01b031661014083015251908190036101600190f35b34801561085757600080fd5b506103ab6139a8565b34801561086c57600080fd5b506103ab6139ae565b34801561088157600080fd5b506106726004803603604081101561089857600080fd5b50803590602001356139b4565b6104e5600480360360408110156108bb57600080fd5b50803590602001356139e9565b3480156108d457600080fd5b506103ab61421a565b3480156108e957600080fd5b506104e56004803603604081101561090057600080fd5b50803590602001351515614220565b34801561091b57600080fd5b506103ab6004803603602081101561093257600080fd5b50356147f4565b34801561094557600080fd5b506106726148d7565b34801561095a57600080fd5b506103ab6148e6565b34801561096f57600080fd5b5061052f614964565b34801561098457600080fd5b506103ab61496d565b34801561099957600080fd5b50610672614973565b3480156109ae57600080fd5b506104e5600480360360608110156109c557600080fd5b508035906001600160a01b0360208201358116916040013516614982565b3480156109ef57600080fd5b506103ab614b5e565b348015610a0457600080fd5b50610672614b6b565b348015610a1957600080fd5b506103ab60048036036040811015610a3057600080fd5b50803590602001356001600160a01b0316614b7a565b348015610a5257600080fd5b506103ab60048036036020811015610a6957600080fd5b5035614c00565b348015610a7c57600080fd5b506103ab60048036036020811015610a9357600080fd5b5035614c5b565b348015610aa657600080fd5b506103ab614db3565b348015610abb57600080fd5b506103ab614db9565b348015610ad057600080fd5b50610672614dbf565b348015610ae557600080fd5b506103ab614dce565b348015610afa57600080fd5b506104e560048036036020811015610b1157600080fd5b50356001600160a01b0316614dd4565b348015610b2d57600080fd5b506104e560048036036020811015610b4457600080fd5b810190602081018135640100000000811115610b5f57600080fd5b820183602082011115610b7157600080fd5b80359060200191846020830284011164010000000083111715610b9357600080fd5b509092509050614e3d565b348015610baa57600080fd5b506103ab614efa565b348015610bbf57600080fd5b50610672614f0d565b348015610bd457600080fd5b50610c0160048036036040811015610beb57600080fd5b50803590602001356001600160a01b0316614f1c565b604080519b8c5260208c019a909a528a8a019890985260608a0196909652608089019490945260a088019290925260c087015260e086015261010085015261012084015261014083015251908190036101600190f35b348015610c6357600080fd5b506103ab614f83565b60135481565b60095490565b60185481565b601f5481565b60095460009081908310610cce576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b600060098481548110610cdd57fe5b6000918252602080832060059290920290910160018101548154604080516370a0823160e01b81526001600160a01b03928316600482015290519396509116926370a0823192602480840193829003018186803b158015610d3d57600080fd5b505afa158015610d51573d6000803e3d6000fd5b505050506040513d6020811015610d6757600080fd5b50516003548354604080516370a0823160e01b81526001600160a01b039283166004820152905193945060009391909216916370a08231916024808301926020929190829003018186803b158015610dbe57600080fd5b505afa158015610dd2573d6000803e3d6000fd5b505050506040513d6020811015610de857600080fd5b50519194509092505050915091565b600e5481565b60098181548110610e0a57fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b03938416955091909216929085565b6001546001600160a01b03163314610e5e57600080fd5b6064811115610ea9576040805162461bcd60e51b815260206004820152601260248201527124b73b30b634b21030b63637b1b0ba34b7b760711b604482015290519081900360640190fd5b6000610f07610ece6064610ec885600c5461502590919063ffffffff16565b90614fe3565b610f0160098681548110610ede57fe5b906000526020600020906005020160020154600c5461507e90919063ffffffff16565b90614f89565b9050600c54811115610f56576040805162461bcd60e51b8152602060048201526013602482015272105b1b1bd8d85d1a5bdb88195e18d959591959606a1b604482015290519081900360640190fd5b610f706064610ec884600c5461502590919063ffffffff16565b60098481548110610f7d57fe5b90600052602060002090600502016002015414610fd157610fae6064610ec884600c5461502590919063ffffffff16565b60098481548110610fbb57fe5b9060005260206000209060050201600201819055505b505050565b60115481565b601d6020526000908152604090205460ff1681565b60195481565b6212750081565b601a5481565b6002600054141561104a576040805162461bcd60e51b815260206004820152601f60248201526000805160206156fa833981519152604482015290519081900360640190fd5b60026000556110576150c0565b6110608161512f565b61106981615184565b60095481106110ae576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b6000600982815481106110bd57fe5b60009182526020808320858452600a8252604080852033865290925292206003810154600590920290920192504261a8c0909101111561113c576040805162461bcd60e51b8152602060048201526015602482015274496e76616c69642077697468647261772074696d6560581b604482015290519081900360640190fd5b6000816001015411611187576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c69642062616c616e636560881b604482015290519081900360640190fd5b60006111a76064610ec8601954856002015461502590919063ffffffff16565b905080826001015410156111bc575060018101545b60038301546111cb908261507e565b600384015560018201546111df908261507e565b600183015542600383015560408051600280825260608083018452926020830190803683370190505090506000856113b657828260018151811061121f57fe5b60209081029190910101526004805460408051632770a7eb60e21b8152339381019390935260248301869052516001600160a01b0390911691639dc29fac91604480830192600092919082900301818387803b15801561127e57600080fd5b505af1158015611292573d6000803e3d6000fd5b50505050600061132b73247730b7f828bf883a0582ab47a980d6c822b6ee637c18f69687600401546018546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156112f857600080fd5b505af415801561130c573d6000803e3d6000fd5b505050506040513d602081101561132257600080fd5b50518590614fe3565b60035460408051632770a7eb60e21b815261dead60048201526024810184905290519293506001600160a01b0390911691639dc29fac9160448082019260009290919082900301818387803b15801561138357600080fd5b505af1158015611397573d6000803e3d6000fd5b505050506113ae818561507e90919063ffffffff16565b9150506116db565b84546006546040805163095ea7b360e01b81526001600160a01b039283166004820152602481018790529051919092169163095ea7b39160448083019260209291908290030181600087803b15801561140e57600080fd5b505af1158015611422573d6000803e3d6000fd5b505050506040513d602081101561143857600080fd5b5050600186141561152c5760065460035460408051629d473b60e21b81526001600160a01b039283166004820152602481018790526000604482018190526064820181905230608483015262015180420160a483015282519094859416926302751cec9260c4808201939182900301818787803b1580156114b857600080fd5b505af11580156114cc573d6000803e3d6000fd5b505050506040513d60408110156114e257600080fd5b50805160209091015185519193509150829085906000906114ff57fe5b602002602001018181525050808460018151811061151957fe5b6020026020010181815250505050611620565b600654600354600187015460408051635d5155ef60e11b81526001600160a01b039384166004820152918316602483015260448201879052600060648301819052608483018190523060a484015262015180420160c4840152815190948594169263baa2abde9260e480830193919282900301818787803b1580156115b057600080fd5b505af11580156115c4573d6000803e3d6000fd5b505050506040513d60408110156115da57600080fd5b50805160209091015185519193509150829085906000906115f757fe5b602002602001018181525050808460018151811061161157fe5b60200260200101818152505050505b60035482516001600160a01b0390911690639dc29fac903090859060009061164457fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561169257600080fd5b505af11580156116a6573d6000803e3d6000fd5b505050506116d5826000815181106116ba57fe5b6020026020010151866004015461507e90919063ffffffff16565b60048601555b600060018714156117dc5773247730b7f828bf883a0582ab47a980d6c822b6ee63cdc345ca601b54601a546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561174157600080fd5b505af4158015611755573d6000803e3d6000fd5b505050506040513d602081101561176b57600080fd5b5051835190915061179b9082908590600190811061178557fe5b6020026020010151614fe390919063ffffffff16565b6008546040519192506001600160a01b03169082156108fc029083906000818181858888f193505050501580156117d6573d6000803e3d6000fd5b50611907565b73247730b7f828bf883a0582ab47a980d6c822b6ee631915579886600401546017546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561183957600080fd5b505af415801561184d573d6000803e3d6000fd5b505050506040513d602081101561186357600080fd5b5051835190915061187d9082908590600190811061178557fe5b60018701546008546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101859052905193945091169163a9059cbb916044808201926020929091908290030181600087803b1580156118da57600080fd5b505af11580156118ee573d6000803e3d6000fd5b505050506040513d602081101561190457600080fd5b50505b8661191d57611916828261507e565b9150611947565b611944818460018151811061192e57fe5b602002602001015161507e90919063ffffffff16565b91505b6000878152600b602052604090205415801590611968575060008660030154115b15611bdf5760006001881415611a065773247730b7f828bf883a0582ab47a980d6c822b6ee63cdc345ca601b54601a546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156119d357600080fd5b505af41580156119e7573d6000803e3d6000fd5b505050506040513d60208110156119fd57600080fd5b50519050611a92565b73247730b7f828bf883a0582ab47a980d6c822b6ee6397c0f28887600401546016546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015611a6357600080fd5b505af4158015611a77573d6000803e3d6000fd5b505050506040513d6020811015611a8d57600080fd5b505190505b611aa3818560018151811061178557fe5b905060005b6000898152600b6020526040902054811015611bd0576000898152600a60209081526040808320600b9092528220805483919085908110611ae557fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020600181015490915015801590611b4f575060008a8152600b60205260409020805433919084908110611b3757fe5b6000918252602090912001546001600160a01b031614155b15611bc75760018a1415611b9457611b8a611b7f8a60030154610ec886856001015461502590919063ffffffff16565b600783015490614f89565b6007820155611bc7565b611bc1611bb68a60030154610ec886856001015461502590919063ffffffff16565b600983015490614f89565b60098201555b50600101611aa8565b50611bdb838261507e565b9250505b8183600181518110611bed57fe5b6020026020010181815250506001871415611c5557336001600160a01b03166108fc84600181518110611c1c57fe5b60200260200101519081150290604051600060405180830381858888f19350505050158015611c4f573d6000803e3d6000fd5b50611cf6565b60018087015484516001600160a01b039091169163a9059cbb91339187918110611c7b57fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611cc957600080fd5b505af1158015611cdd573d6000803e3d6000fd5b505050506040513d6020811015611cf357600080fd5b50505b6001850154158015611d085750845415155b8015611d2357506000878152600b6020526040902054855411155b15611e3d5784546000888152600a60209081526040808320600b9092528220805460001980860195949291908101908110611d5a57fe5b60009182526020808320909101546001600160a01b031683528281019390935260409182018120939093558a8352600b909152902080546000198101908110611d9f57fe5b60009182526020808320909101548a8352600b909152604090912080546001600160a01b039092169183908110611dd257fe5b600091825260208083209190910180546001600160a01b0319166001600160a01b039490941693909317909255898152600b90915260409020805480611e1457fe5b600082815260208120820160001990810180546001600160a01b03191690559091019091558655505b336001600160a01b03167f75e161b3e824b114fc1a33274bd7091918dd4e639cede50b78b15a4eea956a21888686600181518110611e7757fe5b602002602001015160405180848152602001838152602001828152602001935050505060405180910390a2505060016000555050505050565b600d5481565b60165481565b601e6020526000908152604090205481565b60026000541415611f14576040805162461bcd60e51b815260206004820152601f60248201526000805160206156fa833981519152604482015290519081900360640190fd5b6002600055611f216150c0565b611f2a8161512f565b611f3381615184565b600060098281548110611f4257fe5b60009182526020808320858452600a8252604080852033865290925292206005818101549202909201925080611fac576040805162461bcd60e51b815260206004820152600a6024820152694e6f207265776172647360b01b604482015290519081900360640190fd5b8015612e3f57600060058301556003546004808401546012546040805163d572676d60e01b8152938401929092526024830152516001600160a01b03909216916340c10f199161dead916120369173247730b7f828bf883a0582ab47a980d6c822b6ee9163d572676d91604480820192602092909190829003018186803b1580156112f857600080fd5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561207c57600080fd5b505af1158015612090573d6000803e3d6000fd5b50505050600360009054906101000a90046001600160a01b03166001600160a01b03166340c10f193361211973247730b7f828bf883a0582ab47a980d6c822b6ee6310d8c9aa87600401546015546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156112f857600080fd5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561215f57600080fd5b505af1158015612173573d6000803e3d6000fd5b50506003546008546004808701546013546040805163f1dc0cc360e01b8152938401929092526024830152516001600160a01b0393841695506340c10f19945091909216916121f79173247730b7f828bf883a0582ab47a980d6c822b6ee9163f1dc0cc3916044808301926020929190829003018186803b1580156112f857600080fd5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561223d57600080fd5b505af1158015612251573d6000803e3d6000fd5b5050506000858152600b60205260409020541580159150612276575060008360030154115b156123e75760005b6000858152600b60205260409020548110156123e5576000858152600a60209081526040808320600b90925282208054839190859081106122bb57fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902060018101549091501580159061232557506000868152600b6020526040902080543391908490811061230d57fe5b6000918252602090912001546001600160a01b031614155b156123dc576123d6611bb68660030154610ec86123cb73247730b7f828bf883a0582ab47a980d6c822b6ee63f6286ae18a600401546014546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561239857600080fd5b505af41580156123ac573d6000803e3d6000fd5b505050506040513d60208110156123c257600080fd5b50518890614fe3565b600186015490615025565b60098201555b5060010161227e565b505b604080516002808252606080830184529260208301908036833701905050905061263961249d73247730b7f828bf883a0582ab47a980d6c822b6ee63f6286ae186600401546014546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561246a57600080fd5b505af415801561247e573d6000803e3d6000fd5b505050506040513d602081101561249457600080fd5b50518490614fe3565b61263361253373247730b7f828bf883a0582ab47a980d6c822b6ee63f1dc0cc388600401546013546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561250057600080fd5b505af4158015612514573d6000803e3d6000fd5b505050506040513d602081101561252a57600080fd5b50518690614fe3565b61263361259673247730b7f828bf883a0582ab47a980d6c822b6ee6310d8c9aa8a600401546015546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561239857600080fd5b61263361262c73247730b7f828bf883a0582ab47a980d6c822b6ee63d572676d8c600401546012546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156125f957600080fd5b505af415801561260d573d6000803e3d6000fd5b505050506040513d602081101561262357600080fd5b50518a90614fe3565b899061507e565b9061507e565b8160008151811061264657fe5b60200260200101818152505061266460028260008151811061178557fe5b8160018151811061267157fe5b602090810291909101015260035481516001600160a01b03909116906340c10f1990309084906000906126a057fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156126ee57600080fd5b505af1158015612702573d6000803e3d6000fd5b505060408051600280825260608083018452945090925090602083019080368337505060035482519293506001600160a01b03169183915060009061274357fe5b6001600160a01b03928316602091820292909201015260075482519116908290600190811061276e57fe5b6001600160a01b03928316602091820292909201015260065460035461279a9290811691166000615212565b60065482516127d8916001600160a01b031690849060019081106127ba57fe5b60209081029190910101516003546001600160a01b03169190615212565b60065482516060916001600160a01b0316906318cbafe590859060019081106127fd57fe5b6020026020010151600085304262015180016040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561287f578181015183820152602001612867565b505050509050019650505050505050600060405180830381600087803b1580156128a857600080fd5b505af11580156128bc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156128e557600080fd5b810190808051604051939291908464010000000082111561290557600080fd5b90830190602082018581111561291a57600080fd5b825186602082028301116401000000008211171561293757600080fd5b82525081516020918201928201910280838360005b8381101561296457818101518382015260200161294c565b5050505090500160405250505090506060600367ffffffffffffffff8111801561298d57600080fd5b506040519080825280602002602001820160405280156129b7578160200160208202803683370190505b506006546003549192506129d9916001600160a01b0390811691166000615212565b60065484516129f9916001600160a01b031690869060019081106127ba57fe5b60065482516001600160a01b039091169063f305d7199084906000198101908110612a2057fe5b6020026020010151600360009054906101000a90046001600160a01b031687600181518110612a4b57fe5b6020026020010151600080304261012c016040518863ffffffff1660e01b815260040180876001600160a01b03168152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200196505050505050506060604051808303818588803b158015612ac657600080fd5b505af1158015612ada573d6000803e3d6000fd5b50505050506040513d6060811015612af157600080fd5b508051602082015160409092015183519192918490600090612b0f57fe5b6020026020010184600181518110612b2357fe5b6020026020010185600281518110612b3757fe5b602002602001018381525083815250838152505050506000612b7482600081518110612b5f57fe5b60200260200101518660018151811061192e57fe5b1115612c165760035481516001600160a01b03909116906340c10f19903390612bb7908590600090612ba257fe5b60200260200101518860018151811061192e57fe5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015612bfd57600080fd5b505af1158015612c11573d6000803e3d6000fd5b505050505b6000612c4082600181518110612c2857fe5b60200260200101518460018651038151811061192e57fe5b1115612ca557336001600160a01b03166108fc612c7b83600181518110612c6357fe5b60200260200101518560018751038151811061192e57fe5b6040518115909202916000818181858888f19350505050158015612ca3573d6000803e3d6000fd5b505b60006009600181548110612cb557fe5b600091825260208083203384527fbbc70db1b6c7afd11e79c0fb0051300458f1a3acb8ee9789d9b6b26c61ad9bc79091526040909220845160059092029092019250612d239084906002908110612d0857fe5b60200260200101518360030154614f8990919063ffffffff16565b8260030181905550612d5683600081518110612d3b57fe5b60200260200101518360040154614f8990919063ffffffff16565b8260040181905550612d8983600281518110612d6e57fe5b60200260200101518260010154614f8990919063ffffffff16565b60018201558054612dfe57600b6020527f72c6bfb7988af3a1efa6568f02a999bc52252641c659d85961ca3d372b57d5cf8054600181810183557ffc2858506235d5502cafdfae2dcc7804b97258f4d77357c39b0f2a32aa2e6a5090910180546001600160a01b031916331790556000525481555b604080518b815260208101899052815133927f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a928290030190a25050505050505b600082600701541180612e56575060008260090154115b15612e6457612e6484613653565b505060016000555050565b6001546001600160a01b03163314612e8657600080fd5b601c5460ff16158015612e9d5750635fce35608110155b8015612ead5750635fd270308111155b612eee576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b601b819055612eff81610258614f89565b601f5550565b6004546001600160a01b031681565b6007546001600160a01b031681565b6001546001600160a01b03163314612f3a57600080fd5b600581600081518110612f4957fe5b602002602001015110158015612f745750603281600081518110612f6957fe5b602002602001015111155b612fb5576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b600a81600181518110612fc457fe5b602002602001015110158015612fef5750603281600181518110612fe457fe5b602002602001015111155b613030576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b60018160028151811061303f57fe5b60200260200101511015801561306a575060058160028151811061305f57fe5b602002602001015111155b6130ab576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b6001816003815181106130ba57fe5b6020026020010151101580156130e557506005816003815181106130da57fe5b602002602001015111155b613126576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b60018160048151811061313557fe5b602002602001015110158015613160575060058160048151811061315557fe5b602002602001015111155b6131a1576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b6019816005815181106131b057fe5b6020026020010151101580156131db5750605f816005815181106131d057fe5b602002602001015111155b61321c576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b60018160068151811061322b57fe5b602002602001015110158015613256575060058160068151811061324b57fe5b602002602001015111155b613297576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b6001816007815181106132a657fe5b6020026020010151101580156132d157506005816007815181106132c657fe5b602002602001015111155b613312576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b60018160088151811061332157fe5b60200260200101511015801561334c575060058160088151811061334157fe5b602002602001015111155b61338d576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b60028160098151811061339c57fe5b6020026020010151101580156133c75750600a816009815181106133bc57fe5b602002602001015111155b613408576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b6134738160058151811061341857fe5b6020026020010151610f018360048151811061343057fe5b6020026020010151610f018560038151811061344857fe5b60200260200101518660028151811061345d57fe5b6020026020010151614f8990919063ffffffff16565b6064146134bc576040805162461bcd60e51b8152602060048201526012602482015271496e76616c696420636c61696d206665657360701b604482015290519081900360640190fd5b806000815181106134c957fe5b6020026020010151601181905550806001815181106134e457fe5b6020026020010151601981905550806002815181106134ff57fe5b60200260200101516012819055508060038151811061351a57fe5b60200260200101516013819055508060048151811061353557fe5b60200260200101516014819055508060058151811061355057fe5b60200260200101516015819055508060068151811061356b57fe5b60200260200101516018819055508060078151811061358657fe5b6020026020010151601781905550806008815181106135a157fe5b6020026020010151601681905550806009815181106135bc57fe5b6020026020010151601a8190555050565b6002546001600160a01b031633146135e457600080fd5b60028054600180546001600160a01b038084166001600160a01b031992831617928390559216909255604051600092909116907f897d3c8bbea11029ba3b26eb993fe8edb14c2c4c0d2ecceccce41d1d83d3e359908390a3565b61025881565b6008546001600160a01b031681565b6000818152600a6020908152604080832033845290915290206007810154151580613682575060008160090154115b6136c3576040805162461bcd60e51b815260206004820152600d60248201526c4e6f204c50207265776172647360981b604482015290519081900360640190fd5b60078101546009820154604080518581526020810193909352828101919091525133917f3eebddb24765187145dfd33b309fe37cda5b88eea08993213266bcf045d5765e919081900360600190a260078101541561376c576007810154600882015461372e91614f89565b60088201556007810154604051339180156108fc02916000818181858888f19350505050158015613763573d6000803e3d6000fd5b50600060078201555b600981015415613806576009810154600a82015461378991614f89565b600a8201556003546009820154604080516340c10f1960e01b81523360048201526024810192909252516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b1580156137e657600080fd5b505af11580156137fa573d6000803e3d6000fd5b50506000600984015550505b5050565b60008060008060008060008060008060006009805490508d10613863576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b60008d8152600b6020526040902080548d90811061387d57fe5b6000918252602090912001546001600160a01b0316905061389c615672565b600a60008f81526020019081526020016000206000836001600160a01b03166001600160a01b031681526020019081526020016000206040518061016001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a82015481525050905080600001518160200151826060015183608001518460a001518560c001518660e001518761010001518861012001518961014001519b509b509b509b509b509b509b509b509b509b50509295989b509295989b9093969950565b600c5481565b60155481565b600b60205281600052604060002081815481106139cd57fe5b6000918252602090912001546001600160a01b03169150829050565b60026000541415613a2f576040805162461bcd60e51b815260206004820152601f60248201526000805160206156fa833981519152604482015290519081900360640190fd5b6002600055613a3c6150c0565b613a458261512f565b613a4e82615184565b60006001831415613a60575034613a63565b50805b60008111613aa9576040805162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b604482015290519081900360640190fd5b613ab233615325565b15613af3576040805162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103ab9b2b960a11b604482015290519081900360640190fd5b6009548310613b38576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b60008311613b7d576040805162461bcd60e51b815260206004820152600d60248201526c5374616b6520696e204875676f60981b604482015290519081900360640190fd5b42601f5410613c7357336000908152601d602052604090205460ff16613bea576040805162461bcd60e51b815260206004820152601860248201527f5374696c6c206275696c64696e67206c69717569646974790000000000000000604482015290519081900360640190fd5b336000908152601e6020526040902054613c049034614f89565b336000908152601e6020526040902081905568056bc75e2d631000001015613c73576040805162461bcd60e51b815260206004820152601d60248201527f57686974656c697374207374616b65206c696d69742072656163686564000000604482015290519081900360640190fd5b600060098481548110613c8257fe5b60009182526020808320878452600a8252604080852033865283528085206003546005909502909201805482516370a0823160e01b81526001600160a01b0391821660048201529251919750929594909216926370a0823192602480840193829003018186803b158015613cf557600080fd5b505afa158015613d09573d6000803e3d6000fd5b505050506040513d6020811015613d1f57600080fd5b505160018401548454604080516370a0823160e01b81526001600160a01b039283166004820152905193945060009391909216916370a08231916024808301926020929190829003018186803b158015613d7857600080fd5b505afa158015613d8c573d6000803e3d6000fd5b505050506040513d6020811015613da257600080fd5b5051905060006001881415613dd6578115613dca57613dc582610ec88886615025565b613dcf565b85600a025b9050613e2f565b60008211613e1e576040805162461bcd60e51b815260206004820152601060248201526f141bdbdb081b9bdd081cdd185c9d195960821b604482015290519081900360640190fd5b613e2c82610ec88886615025565b90505b600354604080516340c10f1960e01b81523060048201526024810184905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b158015613e8257600080fd5b505af1158015613e96573d6000803e3d6000fd5b5050506004860154613ea9915082614f89565b6004808701919091556003546006546040805163095ea7b360e01b81526001600160a01b0392831694810194909452602484018590525191169163095ea7b39160448083019260209291908290030181600087803b158015613f0a57600080fd5b505af1158015613f1e573d6000803e3d6000fd5b505050506040513d6020811015613f3457600080fd5b50600090506001891415613ff3576006546003546040805163f305d71960e01b81526001600160a01b03928316600482015260248101869052600060448201819052606482015230608482015262015180420160a48201529051919092169163f305d719918a9160c48082019260609290919082900301818588803b158015613fbc57600080fd5b505af1158015613fd0573d6000803e3d6000fd5b50505050506040513d6060811015613fe757600080fd5b5060400151905061413b565b60018601546006546040805163095ea7b360e01b81526001600160a01b039283166004820152602481018b90529051919092169163095ea7b39160448083019260209291908290030181600087803b15801561404e57600080fd5b505af1158015614062573d6000803e3d6000fd5b505050506040513d602081101561407857600080fd5b505060065460018701546003546040805162e8e33760e81b81526001600160a01b0393841660048201529183166024830152604482018b90526064820186905260006084830181905260a483018190523060c484015262015180420160e48401529051929093169263e8e3370092610104808401936060939083900390910190829087803b15801561410957600080fd5b505af115801561411d573d6000803e3d6000fd5b505050506040513d606081101561413357600080fd5b506040015190505b600386015461414a9082614f89565b6003870155600185015461415e9082614f89565b600186018190556002860154101561417b57600185015460028601555b84546141ba576000898152600b602090815260408220805460018101825581845291832090910180546001600160a01b03191633179055908a90525485555b42600486015560038501546141d0574260038601555b6040805188815260208101839052815133927f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90928290030190a25050600160005550505050505050565b600f5481565b60026000541415614266576040805162461bcd60e51b815260206004820152601f60248201526000805160206156fa833981519152604482015290519081900360640190fd5b60026000556142736150c0565b61427d600061512f565b6142876000615184565b6000600960008154811061429757fe5b600091825260208083203384527f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e3909152604090922060059091029091019150821561454557600581015460015b600954811015614361576000818152600a6020908152604080832033845290915290206005015415614359576000818152600a60209081526040808320338452909152902060050154614339908390614f89565b6000828152600a6020908152604080832033845290915281206005015591505b6001016142e5565b50801561454357600354604080516340c10f1960e01b81523060048201526024810184905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b1580156143bb57600080fd5b505af11580156143cf573d6000803e3d6000fd5b505060048054604080516340c10f1960e01b8152339381019390935260248301869052516001600160a01b0390911693506340c10f199250604480830192600092919082900301818387803b15801561442757600080fd5b505af115801561443b573d6000803e3d6000fd5b505060408051600081526020810185905281513394507ff3a03193094a1b3c41754b7de76a0833a26ad4ee4b4e896eb27162f09831073093509081900390910190a2600182015461448c9082614f89565b60018301819055600283015410156144a957600182015460028301555b426004830155815461451d57600b6020527fdf7de25b7f1fd6d0b5205f0e18f1f35bd7b8d84cce336588d184533ce43a6f7680546001810182557f4335e144cd35056e5b3aebd10c5e62566e9af1617088f92a0f803bf15715d84a0180546001600160a01b03191633179055600080525482555b600383015461452c9082614f89565b600384015560058201541561454357600060058301555b505b8315612e6457600354604080516370a0823160e01b8152336004820152905186926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561459557600080fd5b505afa1580156145a9573d6000803e3d6000fd5b505050506040513d60208110156145bf57600080fd5b50511015614606576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c69642062616c616e636560881b604482015290519081900360640190fd5b600354604080516323b872dd60e01b81523360048201523060248201526044810187905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b15801561466057600080fd5b505af1158015614674573d6000803e3d6000fd5b505050506040513d602081101561468a57600080fd5b5050600382015461469b9085614f89565b600383015560018101546146af9085614f89565b60018201819055600282015410156146cc57600181015460028201555b426004820155805461474057600b6020527fdf7de25b7f1fd6d0b5205f0e18f1f35bd7b8d84cce336588d184533ce43a6f7680546001810182557f4335e144cd35056e5b3aebd10c5e62566e9af1617088f92a0f803bf15715d84a0180546001600160a01b03191633179055600080525481555b60048054604080516340c10f1960e01b8152339381019390935260248301879052516001600160a01b03909116916340c10f1991604480830192600092919082900301818387803b15801561479457600080fd5b505af11580156147a8573d6000803e3d6000fd5b5050604080518781526000602082015281513394507f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee9093509081900390910190a2505060016000555050565b600954600090821061483c576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b60006009838154811061484b57fe5b906000526020600020906005020190508060030154600014156148725750506010546148d2565b6000614893600c54610ec8600f54856002015461502590919063ffffffff16565b90506148cd6148c48360030154610ec8670de0b6b3a76400006148be866148be600e54612633614efa565b90615025565b60105490614f89565b925050505b919050565b6001546001600160a01b031681565b600354604080516370a0823160e01b815261dead600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561493357600080fd5b505afa158015614947573d6000803e3d6000fd5b505050506040513d602081101561495d57600080fd5b5051905090565b601c5460ff1681565b601b5481565b6003546001600160a01b031681565b6001546001600160a01b0316331461499957600080fd5b60648311156149e4576040805162461bcd60e51b815260206004820152601260248201527124b73b30b634b21030b63637b1b0ba34b7b760711b604482015290519081900360640190fd5b6000614a006064610ec886600c5461502590919063ffffffff16565b905060005b600954811015614a4a57614a4060098281548110614a1f57fe5b90600052602060002090600502016002015483614f8990919063ffffffff16565b9150600101614a05565b50600c54811115614a98576040805162461bcd60e51b8152602060048201526013602482015272105b1b1bd8d85d1a5bdb88195e18d959591959606a1b604482015290519081900360640190fd5b60096040518060a00160405280856001600160a01b03168152602001846001600160a01b03168152602001614add6064610ec889600c5461502590919063ffffffff16565b815260006020808301829052604092830182905284546001818101875595835291819020845160059093020180546001600160a01b039384166001600160a01b031991821617825591850151958101805496909316959091169490941790558101516002830155606081015160038301556080015160049091015550505050565b68056bc75e2d6310000081565b6005546001600160a01b031681565b6000828152600a602090815260408083206001600160a01b038516845290915281206005810154600690910154614bf79190610f0190670de0b6b3a764000090610ec890614bcb906126338a6147f4565b6000898152600a602090815260408083206001600160a01b038c16845290915290206001015490615025565b90505b92915050565b6009546000908210614c48576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b506000908152600b602052604090205490565b60008060098381548110614c6b57fe5b600091825260208083206007546005909302018054604080516370a0823160e01b81526001600160a01b03928316600482015290519296509316926370a08231926024808301939192829003018186803b158015614cc857600080fd5b505afa158015614cdc573d6000803e3d6000fd5b505050506040513d6020811015614cf257600080fd5b50516003548354604080516370a0823160e01b81526001600160a01b039283166004820152905193945060009391909216916370a08231916024808301926020929190829003018186803b158015614d4957600080fd5b505afa158015614d5d573d6000803e3d6000fd5b505050506040513d6020811015614d7357600080fd5b5051905080614d9457614d8f670de0b6b3a7640000600a614fe3565b614daa565b614daa81610ec884670de0b6b3a7640000615025565b95945050505050565b60105481565b60125481565b6002546001600160a01b031681565b60145481565b6001546001600160a01b03163314614deb57600080fd5b600280546001600160a01b0319166001600160a01b03838116918217909255600154604051919216907f83ada3430836f9d4bd6f7bc690ffbba5199cb19b37393dd64c2299302135359690600090a350565b6001546001600160a01b03163314614e5457600080fd5b42601f541015614ea4576040805162461bcd60e51b8152602060048201526016602482015275151bdbc81b185d1948199bdc881dda1a5d195b1a5cdd60521b604482015290519081900360640190fd5b60005b81811015610fd1576001601d6000858585818110614ec157fe5b602090810292909201356001600160a01b0316835250810191909152604001600020805460ff1916911515919091179055600101614ea7565b6000614f0842600d5461532b565b905090565b6006546001600160a01b031681565b600a6020528160005260406000206020528060005260406000206000915091505080600001549080600101549080600201549080600301549080600401549080600501549080600601549080600701549080600801549080600901549080600a015490508b565b60175481565b600082820183811015614bf7576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000614bf783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615341565b60008261503457506000614bfa565b8282028284828161504157fe5b0414614bf75760405162461bcd60e51b815260040180806020018281038252602181526020018061571a6021913960400191505060405180910390fd5b6000614bf783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506153e3565b42601b5411156151015760405162461bcd60e51b815260040180806020018281038252602d8152602001806156cd602d913960400191505060405180910390fd5b601c5460ff1661512d57601c805460ff191660011790556151254262127500614f89565b600d5542600e555b565b615138816147f4565b601055615143614efa565b600e553315615181576151568133614b7a565b6000828152600a60209081526040808320338452909152902060058101919091556010546006909101555b50565b600d544210615181576151a96064610ec8601154600c5461502590919063ffffffff16565b600c8190556151bb9062127500614fe3565b600f55600d546151ce9062127500614f89565b600d556151da8161512f565b600c5460408051918252517ffafb0ec84dbe5a6bf08f4fec2f970b66d402032cdfea2008b11e11eb5c3990f09181900360200190a150565b801580615298575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561526a57600080fd5b505afa15801561527e573d6000803e3d6000fd5b505050506040513d602081101561529457600080fd5b5051155b6152d35760405162461bcd60e51b81526004018080602001828103825260368152602001806157656036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610fd190849061543d565b3b151590565b600081831061533a5781614bf7565b5090919050565b600081836153cd5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561539257818101518382015260200161537a565b50505050905090810190601f1680156153bf5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816153d957fe5b0495945050505050565b600081848411156154355760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561539257818101518382015260200161537a565b505050900390565b6060615492826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166154ee9092919063ffffffff16565b805190915015610fd1578080602001905160208110156154b157600080fd5b5051610fd15760405162461bcd60e51b815260040180806020018281038252602a81526020018061573b602a913960400191505060405180910390fd5b60606154fd8484600085615505565b949350505050565b606061551085615325565b615561576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106155a05780518252601f199092019160209182019101615581565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114615602576040519150601f19603f3d011682016040523d82523d6000602084013e615607565b606091505b5091509150811561561b5791506154fd9050565b80511561562b5780518082602001fd5b60405162461bcd60e51b815260206004820181815286516024840152865187939192839260440191908501908083836000831561539257818101518382015260200161537a565b6040518061016001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe4661726d696e6720686173206e6f742079657420737461727465642e2054727920616761696e206c617465722e5265656e7472616e637947756172643a207265656e7472616e742063616c6c00536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212205ce19d33a315e33494a60dde2708df79a05b786e14704a44c52a8dc69c1f8a5f64736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001b5ed7c13eb64819f7b0c7b2d810daba93dfc2e0
-----Decoded View---------------
Arg [0] : _treasury (address): 0x1b5ed7c13eB64819F7b0C7b2D810dAbA93DFC2E0
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000001b5ed7c13eb64819f7b0c7b2d810daba93dfc2e0
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.