Contract Overview
My Name Tag:
Not Available
[ Download CSV Export ]
Latest 25 internal transaction
[ Download CSV Export ]
Contract Name:
TradeMint
Compiler Version
v0.7.6+commit.7338295f
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.6; pragma abicoder v2; import "../libraries/SafeMath.sol"; import "../libraries/Address.sol"; import "../libraries/trademint/PoolAddress.sol"; import "../interface/IERC20.sol"; import "../interface/ITokenIssue.sol"; import "../libraries/SafeERC20.sol"; import "../interface/trademint/ISummaSwapV3Manager.sol"; import "../interface/trademint/ITradeMint.sol"; import "../libraries/Context.sol"; import "../libraries/Owned.sol"; import "../libraries/FixedPoint128.sol"; import "../libraries/FullMath.sol"; import "../interface/ISummaPri.sol"; contract TradeMint is ITradeMint, Context, Owned { using SafeMath for uint256; using SafeERC20 for IERC20; using Address for address; ITokenIssue public tokenIssue; ISummaSwapV3Manager public iSummaSwapV3Manager; uint256 public totalIssueRate = 0.1 * 10000; uint256 public settlementBlock; mapping(address => bool) public isReward; uint256 public totalRewardShare; address public factory; uint256 public tradeShare; bytes32 public constant PUBLIC_ROLE = keccak256("PUBLIC_ROLE"); uint24 public reduceFee; uint24 public superFee; struct TickInfo { uint256 liquidityVolumeGrowthOutside; uint256 liquidityIncentiveGrowthOutside; uint256 settlementBlock; } struct PoolInfo { uint256 lastSettlementBlock; mapping(int24 => TickInfo) ticks; uint256 liquidityVolumeGrowth; uint256 liquidityIncentiveGrowth; uint256 rewardShare; int24 currentTick; uint256 unSettlementAmount; mapping(uint256 => uint256) blockSettlementVolume; address poolAddress; mapping(uint256 => uint256) tradeSettlementAmountGrowth; } struct UserInfo { uint256 tradeSettlementedAmount; uint256 tradeUnSettlementedAmount; uint256 lastTradeBlock; } struct Position { uint256 lastRewardGrowthInside; uint256 lastRewardVolumeGrowth; uint256 lastRewardSettlementedBlock; uint256 tokensOwed; } struct TradeMintCallbackData { bytes path; address payer; address realplay; } address[] public poolAddress; uint256 public pledgeRate; uint256 public minPledge; address public summaAddress; address public priAddress; address public router; mapping(uint256 => Position) public _positions; mapping(address => mapping(address => UserInfo)) public userInfo; mapping(address => PoolInfo) public poolInfoByPoolAddress; uint256 public lastWithdrawBlock; event Cross( int24 _tick, int24 _nextTick, uint256 liquidityVolumeGrowth, uint256 liquidityIncentiveGrowth, uint256 tickliquidityVolumeGrowth, uint256 tickliquidityIncentiveGrowth ); event Snapshot( address tradeAddress, int24 tick, uint256 liquidityVolumeGrowth, uint256 tradeVolume ); event SnapshotMintLiquidity( uint256 tokenId, address poolAddress, int24 _tickLower, int24 _tickUpper ); event SnapshotLiquidity( uint256 tokenId, address poolAddress, int24 _tickLower, int24 _tickUpper ); function setTokenIssue(ITokenIssue _tokenIssue) public onlyOwner { tokenIssue = _tokenIssue; } function setISummaSwapV3Manager(ISummaSwapV3Manager _ISummaSwapV3Manager) public onlyOwner { iSummaSwapV3Manager = _ISummaSwapV3Manager; } function setTotalIssueRate(uint256 _totalIssueRate) public onlyOwner { totalIssueRate = _totalIssueRate; } function setSettlementBlock(uint256 _settlementBlock) public onlyOwner { settlementBlock = _settlementBlock; } function setFactory(address _factory) public onlyOwner { factory = _factory; } function setRouterAddress(address _routerAddress) public onlyOwner { router = _routerAddress; } function setTradeShare(uint256 _tradeShare) public onlyOwner { tradeShare = _tradeShare; } function setPledgeRate(uint256 _pledgeRate) public onlyOwner { pledgeRate = _pledgeRate; } function setMinPledge(uint256 _minPledge) public onlyOwner { minPledge = _minPledge * 10**18; } function setSummaAddress(address _summaAddress) public onlyOwner { summaAddress = _summaAddress; } function setPriAddress(address _priAddress) public onlyOwner { priAddress = _priAddress; } function setReduceFee(uint24 _reduceFee) public onlyOwner { reduceFee = _reduceFee; } function setSuperFee(uint24 _superFee) public onlyOwner { superFee = _superFee; } function enableReward( address _poolAddress, bool _isReward, uint256 _rewardShare ) public onlyOwner { require(settlementBlock > 0, "error settlementBlock"); massUpdatePools(); if (_isReward) { require(_rewardShare > 0, "error rewardShare"); PoolInfo storage _poolInfo = poolInfoByPoolAddress[_poolAddress]; if (poolAddress.length == 0) { lastWithdrawBlock = block.number.div(settlementBlock).mul( settlementBlock ); } if (_poolInfo.poolAddress == address(0)) { _poolInfo.lastSettlementBlock = block .number .div(settlementBlock) .mul(settlementBlock); poolAddress.push(_poolAddress); } totalRewardShare += _rewardShare; totalRewardShare -= _poolInfo.rewardShare; _poolInfo.poolAddress = _poolAddress; _poolInfo.rewardShare = _rewardShare; } else { require(isReward[_poolAddress], "pool is not reward"); PoolInfo storage _poolInfo = poolInfoByPoolAddress[_poolAddress]; totalRewardShare -= _poolInfo.rewardShare; _poolInfo.rewardShare = 0; } isReward[_poolAddress] = _isReward; } function enableReward( address token0, address token1, uint24 fee, bool _isReward, uint256 _rewardShare ) public onlyOwner { require(settlementBlock > 0, "error settlementBlock"); address _poolAddress = PoolAddress.computeAddress( factory, token0, token1, fee ); massUpdatePools(); if (_isReward) { require(_rewardShare > 0, "error rewardShare"); PoolInfo storage _poolInfo = poolInfoByPoolAddress[_poolAddress]; if (poolAddress.length == 0) { lastWithdrawBlock = block.number.div(settlementBlock).mul( settlementBlock ); } if (_poolInfo.poolAddress == address(0)) { _poolInfo.lastSettlementBlock = block .number .div(settlementBlock) .mul(settlementBlock); poolAddress.push(_poolAddress); } totalRewardShare += _rewardShare; totalRewardShare -= _poolInfo.rewardShare; _poolInfo.poolAddress = _poolAddress; _poolInfo.rewardShare = _rewardShare; } else { require(isReward[_poolAddress], "pool is not reward"); PoolInfo storage _poolInfo = poolInfoByPoolAddress[_poolAddress]; totalRewardShare -= _poolInfo.rewardShare; _poolInfo.rewardShare = 0; } isReward[_poolAddress] = _isReward; } function massUpdatePools() public { uint256 length = poolAddress.length; for (uint256 pid = 0; pid < length; ++pid) { updatePool(pid); } } function updatePool(uint256 _pid) public { address _poolAddress = poolAddress[_pid]; PoolInfo storage poolInfo = poolInfoByPoolAddress[_poolAddress]; if ( poolInfo.lastSettlementBlock.add(settlementBlock) <= block.number && poolInfo.unSettlementAmount > 0 ) { uint256 form = poolInfo.lastSettlementBlock; uint256 to = (form.add(settlementBlock)); uint256 summaReward = getMultiplier(form, to) .mul(poolInfo.rewardShare) .div(totalRewardShare); settlementTrade(poolInfo.poolAddress, summaReward.div(tradeShare)); settlementPoolNewLiquidityIncentiveGrowth(poolInfo.poolAddress); withdrawTokenFromPri(); } } function withdrawSumma(uint256 amount) public onlyOwner { IERC20(summaAddress).safeTransfer(msg.sender, amount); } function pendingSumma(address userAddress) public view returns (uint256) { uint256 amount = 0; uint256 length = poolAddress.length; for (uint256 pid = 0; pid < length; ++pid) { address _poolAddress = poolAddress[pid]; PoolInfo storage poolInfo = poolInfoByPoolAddress[_poolAddress]; UserInfo storage userInfo = userInfo[userAddress][_poolAddress]; if (userInfo.lastTradeBlock != 0) { if (userInfo.lastTradeBlock < poolInfo.lastSettlementBlock) { amount += FullMath.mulDiv( userInfo.tradeUnSettlementedAmount, poolInfo.tradeSettlementAmountGrowth[ ( userInfo .lastTradeBlock .div(settlementBlock) .add(1) ).mul(settlementBlock) ], FixedPoint128.Q128 ); } else if ( (userInfo.lastTradeBlock.div(settlementBlock).add(1)).mul( settlementBlock ) <= block.number && poolInfo.unSettlementAmount > 0 ) { uint256 form = ( userInfo.lastTradeBlock.div(settlementBlock) ).mul(settlementBlock); uint256 to = form.add(settlementBlock); uint256 summaReward = getMultiplier(form, to) .mul(poolInfo.rewardShare) .div(totalRewardShare); uint256 tradeReward = (summaReward).div(tradeShare); uint256 quotient = FullMath.mulDiv( tradeReward, FixedPoint128.Q128, poolInfo.unSettlementAmount ); amount += FullMath.mulDiv( quotient, userInfo.tradeUnSettlementedAmount, FixedPoint128.Q128 ); } amount += userInfo.tradeSettlementedAmount; } } uint256 balance = iSummaSwapV3Manager.balanceOf(userAddress); for (uint256 pid = 0; pid < balance; ++pid) { uint256 tokenId = iSummaSwapV3Manager.tokenOfOwnerByIndex( userAddress, pid ); amount += getPendingSummaByTokenId(tokenId); } return amount; } function pendingTradeSumma(address userAddress) public view returns (uint256) { uint256 amount = 0; uint256 length = poolAddress.length; for (uint256 pid = 0; pid < length; ++pid) { address _poolAddress = poolAddress[pid]; PoolInfo storage poolInfo = poolInfoByPoolAddress[_poolAddress]; UserInfo storage userInfo = userInfo[userAddress][poolAddress[pid]]; if (userInfo.lastTradeBlock != 0) { if (userInfo.lastTradeBlock < poolInfo.lastSettlementBlock) { amount += FullMath.mulDiv( userInfo.tradeUnSettlementedAmount, poolInfo.tradeSettlementAmountGrowth[ ( userInfo .lastTradeBlock .div(settlementBlock) .add(1) ).mul(settlementBlock) ], FixedPoint128.Q128 ); } else if ( (userInfo.lastTradeBlock.div(settlementBlock).add(1)).mul( settlementBlock ) <= block.number && poolInfo.unSettlementAmount > 0 ) { uint256 form = ( userInfo.lastTradeBlock.div(settlementBlock) ).mul(settlementBlock); uint256 to = ( userInfo.lastTradeBlock.div(settlementBlock).add(1) ).mul(settlementBlock); uint256 summaReward = getMultiplier(form, to) .mul(poolInfo.rewardShare) .div(totalRewardShare); uint256 tradeReward = (summaReward).div(tradeShare); uint256 quotient = FullMath.mulDiv( tradeReward, FixedPoint128.Q128, poolInfo.unSettlementAmount ); amount += FullMath.mulDiv( quotient, userInfo.tradeUnSettlementedAmount, FixedPoint128.Q128 ); } amount += userInfo.tradeSettlementedAmount; } } return amount; } function getPendingSummaByTokenId(uint256 tokenId) public view returns (uint256) { uint256 amount = 0; ( , , address token0, address token1, uint24 fee, int24 tickLower, int24 tickUpper, uint128 liquidity, , , , ) = iSummaSwapV3Manager.positions(tokenId); address poolAddress = PoolAddress.computeAddress( factory, token0, token1, fee ); if (isReward[poolAddress]) { ( uint256 liquidityIncentiveGrowthInPosition, uint256 blockSettlementVolume ) = getLiquidityIncentiveGrowthInPosition( tickLower, tickUpper, tokenId, poolAddress ); Position memory position = _positions[tokenId]; uint256 userLastReward = position.lastRewardGrowthInside; if (position.lastRewardVolumeGrowth > 0) { userLastReward += FullMath.mulDiv( position.lastRewardVolumeGrowth, blockSettlementVolume, FixedPoint128.Q128 ); } if (liquidityIncentiveGrowthInPosition > userLastReward) { uint256 newliquidityIncentiveGrowthInPosition = liquidityIncentiveGrowthInPosition .sub(userLastReward); amount += FullMath.mulDiv( newliquidityIncentiveGrowthInPosition, liquidity, FixedPoint128.Q128 ); } amount += position.tokensOwed; } return amount; } function getPoolReward(address poolAddress) internal view returns (uint256) { PoolInfo storage poolInfo = poolInfoByPoolAddress[poolAddress]; uint256 form = poolInfo.lastSettlementBlock; uint256 to = poolInfo.lastSettlementBlock.add(settlementBlock); uint256 multiplier = getMultiplier(form, to); uint256 reward = multiplier .mul(poolInfo.rewardShare) .div(totalRewardShare) .div(tradeShare) .mul(tradeShare.sub(1)); return reward; } function getLiquidityIncentiveGrowthInPosition( int24 _tickLower, int24 _tickUpper, uint256 tokenId, address poolAddress ) public view returns (uint256 feeGrowthInside, uint256 blockSettlementVolume) { PoolInfo storage poolInfo = poolInfoByPoolAddress[poolAddress]; uint256 newLiquidityIncentiveGrowth = poolInfo.liquidityIncentiveGrowth; if ( poolInfo.lastSettlementBlock.add(settlementBlock) <= block.number && poolInfo.unSettlementAmount > 0 ) { ( uint256 newSettlement, uint256 _blockSettlementVolume ) = getPoolNewLiquidityIncentiveGrowth(poolAddress); newLiquidityIncentiveGrowth += newSettlement; blockSettlementVolume = _blockSettlementVolume; } TickInfo storage tickLower = poolInfo.ticks[_tickLower]; uint256 newLowerLiquidityIncentiveGrowthOutside = tickLower .liquidityIncentiveGrowthOutside; if (tickLower.liquidityVolumeGrowthOutside != 0) { if ( poolInfo.blockSettlementVolume[tickLower.settlementBlock] != 0 ) { newLowerLiquidityIncentiveGrowthOutside += FullMath.mulDiv( tickLower.liquidityVolumeGrowthOutside, poolInfo.blockSettlementVolume[tickLower.settlementBlock], FixedPoint128.Q128 ); } else if ( tickLower.settlementBlock == poolInfo.lastSettlementBlock.add(settlementBlock) ) { newLowerLiquidityIncentiveGrowthOutside += FullMath.mulDiv( tickLower.liquidityVolumeGrowthOutside, blockSettlementVolume, FixedPoint128.Q128 ); } } TickInfo storage tickUpper = poolInfo.ticks[_tickUpper]; uint256 newUpLiquidityIncentiveGrowthOutside = tickUpper .liquidityIncentiveGrowthOutside; if (tickUpper.liquidityVolumeGrowthOutside != 0) { if ( poolInfo.blockSettlementVolume[tickUpper.settlementBlock] != 0 ) { newUpLiquidityIncentiveGrowthOutside += FullMath.mulDiv( tickUpper.liquidityVolumeGrowthOutside, poolInfo.blockSettlementVolume[tickUpper.settlementBlock], FixedPoint128.Q128 ); } else if ( tickUpper.settlementBlock == poolInfo.lastSettlementBlock.add(settlementBlock) ) { newUpLiquidityIncentiveGrowthOutside += FullMath.mulDiv( tickUpper.liquidityVolumeGrowthOutside, blockSettlementVolume, FixedPoint128.Q128 ); } } // calculate fee growth below uint256 feeGrowthBelow; if (poolInfo.currentTick >= _tickLower) { feeGrowthBelow = newLowerLiquidityIncentiveGrowthOutside; } else { feeGrowthBelow = newLiquidityIncentiveGrowth - newLowerLiquidityIncentiveGrowthOutside; } uint256 feeGrowthAbove; if (poolInfo.currentTick < _tickUpper) { feeGrowthAbove = newUpLiquidityIncentiveGrowthOutside; } else { feeGrowthAbove = newLiquidityIncentiveGrowth - newUpLiquidityIncentiveGrowthOutside; } feeGrowthInside = newLiquidityIncentiveGrowth - feeGrowthBelow - feeGrowthAbove; if ( poolInfo.blockSettlementVolume[ _positions[tokenId].lastRewardSettlementedBlock ] != 0 ) { blockSettlementVolume = poolInfo.blockSettlementVolume[ _positions[tokenId].lastRewardSettlementedBlock ]; } } function settlementLiquidityIncentiveGrowthInPosition( int24 _tickLower, int24 _tickUpper, address poolAddress ) internal returns (uint256) { PoolInfo storage poolInfo = poolInfoByPoolAddress[poolAddress]; uint256 newLiquidityIncentiveGrowth = poolInfo.liquidityIncentiveGrowth; if ( poolInfo.lastSettlementBlock.add(settlementBlock) <= block.number && poolInfo.unSettlementAmount > 0 ) { newLiquidityIncentiveGrowth = settlementPoolNewLiquidityIncentiveGrowth( poolAddress ); } if (newLiquidityIncentiveGrowth == 0) { return 0; } TickInfo storage tickLower = poolInfo.ticks[_tickLower]; if ( poolInfo.blockSettlementVolume[tickLower.settlementBlock] > 0 && tickLower.liquidityVolumeGrowthOutside > 0 ) { tickLower.liquidityIncentiveGrowthOutside += FullMath.mulDiv( tickLower.liquidityVolumeGrowthOutside, poolInfo.blockSettlementVolume[tickLower.settlementBlock], FixedPoint128.Q128 ); tickLower.liquidityVolumeGrowthOutside = 0; } uint256 newLowerLiquidityIncentiveGrowthOutside = tickLower .liquidityIncentiveGrowthOutside; TickInfo storage tickUpper = poolInfo.ticks[_tickUpper]; if ( poolInfo.blockSettlementVolume[tickUpper.settlementBlock] > 0 && tickUpper.liquidityVolumeGrowthOutside > 0 ) { tickUpper.liquidityIncentiveGrowthOutside += FullMath.mulDiv( tickUpper.liquidityVolumeGrowthOutside, poolInfo.blockSettlementVolume[tickUpper.settlementBlock], FixedPoint128.Q128 ); tickUpper.liquidityVolumeGrowthOutside = 0; } uint256 newUpLiquidityIncentiveGrowthOutside = tickUpper .liquidityIncentiveGrowthOutside; // calculate fee growth below uint256 feeGrowthBelow; if (poolInfo.currentTick >= _tickLower) { feeGrowthBelow = newLowerLiquidityIncentiveGrowthOutside; } else { feeGrowthBelow = newLiquidityIncentiveGrowth - newLowerLiquidityIncentiveGrowthOutside; } uint256 feeGrowthAbove; if (poolInfo.currentTick < _tickUpper) { feeGrowthAbove = newUpLiquidityIncentiveGrowthOutside; } else { feeGrowthAbove = newLiquidityIncentiveGrowth - newUpLiquidityIncentiveGrowthOutside; } uint256 feeGrowthInside = newLiquidityIncentiveGrowth - feeGrowthBelow - feeGrowthAbove; return feeGrowthInside; } function settlementPoolNewLiquidityIncentiveGrowth(address poolAddress) internal returns (uint256) { PoolInfo storage poolInfo = poolInfoByPoolAddress[poolAddress]; uint256 reward = getPoolReward(poolAddress); poolInfo.liquidityIncentiveGrowth += reward .mul(poolInfo.liquidityVolumeGrowth) .div(poolInfo.unSettlementAmount); poolInfo.liquidityVolumeGrowth = 0; poolInfo.blockSettlementVolume[ poolInfo.lastSettlementBlock.add(settlementBlock) ] = FullMath.mulDiv( reward, FixedPoint128.Q128, poolInfo.unSettlementAmount ); poolInfo.unSettlementAmount = 0; poolInfo.lastSettlementBlock = block.number.div(settlementBlock).mul( settlementBlock ); return poolInfo.liquidityIncentiveGrowth; } function getPoolNewLiquidityIncentiveGrowth(address poolAddress) public view returns ( uint256 newLiquidityIncentiveGrowth, uint256 blockSettlementVolume ) { PoolInfo storage poolInfo = poolInfoByPoolAddress[poolAddress]; uint256 reward = getPoolReward(poolAddress); newLiquidityIncentiveGrowth = reward .mul(poolInfo.liquidityVolumeGrowth) .div(poolInfo.unSettlementAmount); blockSettlementVolume = FullMath.mulDiv( reward, FixedPoint128.Q128, poolInfo.unSettlementAmount ); } // Return reward multiplier over the given _from to _to block. function getMultiplier(uint256 _from, uint256 _to) internal view returns (uint256) { uint256 issueTime = tokenIssue.startIssueTime(); if (_to < issueTime) { return 0; } if (_from < issueTime) { return getIssue(issueTime, _to).mul(totalIssueRate).div(10000); } return getIssue(issueTime, _to) .sub(getIssue(issueTime, _from)) .mul(totalIssueRate) .div(10000); } function withdrawTokenFromPri() internal { uint256 nowWithdrawBlock = block.number.div(settlementBlock).mul( settlementBlock ); if (nowWithdrawBlock > lastWithdrawBlock) { uint256 summaReward = getMultiplier( lastWithdrawBlock, nowWithdrawBlock ); tokenIssue.transByContract(address(this), summaReward); } lastWithdrawBlock = nowWithdrawBlock; } function withdraw() public { withdrawTokenFromPri(); uint256 amount = withdrawSettlement(); uint256 pledge = amount.mul(pledgeRate).div(100); if (pledge < minPledge) { pledge = minPledge; } if (pledge != 0) { require( IERC20(summaAddress).balanceOf(msg.sender) > pledge, "Insufficient pledge" ); } IERC20(summaAddress).safeTransfer(address(msg.sender), amount); } function withdrawByTokenId(uint256 tokenId) public { withdrawTokenFromPri(); require(msg.sender == iSummaSwapV3Manager.ownerOf(tokenId),"not allowed!"); uint256 amount = withdrawSettlementByTokenId(tokenId); uint256 pledge = amount.mul(pledgeRate).div(100); if (pledge < minPledge) { pledge = minPledge; } if (pledge != 0) { require( IERC20(summaAddress).balanceOf(msg.sender) > pledge, "Insufficient pledge" ); } IERC20(summaAddress).safeTransfer(address(msg.sender), amount); } function withdrawTrade() public { withdrawTokenFromPri(); uint256 amount = withdrawSettlementTrade(); uint256 pledge = amount.mul(pledgeRate).div(100); if (pledge < minPledge) { pledge = minPledge; } if (pledge != 0) { require( IERC20(summaAddress).balanceOf(msg.sender) > pledge, "Insufficient pledge" ); } IERC20(summaAddress).safeTransfer(address(msg.sender), amount); } function withdrawSettlementTrade() internal returns (uint256) { uint256 amount = 0; uint256 length = poolAddress.length; for (uint256 pid = 0; pid < length; ++pid) { address _poolAddress = poolAddress[pid]; PoolInfo storage poolInfo = poolInfoByPoolAddress[_poolAddress]; UserInfo storage userInfo = userInfo[msg.sender][poolAddress[pid]]; if ( poolInfo.lastSettlementBlock.add(settlementBlock) <= block.number && poolInfo.unSettlementAmount > 0 ) { uint256 form = poolInfo.lastSettlementBlock; uint256 to = poolInfo.lastSettlementBlock.add(settlementBlock); uint256 summaReward = getMultiplier(form, to) .mul(poolInfo.rewardShare) .div(totalRewardShare); poolInfo.tradeSettlementAmountGrowth[to] += FullMath.mulDiv( summaReward.div(tradeShare), FixedPoint128.Q128, poolInfo.unSettlementAmount ); settlementPoolNewLiquidityIncentiveGrowth(poolInfo.poolAddress); } uint256 tradeSettlementAmount = poolInfo .tradeSettlementAmountGrowth[ userInfo .lastTradeBlock .div(settlementBlock) .mul(settlementBlock) .add(settlementBlock) ]; if ( userInfo.tradeUnSettlementedAmount != 0 && tradeSettlementAmount != 0 ) { userInfo.tradeSettlementedAmount += FullMath.mulDiv( userInfo.tradeUnSettlementedAmount, tradeSettlementAmount, FixedPoint128.Q128 ); userInfo.tradeUnSettlementedAmount = 0; } amount += userInfo.tradeSettlementedAmount; userInfo.tradeSettlementedAmount = 0; } return amount; } function settlementTrade( address tradeAddress, address poolAddress, uint256 summaReward ) internal { UserInfo storage userInfo = userInfo[tradeAddress][poolAddress]; PoolInfo storage poolInfo = poolInfoByPoolAddress[poolAddress]; poolInfo.tradeSettlementAmountGrowth[ poolInfo.lastSettlementBlock.add(settlementBlock) ] += FullMath.mulDiv( summaReward, FixedPoint128.Q128, poolInfo.unSettlementAmount ); userInfo.tradeSettlementedAmount += FullMath.mulDiv( userInfo.tradeUnSettlementedAmount, poolInfo.tradeSettlementAmountGrowth[ (userInfo.lastTradeBlock.div(settlementBlock).add(1)).mul( settlementBlock ) ], FixedPoint128.Q128 ); userInfo.tradeUnSettlementedAmount = 0; } function settlementTrade(address poolAddress, uint256 summaReward) internal { PoolInfo storage poolInfo = poolInfoByPoolAddress[poolAddress]; poolInfo.tradeSettlementAmountGrowth[ poolInfo.lastSettlementBlock.add(settlementBlock) ] += FullMath.mulDiv( summaReward, FixedPoint128.Q128, poolInfo.unSettlementAmount ); } function withdrawSettlement() internal returns (uint256) { uint256 amount = 0; uint256 length = poolAddress.length; for (uint256 pid = 0; pid < length; ++pid) { address _poolAddress = poolAddress[pid]; PoolInfo storage poolInfo = poolInfoByPoolAddress[_poolAddress]; UserInfo storage userInfo = userInfo[msg.sender][poolAddress[pid]]; if ( poolInfo.lastSettlementBlock.add(settlementBlock) <= block.number && poolInfo.unSettlementAmount > 0 ) { uint256 form = poolInfo.lastSettlementBlock; uint256 to = poolInfo.lastSettlementBlock.add(settlementBlock); uint256 summaReward = getMultiplier(form, to) .mul(poolInfo.rewardShare) .div(totalRewardShare); poolInfo.tradeSettlementAmountGrowth[to] += FullMath.mulDiv( summaReward.div(tradeShare), FixedPoint128.Q128, poolInfo.unSettlementAmount ); settlementPoolNewLiquidityIncentiveGrowth(poolInfo.poolAddress); } uint256 tradeSettlementAmount = poolInfo .tradeSettlementAmountGrowth[ userInfo .lastTradeBlock .div(settlementBlock) .mul(settlementBlock) .add(settlementBlock) ]; if ( userInfo.tradeUnSettlementedAmount != 0 && tradeSettlementAmount != 0 ) { userInfo.tradeSettlementedAmount += FullMath.mulDiv( userInfo.tradeUnSettlementedAmount, tradeSettlementAmount, FixedPoint128.Q128 ); userInfo.tradeUnSettlementedAmount = 0; } amount += userInfo.tradeSettlementedAmount; userInfo.tradeSettlementedAmount = 0; } uint256 balance = iSummaSwapV3Manager.balanceOf(msg.sender); for (uint256 pid = 0; pid < balance; ++pid) { uint256 tokenId = iSummaSwapV3Manager.tokenOfOwnerByIndex( msg.sender, pid ); amount += settlementByTokenId(tokenId); } return amount; } function withdrawSettlementByTokenId(uint256 tokenId) internal returns (uint256) { uint256 amount = 0; uint256 length = poolAddress.length; for (uint256 pid = 0; pid < length; ++pid) { address _poolAddress = poolAddress[pid]; PoolInfo storage poolInfo = poolInfoByPoolAddress[_poolAddress]; UserInfo storage userInfo = userInfo[msg.sender][poolAddress[pid]]; if ( poolInfo.lastSettlementBlock.add(settlementBlock) <= block.number && poolInfo.unSettlementAmount > 0 ) { uint256 form = poolInfo.lastSettlementBlock; uint256 to = poolInfo.lastSettlementBlock.add(settlementBlock); uint256 summaReward = getMultiplier(form, to) .mul(poolInfo.rewardShare) .div(totalRewardShare); poolInfo.tradeSettlementAmountGrowth[to] += FullMath.mulDiv( summaReward.div(tradeShare), FixedPoint128.Q128, poolInfo.unSettlementAmount ); settlementPoolNewLiquidityIncentiveGrowth(poolInfo.poolAddress); } uint256 tradeSettlementAmount = poolInfo .tradeSettlementAmountGrowth[ userInfo .lastTradeBlock .div(settlementBlock) .mul(settlementBlock) .add(settlementBlock) ]; if ( userInfo.tradeUnSettlementedAmount != 0 && tradeSettlementAmount != 0 ) { userInfo.tradeSettlementedAmount += FullMath.mulDiv( userInfo.tradeUnSettlementedAmount, tradeSettlementAmount, FixedPoint128.Q128 ); userInfo.tradeUnSettlementedAmount = 0; } } amount += settlementByTokenId(tokenId); return amount; } function settlementByTokenId(uint256 tokenId) internal returns (uint256) { ( , , address token0, address token1, uint24 fee, int24 tickLower, int24 tickUpper, uint128 liquidity, , , , ) = iSummaSwapV3Manager.positions(tokenId); address poolAddress = PoolAddress.computeAddress( factory, token0, token1, fee ); uint256 amount = 0; if (isReward[poolAddress] ) { uint256 newLiquidityIncentiveGrowthInPosition = settlementLiquidityIncentiveGrowthInPosition( tickLower, tickUpper, poolAddress ); uint256 userLastReward = settlementLastReward(poolAddress, tokenId); amount += _positions[tokenId].tokensOwed; _positions[tokenId].tokensOwed = 0; if (newLiquidityIncentiveGrowthInPosition > userLastReward) { uint256 liquidityIncentiveGrowthInPosition = newLiquidityIncentiveGrowthInPosition .sub(userLastReward); _positions[tokenId] .lastRewardGrowthInside = newLiquidityIncentiveGrowthInPosition; amount += FullMath.mulDiv( liquidityIncentiveGrowthInPosition, liquidity, FixedPoint128.Q128 ); } else { _positions[tokenId] .lastRewardGrowthInside = newLiquidityIncentiveGrowthInPosition; } } return amount; } function settlementLastReward(address poolAddress, uint256 tokenId) internal returns (uint256 userLastReward) { PoolInfo storage poolInfo = poolInfoByPoolAddress[poolAddress]; userLastReward = _positions[tokenId].lastRewardGrowthInside; if ( _positions[tokenId].lastRewardVolumeGrowth >= 0 && poolInfo.blockSettlementVolume[ _positions[tokenId].lastRewardSettlementedBlock ] != 0 ) { userLastReward += ( FullMath.mulDiv( _positions[tokenId].lastRewardVolumeGrowth, poolInfo.blockSettlementVolume[ _positions[tokenId].lastRewardSettlementedBlock ], FixedPoint128.Q128 ) ); _positions[tokenId].lastRewardVolumeGrowth = 0; } } function getIssue(uint256 _from, uint256 _to) private view returns (uint256) { if (_to <= _from || _from <= 0) { return 0; } uint256 timeInterval = _to - _from; uint256 monthIndex = timeInterval.div(tokenIssue.MONTH_SECONDS()); if (monthIndex < 1) { return timeInterval.mul( tokenIssue.issueInfo(monthIndex).div( tokenIssue.MONTH_SECONDS() ) ); } else if (monthIndex < tokenIssue.issueInfoLength()) { uint256 tempTotal = 0; for (uint256 j = 0; j < monthIndex; j++) { tempTotal = tempTotal.add(tokenIssue.issueInfo(j)); } uint256 calcAmount = timeInterval .sub(monthIndex.mul(tokenIssue.MONTH_SECONDS())) .mul( tokenIssue.issueInfo(monthIndex).div( tokenIssue.MONTH_SECONDS() ) ) .add(tempTotal); if ( calcAmount > tokenIssue.TOTAL_AMOUNT().sub(tokenIssue.INIT_MINE_SUPPLY()) ) { return tokenIssue.TOTAL_AMOUNT().sub( tokenIssue.INIT_MINE_SUPPLY() ); } return calcAmount; } else { return 0; } } function cross(int24 _tick, int24 _nextTick) external override { require(Address.isContract(_msgSender())); PoolInfo storage poolInfo = poolInfoByPoolAddress[_msgSender()]; if (isReward[_msgSender()]) { poolInfo.currentTick = _nextTick; TickInfo storage tick = poolInfo.ticks[_tick]; if ( tick.liquidityVolumeGrowthOutside > 0 && poolInfo.blockSettlementVolume[tick.settlementBlock] > 0 ) { tick.liquidityIncentiveGrowthOutside += FullMath.mulDiv( poolInfo.blockSettlementVolume[tick.settlementBlock], tick.liquidityVolumeGrowthOutside, FixedPoint128.Q128 ); tick.liquidityVolumeGrowthOutside = 0; } tick.liquidityIncentiveGrowthOutside = poolInfo .liquidityIncentiveGrowth .sub(tick.liquidityIncentiveGrowthOutside); tick.liquidityVolumeGrowthOutside = poolInfo .liquidityVolumeGrowth .sub(tick.liquidityVolumeGrowthOutside); tick.settlementBlock = (block.number.div(settlementBlock).add(1)) .mul(settlementBlock); emit Cross( _tick, _nextTick, poolInfo.liquidityVolumeGrowth, poolInfo.liquidityIncentiveGrowth, tick.liquidityVolumeGrowthOutside, tick.liquidityIncentiveGrowthOutside ); } } function snapshot( bytes calldata _data, int24 tick, uint256 liquidityVolumeGrowth, uint256 tradeVolume ) external override { require(Address.isContract(_msgSender())); TradeMintCallbackData memory data = abi.decode( _data, (TradeMintCallbackData) ); PoolInfo storage poolInfo = poolInfoByPoolAddress[_msgSender()]; UserInfo storage userInfo = userInfo[data.realplay][_msgSender()]; if (isReward[_msgSender()]) { if ( poolInfo.lastSettlementBlock.add(settlementBlock) <= block.number && poolInfo.unSettlementAmount > 0 ) { uint256 form = poolInfo.lastSettlementBlock; uint256 to = (form.add(settlementBlock)); uint256 summaReward = getMultiplier(form, to) .mul(poolInfo.rewardShare) .div(totalRewardShare); settlementTrade( data.realplay, _msgSender(), summaReward.div(tradeShare) ); settlementPoolNewLiquidityIncentiveGrowth(_msgSender()); } else { uint256 tradeSettlementAmount = poolInfo .tradeSettlementAmountGrowth[ userInfo .lastTradeBlock .div(settlementBlock) .mul(settlementBlock) .add(settlementBlock) ]; if ( userInfo.tradeUnSettlementedAmount != 0 && tradeSettlementAmount != 0 ) { userInfo.tradeSettlementedAmount += FullMath.mulDiv( userInfo.tradeUnSettlementedAmount, tradeSettlementAmount, FixedPoint128.Q128 ); userInfo.tradeUnSettlementedAmount = 0; } } userInfo.tradeUnSettlementedAmount += tradeVolume; userInfo.lastTradeBlock = block.number; poolInfo.currentTick = tick; poolInfo.liquidityVolumeGrowth += liquidityVolumeGrowth; poolInfo.unSettlementAmount += tradeVolume; poolInfo.lastSettlementBlock = block .number .div(settlementBlock) .mul(settlementBlock); emit Snapshot( data.realplay, tick, liquidityVolumeGrowth, tradeVolume ); } } function snapshotLiquidity( address poolAddress, uint128 liquidity, uint256 tokenId, int24 _tickLower, int24 _tickUpper ) external override { require(_msgSender() == address(iSummaSwapV3Manager)); PoolInfo storage poolInfo = poolInfoByPoolAddress[poolAddress]; if (isReward[poolAddress]) { if ( poolInfo.lastSettlementBlock.add(settlementBlock) <= block.number && poolInfo.unSettlementAmount > 0 ) { uint256 form = poolInfo.lastSettlementBlock; uint256 to = (form.add(settlementBlock)); uint256 summaReward = getMultiplier(form, to) .mul(poolInfo.rewardShare) .div(totalRewardShare); settlementTrade(poolAddress, summaReward.div(tradeShare)); } settlementByTokenId( tokenId, poolAddress, liquidity, _tickLower, _tickUpper ); emit SnapshotLiquidity( tokenId, poolAddress, _tickLower, _tickUpper ); } } function snapshotMintLiquidity( address poolAddress, uint256 tokenId, int24 _tickLower, int24 _tickUpper ) external override { require(_msgSender() == address(iSummaSwapV3Manager)); PoolInfo storage poolInfo = poolInfoByPoolAddress[poolAddress]; if (isReward[poolAddress]) { if ( poolInfo.lastSettlementBlock.add(settlementBlock) <= block.number && poolInfo.unSettlementAmount > 0 ) { uint256 form = poolInfo.lastSettlementBlock; uint256 to = (form.add(settlementBlock)); uint256 summaReward = getMultiplier(form, to) .mul(poolInfo.rewardShare) .div(totalRewardShare); settlementTrade(poolAddress, summaReward.div(tradeShare)); } settlementByTokenId( tokenId, poolAddress, 0, _tickLower, _tickUpper ); emit SnapshotMintLiquidity( tokenId, poolAddress, _tickLower, _tickUpper ); } } function settlementByTokenId( uint256 tokenId, address poolAddress, uint128 liquidity, int24 _tickLower, int24 _tickUpper ) internal { Position storage position = _positions[tokenId]; uint256 newLiquidityIncentiveGrowthInPosition = settlementLiquidityIncentiveGrowthInPosition( _tickLower, _tickUpper, poolAddress ); uint256 userLastReward = settlementLastReward(poolAddress, tokenId); if (newLiquidityIncentiveGrowthInPosition > userLastReward) { uint256 liquidityIncentiveGrowthInPosition = newLiquidityIncentiveGrowthInPosition .sub(userLastReward); if (liquidity != 0) { position.tokensOwed += FullMath.mulDiv( liquidityIncentiveGrowthInPosition, liquidity, FixedPoint128.Q128 ); } } position.lastRewardGrowthInside = newLiquidityIncentiveGrowthInPosition; position .lastRewardVolumeGrowth = settlementLiquidityVolumeGrowthInPosition( _tickLower, _tickUpper, poolAddress ); position.lastRewardSettlementedBlock = block .number .div(settlementBlock) .mul(settlementBlock) .add(settlementBlock); } function settlementLiquidityVolumeGrowthInPosition( int24 _tickLower, int24 _tickUpper, address poolAddress ) internal returns (uint256) { PoolInfo storage poolInfo = poolInfoByPoolAddress[poolAddress]; if (poolInfo.liquidityVolumeGrowth == 0) { return 0; } TickInfo storage tickLower = poolInfo.ticks[_tickLower]; TickInfo storage tickUpper = poolInfo.ticks[_tickUpper]; // calculate fee growth below uint256 feeGrowthBelow; if (poolInfo.currentTick >= _tickLower) { feeGrowthBelow = tickLower.liquidityVolumeGrowthOutside; } else { feeGrowthBelow = poolInfo.liquidityVolumeGrowth - tickLower.liquidityVolumeGrowthOutside; } uint256 feeGrowthAbove; if (poolInfo.currentTick < _tickUpper) { feeGrowthAbove = tickUpper.liquidityVolumeGrowthOutside; } else { feeGrowthAbove = poolInfo.liquidityVolumeGrowth - tickUpper.liquidityVolumeGrowthOutside; } uint256 feeGrowthInside = poolInfo.liquidityVolumeGrowth - feeGrowthBelow - feeGrowthAbove; return feeGrowthInside; } function getFee( address tradeAddress, bytes calldata _data, uint24 fee ) external view override returns (uint24) { uint24 newfee = 0; if (Address.isContract(tradeAddress)) { TradeMintCallbackData memory data = abi.decode( _data, (TradeMintCallbackData) ); newfee = fee; if (ISummaPri(priAddress).hasRole(PUBLIC_ROLE, data.realplay)) { newfee = fee - (fee / reduceFee); } } else { newfee = fee; if (ISummaPri(priAddress).hasRole(PUBLIC_ROLE, tradeAddress)) { newfee = fee - (fee / reduceFee); } } return newfee; } function getRelation(address tradeAddress, bytes calldata _data) external view override returns (address) { if (Address.isContract(tradeAddress)) { TradeMintCallbackData memory data = abi.decode( _data, (TradeMintCallbackData) ); return ISummaPri(priAddress).getRelation(data.realplay); } else { return ISummaPri(priAddress).getRelation(tradeAddress); } } function getPledge(address userAddess) external view returns (uint256) { uint256 amount = pendingSumma(userAddess); uint256 pledge = amount.mul(pledgeRate).div(100); if (pledge < minPledge) { pledge = minPledge; } return pledge; } function getSuperFee() external view override returns (uint24) { return superFee; } function routerAddress() external view override returns (address) { return router; } function getPoolLength() external view returns (uint256) { return poolAddress.length; } function getPoolReward(address poolAddress, uint256 blockNum) external view returns (uint256 lpReward, uint256 tradeReward) { PoolInfo storage poolInfo = poolInfoByPoolAddress[poolAddress]; uint256 form = blockNum.sub(settlementBlock); uint256 to = blockNum; uint256 summaReward = getMultiplier(form, to) .mul(poolInfo.rewardShare) .div(totalRewardShare); tradeReward = summaReward.div(tradeShare); lpReward = summaReward.sub(tradeReward); } function getTradeSettlementAmountGrowth( address poolAddress, uint256 blockNum ) external view returns (uint256 tradeSettlementAmountGrowth) { PoolInfo storage poolInfo = poolInfoByPoolAddress[poolAddress]; tradeSettlementAmountGrowth = poolInfo.tradeSettlementAmountGrowth[ blockNum ]; } function getTickLiquidityIncentiveGrowthOutside( address poolAddress, int24 _tick ) external view returns ( uint256 liquidityIncentiveGrowthOutside, uint256 liquidityVolumeGrowthOutside, uint256 settlementBlock ) { PoolInfo storage poolInfo = poolInfoByPoolAddress[poolAddress]; TickInfo storage tick = poolInfo.ticks[_tick]; liquidityIncentiveGrowthOutside = tick.liquidityIncentiveGrowthOutside; liquidityVolumeGrowthOutside = tick.liquidityVolumeGrowthOutside; settlementBlock = tick.settlementBlock; } function getReduceFeeByUserAddress(address usderAddress) external view returns (uint256) { if (ISummaPri(priAddress).hasRole(PUBLIC_ROLE, usderAddress)) { return reduceFee; } else { return 0; } } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity =0.7.6; 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; } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity =0.7.6; library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // 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"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity =0.7.6; library PoolAddress { bytes32 internal constant POOL_INIT_CODE_HASH = 0xe6b16e290cb376ebc5d1ae1a293763a28c2ee5a6829d50c61db25863d81e8613; function computeAddress(address factory, address token0,address token1,uint24 fee) internal pure returns (address pool) { require(token0 < token1); pool = address( uint256( keccak256( abi.encodePacked( hex'ff', factory, keccak256(abi.encode(token0, token1, fee)), POOL_INIT_CODE_HASH ) ) ) ); } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.6; interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.6; interface ITokenIssue { function transByContract(address to, uint256 amount) external; function issueInfo(uint256 monthIndex) external view returns (uint256); function startIssueTime() external view returns (uint256); function issueInfoLength() external view returns (uint256); function TOTAL_AMOUNT() external view returns (uint256); function DAY_SECONDS() external view returns (uint256); function MONTH_SECONDS() external view returns (uint256); function INIT_MINE_SUPPLY() external view returns (uint256); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity =0.7.6; import './SafeMath.sol'; import './Address.sol'; import '../interface/IERC20.sol'; 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"); } } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.6; interface ISummaSwapV3Manager{ function positions(uint256 tokenId) external view returns ( uint96 nonce, address operator, address token0, address token1, uint24 fee, int24 tickLower, int24 tickUpper, uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1 ); function ownerOf(uint256 tokenId) external view returns (address owner); function balanceOf(address owner) external view returns (uint256); function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.6; interface ITradeMint{ function getFee(address tradeAddress,bytes calldata data,uint24 fee) external view returns (uint24); function getRelation(address tradeAddress,bytes calldata data) external view returns (address); function cross(int24 tick,int24 nextTick) external; function snapshot(bytes calldata data,int24 tick,uint256 liquidityVolumeGrowth,uint256 tradeVolume) external; function snapshotLiquidity(address poolAddress,uint128 liquidity,uint256 tokenId,int24 _tickLower,int24 _tickUpper) external; function snapshotMintLiquidity(address poolAddress,uint256 tokenId,int24 _tickLower,int24 _tickUpper) external; function getSuperFee() external view returns (uint24); function routerAddress() external view returns (address); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity =0.7.6; 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; } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.6.12; /** * @title Owned * @notice Basic contract to define an owner. * @author Julien Niset - <[email protected]> */ contract Owned { // The owner address public owner; event OwnerChanged(address indexed _newOwner); /** * @notice Throws if the sender is not the owner. */ modifier onlyOwner { require(msg.sender == owner, "Must be owner"); _; } constructor() public { owner = msg.sender; } /** * @notice Lets the owner transfer ownership of the contract to a new owner. * @param _newOwner The new owner. */ function changeOwner(address _newOwner) external onlyOwner { require(_newOwner != address(0), "Address must not be null"); owner = _newOwner; emit OwnerChanged(_newOwner); } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.6; library FixedPoint128 { uint256 internal constant Q128 = 0x100000000000000000000000000000000; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.6; library FullMath { /// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 /// @param a The multiplicand /// @param b The multiplier /// @param denominator The divisor /// @return result The 256-bit result /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv function mulDiv( uint256 a, uint256 b, uint256 denominator ) internal pure returns (uint256 result) { // 512-bit multiply [prod1 prod0] = a * b // Compute the product mod 2**256 and mod 2**256 - 1 // then use the Chinese Remainder Theorem to reconstruct // the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2**256 + prod0 uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(a, b, not(0)) prod0 := mul(a, b) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division if (prod1 == 0) { require(denominator > 0); assembly { result := div(prod0, denominator) } return result; } // Make sure the result is less than 2**256. // Also prevents denominator == 0 require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0] // Compute remainder using mulmod uint256 remainder; assembly { remainder := mulmod(a, b, denominator) } // Subtract 256 bit number from 512 bit number assembly { prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator // Compute largest power of two divisor of denominator. // Always >= 1. uint256 twos = -denominator & denominator; // Divide denominator by power of two assembly { denominator := div(denominator, twos) } // Divide [prod1 prod0] by the factors of two assembly { prod0 := div(prod0, twos) } // Shift in bits from prod1 into prod0. For this we need // to flip `twos` such that it is 2**256 / twos. // If twos is zero, then it becomes one assembly { twos := add(div(sub(0, twos), twos), 1) } prod0 |= prod1 * twos; // Invert denominator mod 2**256 // Now that denominator is an odd number, it has an inverse // modulo 2**256 such that denominator * inv = 1 mod 2**256. // Compute the inverse by starting with a seed that is correct // correct for four bits. That is, denominator * inv = 1 mod 2**4 uint256 inv = (3 * denominator) ^ 2; // Now use Newton-Raphson iteration to improve the precision. // Thanks to Hensel's lifting lemma, this also works in modular // arithmetic, doubling the correct bits in each step. inv *= 2 - denominator * inv; // inverse mod 2**8 inv *= 2 - denominator * inv; // inverse mod 2**16 inv *= 2 - denominator * inv; // inverse mod 2**32 inv *= 2 - denominator * inv; // inverse mod 2**64 inv *= 2 - denominator * inv; // inverse mod 2**128 inv *= 2 - denominator * inv; // inverse mod 2**256 // Because the division is now exact we can divide by multiplying // with the modular inverse of denominator. This will give us the // correct result modulo 2**256. Since the precoditions guarantee // that the outcome is less than 2**256, this is the final result. // We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inv; return result; } /// @notice Calculates ceil(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 /// @param a The multiplicand /// @param b The multiplier /// @param denominator The divisor /// @return result The 256-bit result function mulDivRoundingUp( uint256 a, uint256 b, uint256 denominator ) internal pure returns (uint256 result) { result = mulDiv(a, b, denominator); if (mulmod(a, b, denominator) > 0) { require(result < type(uint256).max); result++; } } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.6; interface ISummaPri{ function getRelation(address addr) external view returns (address); function hasRole(bytes32 role, address account) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"int24","name":"_tick","type":"int24"},{"indexed":false,"internalType":"int24","name":"_nextTick","type":"int24"},{"indexed":false,"internalType":"uint256","name":"liquidityVolumeGrowth","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"liquidityIncentiveGrowth","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tickliquidityVolumeGrowth","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tickliquidityIncentiveGrowth","type":"uint256"}],"name":"Cross","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tradeAddress","type":"address"},{"indexed":false,"internalType":"int24","name":"tick","type":"int24"},{"indexed":false,"internalType":"uint256","name":"liquidityVolumeGrowth","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tradeVolume","type":"uint256"}],"name":"Snapshot","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"poolAddress","type":"address"},{"indexed":false,"internalType":"int24","name":"_tickLower","type":"int24"},{"indexed":false,"internalType":"int24","name":"_tickUpper","type":"int24"}],"name":"SnapshotLiquidity","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"poolAddress","type":"address"},{"indexed":false,"internalType":"int24","name":"_tickLower","type":"int24"},{"indexed":false,"internalType":"int24","name":"_tickUpper","type":"int24"}],"name":"SnapshotMintLiquidity","type":"event"},{"inputs":[],"name":"PUBLIC_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_positions","outputs":[{"internalType":"uint256","name":"lastRewardGrowthInside","type":"uint256"},{"internalType":"uint256","name":"lastRewardVolumeGrowth","type":"uint256"},{"internalType":"uint256","name":"lastRewardSettlementedBlock","type":"uint256"},{"internalType":"uint256","name":"tokensOwed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"changeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int24","name":"_tick","type":"int24"},{"internalType":"int24","name":"_nextTick","type":"int24"}],"name":"cross","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"bool","name":"_isReward","type":"bool"},{"internalType":"uint256","name":"_rewardShare","type":"uint256"}],"name":"enableReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_poolAddress","type":"address"},{"internalType":"bool","name":"_isReward","type":"bool"},{"internalType":"uint256","name":"_rewardShare","type":"uint256"}],"name":"enableReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tradeAddress","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"uint24","name":"fee","type":"uint24"}],"name":"getFee","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int24","name":"_tickLower","type":"int24"},{"internalType":"int24","name":"_tickUpper","type":"int24"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"poolAddress","type":"address"}],"name":"getLiquidityIncentiveGrowthInPosition","outputs":[{"internalType":"uint256","name":"feeGrowthInside","type":"uint256"},{"internalType":"uint256","name":"blockSettlementVolume","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getPendingSummaByTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddess","type":"address"}],"name":"getPledge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPoolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"poolAddress","type":"address"}],"name":"getPoolNewLiquidityIncentiveGrowth","outputs":[{"internalType":"uint256","name":"newLiquidityIncentiveGrowth","type":"uint256"},{"internalType":"uint256","name":"blockSettlementVolume","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"poolAddress","type":"address"},{"internalType":"uint256","name":"blockNum","type":"uint256"}],"name":"getPoolReward","outputs":[{"internalType":"uint256","name":"lpReward","type":"uint256"},{"internalType":"uint256","name":"tradeReward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usderAddress","type":"address"}],"name":"getReduceFeeByUserAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tradeAddress","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"getRelation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSuperFee","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"poolAddress","type":"address"},{"internalType":"int24","name":"_tick","type":"int24"}],"name":"getTickLiquidityIncentiveGrowthOutside","outputs":[{"internalType":"uint256","name":"liquidityIncentiveGrowthOutside","type":"uint256"},{"internalType":"uint256","name":"liquidityVolumeGrowthOutside","type":"uint256"},{"internalType":"uint256","name":"settlementBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"poolAddress","type":"address"},{"internalType":"uint256","name":"blockNum","type":"uint256"}],"name":"getTradeSettlementAmountGrowth","outputs":[{"internalType":"uint256","name":"tradeSettlementAmountGrowth","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"iSummaSwapV3Manager","outputs":[{"internalType":"contract ISummaSwapV3Manager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isReward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastWithdrawBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minPledge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"}],"name":"pendingSumma","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"}],"name":"pendingTradeSumma","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pledgeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"poolInfoByPoolAddress","outputs":[{"internalType":"uint256","name":"lastSettlementBlock","type":"uint256"},{"internalType":"uint256","name":"liquidityVolumeGrowth","type":"uint256"},{"internalType":"uint256","name":"liquidityIncentiveGrowth","type":"uint256"},{"internalType":"uint256","name":"rewardShare","type":"uint256"},{"internalType":"int24","name":"currentTick","type":"int24"},{"internalType":"uint256","name":"unSettlementAmount","type":"uint256"},{"internalType":"address","name":"poolAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reduceFee","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"routerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_factory","type":"address"}],"name":"setFactory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISummaSwapV3Manager","name":"_ISummaSwapV3Manager","type":"address"}],"name":"setISummaSwapV3Manager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minPledge","type":"uint256"}],"name":"setMinPledge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pledgeRate","type":"uint256"}],"name":"setPledgeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_priAddress","type":"address"}],"name":"setPriAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint24","name":"_reduceFee","type":"uint24"}],"name":"setReduceFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_routerAddress","type":"address"}],"name":"setRouterAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_settlementBlock","type":"uint256"}],"name":"setSettlementBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_summaAddress","type":"address"}],"name":"setSummaAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint24","name":"_superFee","type":"uint24"}],"name":"setSuperFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ITokenIssue","name":"_tokenIssue","type":"address"}],"name":"setTokenIssue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_totalIssueRate","type":"uint256"}],"name":"setTotalIssueRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tradeShare","type":"uint256"}],"name":"setTradeShare","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"settlementBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"int24","name":"tick","type":"int24"},{"internalType":"uint256","name":"liquidityVolumeGrowth","type":"uint256"},{"internalType":"uint256","name":"tradeVolume","type":"uint256"}],"name":"snapshot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"poolAddress","type":"address"},{"internalType":"uint128","name":"liquidity","type":"uint128"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"int24","name":"_tickLower","type":"int24"},{"internalType":"int24","name":"_tickUpper","type":"int24"}],"name":"snapshotLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"poolAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"int24","name":"_tickLower","type":"int24"},{"internalType":"int24","name":"_tickUpper","type":"int24"}],"name":"snapshotMintLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"summaAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"superFee","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenIssue","outputs":[{"internalType":"contract ITokenIssue","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalIssueRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRewardShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tradeShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"tradeSettlementedAmount","type":"uint256"},{"internalType":"uint256","name":"tradeUnSettlementedAmount","type":"uint256"},{"internalType":"uint256","name":"lastTradeBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdrawByTokenId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawSumma","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawTrade","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526103e860035534801561001657600080fd5b50600080546001600160a01b03191633179055615170806100386000396000f3fe608060405234801561001057600080fd5b50600436106103455760003560e01c80637d4d0fd7116101bf578063b1bba4ac116100fa578063d65bd07f1161009d578063d65bd07f146106f7578063da9da5261461070a578063e90ff9f91461071d578063ea2d8a0514610730578063ebe62aad14610743578063efa2681a1461074b578063f887ea401461075e578063fb02fc891461076657610345565b8063b1bba4ac1461066d578063b27d0dde14610680578063b3944d5214610693578063b66b2b221461069b578063bda29cfe146106ae578063c45a0155146106d4578063d47ccfa0146106dc578063d6554ae1146106ef57610345565b8063986e801611610162578063986e8016146106015780639907ccab146106145780639b4b1786146106275780639db49ed51461062f5780639e0796d014610642578063a6a043551461064a578063a6f9dae114610652578063a70419d21461066557610345565b80637d4d0fd7146105615780638240c4001461057457806383cd75b11461057c578063852feeb71461059d5780638b12d7da146105b05780638da5cb5b146105c357806390769e0e146105cb57806397d6958d146105de57610345565b80634d5ce0381161028f578063630b5ba111610232578063630b5ba1146104f5578063694c7a05146104fd5780636aa1f07b146105105780636b29657f146105185780636c2536d11461052b5780636f3980b01461053357806370dfb3071461054657806371ac3a7d1461055957610345565b80634d5ce03814610466578063512d76061461048657806351eb05a614610499578063529ffe03146104ac57806354ea83d0146104b4578063559ab6e4146104c75780635bb47808146104da578063607feec2146104ed57610345565b80631a65476d116102f75780631a65476d146103fa5780633268cc561461040d5780633310fd3a146104155780633b588351146104285780633ca7c02a1461043b5780633ccfd60b146104435780633d0aa3861461044b57806341cb87fc1461045357610345565b80630a19fabc1461034a5780630f208beb1461036857806315330d271461038a578063179d27af1461039f57806318bfb8bc146103b2578063190d46f6146103d257806319a18b55146103e5575b600080fd5b610352610779565b60405161035f9190614e14565b60405180910390f35b61037b610376366004614888565b610788565b60405161035f93929190614fe6565b61039d610398366004614850565b6107b4565b005b61039d6103ad366004614d05565b610825565b6103c56103c0366004614850565b61088e565b60405161035f9190614e75565b61039d6103e0366004614a49565b61093b565b6103ed610a68565b60405161035f9190614f9e565b61039d610408366004614d05565b610a7a565b610352610ace565b610352610423366004614963565b610add565b61039d610436366004614d05565b610c13565b6103c5610c71565b61039d610c83565b6103ed610d8b565b61039d610461366004614850565b610d9d565b610479610474366004614850565b610e0e565b60405161035f9190614e6a565b6103c5610494366004614ab0565b610e23565b61039d6104a7366004614d05565b610e4e565b610352610f28565b6103c56104c2366004614d05565b610f37565b61039d6104d5366004614d05565b6110e2565b61039d6104e8366004614850565b611136565b6103c56111a7565b61039d6111ad565b61039d61050b3660046148c0565b6111cc565b6103526113f6565b6103c5610526366004614850565b611405565b61039d6116f9565b61039d610541366004614d05565b61170b565b61039d610554366004614adb565b6118b7565b6103c56119d3565b61037b61056f366004614a1c565b6119d9565b6103c5611a1b565b61058f61058a366004614ab0565b611a21565b60405161035f929190614fd8565b61058f6105ab366004614bc0565b611a9d565b6103c56105be366004614850565b611cd5565b610352611ec0565b6103c56105d9366004614850565b611ecf565b6105f16105ec366004614d05565b611f10565b60405161035f9493929190614ffc565b61039d61060f366004614ce9565b611f37565b61039d610622366004614ce9565b611fa0565b6103c5612013565b61039d61063d366004614850565b612019565b6103c561208a565b610352612090565b61039d610660366004614850565b61209f565b6103ed61218c565b61039d61067b366004614850565b612197565b61039d61068e366004614ba3565b612208565b6103c56123b2565b61039d6106a9366004614850565b6123b8565b6106c16106bc366004614850565b612429565b60405161035f9796959493929190615017565b610352612470565b6103ed6106ea3660046149b6565b61247f565b6103c5612616565b61039d610705366004614b3e565b61261c565b610352610718366004614d05565b61289e565b61039d61072b366004614d05565b6128c8565b61039d61073e366004614d05565b61291c565b6103c5612970565b61039d610759366004614923565b612976565b610352612b82565b61058f610774366004614850565b612b91565b600d546001600160a01b031681565b601160209081526000928352604080842090915290825290208054600182015460029092015490919083565b6000546001600160a01b03163314610803576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610874576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600d5461088b906001600160a01b03163383612bf4565b50565b600e54604051632474521560e21b81526000916001600160a01b0316906391d14854906108cf906000805160206150d0833981519152908690600401614e7e565b60206040518083038186803b1580156108e757600080fd5b505afa1580156108fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061091f9190614b22565b15610932575060095462ffffff16610936565b5060005b919050565b6002546001600160a01b031661094f612c46565b6001600160a01b03161461096257600080fd5b6001600160a01b038516600090815260126020908152604080832060059092529091205460ff1615610a60576004548154439161099f9190612c4a565b111580156109b1575060008160060154115b15610a155780546004546000906109c9908390612c4a565b905060006109f16006546109eb86600401546109e58787612cad565b90612da1565b90612dfa565b9050610a1189610a0c60085484612dfa90919063ffffffff16565b612e3c565b5050505b610a228487878686612e9c565b7fc42fcee814e48ea79cb656f74d33c9acf93facf0c54b78c901f50256ccfc9bb784878585604051610a579493929190614fae565b60405180910390a15b505050505050565b6009546301000000900462ffffff1681565b6000546001600160a01b03163314610ac9576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600455565b600f546001600160a01b031690565b6000610ae884612f4b565b15610b89576000610afb83850185614c07565b600e546040808301519051631f532b3960e01b81529293506001600160a01b0390911691631f532b3991610b3191600401614e14565b60206040518083038186803b158015610b4957600080fd5b505afa158015610b5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b81919061486c565b915050610c0c565b600e54604051631f532b3960e01b81526001600160a01b0390911690631f532b3990610bb9908790600401614e14565b60206040518083038186803b158015610bd157600080fd5b505afa158015610be5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c09919061486c565b90505b9392505050565b6000546001600160a01b03163314610c62576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b670de0b6b3a764000002600c55565b6000805160206150d083398151915281565b610c8b612f51565b6000610c95612feb565b90506000610cb360646109eb600b5485612da190919063ffffffff16565b9050600c54811015610cc45750600c545b8015610d7057600d546040516370a0823160e01b815282916001600160a01b0316906370a0823190610cfa903390600401614e14565b60206040518083038186803b158015610d1257600080fd5b505afa158015610d26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4a9190614d1d565b11610d705760405162461bcd60e51b8152600401610d6790614ec5565b60405180910390fd5b600d54610d87906001600160a01b03163384612bf4565b5050565b6009546301000000900462ffffff1690565b6000546001600160a01b03163314610dec576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b60056020526000908152604090205460ff1681565b6001600160a01b03909116600090815260126020908152604080832093835260099093019052205490565b6000600a8281548110610e5d57fe5b60009182526020808320909101546001600160a01b031680835260129091526040909120600454815492935090914391610e979190612c4a565b11158015610ea9575060008160060154115b15610f23578054600454600090610ec1908390612c4a565b90506000610edd6006546109eb86600401546109e58787612cad565b6008808601549054919250610f03916001600160a01b0390911690610a0c908490612dfa565b6008840154610f1a906001600160a01b03166132ec565b50610a60612f51565b505050565b600e546001600160a01b031681565b60025460405163133f757160e31b815260009182918291829182918291829182916001600160a01b03909116906399fbab8890610f78908c90600401614e75565b6101806040518083038186803b158015610f9157600080fd5b505afa158015610fa5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc99190614d35565b5050505097509750975097509750975050506000610ffe600760009054906101000a90046001600160a01b03168888886133a6565b6001600160a01b03811660009081526005602052604090205490915060ff16156110d45760008061103186868e86611a9d565b60008e8152601060209081526040918290208251608081018452815480825260018301549382018490526002830154948201949094526003909101546060820152939550919350901561109357611091826020015184600160801b61347e565b015b808411156110c75760006110a7858361352d565b90506110c181886001600160801b0316600160801b61347e565b8d019c50505b5060600151999099019850505b509598975050505050505050565b6000546001600160a01b03163314611131576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600855565b6000546001600160a01b03163314611185576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60035481565b600a5460005b81811015610d87576111c481610e4e565b6001016111b3565b6000546001600160a01b0316331461121b576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b60006004541161123d5760405162461bcd60e51b8152600401610d6790614f6f565b600754600090611258906001600160a01b03168787876133a6565b90506112626111ad565b821561136857600082116112885760405162461bcd60e51b8152600401610d6790614ef2565b6001600160a01b0381166000908152601260205260409020600a546112bc576004546112b8906109e54382612dfa565b6013555b60088101546001600160a01b031661132d576004546112df906109e54382612dfa565b8155600a80546001810182556000919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80180546001600160a01b0319166001600160a01b0384161790555b600680548401808255600483018054909103909155600890910180546001600160a01b0319166001600160a01b0384161790558290556113c9565b6001600160a01b03811660009081526005602052604090205460ff166113a05760405162461bcd60e51b8152600401610d6790614f1d565b6001600160a01b0381166000908152601260205260408120600401805460068054919091039055555b6001600160a01b03166000908152600560205260409020805460ff19169215159290921790915550505050565b6001546001600160a01b031681565b600a546000908190815b818110156115c5576000600a828154811061142657fe5b60009182526020808320909101546001600160a01b03908116808452601283526040808520928b1685526011845280852082865290935291909220600281015491935090156115b7578154600282015410156114d6576114cd81600101548360090160006114b46004546109e560016114ae6004548a60020154612dfa90919063ffffffff16565b90612c4a565b815260200190815260200160002054600160801b61347e565b860195506115af565b436114fb6004546109e560016114ae6004548760020154612dfa90919063ffffffff16565b1115801561150d575060008260060154115b156115af57600454600282015460009161152b916109e59082612dfa565b9050600061154460045483612c4a90919063ffffffff16565b905060006115606006546109eb87600401546109e58787612cad565b9050600061157960085483612dfa90919063ffffffff16565b9050600061159082600160801b896006015461347e565b90506115a5818760010154600160801b61347e565b8b019a5050505050505b805495909501945b50505080600101905061140f565b506002546040516370a0823160e01b81526000916001600160a01b0316906370a08231906115f7908890600401614e14565b60206040518083038186803b15801561160f57600080fd5b505afa158015611623573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116479190614d1d565b905060005b818110156116ef57600254604051632f745c5960e01b81526000916001600160a01b031690632f745c5990611687908a908690600401614e28565b60206040518083038186803b15801561169f57600080fd5b505afa1580156116b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d79190614d1d565b90506116e281610f37565b909401935060010161164c565b5091949350505050565b611701612f51565b6000610c9561356f565b611713612f51565b6002546040516331a9108f60e11b81526001600160a01b0390911690636352211e90611743908490600401614e75565b60206040518083038186803b15801561175b57600080fd5b505afa15801561176f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611793919061486c565b6001600160a01b0316336001600160a01b0316146117c35760405162461bcd60e51b8152600401610d6790614f49565b60006117ce82613736565b905060006117ec60646109eb600b5485612da190919063ffffffff16565b9050600c548110156117fd5750600c545b80156118a057600d546040516370a0823160e01b815282916001600160a01b0316906370a0823190611833903390600401614e14565b60206040518083038186803b15801561184b57600080fd5b505afa15801561185f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118839190614d1d565b116118a05760405162461bcd60e51b8152600401610d6790614ec5565b600d54610f23906001600160a01b03163384612bf4565b6002546001600160a01b03166118cb612c46565b6001600160a01b0316146118de57600080fd5b6001600160a01b038416600090815260126020908152604080832060059092529091205460ff16156119cc576004548154439161191b9190612c4a565b1115801561192d575060008160060154115b15611980578054600454600090611945908390612c4a565b905060006119616006546109eb86600401546109e58787612cad565b905061197c88610a0c60085484612dfa90919063ffffffff16565b5050505b61198e848660008686612e9c565b7ff1a4e6dcce941118d895689ec6574905063b2f7d3faef1ae234e066a50ffd540848685856040516119c39493929190614fae565b60405180910390a15b5050505050565b60065481565b6001600160a01b039091166000908152601260209081526040808320600294850b850b8452600190810190925290912090810154815491909201549192909190565b60045481565b6001600160a01b03821660009081526012602052604081206004548291908290611a4c90869061352d565b905060008590506000611a6d6006546109eb86600401546109e58787612cad565b9050611a8460085482612dfa90919063ffffffff16565b9450611a90818661352d565b9550505050509250929050565b6001600160a01b038116600090815260126020526040812060038101546004548254849392914391611ace91612c4a565b11158015611ae0575060008260060154115b15611afb57600080611af187612b91565b9550929092019150505b600288810b900b60009081526001808401602052604090912090810154815415611b93576002820154600090815260078501602052604090205415611b6757815460028301546000908152600786016020526040902054611b619190600160801b61347e565b01611b93565b6004548454611b7591612c4a565b82600201541415611b93578154611b919086600160801b61347e565b015b600289810b900b60009081526001808601602052604090912090810154815415611c2b576002820154600090815260078701602052604090205415611bff57815460028301546000908152600788016020526040902054611bf99190600160801b61347e565b01611c2b565b6004548654611c0d91612c4a565b82600201541415611c2b578154611c299088600160801b61347e565b015b600586015460009060028e810b91810b900b12611c49575082611c4e565b508285035b600587015460009060028e810b91810b900b1215611c6d575081611c72565b508186035b60008c815260106020908152604080832060020154835260078b019091529020548288038290039a5015611cc45760008c815260106020908152604080832060020154835260078b0190915290205498505b505050505050505094509492505050565b600a546000908190815b81811015611eb7576000600a8281548110611cf657fe5b60009182526020808320909101546001600160a01b03908116808452601283526040808520928b1685526011909352918320600a80549395509193929091839187908110611d4057fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020600281015490915015611ea957815460028201541015611db957611db081600101548360090160006114b46004546109e560016114ae6004548a60020154612dfa90919063ffffffff16565b86019550611ea1565b43611dde6004546109e560016114ae6004548760020154612dfa90919063ffffffff16565b11158015611df0575060008260060154115b15611ea1576004546002820154600091611e0e916109e59082612dfa565b90506000611e366004546109e560016114ae6004548860020154612dfa90919063ffffffff16565b90506000611e526006546109eb87600401546109e58787612cad565b90506000611e6b60085483612dfa90919063ffffffff16565b90506000611e8282600160801b896006015461347e565b9050611e97818760010154600160801b61347e565b8b019a5050505050505b805495909501945b505050806001019050611cdf565b50909392505050565b6000546001600160a01b031681565b600080611edb83611405565b90506000611ef960646109eb600b5485612da190919063ffffffff16565b9050600c54811015610c0c5750600c549392505050565b60106020526000908152604090208054600182015460028301546003909301549192909184565b6000546001600160a01b03163314611f86576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b6009805462ffffff191662ffffff92909216919091179055565b6000546001600160a01b03163314611fef576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b6009805462ffffff90921663010000000265ffffff00000019909216919091179055565b600c5481565b6000546001600160a01b03163314612068576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b60135481565b6002546001600160a01b031681565b6000546001600160a01b031633146120ee576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b6001600160a01b038116612144576040805162461bcd60e51b81526020600482015260186024820152771059191c995cdcc81b5d5cdd081b9bdd081899481b9d5b1b60421b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b038316908117825560405190917fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf3691a250565b60095462ffffff1681565b6000546001600160a01b031633146121e6576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b612218612213612c46565b612f4b565b61222157600080fd5b60006012600061222f612c46565b6001600160a01b03166001600160a01b0316815260200190815260200160002090506005600061225d612c46565b6001600160a01b0316815260208101919091526040016000205460ff1615610f2357600581018054600284810b62ffffff1662ffffff199092169190911790915583810b900b600090815260018201602052604090208054158015906122d757506002810154600090815260078301602052604090205415155b15612313576002810154600090815260078301602052604090205481546123039190600160801b61347e565b6001820180549091019055600081555b600181015460038301546123269161352d565b60018201558054600283015461233b9161352d565b8155600454612353906109e560016114ae4384612dfa565b81600201819055507f2adb4b67cbae2c098371e7c630d02ca7d2270c2c2fbc05cd49ee330ed00a0cbc848484600201548560030154856000015486600101546040516123a496959493929190614e95565b60405180910390a150505050565b600a5490565b6000546001600160a01b03163314612407576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6012602052600090815260409020805460028083015460038401546004850154600586015460068701546008909701549596939592949193910b916001600160a01b031687565b6007546001600160a01b031681565b60008061248b86612f4b565b1561255d57600061249e85870187614c07565b600e546040808301519051632474521560e21b81528795509293506001600160a01b03909116916391d14854916124e8916000805160206150d08339815191529190600401614e7e565b60206040518083038186803b15801561250057600080fd5b505afa158015612514573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125389190614b22565b156125575760095462ffffff9081169085168161255157fe5b04840391505b5061260d565b50600e54604051632474521560e21b815283916001600160a01b0316906391d148549061259e906000805160206150d0833981519152908a90600401614e7e565b60206040518083038186803b1580156125b657600080fd5b505afa1580156125ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125ee9190614b22565b1561260d5760095462ffffff9081169084168161260757fe5b04830390505b95945050505050565b600b5481565b612627612213612c46565b61263057600080fd5b600061263e85870187614c07565b905060006012600061264e612c46565b6001600160a01b03166001600160a01b03168152602001908152602001600020905060006011600084604001516001600160a01b03166001600160a01b0316815260200190815260200160002060006126a5612c46565b6001600160a01b03166001600160a01b031681526020019081526020016000209050600560006126d3612c46565b6001600160a01b0316815260208101919091526040016000205460ff161561289457600454825443916127069190612c4a565b11158015612718575060008260060154115b1561278a578154600454600090612730908390612c4a565b9050600061274c6006546109eb87600401546109e58787612cad565b9050612771866040015161275e612c46565b60085461276c908590612dfa565b613902565b61278161277c612c46565b6132ec565b50505050612803565b60008260090160006127b76004546114ae6004546109e56004548960020154612dfa90919063ffffffff16565b815260200190815260200160002054905081600101546000141580156127dc57508015155b15612801576127f4826001015482600160801b61347e565b8254018255600060018301555b505b6001810180548501905543600280830182905560058401805462ffffff191662ffffff8a840b16179055830180548701905560068301805486019055600454612850916109e59082612dfa565b825560408084015190517f7c77e656b9ac404b27ce87e2dfdf91995fb9154a3d407802ca72815c83059f8c9161288b91899089908990614e41565b60405180910390a15b5050505050505050565b600a81815481106128ae57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314612917576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600b55565b6000546001600160a01b0316331461296b576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600355565b60085481565b6000546001600160a01b031633146129c5576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b6000600454116129e75760405162461bcd60e51b8152600401610d6790614f6f565b6129ef6111ad565b8115612af55760008111612a155760405162461bcd60e51b8152600401610d6790614ef2565b6001600160a01b0383166000908152601260205260409020600a54612a4957600454612a45906109e54382612dfa565b6013555b60088101546001600160a01b0316612aba57600454612a6c906109e54382612dfa565b8155600a80546001810182556000919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80180546001600160a01b0319166001600160a01b0386161790555b600680548301808255600483018054909103909155600890910180546001600160a01b0319166001600160a01b038616179055819055612b56565b6001600160a01b03831660009081526005602052604090205460ff16612b2d5760405162461bcd60e51b8152600401610d6790614f1d565b6001600160a01b0383166000908152601260205260408120600401805460068054919091039055555b506001600160a01b03919091166000908152600560205260409020805460ff1916911515919091179055565b600f546001600160a01b031681565b6001600160a01b0381166000908152601260205260408120819081612bb5856139bd565b9050612bd682600601546109eb846002015484612da190919063ffffffff16565b9350612beb81600160801b846006015461347e565b92505050915091565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610f23908490613a40565b3390565b600082820183811015612ca4576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b600080600160009054906101000a90046001600160a01b03166001600160a01b0316637d24af666040518163ffffffff1660e01b815260040160206040518083038186803b158015612cfe57600080fd5b505afa158015612d12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d369190614d1d565b905080831015612d4a576000915050612ca7565b80841015612d7057612d686127106109eb6003546109e58588613af1565b915050612ca7565b612d996127106109eb6003546109e5612d89868a613af1565b612d93878a613af1565b9061352d565b949350505050565b600082612db057506000612ca7565b82820282848281612dbd57fe5b0414612ca45760405162461bcd60e51b81526004018080602001828103825260218152602001806150f06021913960400191505060405180910390fd5b6000612ca483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506140d5565b6001600160a01b03821660009081526012602052604090206006810154612e6a908390600160801b9061347e565b60045482546009840191600091612e8091612c4a565b8152602081019190915260400160002080549091019055505050565b600085815260106020526040812090612eb6848488614177565b90506000612ec48789614328565b905080821115612f11576000612eda838361352d565b90506001600160801b03871615612f0f57612f0381886001600160801b0316600160801b61347e565b60038501805490910190555b505b818355612f1f8585896143bf565b6001840155600454612f39906114ae816109e54382612dfa565b83600201819055505050505050505050565b3b151590565b600454600090612f65906109e54382612dfa565b9050601354811115612fe6576000612f7f60135483612cad565b6001546040516317f2f1d360e11b81529192506001600160a01b031690632fe5e3a690612fb29030908590600401614e28565b600060405180830381600087803b158015612fcc57600080fd5b505af1158015612fe0573d6000803e3d6000fd5b50505050505b601355565b600a546000908190815b818110156131b9576000600a828154811061300c57fe5b60009182526020808320909101546001600160a01b031680835260128252604080842033855260119093528320600a805492955092939290918391908790811061305257fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190206004548354919250439161308991612c4a565b1115801561309b575060008260060154115b1561312b5781546004546000906130b3908390612c4a565b905060006130cf6006546109eb87600401546109e58787612cad565b90506130f86130e960085483612dfa90919063ffffffff16565b600160801b876006015461347e565b60008381526009870160205260409020805490910190556008850154613126906001600160a01b03166132ec565b505050505b60008260090160006131586004546114ae6004546109e56004548960020154612dfa90919063ffffffff16565b8152602001908152602001600020549050816001015460001415801561317d57508015155b156131a257613195826001015482600160801b61347e565b8254018255600060018301555b508054600090915594909401935050600101612ff5565b506002546040516370a0823160e01b81526000916001600160a01b0316906370a08231906131eb903390600401614e14565b60206040518083038186803b15801561320357600080fd5b505afa158015613217573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061323b9190614d1d565b905060005b818110156132e357600254604051632f745c5960e01b81526000916001600160a01b031690632f745c599061327b9033908690600401614e28565b60206040518083038186803b15801561329357600080fd5b505afa1580156132a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132cb9190614d1d565b90506132d681614472565b9094019350600101613240565b50919250505090565b6001600160a01b03811660009081526012602052604081208161330e846139bd565b905061332f82600601546109eb846002015484612da190919063ffffffff16565b6003830180549091019055600060028301556006820154613357908290600160801b9061347e565b6004548354600785019160009161336d91612c4a565b815260208101919091526040016000908120919091556006830155600454613399906109e54382612dfa565b8255506003015492915050565b6000826001600160a01b0316846001600160a01b0316106133c657600080fd5b50604080516001600160a01b03948516602080830191909152939094168482015262ffffff919091166060808501919091528151808503820181526080850183528051908401206001600160f81b031960a086015294901b6bffffffffffffffffffffffff191660a184015260b58301939093527fe6b16e290cb376ebc5d1ae1a293763a28c2ee5a6829d50c61db25863d81e861360d5808401919091528351808403909101815260f5909201909252805191012090565b60008080600019858709868602925082811090839003039050806134b457600084116134a957600080fd5b508290049050610c0c565b8084116134c057600080fd5b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b6000612ca483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506145fd565b600a546000908190815b8181101561372e576000600a828154811061359057fe5b60009182526020808320909101546001600160a01b031680835260128252604080842033855260119093528320600a80549295509293929091839190879081106135d657fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190206004548354919250439161360d91612c4a565b1115801561361f575060008260060154115b156136a0578154600454600090613637908390612c4a565b905060006136536006546109eb87600401546109e58787612cad565b905061366d6130e960085483612dfa90919063ffffffff16565b6000838152600987016020526040902080549091019055600885015461369b906001600160a01b03166132ec565b505050505b60008260090160006136cd6004546114ae6004546109e56004548960020154612dfa90919063ffffffff16565b815260200190815260200160002054905081600101546000141580156136f257508015155b156137175761370a826001015482600160801b61347e565b8254018255600060018301555b508054600090915594909401935050600101613579565b509091505090565b600a546000908190815b818110156138ed576000600a828154811061375757fe5b60009182526020808320909101546001600160a01b031680835260128252604080842033855260119093528320600a805492955092939290918391908790811061379d57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020600454835491925043916137d491612c4a565b111580156137e6575060008260060154115b156138675781546004546000906137fe908390612c4a565b9050600061381a6006546109eb87600401546109e58787612cad565b90506138346130e960085483612dfa90919063ffffffff16565b60008381526009870160205260409020805490910190556008850154613862906001600160a01b03166132ec565b505050505b60008260090160006138946004546114ae6004546109e56004548960020154612dfa90919063ffffffff16565b815260200190815260200160002054905081600101546000141580156138b957508015155b156138de576138d1826001015482600160801b61347e565b8254018255600060018301555b50505050806001019050613740565b506138f784614472565b909101915050919050565b6001600160a01b038084166000908152601160209081526040808320938616835292815282822060129091529190206006810154613947908490600160801b9061347e565b6004548254600984019160009161395d91612c4a565b8152602001908152602001600020600082825401925050819055506139aa82600101548260090160006114b46004546109e560016114ae6004548b60020154612dfa90919063ffffffff16565b8254018255506000600190910155505050565b6001600160a01b0381166000908152601260205260408120805460045483906139e7908390612c4a565b905060006139f58383612cad565b90506000613a35613a12600160085461352d90919063ffffffff16565b6109e56008546109eb6006546109eb8b6004015489612da190919063ffffffff16565b979650505050505050565b6000613a95826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166146579092919063ffffffff16565b805190915015610f2357808060200190516020811015613ab457600080fd5b5051610f235760405162461bcd60e51b815260040180806020018281038252602a815260200180615111602a913960400191505060405180910390fd5b60008282111580613b00575082155b15613b0d57506000612ca7565b600083830390506000613ba6600160009054906101000a90046001600160a01b03166001600160a01b031663f4a814fd6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b6757600080fd5b505afa158015613b7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b9f9190614d1d565b8390612dfa565b90506001811015613ccd57613cc4613cbd600160009054906101000a90046001600160a01b03166001600160a01b031663f4a814fd6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c0557600080fd5b505afa158015613c19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c3d9190614d1d565b60015460405163b626975760e01b81526001600160a01b039091169063b626975790613c6d908790600401614e75565b60206040518083038186803b158015613c8557600080fd5b505afa158015613c99573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109eb9190614d1d565b8390612da1565b92505050612ca7565b600160009054906101000a90046001600160a01b03166001600160a01b0316635a2d34906040518163ffffffff1660e01b815260040160206040518083038186803b158015613d1b57600080fd5b505afa158015613d2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d539190614d1d565b8110156140ca576000805b82811015613df95760015460405163b626975760e01b8152613def916001600160a01b03169063b626975790613d98908590600401614e75565b60206040518083038186803b158015613db057600080fd5b505afa158015613dc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613de89190614d1d565b8390612c4a565b9150600101613d5e565b506000613f56826114ae613ebc600160009054906101000a90046001600160a01b03166001600160a01b031663f4a814fd6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5457600080fd5b505afa158015613e68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e8c9190614d1d565b60015460405163b626975760e01b81526001600160a01b039091169063b626975790613c6d908b90600401614e75565b6109e5613f4f600160009054906101000a90046001600160a01b03166001600160a01b031663f4a814fd6040518163ffffffff1660e01b815260040160206040518083038186803b158015613f1057600080fd5b505afa158015613f24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f489190614d1d565b8990612da1565b899061352d565b9050614067600160009054906101000a90046001600160a01b03166001600160a01b03166345138eb86040518163ffffffff1660e01b815260040160206040518083038186803b158015613fa957600080fd5b505afa158015613fbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fe19190614d1d565b600160009054906101000a90046001600160a01b03166001600160a01b031663a2d7f5e36040518163ffffffff1660e01b815260040160206040518083038186803b15801561402f57600080fd5b505afa158015614043573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d939190614d1d565b8111156140bf57600154604080516308a271d760e31b815290516140b4926001600160a01b0316916345138eb8916004808301926020929190829003018186803b158015613fa957600080fd5b945050505050612ca7565b9350612ca792505050565b600092505050612ca7565b600081836141615760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561412657818101518382015260200161410e565b50505050905090810190601f1680156141535780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161416d57fe5b0495945050505050565b6001600160a01b03811660009081526012602052604081206003810154600454825443916141a59190612c4a565b111580156141b7575060008260060154115b156141c8576141c5846132ec565b90505b806141d857600092505050610c0c565b600286810b810b6000908152600184016020908152604080832093840154835260078601909152902054158015906142105750805415155b1561424c5780546002820154600090815260078501602052604090205461423c9190600160801b61347e565b6001820180549091019055600081555b600180820154600288810b810b60009081529286016020908152604080852092830154855260078801909152909220549091901580159061428d5750805415155b156142c9578054600282015460009081526007870160205260409020546142b99190600160801b61347e565b6001820180549091019055600081555b6001810154600586015460009060028c810b91810b900b126142ec5750826142f1565b508285035b600587015460009060028c810b91810b900b1215614310575081614315565b508186035b9503949094039998505050505050505050565b6001600160a01b0382166000908152601260209081526040808320848452601083528184208054600290910154855260078201909352922054909190156143b85760008381526010602090815260408083206001810154600290910154845260078501909252909120546143a19190600160801b61347e565b600084815260106020526040812060010155909101905b5092915050565b6001600160a01b038116600090815260126020526040812060028101546143ea576000915050610c0c565b600285810b80820b600090815260018401602052604080822088850b850b835290822060058601549194909391810b900b1261442857508154614432565b5081546002840154035b6005840154600090600289810b91810b900b12156144525750815461445c565b5081546002850154035b6002909401540392909203925050509392505050565b60025460405163133f757160e31b81526000918291829182918291829182916001600160a01b0316906399fbab88906144af908b90600401614e75565b6101806040518083038186803b1580156144c857600080fd5b505afa1580156144dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145009190614d35565b5050505097509750975097509750975050506000614535600760009054906101000a90046001600160a01b03168888886133a6565b6001600160a01b0381166000908152600560205260408120549192509060ff16156145f0576000614567868685614177565b90506000614575848d614328565b60008d8152601060205260408120600301805491905593909301929050808211156145db5760006145a6838361352d565b60008e815260106020526040902084905590506145d1816001600160801b038816600160801b61347e565b84019350506145ed565b60008c81526010602052604090208290555b50505b9998505050505050505050565b6000818484111561464f5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561412657818101518382015260200161410e565b505050900390565b6060610c0984846000858561466b85612f4b565b6146bc576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106146fa5780518252601f1990920191602091820191016146db565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461475c576040519150601f19603f3d011682016040523d82523d6000602084013e614761565b606091505b5091509150613a358282866060831561477b575081610c0c565b82511561478b5782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561412657818101518382015260200161410e565b803561093681615077565b805161093681615077565b60008083601f8401126147f9578182fd5b50813567ffffffffffffffff811115614810578182fd5b60208301915083602082850101111561482857600080fd5b9250929050565b80516109368161509a565b8051610936816150a9565b8051610936816150be565b600060208284031215614861578081fd5b8135612ca481615077565b60006020828403121561487d578081fd5b8151612ca481615077565b6000806040838503121561489a578081fd5b82356148a581615077565b915060208301356148b581615077565b809150509250929050565b600080600080600060a086880312156148d7578081fd5b85356148e281615077565b945060208601356148f281615077565b93506040860135614902816150be565b925060608601356149128161508c565b949793965091946080013592915050565b600080600060608486031215614937578283fd5b833561494281615077565b925060208401356149528161508c565b929592945050506040919091013590565b600080600060408486031215614977578283fd5b833561498281615077565b9250602084013567ffffffffffffffff81111561499d578283fd5b6149a9868287016147e8565b9497909650939450505050565b600080600080606085870312156149cb578384fd5b84356149d681615077565b9350602085013567ffffffffffffffff8111156149f1578384fd5b6149fd878288016147e8565b9094509250506040850135614a11816150be565b939692955090935050565b60008060408385031215614a2e578182fd5b8235614a3981615077565b915060208301356148b58161509a565b600080600080600060a08688031215614a60578283fd5b8535614a6b81615077565b94506020860135614a7b816150a9565b9350604086013592506060860135614a928161509a565b91506080860135614aa28161509a565b809150509295509295909350565b60008060408385031215614ac2578182fd5b8235614acd81615077565b946020939093013593505050565b60008060008060808587031215614af0578182fd5b8435614afb81615077565b9350602085013592506040850135614b128161509a565b91506060850135614a118161509a565b600060208284031215614b33578081fd5b8151612ca48161508c565b600080600080600060808688031215614b55578283fd5b853567ffffffffffffffff811115614b6b578384fd5b614b77888289016147e8565b9096509450506020860135614b8b8161509a565b94979396509394604081013594506060013592915050565b60008060408385031215614bb5578182fd5b8235614a398161509a565b60008060008060808587031215614bd5578182fd5b8435614be08161509a565b93506020850135614bf08161509a565b9250604085013591506060850135614a1181615077565b60006020808385031215614c19578182fd5b823567ffffffffffffffff80821115614c30578384fd5b9084019060608287031215614c43578384fd5b604051606081018181108382111715614c5857fe5b604052823582811115614c69578586fd5b8301601f81018813614c79578586fd5b803583811115614c8557fe5b614c97601f8201601f19168701615053565b93508084528886828401011115614cac578687fd5b80868301878601378301850186905250818152614cca8385016147d2565b84820152614cda604084016147d2565b60408201529695505050505050565b600060208284031215614cfa578081fd5b8135612ca4816150be565b600060208284031215614d16578081fd5b5035919050565b600060208284031215614d2e578081fd5b5051919050565b6000806000806000806000806000806000806101808d8f031215614d5757898afd5b8c516bffffffffffffffffffffffff81168114614d72578a8bfd5b9b50614d8060208e016147dd565b9a50614d8e60408e016147dd565b9950614d9c60608e016147dd565b9850614daa60808e01614845565b9750614db860a08e0161482f565b9650614dc660c08e0161482f565b9550614dd460e08e0161483a565b94506101008d015193506101208d01519250614df36101408e0161483a565b9150614e026101608e0161483a565b90509295989b509295989b509295989b565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0394909416845260029290920b60208401526040830152606082015260800190565b901515815260200190565b90815260200190565b9182526001600160a01b0316602082015260400190565b600296870b81529490950b602085015260408401929092526060830152608082015260a081019190915260c00190565b602080825260139082015272496e73756666696369656e7420706c6564676560681b604082015260600190565b6020808252601190820152706572726f7220726577617264536861726560781b604082015260600190565b6020808252601290820152711c1bdbdb081a5cc81b9bdd081c995dd85c9960721b604082015260600190565b6020808252600c908201526b6e6f7420616c6c6f7765642160a01b604082015260600190565b6020808252601590820152746572726f7220736574746c656d656e74426c6f636b60581b604082015260600190565b62ffffff91909116815260200190565b9384526001600160a01b03929092166020840152600290810b60408401520b606082015260800190565b918252602082015260400190565b9283526020830191909152604082015260600190565b93845260208401929092526040830152606082015260800190565b96875260208701959095526040860193909352606085019190915260020b608084015260a08301526001600160a01b031660c082015260e00190565b60405181810167ffffffffffffffff8111828210171561506f57fe5b604052919050565b6001600160a01b038116811461088b57600080fd5b801515811461088b57600080fd5b8060020b811461088b57600080fd5b6001600160801b038116811461088b57600080fd5b62ffffff8116811461088b57600080fdfeee244ef9da0b2f89a74b208ea9fe1a639ebdf634027d9e1f092b58c39954fa37536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220f8eb31c304b5199a76383dedf0e64bd9b5dffff4545016b8282f2610dc820c0f64736f6c63430007060033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103455760003560e01c80637d4d0fd7116101bf578063b1bba4ac116100fa578063d65bd07f1161009d578063d65bd07f146106f7578063da9da5261461070a578063e90ff9f91461071d578063ea2d8a0514610730578063ebe62aad14610743578063efa2681a1461074b578063f887ea401461075e578063fb02fc891461076657610345565b8063b1bba4ac1461066d578063b27d0dde14610680578063b3944d5214610693578063b66b2b221461069b578063bda29cfe146106ae578063c45a0155146106d4578063d47ccfa0146106dc578063d6554ae1146106ef57610345565b8063986e801611610162578063986e8016146106015780639907ccab146106145780639b4b1786146106275780639db49ed51461062f5780639e0796d014610642578063a6a043551461064a578063a6f9dae114610652578063a70419d21461066557610345565b80637d4d0fd7146105615780638240c4001461057457806383cd75b11461057c578063852feeb71461059d5780638b12d7da146105b05780638da5cb5b146105c357806390769e0e146105cb57806397d6958d146105de57610345565b80634d5ce0381161028f578063630b5ba111610232578063630b5ba1146104f5578063694c7a05146104fd5780636aa1f07b146105105780636b29657f146105185780636c2536d11461052b5780636f3980b01461053357806370dfb3071461054657806371ac3a7d1461055957610345565b80634d5ce03814610466578063512d76061461048657806351eb05a614610499578063529ffe03146104ac57806354ea83d0146104b4578063559ab6e4146104c75780635bb47808146104da578063607feec2146104ed57610345565b80631a65476d116102f75780631a65476d146103fa5780633268cc561461040d5780633310fd3a146104155780633b588351146104285780633ca7c02a1461043b5780633ccfd60b146104435780633d0aa3861461044b57806341cb87fc1461045357610345565b80630a19fabc1461034a5780630f208beb1461036857806315330d271461038a578063179d27af1461039f57806318bfb8bc146103b2578063190d46f6146103d257806319a18b55146103e5575b600080fd5b610352610779565b60405161035f9190614e14565b60405180910390f35b61037b610376366004614888565b610788565b60405161035f93929190614fe6565b61039d610398366004614850565b6107b4565b005b61039d6103ad366004614d05565b610825565b6103c56103c0366004614850565b61088e565b60405161035f9190614e75565b61039d6103e0366004614a49565b61093b565b6103ed610a68565b60405161035f9190614f9e565b61039d610408366004614d05565b610a7a565b610352610ace565b610352610423366004614963565b610add565b61039d610436366004614d05565b610c13565b6103c5610c71565b61039d610c83565b6103ed610d8b565b61039d610461366004614850565b610d9d565b610479610474366004614850565b610e0e565b60405161035f9190614e6a565b6103c5610494366004614ab0565b610e23565b61039d6104a7366004614d05565b610e4e565b610352610f28565b6103c56104c2366004614d05565b610f37565b61039d6104d5366004614d05565b6110e2565b61039d6104e8366004614850565b611136565b6103c56111a7565b61039d6111ad565b61039d61050b3660046148c0565b6111cc565b6103526113f6565b6103c5610526366004614850565b611405565b61039d6116f9565b61039d610541366004614d05565b61170b565b61039d610554366004614adb565b6118b7565b6103c56119d3565b61037b61056f366004614a1c565b6119d9565b6103c5611a1b565b61058f61058a366004614ab0565b611a21565b60405161035f929190614fd8565b61058f6105ab366004614bc0565b611a9d565b6103c56105be366004614850565b611cd5565b610352611ec0565b6103c56105d9366004614850565b611ecf565b6105f16105ec366004614d05565b611f10565b60405161035f9493929190614ffc565b61039d61060f366004614ce9565b611f37565b61039d610622366004614ce9565b611fa0565b6103c5612013565b61039d61063d366004614850565b612019565b6103c561208a565b610352612090565b61039d610660366004614850565b61209f565b6103ed61218c565b61039d61067b366004614850565b612197565b61039d61068e366004614ba3565b612208565b6103c56123b2565b61039d6106a9366004614850565b6123b8565b6106c16106bc366004614850565b612429565b60405161035f9796959493929190615017565b610352612470565b6103ed6106ea3660046149b6565b61247f565b6103c5612616565b61039d610705366004614b3e565b61261c565b610352610718366004614d05565b61289e565b61039d61072b366004614d05565b6128c8565b61039d61073e366004614d05565b61291c565b6103c5612970565b61039d610759366004614923565b612976565b610352612b82565b61058f610774366004614850565b612b91565b600d546001600160a01b031681565b601160209081526000928352604080842090915290825290208054600182015460029092015490919083565b6000546001600160a01b03163314610803576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610874576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600d5461088b906001600160a01b03163383612bf4565b50565b600e54604051632474521560e21b81526000916001600160a01b0316906391d14854906108cf906000805160206150d0833981519152908690600401614e7e565b60206040518083038186803b1580156108e757600080fd5b505afa1580156108fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061091f9190614b22565b15610932575060095462ffffff16610936565b5060005b919050565b6002546001600160a01b031661094f612c46565b6001600160a01b03161461096257600080fd5b6001600160a01b038516600090815260126020908152604080832060059092529091205460ff1615610a60576004548154439161099f9190612c4a565b111580156109b1575060008160060154115b15610a155780546004546000906109c9908390612c4a565b905060006109f16006546109eb86600401546109e58787612cad565b90612da1565b90612dfa565b9050610a1189610a0c60085484612dfa90919063ffffffff16565b612e3c565b5050505b610a228487878686612e9c565b7fc42fcee814e48ea79cb656f74d33c9acf93facf0c54b78c901f50256ccfc9bb784878585604051610a579493929190614fae565b60405180910390a15b505050505050565b6009546301000000900462ffffff1681565b6000546001600160a01b03163314610ac9576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600455565b600f546001600160a01b031690565b6000610ae884612f4b565b15610b89576000610afb83850185614c07565b600e546040808301519051631f532b3960e01b81529293506001600160a01b0390911691631f532b3991610b3191600401614e14565b60206040518083038186803b158015610b4957600080fd5b505afa158015610b5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b81919061486c565b915050610c0c565b600e54604051631f532b3960e01b81526001600160a01b0390911690631f532b3990610bb9908790600401614e14565b60206040518083038186803b158015610bd157600080fd5b505afa158015610be5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c09919061486c565b90505b9392505050565b6000546001600160a01b03163314610c62576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b670de0b6b3a764000002600c55565b6000805160206150d083398151915281565b610c8b612f51565b6000610c95612feb565b90506000610cb360646109eb600b5485612da190919063ffffffff16565b9050600c54811015610cc45750600c545b8015610d7057600d546040516370a0823160e01b815282916001600160a01b0316906370a0823190610cfa903390600401614e14565b60206040518083038186803b158015610d1257600080fd5b505afa158015610d26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4a9190614d1d565b11610d705760405162461bcd60e51b8152600401610d6790614ec5565b60405180910390fd5b600d54610d87906001600160a01b03163384612bf4565b5050565b6009546301000000900462ffffff1690565b6000546001600160a01b03163314610dec576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b60056020526000908152604090205460ff1681565b6001600160a01b03909116600090815260126020908152604080832093835260099093019052205490565b6000600a8281548110610e5d57fe5b60009182526020808320909101546001600160a01b031680835260129091526040909120600454815492935090914391610e979190612c4a565b11158015610ea9575060008160060154115b15610f23578054600454600090610ec1908390612c4a565b90506000610edd6006546109eb86600401546109e58787612cad565b6008808601549054919250610f03916001600160a01b0390911690610a0c908490612dfa565b6008840154610f1a906001600160a01b03166132ec565b50610a60612f51565b505050565b600e546001600160a01b031681565b60025460405163133f757160e31b815260009182918291829182918291829182916001600160a01b03909116906399fbab8890610f78908c90600401614e75565b6101806040518083038186803b158015610f9157600080fd5b505afa158015610fa5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc99190614d35565b5050505097509750975097509750975050506000610ffe600760009054906101000a90046001600160a01b03168888886133a6565b6001600160a01b03811660009081526005602052604090205490915060ff16156110d45760008061103186868e86611a9d565b60008e8152601060209081526040918290208251608081018452815480825260018301549382018490526002830154948201949094526003909101546060820152939550919350901561109357611091826020015184600160801b61347e565b015b808411156110c75760006110a7858361352d565b90506110c181886001600160801b0316600160801b61347e565b8d019c50505b5060600151999099019850505b509598975050505050505050565b6000546001600160a01b03163314611131576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600855565b6000546001600160a01b03163314611185576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60035481565b600a5460005b81811015610d87576111c481610e4e565b6001016111b3565b6000546001600160a01b0316331461121b576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b60006004541161123d5760405162461bcd60e51b8152600401610d6790614f6f565b600754600090611258906001600160a01b03168787876133a6565b90506112626111ad565b821561136857600082116112885760405162461bcd60e51b8152600401610d6790614ef2565b6001600160a01b0381166000908152601260205260409020600a546112bc576004546112b8906109e54382612dfa565b6013555b60088101546001600160a01b031661132d576004546112df906109e54382612dfa565b8155600a80546001810182556000919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80180546001600160a01b0319166001600160a01b0384161790555b600680548401808255600483018054909103909155600890910180546001600160a01b0319166001600160a01b0384161790558290556113c9565b6001600160a01b03811660009081526005602052604090205460ff166113a05760405162461bcd60e51b8152600401610d6790614f1d565b6001600160a01b0381166000908152601260205260408120600401805460068054919091039055555b6001600160a01b03166000908152600560205260409020805460ff19169215159290921790915550505050565b6001546001600160a01b031681565b600a546000908190815b818110156115c5576000600a828154811061142657fe5b60009182526020808320909101546001600160a01b03908116808452601283526040808520928b1685526011845280852082865290935291909220600281015491935090156115b7578154600282015410156114d6576114cd81600101548360090160006114b46004546109e560016114ae6004548a60020154612dfa90919063ffffffff16565b90612c4a565b815260200190815260200160002054600160801b61347e565b860195506115af565b436114fb6004546109e560016114ae6004548760020154612dfa90919063ffffffff16565b1115801561150d575060008260060154115b156115af57600454600282015460009161152b916109e59082612dfa565b9050600061154460045483612c4a90919063ffffffff16565b905060006115606006546109eb87600401546109e58787612cad565b9050600061157960085483612dfa90919063ffffffff16565b9050600061159082600160801b896006015461347e565b90506115a5818760010154600160801b61347e565b8b019a5050505050505b805495909501945b50505080600101905061140f565b506002546040516370a0823160e01b81526000916001600160a01b0316906370a08231906115f7908890600401614e14565b60206040518083038186803b15801561160f57600080fd5b505afa158015611623573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116479190614d1d565b905060005b818110156116ef57600254604051632f745c5960e01b81526000916001600160a01b031690632f745c5990611687908a908690600401614e28565b60206040518083038186803b15801561169f57600080fd5b505afa1580156116b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d79190614d1d565b90506116e281610f37565b909401935060010161164c565b5091949350505050565b611701612f51565b6000610c9561356f565b611713612f51565b6002546040516331a9108f60e11b81526001600160a01b0390911690636352211e90611743908490600401614e75565b60206040518083038186803b15801561175b57600080fd5b505afa15801561176f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611793919061486c565b6001600160a01b0316336001600160a01b0316146117c35760405162461bcd60e51b8152600401610d6790614f49565b60006117ce82613736565b905060006117ec60646109eb600b5485612da190919063ffffffff16565b9050600c548110156117fd5750600c545b80156118a057600d546040516370a0823160e01b815282916001600160a01b0316906370a0823190611833903390600401614e14565b60206040518083038186803b15801561184b57600080fd5b505afa15801561185f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118839190614d1d565b116118a05760405162461bcd60e51b8152600401610d6790614ec5565b600d54610f23906001600160a01b03163384612bf4565b6002546001600160a01b03166118cb612c46565b6001600160a01b0316146118de57600080fd5b6001600160a01b038416600090815260126020908152604080832060059092529091205460ff16156119cc576004548154439161191b9190612c4a565b1115801561192d575060008160060154115b15611980578054600454600090611945908390612c4a565b905060006119616006546109eb86600401546109e58787612cad565b905061197c88610a0c60085484612dfa90919063ffffffff16565b5050505b61198e848660008686612e9c565b7ff1a4e6dcce941118d895689ec6574905063b2f7d3faef1ae234e066a50ffd540848685856040516119c39493929190614fae565b60405180910390a15b5050505050565b60065481565b6001600160a01b039091166000908152601260209081526040808320600294850b850b8452600190810190925290912090810154815491909201549192909190565b60045481565b6001600160a01b03821660009081526012602052604081206004548291908290611a4c90869061352d565b905060008590506000611a6d6006546109eb86600401546109e58787612cad565b9050611a8460085482612dfa90919063ffffffff16565b9450611a90818661352d565b9550505050509250929050565b6001600160a01b038116600090815260126020526040812060038101546004548254849392914391611ace91612c4a565b11158015611ae0575060008260060154115b15611afb57600080611af187612b91565b9550929092019150505b600288810b900b60009081526001808401602052604090912090810154815415611b93576002820154600090815260078501602052604090205415611b6757815460028301546000908152600786016020526040902054611b619190600160801b61347e565b01611b93565b6004548454611b7591612c4a565b82600201541415611b93578154611b919086600160801b61347e565b015b600289810b900b60009081526001808601602052604090912090810154815415611c2b576002820154600090815260078701602052604090205415611bff57815460028301546000908152600788016020526040902054611bf99190600160801b61347e565b01611c2b565b6004548654611c0d91612c4a565b82600201541415611c2b578154611c299088600160801b61347e565b015b600586015460009060028e810b91810b900b12611c49575082611c4e565b508285035b600587015460009060028e810b91810b900b1215611c6d575081611c72565b508186035b60008c815260106020908152604080832060020154835260078b019091529020548288038290039a5015611cc45760008c815260106020908152604080832060020154835260078b0190915290205498505b505050505050505094509492505050565b600a546000908190815b81811015611eb7576000600a8281548110611cf657fe5b60009182526020808320909101546001600160a01b03908116808452601283526040808520928b1685526011909352918320600a80549395509193929091839187908110611d4057fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020600281015490915015611ea957815460028201541015611db957611db081600101548360090160006114b46004546109e560016114ae6004548a60020154612dfa90919063ffffffff16565b86019550611ea1565b43611dde6004546109e560016114ae6004548760020154612dfa90919063ffffffff16565b11158015611df0575060008260060154115b15611ea1576004546002820154600091611e0e916109e59082612dfa565b90506000611e366004546109e560016114ae6004548860020154612dfa90919063ffffffff16565b90506000611e526006546109eb87600401546109e58787612cad565b90506000611e6b60085483612dfa90919063ffffffff16565b90506000611e8282600160801b896006015461347e565b9050611e97818760010154600160801b61347e565b8b019a5050505050505b805495909501945b505050806001019050611cdf565b50909392505050565b6000546001600160a01b031681565b600080611edb83611405565b90506000611ef960646109eb600b5485612da190919063ffffffff16565b9050600c54811015610c0c5750600c549392505050565b60106020526000908152604090208054600182015460028301546003909301549192909184565b6000546001600160a01b03163314611f86576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b6009805462ffffff191662ffffff92909216919091179055565b6000546001600160a01b03163314611fef576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b6009805462ffffff90921663010000000265ffffff00000019909216919091179055565b600c5481565b6000546001600160a01b03163314612068576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b60135481565b6002546001600160a01b031681565b6000546001600160a01b031633146120ee576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b6001600160a01b038116612144576040805162461bcd60e51b81526020600482015260186024820152771059191c995cdcc81b5d5cdd081b9bdd081899481b9d5b1b60421b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b038316908117825560405190917fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf3691a250565b60095462ffffff1681565b6000546001600160a01b031633146121e6576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b612218612213612c46565b612f4b565b61222157600080fd5b60006012600061222f612c46565b6001600160a01b03166001600160a01b0316815260200190815260200160002090506005600061225d612c46565b6001600160a01b0316815260208101919091526040016000205460ff1615610f2357600581018054600284810b62ffffff1662ffffff199092169190911790915583810b900b600090815260018201602052604090208054158015906122d757506002810154600090815260078301602052604090205415155b15612313576002810154600090815260078301602052604090205481546123039190600160801b61347e565b6001820180549091019055600081555b600181015460038301546123269161352d565b60018201558054600283015461233b9161352d565b8155600454612353906109e560016114ae4384612dfa565b81600201819055507f2adb4b67cbae2c098371e7c630d02ca7d2270c2c2fbc05cd49ee330ed00a0cbc848484600201548560030154856000015486600101546040516123a496959493929190614e95565b60405180910390a150505050565b600a5490565b6000546001600160a01b03163314612407576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6012602052600090815260409020805460028083015460038401546004850154600586015460068701546008909701549596939592949193910b916001600160a01b031687565b6007546001600160a01b031681565b60008061248b86612f4b565b1561255d57600061249e85870187614c07565b600e546040808301519051632474521560e21b81528795509293506001600160a01b03909116916391d14854916124e8916000805160206150d08339815191529190600401614e7e565b60206040518083038186803b15801561250057600080fd5b505afa158015612514573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125389190614b22565b156125575760095462ffffff9081169085168161255157fe5b04840391505b5061260d565b50600e54604051632474521560e21b815283916001600160a01b0316906391d148549061259e906000805160206150d0833981519152908a90600401614e7e565b60206040518083038186803b1580156125b657600080fd5b505afa1580156125ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125ee9190614b22565b1561260d5760095462ffffff9081169084168161260757fe5b04830390505b95945050505050565b600b5481565b612627612213612c46565b61263057600080fd5b600061263e85870187614c07565b905060006012600061264e612c46565b6001600160a01b03166001600160a01b03168152602001908152602001600020905060006011600084604001516001600160a01b03166001600160a01b0316815260200190815260200160002060006126a5612c46565b6001600160a01b03166001600160a01b031681526020019081526020016000209050600560006126d3612c46565b6001600160a01b0316815260208101919091526040016000205460ff161561289457600454825443916127069190612c4a565b11158015612718575060008260060154115b1561278a578154600454600090612730908390612c4a565b9050600061274c6006546109eb87600401546109e58787612cad565b9050612771866040015161275e612c46565b60085461276c908590612dfa565b613902565b61278161277c612c46565b6132ec565b50505050612803565b60008260090160006127b76004546114ae6004546109e56004548960020154612dfa90919063ffffffff16565b815260200190815260200160002054905081600101546000141580156127dc57508015155b15612801576127f4826001015482600160801b61347e565b8254018255600060018301555b505b6001810180548501905543600280830182905560058401805462ffffff191662ffffff8a840b16179055830180548701905560068301805486019055600454612850916109e59082612dfa565b825560408084015190517f7c77e656b9ac404b27ce87e2dfdf91995fb9154a3d407802ca72815c83059f8c9161288b91899089908990614e41565b60405180910390a15b5050505050505050565b600a81815481106128ae57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314612917576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600b55565b6000546001600160a01b0316331461296b576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b600355565b60085481565b6000546001600160a01b031633146129c5576040805162461bcd60e51b815260206004820152600d60248201526c26bab9ba1031329037bbb732b960991b604482015290519081900360640190fd5b6000600454116129e75760405162461bcd60e51b8152600401610d6790614f6f565b6129ef6111ad565b8115612af55760008111612a155760405162461bcd60e51b8152600401610d6790614ef2565b6001600160a01b0383166000908152601260205260409020600a54612a4957600454612a45906109e54382612dfa565b6013555b60088101546001600160a01b0316612aba57600454612a6c906109e54382612dfa565b8155600a80546001810182556000919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80180546001600160a01b0319166001600160a01b0386161790555b600680548301808255600483018054909103909155600890910180546001600160a01b0319166001600160a01b038616179055819055612b56565b6001600160a01b03831660009081526005602052604090205460ff16612b2d5760405162461bcd60e51b8152600401610d6790614f1d565b6001600160a01b0383166000908152601260205260408120600401805460068054919091039055555b506001600160a01b03919091166000908152600560205260409020805460ff1916911515919091179055565b600f546001600160a01b031681565b6001600160a01b0381166000908152601260205260408120819081612bb5856139bd565b9050612bd682600601546109eb846002015484612da190919063ffffffff16565b9350612beb81600160801b846006015461347e565b92505050915091565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610f23908490613a40565b3390565b600082820183811015612ca4576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b600080600160009054906101000a90046001600160a01b03166001600160a01b0316637d24af666040518163ffffffff1660e01b815260040160206040518083038186803b158015612cfe57600080fd5b505afa158015612d12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d369190614d1d565b905080831015612d4a576000915050612ca7565b80841015612d7057612d686127106109eb6003546109e58588613af1565b915050612ca7565b612d996127106109eb6003546109e5612d89868a613af1565b612d93878a613af1565b9061352d565b949350505050565b600082612db057506000612ca7565b82820282848281612dbd57fe5b0414612ca45760405162461bcd60e51b81526004018080602001828103825260218152602001806150f06021913960400191505060405180910390fd5b6000612ca483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506140d5565b6001600160a01b03821660009081526012602052604090206006810154612e6a908390600160801b9061347e565b60045482546009840191600091612e8091612c4a565b8152602081019190915260400160002080549091019055505050565b600085815260106020526040812090612eb6848488614177565b90506000612ec48789614328565b905080821115612f11576000612eda838361352d565b90506001600160801b03871615612f0f57612f0381886001600160801b0316600160801b61347e565b60038501805490910190555b505b818355612f1f8585896143bf565b6001840155600454612f39906114ae816109e54382612dfa565b83600201819055505050505050505050565b3b151590565b600454600090612f65906109e54382612dfa565b9050601354811115612fe6576000612f7f60135483612cad565b6001546040516317f2f1d360e11b81529192506001600160a01b031690632fe5e3a690612fb29030908590600401614e28565b600060405180830381600087803b158015612fcc57600080fd5b505af1158015612fe0573d6000803e3d6000fd5b50505050505b601355565b600a546000908190815b818110156131b9576000600a828154811061300c57fe5b60009182526020808320909101546001600160a01b031680835260128252604080842033855260119093528320600a805492955092939290918391908790811061305257fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190206004548354919250439161308991612c4a565b1115801561309b575060008260060154115b1561312b5781546004546000906130b3908390612c4a565b905060006130cf6006546109eb87600401546109e58787612cad565b90506130f86130e960085483612dfa90919063ffffffff16565b600160801b876006015461347e565b60008381526009870160205260409020805490910190556008850154613126906001600160a01b03166132ec565b505050505b60008260090160006131586004546114ae6004546109e56004548960020154612dfa90919063ffffffff16565b8152602001908152602001600020549050816001015460001415801561317d57508015155b156131a257613195826001015482600160801b61347e565b8254018255600060018301555b508054600090915594909401935050600101612ff5565b506002546040516370a0823160e01b81526000916001600160a01b0316906370a08231906131eb903390600401614e14565b60206040518083038186803b15801561320357600080fd5b505afa158015613217573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061323b9190614d1d565b905060005b818110156132e357600254604051632f745c5960e01b81526000916001600160a01b031690632f745c599061327b9033908690600401614e28565b60206040518083038186803b15801561329357600080fd5b505afa1580156132a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132cb9190614d1d565b90506132d681614472565b9094019350600101613240565b50919250505090565b6001600160a01b03811660009081526012602052604081208161330e846139bd565b905061332f82600601546109eb846002015484612da190919063ffffffff16565b6003830180549091019055600060028301556006820154613357908290600160801b9061347e565b6004548354600785019160009161336d91612c4a565b815260208101919091526040016000908120919091556006830155600454613399906109e54382612dfa565b8255506003015492915050565b6000826001600160a01b0316846001600160a01b0316106133c657600080fd5b50604080516001600160a01b03948516602080830191909152939094168482015262ffffff919091166060808501919091528151808503820181526080850183528051908401206001600160f81b031960a086015294901b6bffffffffffffffffffffffff191660a184015260b58301939093527fe6b16e290cb376ebc5d1ae1a293763a28c2ee5a6829d50c61db25863d81e861360d5808401919091528351808403909101815260f5909201909252805191012090565b60008080600019858709868602925082811090839003039050806134b457600084116134a957600080fd5b508290049050610c0c565b8084116134c057600080fd5b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b6000612ca483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506145fd565b600a546000908190815b8181101561372e576000600a828154811061359057fe5b60009182526020808320909101546001600160a01b031680835260128252604080842033855260119093528320600a80549295509293929091839190879081106135d657fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190206004548354919250439161360d91612c4a565b1115801561361f575060008260060154115b156136a0578154600454600090613637908390612c4a565b905060006136536006546109eb87600401546109e58787612cad565b905061366d6130e960085483612dfa90919063ffffffff16565b6000838152600987016020526040902080549091019055600885015461369b906001600160a01b03166132ec565b505050505b60008260090160006136cd6004546114ae6004546109e56004548960020154612dfa90919063ffffffff16565b815260200190815260200160002054905081600101546000141580156136f257508015155b156137175761370a826001015482600160801b61347e565b8254018255600060018301555b508054600090915594909401935050600101613579565b509091505090565b600a546000908190815b818110156138ed576000600a828154811061375757fe5b60009182526020808320909101546001600160a01b031680835260128252604080842033855260119093528320600a805492955092939290918391908790811061379d57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020600454835491925043916137d491612c4a565b111580156137e6575060008260060154115b156138675781546004546000906137fe908390612c4a565b9050600061381a6006546109eb87600401546109e58787612cad565b90506138346130e960085483612dfa90919063ffffffff16565b60008381526009870160205260409020805490910190556008850154613862906001600160a01b03166132ec565b505050505b60008260090160006138946004546114ae6004546109e56004548960020154612dfa90919063ffffffff16565b815260200190815260200160002054905081600101546000141580156138b957508015155b156138de576138d1826001015482600160801b61347e565b8254018255600060018301555b50505050806001019050613740565b506138f784614472565b909101915050919050565b6001600160a01b038084166000908152601160209081526040808320938616835292815282822060129091529190206006810154613947908490600160801b9061347e565b6004548254600984019160009161395d91612c4a565b8152602001908152602001600020600082825401925050819055506139aa82600101548260090160006114b46004546109e560016114ae6004548b60020154612dfa90919063ffffffff16565b8254018255506000600190910155505050565b6001600160a01b0381166000908152601260205260408120805460045483906139e7908390612c4a565b905060006139f58383612cad565b90506000613a35613a12600160085461352d90919063ffffffff16565b6109e56008546109eb6006546109eb8b6004015489612da190919063ffffffff16565b979650505050505050565b6000613a95826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166146579092919063ffffffff16565b805190915015610f2357808060200190516020811015613ab457600080fd5b5051610f235760405162461bcd60e51b815260040180806020018281038252602a815260200180615111602a913960400191505060405180910390fd5b60008282111580613b00575082155b15613b0d57506000612ca7565b600083830390506000613ba6600160009054906101000a90046001600160a01b03166001600160a01b031663f4a814fd6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b6757600080fd5b505afa158015613b7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b9f9190614d1d565b8390612dfa565b90506001811015613ccd57613cc4613cbd600160009054906101000a90046001600160a01b03166001600160a01b031663f4a814fd6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c0557600080fd5b505afa158015613c19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c3d9190614d1d565b60015460405163b626975760e01b81526001600160a01b039091169063b626975790613c6d908790600401614e75565b60206040518083038186803b158015613c8557600080fd5b505afa158015613c99573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109eb9190614d1d565b8390612da1565b92505050612ca7565b600160009054906101000a90046001600160a01b03166001600160a01b0316635a2d34906040518163ffffffff1660e01b815260040160206040518083038186803b158015613d1b57600080fd5b505afa158015613d2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d539190614d1d565b8110156140ca576000805b82811015613df95760015460405163b626975760e01b8152613def916001600160a01b03169063b626975790613d98908590600401614e75565b60206040518083038186803b158015613db057600080fd5b505afa158015613dc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613de89190614d1d565b8390612c4a565b9150600101613d5e565b506000613f56826114ae613ebc600160009054906101000a90046001600160a01b03166001600160a01b031663f4a814fd6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5457600080fd5b505afa158015613e68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e8c9190614d1d565b60015460405163b626975760e01b81526001600160a01b039091169063b626975790613c6d908b90600401614e75565b6109e5613f4f600160009054906101000a90046001600160a01b03166001600160a01b031663f4a814fd6040518163ffffffff1660e01b815260040160206040518083038186803b158015613f1057600080fd5b505afa158015613f24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f489190614d1d565b8990612da1565b899061352d565b9050614067600160009054906101000a90046001600160a01b03166001600160a01b03166345138eb86040518163ffffffff1660e01b815260040160206040518083038186803b158015613fa957600080fd5b505afa158015613fbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fe19190614d1d565b600160009054906101000a90046001600160a01b03166001600160a01b031663a2d7f5e36040518163ffffffff1660e01b815260040160206040518083038186803b15801561402f57600080fd5b505afa158015614043573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d939190614d1d565b8111156140bf57600154604080516308a271d760e31b815290516140b4926001600160a01b0316916345138eb8916004808301926020929190829003018186803b158015613fa957600080fd5b945050505050612ca7565b9350612ca792505050565b600092505050612ca7565b600081836141615760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561412657818101518382015260200161410e565b50505050905090810190601f1680156141535780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161416d57fe5b0495945050505050565b6001600160a01b03811660009081526012602052604081206003810154600454825443916141a59190612c4a565b111580156141b7575060008260060154115b156141c8576141c5846132ec565b90505b806141d857600092505050610c0c565b600286810b810b6000908152600184016020908152604080832093840154835260078601909152902054158015906142105750805415155b1561424c5780546002820154600090815260078501602052604090205461423c9190600160801b61347e565b6001820180549091019055600081555b600180820154600288810b810b60009081529286016020908152604080852092830154855260078801909152909220549091901580159061428d5750805415155b156142c9578054600282015460009081526007870160205260409020546142b99190600160801b61347e565b6001820180549091019055600081555b6001810154600586015460009060028c810b91810b900b126142ec5750826142f1565b508285035b600587015460009060028c810b91810b900b1215614310575081614315565b508186035b9503949094039998505050505050505050565b6001600160a01b0382166000908152601260209081526040808320848452601083528184208054600290910154855260078201909352922054909190156143b85760008381526010602090815260408083206001810154600290910154845260078501909252909120546143a19190600160801b61347e565b600084815260106020526040812060010155909101905b5092915050565b6001600160a01b038116600090815260126020526040812060028101546143ea576000915050610c0c565b600285810b80820b600090815260018401602052604080822088850b850b835290822060058601549194909391810b900b1261442857508154614432565b5081546002840154035b6005840154600090600289810b91810b900b12156144525750815461445c565b5081546002850154035b6002909401540392909203925050509392505050565b60025460405163133f757160e31b81526000918291829182918291829182916001600160a01b0316906399fbab88906144af908b90600401614e75565b6101806040518083038186803b1580156144c857600080fd5b505afa1580156144dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145009190614d35565b5050505097509750975097509750975050506000614535600760009054906101000a90046001600160a01b03168888886133a6565b6001600160a01b0381166000908152600560205260408120549192509060ff16156145f0576000614567868685614177565b90506000614575848d614328565b60008d8152601060205260408120600301805491905593909301929050808211156145db5760006145a6838361352d565b60008e815260106020526040902084905590506145d1816001600160801b038816600160801b61347e565b84019350506145ed565b60008c81526010602052604090208290555b50505b9998505050505050505050565b6000818484111561464f5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561412657818101518382015260200161410e565b505050900390565b6060610c0984846000858561466b85612f4b565b6146bc576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106146fa5780518252601f1990920191602091820191016146db565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461475c576040519150601f19603f3d011682016040523d82523d6000602084013e614761565b606091505b5091509150613a358282866060831561477b575081610c0c565b82511561478b5782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561412657818101518382015260200161410e565b803561093681615077565b805161093681615077565b60008083601f8401126147f9578182fd5b50813567ffffffffffffffff811115614810578182fd5b60208301915083602082850101111561482857600080fd5b9250929050565b80516109368161509a565b8051610936816150a9565b8051610936816150be565b600060208284031215614861578081fd5b8135612ca481615077565b60006020828403121561487d578081fd5b8151612ca481615077565b6000806040838503121561489a578081fd5b82356148a581615077565b915060208301356148b581615077565b809150509250929050565b600080600080600060a086880312156148d7578081fd5b85356148e281615077565b945060208601356148f281615077565b93506040860135614902816150be565b925060608601356149128161508c565b949793965091946080013592915050565b600080600060608486031215614937578283fd5b833561494281615077565b925060208401356149528161508c565b929592945050506040919091013590565b600080600060408486031215614977578283fd5b833561498281615077565b9250602084013567ffffffffffffffff81111561499d578283fd5b6149a9868287016147e8565b9497909650939450505050565b600080600080606085870312156149cb578384fd5b84356149d681615077565b9350602085013567ffffffffffffffff8111156149f1578384fd5b6149fd878288016147e8565b9094509250506040850135614a11816150be565b939692955090935050565b60008060408385031215614a2e578182fd5b8235614a3981615077565b915060208301356148b58161509a565b600080600080600060a08688031215614a60578283fd5b8535614a6b81615077565b94506020860135614a7b816150a9565b9350604086013592506060860135614a928161509a565b91506080860135614aa28161509a565b809150509295509295909350565b60008060408385031215614ac2578182fd5b8235614acd81615077565b946020939093013593505050565b60008060008060808587031215614af0578182fd5b8435614afb81615077565b9350602085013592506040850135614b128161509a565b91506060850135614a118161509a565b600060208284031215614b33578081fd5b8151612ca48161508c565b600080600080600060808688031215614b55578283fd5b853567ffffffffffffffff811115614b6b578384fd5b614b77888289016147e8565b9096509450506020860135614b8b8161509a565b94979396509394604081013594506060013592915050565b60008060408385031215614bb5578182fd5b8235614a398161509a565b60008060008060808587031215614bd5578182fd5b8435614be08161509a565b93506020850135614bf08161509a565b9250604085013591506060850135614a1181615077565b60006020808385031215614c19578182fd5b823567ffffffffffffffff80821115614c30578384fd5b9084019060608287031215614c43578384fd5b604051606081018181108382111715614c5857fe5b604052823582811115614c69578586fd5b8301601f81018813614c79578586fd5b803583811115614c8557fe5b614c97601f8201601f19168701615053565b93508084528886828401011115614cac578687fd5b80868301878601378301850186905250818152614cca8385016147d2565b84820152614cda604084016147d2565b60408201529695505050505050565b600060208284031215614cfa578081fd5b8135612ca4816150be565b600060208284031215614d16578081fd5b5035919050565b600060208284031215614d2e578081fd5b5051919050565b6000806000806000806000806000806000806101808d8f031215614d5757898afd5b8c516bffffffffffffffffffffffff81168114614d72578a8bfd5b9b50614d8060208e016147dd565b9a50614d8e60408e016147dd565b9950614d9c60608e016147dd565b9850614daa60808e01614845565b9750614db860a08e0161482f565b9650614dc660c08e0161482f565b9550614dd460e08e0161483a565b94506101008d015193506101208d01519250614df36101408e0161483a565b9150614e026101608e0161483a565b90509295989b509295989b509295989b565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0394909416845260029290920b60208401526040830152606082015260800190565b901515815260200190565b90815260200190565b9182526001600160a01b0316602082015260400190565b600296870b81529490950b602085015260408401929092526060830152608082015260a081019190915260c00190565b602080825260139082015272496e73756666696369656e7420706c6564676560681b604082015260600190565b6020808252601190820152706572726f7220726577617264536861726560781b604082015260600190565b6020808252601290820152711c1bdbdb081a5cc81b9bdd081c995dd85c9960721b604082015260600190565b6020808252600c908201526b6e6f7420616c6c6f7765642160a01b604082015260600190565b6020808252601590820152746572726f7220736574746c656d656e74426c6f636b60581b604082015260600190565b62ffffff91909116815260200190565b9384526001600160a01b03929092166020840152600290810b60408401520b606082015260800190565b918252602082015260400190565b9283526020830191909152604082015260600190565b93845260208401929092526040830152606082015260800190565b96875260208701959095526040860193909352606085019190915260020b608084015260a08301526001600160a01b031660c082015260e00190565b60405181810167ffffffffffffffff8111828210171561506f57fe5b604052919050565b6001600160a01b038116811461088b57600080fd5b801515811461088b57600080fd5b8060020b811461088b57600080fd5b6001600160801b038116811461088b57600080fd5b62ffffff8116811461088b57600080fdfeee244ef9da0b2f89a74b208ea9fe1a639ebdf634027d9e1f092b58c39954fa37536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220f8eb31c304b5199a76383dedf0e64bd9b5dffff4545016b8282f2610dc820c0f64736f6c63430007060033
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.