More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 2 internal transactions
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
1930910 | 5 days ago | Contract Creation | 0 S | |||
1930910 | 5 days ago | Contract Creation | 0 S |
Loading...
Loading
Contract Name:
Pair
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; import "./libraries/Math.sol"; import "./interfaces/IERC20.sol"; import "./interfaces/IPair.sol"; import "./interfaces/IDibs.sol"; import "./interfaces/IPairCallee.sol"; import "./interfaces/IPairFactory.sol"; import "./PairFees.sol"; // The base pair of pools, either stable or volatile contract Pair is IPair { string public name; string public symbol; uint8 public constant decimals = 18; // Used to denote stable or volatile pair, not immutable since construction happens in the initialize method for CREATE2 deterministic addresses bool public immutable stable; uint public totalSupply = 0; mapping(address => mapping(address => uint)) public allowance; mapping(address => uint) public balanceOf; bytes32 internal DOMAIN_SEPARATOR; // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); bytes32 internal constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9; mapping(address => uint) public nonces; uint internal constant MINIMUM_LIQUIDITY = 10 ** 3; address public immutable token0; address public immutable token1; address public immutable fees; address immutable factory; // Structure to capture time period obervations every 30 minutes, used for local oracles struct Observation { uint timestamp; uint reserve0Cumulative; uint reserve1Cumulative; } // Capture oracle reading every 30 minutes uint constant periodSize = 1800; Observation[] public observations; uint internal immutable decimals0; uint internal immutable decimals1; uint public reserve0; uint public reserve1; uint public blockTimestampLast; uint public reserve0CumulativeLast; uint public reserve1CumulativeLast; // index0 and index1 are used to accumulate fees, this is split out from normal trades to keep the swap "clean" // this further allows LP holders to easily claim fees for tokens they have/staked uint public index0 = 0; uint public index1 = 0; // position assigned to each LP to track their current index0 & index1 vs the global position mapping(address => uint) public supplyIndex0; mapping(address => uint) public supplyIndex1; // tracks the amount of unclaimed, but claimable tokens off of fees for token0 and token1 mapping(address => uint) public claimable0; mapping(address => uint) public claimable1; event Fees(address indexed sender, uint amount0, uint amount1); event Mint(address indexed sender, uint amount0, uint amount1); event Burn( address indexed sender, uint amount0, uint amount1, address indexed to ); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint reserve0, uint reserve1); event Claim( address indexed sender, address indexed recipient, uint amount0, uint amount1 ); event Transfer(address indexed from, address indexed to, uint amount); event Approval(address indexed owner, address indexed spender, uint amount); constructor() { factory = msg.sender; (address _token0, address _token1, bool _stable) = IPairFactory( msg.sender ).getInitializable(); (token0, token1, stable) = (_token0, _token1, _stable); fees = address(new PairFees(_token0, _token1)); if (_stable) { name = string( abi.encodePacked( "StableV1 AMM - ", IERC20(_token0).symbol(), "/", IERC20(_token1).symbol() ) ); symbol = string( abi.encodePacked( "sAMM-", IERC20(_token0).symbol(), "/", IERC20(_token1).symbol() ) ); } else { name = string( abi.encodePacked( "VolatileV1 AMM - ", IERC20(_token0).symbol(), "/", IERC20(_token1).symbol() ) ); symbol = string( abi.encodePacked( "vAMM-", IERC20(_token0).symbol(), "/", IERC20(_token1).symbol() ) ); } decimals0 = 10 ** IERC20(_token0).decimals(); decimals1 = 10 ** IERC20(_token1).decimals(); observations.push(Observation(block.timestamp, 0, 0)); } // simple re-entrancy check uint internal _unlocked = 1; modifier lock() { require(_unlocked == 1); _unlocked = 2; _; _unlocked = 1; } function observationLength() external view returns (uint) { return observations.length; } function lastObservation() public view returns (Observation memory) { return observations[observations.length - 1]; } function metadata() external view returns ( uint dec0, uint dec1, uint r0, uint r1, bool st, address t0, address t1 ) { return ( decimals0, decimals1, reserve0, reserve1, stable, token0, token1 ); } function tokens() external view returns (address, address) { return (token0, token1); } function isStable() external view returns (bool) { return stable; } // claim accumulated but unclaimed fees (viewable via claimable0 and claimable1) function claimFees() external returns (uint claimed0, uint claimed1) { _updateFor(msg.sender); claimed0 = claimable0[msg.sender]; claimed1 = claimable1[msg.sender]; if (claimed0 > 0 || claimed1 > 0) { claimable0[msg.sender] = 0; claimable1[msg.sender] = 0; PairFees(fees).claimFeesFor(msg.sender, claimed0, claimed1); emit Claim(msg.sender, msg.sender, claimed0, claimed1); } } function claimStakingFees() external { address _feehandler = IPairFactory(factory).stakingFeeHandler(); PairFees(fees).withdrawStakingFees(_feehandler); } // Accrue fees on token0 function _update0(uint amount) internal { // get referral fee address _dibs = IPairFactory(factory).dibs(); uint256 _maxRef = IPairFactory(factory).MAX_TREASURY_FEE(); uint256 _referralFee = (amount * _maxRef) / 10000; _safeTransfer(token0, _dibs, _referralFee); // transfer the fees out to PairFees // amount -= _referralFee; // get lp and staking fee uint256 _stakingNftFee = (amount * IPairFactory(factory).stakingNFTFee()) / 10000; PairFees(fees).processStakingFees(_stakingNftFee, true); _safeTransfer(token0, fees, amount - _referralFee); // transfer the fees out to PairFees // remove staking fees from lpfees amount -= (_stakingNftFee + _referralFee); uint256 _ratio = (amount * 1e18) / totalSupply; // 1e18 adjustment is removed during claim if (_ratio > 0) { index0 += _ratio; } emit Fees(msg.sender, amount + _stakingNftFee + _referralFee, 0); } // Accrue fees on token1 function _update1(uint amount) internal { // get referral fee address _dibs = IPairFactory(factory).dibs(); uint256 _maxRef = IPairFactory(factory).MAX_TREASURY_FEE(); uint256 _referralFee = (amount * _maxRef) / 10000; _safeTransfer(token1, _dibs, _referralFee); // transfer the fees out to PairFees // amount -= _referralFee; // get lp and staking fee uint256 _stakingNftFee = (amount * IPairFactory(factory).stakingNFTFee()) / 10000; PairFees(fees).processStakingFees(_stakingNftFee, false); _safeTransfer(token1, fees, amount - _referralFee); // transfer the fees out to PairFees // remove staking fees from lpfees amount -= (_stakingNftFee + _referralFee); uint256 _ratio = (amount * 1e18) / totalSupply; if (_ratio > 0) { index1 += _ratio; } emit Fees(msg.sender, 0, amount + _stakingNftFee + _referralFee); } // this function MUST be called on any balance changes, otherwise can be used to infinitely claim fees // Fees are segregated from core funds, so fees can never put liquidity at risk function _updateFor(address recipient) internal { uint _supplied = balanceOf[recipient]; // get LP balance of `recipient` if (_supplied > 0) { uint _supplyIndex0 = supplyIndex0[recipient]; // get last adjusted index0 for recipient uint _supplyIndex1 = supplyIndex1[recipient]; uint _index0 = index0; // get global index0 for accumulated fees uint _index1 = index1; supplyIndex0[recipient] = _index0; // update user current position to global position supplyIndex1[recipient] = _index1; uint _delta0 = _index0 - _supplyIndex0; // see if there is any difference that need to be accrued uint _delta1 = _index1 - _supplyIndex1; if (_delta0 > 0) { uint _share = (_supplied * _delta0) / 1e18; // add accrued difference for each supplied token claimable0[recipient] += _share; } if (_delta1 > 0) { uint _share = (_supplied * _delta1) / 1e18; claimable1[recipient] += _share; } } else { supplyIndex0[recipient] = index0; // new users are set to the default global state supplyIndex1[recipient] = index1; } } function getReserves() public view returns (uint _reserve0, uint _reserve1, uint _blockTimestampLast) { _reserve0 = reserve0; _reserve1 = reserve1; _blockTimestampLast = blockTimestampLast; } // update reserves and, on the first call per block, price accumulators function _update( uint balance0, uint balance1, uint _reserve0, uint _reserve1 ) internal { uint blockTimestamp = block.timestamp; uint timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired if (timeElapsed > 0 && _reserve0 != 0 && _reserve1 != 0) { reserve0CumulativeLast += _reserve0 * timeElapsed; reserve1CumulativeLast += _reserve1 * timeElapsed; } Observation memory _point = lastObservation(); timeElapsed = blockTimestamp - _point.timestamp; // compare the last observation with current timestamp, if greater than 30 minutes, record a new event if (timeElapsed > periodSize) { observations.push( Observation( blockTimestamp, reserve0CumulativeLast, reserve1CumulativeLast ) ); } reserve0 = balance0; reserve1 = balance1; blockTimestampLast = blockTimestamp; emit Sync(reserve0, reserve1); } // produces the cumulative price using counterfactuals to save gas and avoid a call to sync. function currentCumulativePrices() public view returns ( uint reserve0Cumulative, uint reserve1Cumulative, uint blockTimestamp ) { blockTimestamp = block.timestamp; reserve0Cumulative = reserve0CumulativeLast; reserve1Cumulative = reserve1CumulativeLast; // if time has elapsed since the last update on the pair, mock the accumulated price values ( uint _reserve0, uint _reserve1, uint _blockTimestampLast ) = getReserves(); if (_blockTimestampLast != blockTimestamp) { // subtraction overflow is desired uint timeElapsed = blockTimestamp - _blockTimestampLast; reserve0Cumulative += _reserve0 * timeElapsed; reserve1Cumulative += _reserve1 * timeElapsed; } } // gives the current twap price measured from amountIn * tokenIn gives amountOut function current( address tokenIn, uint amountIn ) external view returns (uint amountOut) { Observation memory _observation = lastObservation(); ( uint reserve0Cumulative, uint reserve1Cumulative, ) = currentCumulativePrices(); if (block.timestamp == _observation.timestamp) { _observation = observations[observations.length - 2]; } uint timeElapsed = block.timestamp - _observation.timestamp; uint _reserve0 = (reserve0Cumulative - _observation.reserve0Cumulative) / timeElapsed; uint _reserve1 = (reserve1Cumulative - _observation.reserve1Cumulative) / timeElapsed; amountOut = _getAmountOut(amountIn, tokenIn, _reserve0, _reserve1); } // as per `current`, however allows user configured granularity, up to the full window size function quote( address tokenIn, uint amountIn, uint granularity ) external view returns (uint amountOut) { uint[] memory _prices = sample(tokenIn, amountIn, granularity, 1); uint priceAverageCumulative; for (uint i = 0; i < _prices.length; i++) { priceAverageCumulative += _prices[i]; } return priceAverageCumulative / granularity; } // returns a memory set of twap prices function prices( address tokenIn, uint amountIn, uint points ) external view returns (uint[] memory) { return sample(tokenIn, amountIn, points, 1); } function sample( address tokenIn, uint amountIn, uint points, uint window ) public view returns (uint[] memory) { uint[] memory _prices = new uint[](points); uint length = observations.length - 1; uint i = length - (points * window); uint nextIndex = 0; uint index = 0; for (; i < length; i += window) { nextIndex = i + window; uint timeElapsed = observations[nextIndex].timestamp - observations[i].timestamp; uint _reserve0 = (observations[nextIndex].reserve0Cumulative - observations[i].reserve0Cumulative) / timeElapsed; uint _reserve1 = (observations[nextIndex].reserve1Cumulative - observations[i].reserve1Cumulative) / timeElapsed; _prices[index] = _getAmountOut( amountIn, tokenIn, _reserve0, _reserve1 ); // index < length; length cannot overflow unchecked { index = index + 1; } } return _prices; } // this low-level function should be called by addLiquidity functions in Router.sol, which performs important safety checks // standard uniswap v2 implementation function mint(address to) external lock returns (uint liquidity) { (uint _reserve0, uint _reserve1) = (reserve0, reserve1); uint _balance0 = IERC20(token0).balanceOf(address(this)); uint _balance1 = IERC20(token1).balanceOf(address(this)); uint _amount0 = _balance0 - _reserve0; uint _amount1 = _balance1 - _reserve1; uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee if (_totalSupply == 0) { liquidity = Math.sqrt(_amount0 * _amount1) - MINIMUM_LIQUIDITY; _mint(address(0), MINIMUM_LIQUIDITY); // permanently lock the first MINIMUM_LIQUIDITY tokens } else { liquidity = Math.min( (_amount0 * _totalSupply) / _reserve0, (_amount1 * _totalSupply) / _reserve1 ); } require(liquidity > 0, "ILM"); // Pair: INSUFFICIENT_LIQUIDITY_MINTED _mint(to, liquidity); _update(_balance0, _balance1, _reserve0, _reserve1); emit Mint(msg.sender, _amount0, _amount1); } // this low-level function should be called from a contract which performs important safety checks // standard uniswap v2 implementation function burn( address to ) external lock returns (uint amount0, uint amount1) { (uint _reserve0, uint _reserve1) = (reserve0, reserve1); (address _token0, address _token1) = (token0, token1); uint _balance0 = IERC20(_token0).balanceOf(address(this)); uint _balance1 = IERC20(_token1).balanceOf(address(this)); uint _liquidity = balanceOf[address(this)]; uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee amount0 = (_liquidity * _balance0) / _totalSupply; // using balances ensures pro-rata distribution amount1 = (_liquidity * _balance1) / _totalSupply; // using balances ensures pro-rata distribution require(amount0 > 0 && amount1 > 0, "ILB"); // Pair: INSUFFICIENT_LIQUIDITY_BURNED _burn(address(this), _liquidity); _safeTransfer(_token0, to, amount0); _safeTransfer(_token1, to, amount1); _balance0 = IERC20(_token0).balanceOf(address(this)); _balance1 = IERC20(_token1).balanceOf(address(this)); _update(_balance0, _balance1, _reserve0, _reserve1); emit Burn(msg.sender, amount0, amount1, to); } // this low-level function should be called from a contract which performs important safety checks function swap( uint amount0Out, uint amount1Out, address to, bytes calldata data ) external lock { require(!IPairFactory(factory).isPaused()); require(amount0Out > 0 || amount1Out > 0, "IOA"); // Pair: INSUFFICIENT_OUTPUT_AMOUNT (uint _reserve0, uint _reserve1) = (reserve0, reserve1); require(amount0Out < _reserve0 && amount1Out < _reserve1, "IL"); // Pair: INSUFFICIENT_LIQUIDITY uint _balance0; uint _balance1; { // scope for _token{0,1}, avoids stack too deep errors (address _token0, address _token1) = (token0, token1); require(to != _token0 && to != _token1, "IT"); // Pair: INVALID_TO if (amount0Out > 0) _safeTransfer(_token0, to, amount0Out); // optimistically transfer tokens if (amount1Out > 0) _safeTransfer(_token1, to, amount1Out); // optimistically transfer tokens if (data.length > 0) IPairCallee(to).hook(msg.sender, amount0Out, amount1Out, data); // callback, used for flash loans _balance0 = IERC20(_token0).balanceOf(address(this)); _balance1 = IERC20(_token1).balanceOf(address(this)); } uint amount0In = _balance0 > _reserve0 - amount0Out ? _balance0 - (_reserve0 - amount0Out) : 0; uint amount1In = _balance1 > _reserve1 - amount1Out ? _balance1 - (_reserve1 - amount1Out) : 0; require(amount0In > 0 || amount1In > 0, "IIA"); // Pair: INSUFFICIENT_INPUT_AMOUNT { // scope for reserve{0,1}Adjusted, avoids stack too deep errors (address _token0, address _token1) = (token0, token1); if (amount0In > 0) _update0( (amount0In * IPairFactory(factory).getFee(stable)) / 10000 ); // accrue fees for token0 and move them out of pool if (amount1In > 0) _update1( (amount1In * IPairFactory(factory).getFee(stable)) / 10000 ); // accrue fees for token1 and move them out of pool _balance0 = IERC20(_token0).balanceOf(address(this)); // since we removed tokens, we need to reconfirm balances, can also simply use previous balance - amountIn/ 10000, but doing balanceOf again as safety check _balance1 = IERC20(_token1).balanceOf(address(this)); // The curve, either x3y+y3x for stable pools, or x*y for volatile pools require(_k(_balance0, _balance1) >= _k(_reserve0, _reserve1), "K"); // Pair: K } _update(_balance0, _balance1, _reserve0, _reserve1); emit Swap(msg.sender, amount0In, amount1In, amount0Out, amount1Out, to); } // force balances to match reserves function skim(address to) external lock { (address _token0, address _token1) = (token0, token1); _safeTransfer( _token0, to, IERC20(_token0).balanceOf(address(this)) - (reserve0) ); _safeTransfer( _token1, to, IERC20(_token1).balanceOf(address(this)) - (reserve1) ); } // force reserves to match balances function sync() external lock { _update( IERC20(token0).balanceOf(address(this)), IERC20(token1).balanceOf(address(this)), reserve0, reserve1 ); } function _f(uint x0, uint y) internal pure returns (uint) { return (x0 * ((((y * y) / 1e18) * y) / 1e18)) / 1e18 + (((((x0 * x0) / 1e18) * x0) / 1e18) * y) / 1e18; } function _d(uint x0, uint y) internal pure returns (uint) { return (3 * x0 * ((y * y) / 1e18)) / 1e18 + ((((x0 * x0) / 1e18) * x0) / 1e18); } function _get_y(uint x0, uint xy, uint y) internal pure returns (uint) { for (uint i = 0; i < 255; i++) { uint y_prev = y; uint k = _f(x0, y); if (k < xy) { uint dy = ((xy - k) * 1e18) / _d(x0, y); y = y + dy; } else { uint dy = ((k - xy) * 1e18) / _d(x0, y); y = y - dy; } if (y > y_prev) { if (y - y_prev <= 1) { return y; } } else { if (y_prev - y <= 1) { return y; } } } return y; } function getAmountOut( uint amountIn, address tokenIn ) external view returns (uint) { (uint _reserve0, uint _reserve1) = (reserve0, reserve1); amountIn -= (amountIn * IPairFactory(factory).getFee(stable)) / 10000; // remove fee from amount received return _getAmountOut(amountIn, tokenIn, _reserve0, _reserve1); } function _getAmountOut( uint amountIn, address tokenIn, uint _reserve0, uint _reserve1 ) internal view returns (uint) { if (stable) { uint xy = _k(_reserve0, _reserve1); _reserve0 = (_reserve0 * 1e18) / decimals0; _reserve1 = (_reserve1 * 1e18) / decimals1; (uint reserveA, uint reserveB) = tokenIn == token0 ? (_reserve0, _reserve1) : (_reserve1, _reserve0); amountIn = tokenIn == token0 ? (amountIn * 1e18) / decimals0 : (amountIn * 1e18) / decimals1; uint y = reserveB - _get_y(amountIn + reserveA, xy, reserveB); return (y * (tokenIn == token0 ? decimals1 : decimals0)) / 1e18; } else { (uint reserveA, uint reserveB) = tokenIn == token0 ? (_reserve0, _reserve1) : (_reserve1, _reserve0); return (amountIn * reserveB) / (reserveA + amountIn); } } function _k(uint x, uint y) internal view returns (uint) { if (stable) { uint _x = (x * 1e18) / decimals0; uint _y = (y * 1e18) / decimals1; uint _a = (_x * _y) / 1e18; uint _b = ((_x * _x) / 1e18 + (_y * _y) / 1e18); return (_a * _b) / 1e18; // x3y+y3x >= k } else { return x * y; // xy >= k } } function _mint(address dst, uint amount) internal { _updateFor(dst); // balances must be updated on mint/burn/transfer totalSupply += amount; balanceOf[dst] += amount; emit Transfer(address(0), dst, amount); } function _burn(address dst, uint amount) internal { _updateFor(dst); totalSupply -= amount; balanceOf[dst] -= amount; emit Transfer(dst, address(0), amount); } function approve(address spender, uint amount) external returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function permit( address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s ) external { require(deadline >= block.timestamp, "Pair: EXPIRED"); DOMAIN_SEPARATOR = keccak256( abi.encode( keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ), keccak256(bytes(name)), keccak256(bytes("1")), block.chainid, address(this) ) ); bytes32 digest = keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR, keccak256( abi.encode( PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline ) ) ) ); address recoveredAddress = ecrecover(digest, v, r, s); require( recoveredAddress != address(0) && recoveredAddress == owner, "Pair: INVALID_SIGNATURE" ); allowance[owner][spender] = value; emit Approval(owner, spender, value); } function transfer(address dst, uint amount) external returns (bool) { _transferTokens(msg.sender, dst, amount); return true; } function transferFrom( address src, address dst, uint amount ) external returns (bool) { address spender = msg.sender; uint spenderAllowance = allowance[src][spender]; if (spender != src && spenderAllowance != type(uint).max) { uint newAllowance = spenderAllowance - amount; allowance[src][spender] = newAllowance; emit Approval(src, spender, newAllowance); } _transferTokens(src, dst, amount); return true; } function _transferTokens(address src, address dst, uint amount) internal { _updateFor(src); // update fee position for src _updateFor(dst); // update fee position for dst balanceOf[src] -= amount; balanceOf[dst] += amount; emit Transfer(src, dst, amount); } function _safeTransfer(address token, address to, uint256 value) internal { require(token.code.length > 0); (bool success, bytes memory data) = token.call( abi.encodeWithSelector(IERC20.transfer.selector, to, value) ); require(success && (data.length == 0 || abi.decode(data, (bool)))); } function _safeApprove( address token, address spender, uint256 value ) internal { require(token.code.length > 0); require( (value == 0) || (IERC20(token).allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); (bool success, bytes memory data) = token.call( abi.encodeWithSelector(IERC20.approve.selector, spender, value) ); require(success && (data.length == 0 || abi.decode(data, (bool)))); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; interface IDibs { function reward(address user,bytes32 parentCode, uint256 totalFees,uint256 totalVolume, address token) external returns(uint256 referralFee); function findTotalRewardFor(address _user, uint _totalFees) external view returns(uint256 _referralFeeAmount); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; interface IERC20 { function totalSupply() external view returns (uint256); function transfer(address recipient, uint amount) external returns (bool); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function balanceOf(address) external view returns (uint); function transferFrom(address sender, address recipient, uint amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; interface IPair { function metadata() external view returns (uint dec0, uint dec1, uint r0, uint r1, bool st, address t0, address t1); function claimFees() external returns (uint, uint); function tokens() external view returns (address, address); function token0() external view returns (address); function token1() external view returns (address); function transferFrom(address src, address dst, uint amount) external returns (bool); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function burn(address to) external returns (uint amount0, uint amount1); function mint(address to) external returns (uint liquidity); function getReserves() external view returns (uint _reserve0, uint _reserve1, uint _blockTimestampLast); function getAmountOut(uint, address) external view returns (uint); function name() external view returns(string memory); function symbol() external view returns(string memory); function totalSupply() external view returns (uint); function decimals() external view returns (uint8); function claimable0(address _user) external view returns (uint); function claimable1(address _user) external view returns (uint); function isStable() external view returns(bool); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; interface IPairCallee { function hook(address sender, uint amount0, uint amount1, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; interface IPairFactory { function allPairsLength() external view returns (uint); function isPair(address pair) external view returns (bool); function allPairs(uint index) external view returns (address); function stakingFeeHandler() external view returns (address); function dibs() external view returns (address); function MAX_TREASURY_FEE() external view returns (uint256); function stakingNFTFee() external view returns (uint256); function isPaused() external view returns (bool); function pairCodeHash() external pure returns (bytes32); function getPair(address tokenA, address token, bool stable) external view returns (address); function createPair(address tokenA, address tokenB, bool stable) external returns (address pair); function getInitializable() external view returns (address, address, bool); function getFee(bool _stable) external view returns(uint256); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; library Math { function max(uint a, uint b) internal pure returns (uint) { return a >= b ? a : b; } function min(uint a, uint b) internal pure returns (uint) { return a < b ? a : b; } function sqrt(uint y) internal pure returns (uint z) { if (y > 3) { z = y; uint x = y / 2 + 1; while (x < z) { z = x; x = (y / x + x) / 2; } } else if (y != 0) { z = 1; } } function cbrt(uint256 n) internal pure returns (uint256) { unchecked { uint256 x = 0; for (uint256 y = 1 << 255; y > 0; y >>= 3) { x <<= 1; uint256 z = 3 * x * (x + 1) + 1; if (n / y >= z) { n -= y * z; x += 1; } } return x; }} }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; import './interfaces/IERC20.sol'; // Pair Fees contract is used as a 1:1 pair relationship to split out fees, this ensures that the curve does not need to be modified for LP shares contract PairFees { address internal immutable pair; // The pair it is bonded to address internal immutable token0; // token0 of pair, saved localy and statically for gas optimization address internal immutable token1; // Token1 of pair, saved localy and statically for gas optimization uint256 public toStake0; uint256 public toStake1; constructor(address _token0, address _token1) { pair = msg.sender; token0 = _token0; token1 = _token1; } function _safeTransfer(address token,address to,uint256 value) internal { require(token.code.length > 0); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool)))); } // Allow the pair to transfer fees to users function claimFeesFor(address recipient, uint amount0, uint amount1) external { require(msg.sender == pair); if (amount0 > 0) _safeTransfer(token0, recipient, amount0); if (amount1 > 0) _safeTransfer(token1, recipient, amount1); } function processStakingFees(uint amount, bool isTokenZero) external { require(msg.sender == pair); if(amount > 0 && isTokenZero){ toStake0 += amount; } if(amount > 0 && !isTokenZero){ toStake1 += amount; } } function withdrawStakingFees(address recipient) external { require(msg.sender == pair); if (toStake0 > 0){ _safeTransfer(token0, recipient, toStake0); toStake0 = 0; } if (toStake1 > 0){ _safeTransfer(token1, recipient, toStake1); toStake1 = 0; } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Fees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0Out","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1Out","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reserve0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reserve1","type":"uint256"}],"name":"Sync","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blockTimestampLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"burn","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimFees","outputs":[{"internalType":"uint256","name":"claimed0","type":"uint256"},{"internalType":"uint256","name":"claimed1","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimStakingFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimable0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimable1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"current","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentCumulativePrices","outputs":[{"internalType":"uint256","name":"reserve0Cumulative","type":"uint256"},{"internalType":"uint256","name":"reserve1Cumulative","type":"uint256"},{"internalType":"uint256","name":"blockTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fees","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"}],"name":"getAmountOut","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint256","name":"_reserve0","type":"uint256"},{"internalType":"uint256","name":"_reserve1","type":"uint256"},{"internalType":"uint256","name":"_blockTimestampLast","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"index0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"index1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isStable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastObservation","outputs":[{"components":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"reserve0Cumulative","type":"uint256"},{"internalType":"uint256","name":"reserve1Cumulative","type":"uint256"}],"internalType":"struct Pair.Observation","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadata","outputs":[{"internalType":"uint256","name":"dec0","type":"uint256"},{"internalType":"uint256","name":"dec1","type":"uint256"},{"internalType":"uint256","name":"r0","type":"uint256"},{"internalType":"uint256","name":"r1","type":"uint256"},{"internalType":"bool","name":"st","type":"bool"},{"internalType":"address","name":"t0","type":"address"},{"internalType":"address","name":"t1","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"observationLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"observations","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"reserve0Cumulative","type":"uint256"},{"internalType":"uint256","name":"reserve1Cumulative","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"points","type":"uint256"}],"name":"prices","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"granularity","type":"uint256"}],"name":"quote","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserve0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserve0CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserve1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserve1CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"points","type":"uint256"},{"internalType":"uint256","name":"window","type":"uint256"}],"name":"sample","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"skim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"supplyIndex0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"supplyIndex1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount0Out","type":"uint256"},{"internalType":"uint256","name":"amount1Out","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sync","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokens","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
61016060405260006002556000600d556000600e5560016013553480156200002657600080fd5b50336001600160a01b0316610100816001600160a01b0316815250506000806000336001600160a01b031663eb13c4cf6040518163ffffffff1660e01b8152600401606060405180830381865afa15801562000086573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000ac9190620007c8565b8015156080526001600160a01b0380831660c052831660a052604051929550909350915083908390620000df90620006f7565b6001600160a01b03928316815291166020820152604001604051809103906000f08015801562000113573d6000803e3d6000fd5b506001600160a01b031660e05280156200034557826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000166573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000190919081019062000863565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015620001cf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620001f9919081019062000863565b6040516020016200020c9291906200091b565b604051602081830303815290604052600090805190602001906200023292919062000705565b50826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000272573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200029c919081019062000863565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015620002db573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000305919081019062000863565b6040516020016200031892919062000976565b604051602081830303815290604052600190805190602001906200033e92919062000705565b506200055e565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000384573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620003ae919081019062000863565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015620003ed573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000417919081019062000863565b6040516020016200042a929190620009c7565b604051602081830303815290604052600090805190602001906200045092919062000705565b50826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000490573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620004ba919081019062000863565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015620004f9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000523919081019062000863565b6040516020016200053692919062000a24565b604051602081830303815290604052600190805190602001906200055c92919062000705565b505b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200059d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005c3919062000a46565b620005d090600a62000b87565b6101208181525050816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000617573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200063d919062000a46565b6200064a90600a62000b87565b6101405250506040805160608101825242815260006020820181815292820181815260078054600181018255925291517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68860039092029182015591517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c689830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a909101555062000bd4565b6105c58062004a7c83390190565b828054620007139062000b98565b90600052602060002090601f01602090048101928262000737576000855562000782565b82601f106200075257805160ff191683800117855562000782565b8280016001018555821562000782579182015b828111156200078257825182559160200191906001019062000765565b506200079092915062000794565b5090565b5b8082111562000790576000815560010162000795565b80516001600160a01b0381168114620007c357600080fd5b919050565b600080600060608486031215620007de57600080fd5b620007e984620007ab565b9250620007f960208501620007ab565b9150604084015180151581146200080f57600080fd5b809150509250925092565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200084d57818101518382015260200162000833565b838111156200085d576000848401525b50505050565b6000602082840312156200087657600080fd5b81516001600160401b03808211156200088e57600080fd5b818401915084601f830112620008a357600080fd5b815181811115620008b857620008b86200081a565b604051601f8201601f19908116603f01168101908382118183101715620008e357620008e36200081a565b81604052828152876020848701011115620008fd57600080fd5b6200091083602083016020880162000830565b979650505050505050565b6e029ba30b13632ab189020a6a690169608d1b8152600083516200094781600f85016020880162000830565b602f60f81b600f9184019182015283516200096a81601084016020880162000830565b01601001949350505050565b6473414d4d2d60d81b8152600083516200099881600585016020880162000830565b602f60f81b6005918401918201528351620009bb81600684016020880162000830565b01600601949350505050565b7002b37b630ba34b632ab189020a6a690169607d1b815260008351620009f581601185016020880162000830565b602f60f81b601191840191820152835162000a1881601284016020880162000830565b01601201949350505050565b6476414d4d2d60d81b8152600083516200099881600585016020880162000830565b60006020828403121562000a5957600080fd5b815160ff8116811462000a6b57600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111562000ac957816000190482111562000aad5762000aad62000a72565b8085161562000abb57918102915b93841c939080029062000a8d565b509250929050565b60008262000ae25750600162000b81565b8162000af15750600062000b81565b816001811462000b0a576002811462000b155762000b35565b600191505062000b81565b60ff84111562000b295762000b2962000a72565b50506001821b62000b81565b5060208310610133831016604e8410600b841016171562000b5a575081810a62000b81565b62000b66838362000a88565b806000190482111562000b7d5762000b7d62000a72565b0290505b92915050565b600062000a6b60ff84168362000ad1565b600181811c9082168062000bad57607f821691505b60208210810362000bce57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e051610100516101205161014051613ccc62000db06000396000818161046901528181612bbf01528181612ea901528181612f6b015261307601526000818161044601528181612b7e01528181612e6a01528181612fad01526130500152600081816107f801528181610c4701528181610d1801528181612064015281816121ad0152818161247b01528181612501015281816125d0015281816127ed01528181612873015261294201526000818161062a01528181611cba01528181612106015281816126840152818161270e015281816129f60152612a800152600081816104f30152818161067f0152818161074c0152818161093301528181610bdb0152818161154f0152818161173a01528181611b610152818161230a015281816129150152612a5f015260008181610331015281816104cb0152818161065a0152818161091201528181610bba015281816114b90152818161171801528181611b3f01528181612282015281816125a3015281816126ed01528181612eeb01528181612f320152818161301701526130ba0152600081816102e9015281816103cf0152818161049b01528181610c0f01528181610ce00152818161217c01528181612b560152612e360152613ccc6000f3fe608060405234801561001057600080fd5b506004361061028a5760003560e01c80637ecebe001161015c578063bda39cad116100ce578063d505accf11610087578063d505accf14610776578063dd62ed3e14610789578063ebeb31db146107b4578063f083be3b146107bc578063f140a35a146107c4578063fff6cae9146107d757600080fd5b8063bda39cad14610723578063bf944dbc1461072c578063c245febc14610735578063c5700a021461073e578063d21220a714610747578063d294f0931461076e57600080fd5b80639d63848a116101205780639d63848a1461064c5780639e8cc04b146106aa5780639f767c88146106bd578063a1ac4d13146106dd578063a9059cbb146106fd578063bc25cf771461071057600080fd5b80637ecebe00146105ab57806389afcb44146105cb5780638a7b8cf2146105f357806395d89b411461061d5780639af1d35a1461062557600080fd5b806323b872dd116102005780634d5a9f8a116101b95780634d5a9f8a14610529578063517b3f82146105495780635881c4751461055c5780635a76f25e1461056f5780636a6278421461057857806370a082311461058b57600080fd5b806323b872dd146103f1578063252c09d714610404578063313ce5671461041757806332c0defd14610431578063392f37e91461043a578063443cb4bc1461052057600080fd5b80630dfe1681116102525780630dfe16811461032c57806313345fe11461036b57806318160ddd1461038b5780631df8c717146103a2578063205aabf1146103aa57806322be3de1146103ca57600080fd5b8063022c0d9f1461028f57806306fdde03146102a45780630902f1ac146102c257806309047bdd146102e7578063095ea7b314610319575b600080fd5b6102a261029d366004613717565b6107df565b005b6102ac610f2c565b6040516102b991906137dd565b60405180910390f35b600854600954600a545b604080519384526020840192909252908201526060016102b9565b7f00000000000000000000000000000000000000000000000000000000000000005b60405190151581526020016102b9565b610309610327366004613810565b610fba565b6103537f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102b9565b61037e61037936600461383c565b611027565b6040516102b99190613877565b61039460025481565b6040519081526020016102b9565b6102cc611223565b6103946103b83660046138bb565b60106020526000908152604090205481565b6103097f000000000000000000000000000000000000000000000000000000000000000081565b6103096103ff3660046138d8565b611292565b6102cc610412366004613919565b61135b565b61041f601281565b60405160ff90911681526020016102b9565b610394600d5481565b600854600954604080517f000000000000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000060208201529081019290925260608201527f0000000000000000000000000000000000000000000000000000000000000000151560808201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660a08301527f00000000000000000000000000000000000000000000000000000000000000001660c082015260e0016102b9565b61039460085481565b6103946105373660046138bb565b60116020526000908152604090205481565b610394610557366004613810565b61138e565b61037e61056a366004613932565b611476565b61039460095481565b6103946105863660046138bb565b611485565b6103946105993660046138bb565b60046020526000908152604090205481565b6103946105b93660046138bb565b60066020526000908152604090205481565b6105de6105d93660046138bb565b6116e6565b604080519283526020830191909152016102b9565b6105fb611a03565b60408051825181526020808401519082015291810151908201526060016102b9565b6102ac611a83565b6103537f000000000000000000000000000000000000000000000000000000000000000081565b604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682527f0000000000000000000000000000000000000000000000000000000000000000166020820152016102b9565b6103946106b8366004613932565b611a90565b6103946106cb3660046138bb565b600f6020526000908152604090205481565b6103946106eb3660046138bb565b60126020526000908152604090205481565b61030961070b366004613810565b611afd565b6102a261071e3660046138bb565b611b13565b610394600e5481565b610394600b5481565b610394600c5481565b610394600a5481565b6103537f000000000000000000000000000000000000000000000000000000000000000081565b6105de611c31565b6102a2610784366004613967565b611d58565b6103946107973660046139de565b600360209081526000928352604080842090915290825290205481565b600754610394565b6102a2612060565b6103946107d2366004613a17565b612167565b6102a2612255565b6013546001146107ee57600080fd5b60026013819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b187bd266040518163ffffffff1660e01b8152600401602060405180830381865afa158015610854573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108789190613a3c565b1561088257600080fd5b60008511806108915750600084115b6108c85760405162461bcd60e51b8152602060048201526003602482015262494f4160e81b60448201526064015b60405180910390fd5b60085460095481871080156108dc57508086105b61090d5760405162461bcd60e51b8152602060048201526002602482015261125360f21b60448201526064016108bf565b6000807f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03898116908316148015906109805750806001600160a01b0316896001600160a01b031614155b6109b15760405162461bcd60e51b8152602060048201526002602482015261125560f21b60448201526064016108bf565b8a156109c2576109c2828a8d61238f565b89156109d3576109d3818a8c61238f565b8615610a4057604051639a7bff7960e01b81526001600160a01b038a1690639a7bff7990610a0d9033908f908f908e908e90600401613a5e565b600060405180830381600087803b158015610a2757600080fd5b505af1158015610a3b573d6000803e3d6000fd5b505050505b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610a84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa89190613aaa565b6040516370a0823160e01b81523060048201529094506001600160a01b038216906370a0823190602401602060405180830381865afa158015610aef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b139190613aaa565b9250505060008985610b259190613ad9565b8311610b32576000610b46565b610b3c8a86613ad9565b610b469084613ad9565b90506000610b548a86613ad9565b8311610b61576000610b75565b610b6b8a86613ad9565b610b759084613ad9565b90506000821180610b865750600081115b610bb85760405162461bcd60e51b815260206004820152600360248201526249494160e81b60448201526064016108bf565b7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000008315610ccb57604051632895a2f560e11b81527f000000000000000000000000000000000000000000000000000000000000000015156004820152610ccb90612710906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063512b45ea90602401602060405180830381865afa158015610c8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb29190613aaa565b610cbc9087613af0565b610cc69190613b0f565b612477565b8215610d9c57604051632895a2f560e11b81527f000000000000000000000000000000000000000000000000000000000000000015156004820152610d9c90612710906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063512b45ea90602401602060405180830381865afa158015610d5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d839190613aaa565b610d8d9086613af0565b610d979190613b0f565b6127e9565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610de0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e049190613aaa565b6040516370a0823160e01b81523060048201529096506001600160a01b038216906370a0823190602401602060405180830381865afa158015610e4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6f9190613aaa565b9450610e7b8888612b52565b610e858787612b52565b1015610eb75760405162461bcd60e51b81526020600482015260016024820152604b60f81b60448201526064016108bf565b5050610ec584848888612c9e565b60408051838152602081018390529081018c9052606081018b90526001600160a01b038a169033907fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229060800160405180910390a350506001601355505050505050505050565b60008054610f3990613b31565b80601f0160208091040260200160405190810160405280929190818152602001828054610f6590613b31565b8015610fb25780601f10610f8757610100808354040283529160200191610fb2565b820191906000526020600020905b815481529060010190602001808311610f9557829003601f168201915b505050505081565b3360008181526003602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906110159086815260200190565b60405180910390a35060015b92915050565b606060008367ffffffffffffffff81111561104457611044613b65565b60405190808252806020026020018201604052801561106d578160200160208202803683370190505b5060075490915060009061108390600190613ad9565b905060006110918587613af0565b61109b9083613ad9565b90506000805b83831015611213576110b38784613b7b565b91506000600784815481106110ca576110ca613b93565b906000526020600020906003020160000154600784815481106110ef576110ef613b93565b90600052602060002090600302016000015461110b9190613ad9565b90506000816007868154811061112357611123613b93565b9060005260206000209060030201600101546007868154811061114857611148613b93565b9060005260206000209060030201600101546111649190613ad9565b61116e9190613b0f565b90506000826007878154811061118657611186613b93565b906000526020600020906003020160020154600787815481106111ab576111ab613b93565b9060005260206000209060030201600201546111c79190613ad9565b6111d19190613b0f565b90506111df8c8e8484612e32565b8885815181106111f1576111f1613b93565b602090810291909101015250505060010161120c8784613b7b565b92506110a1565b509293505050505b949350505050565b600b54600c544260008080611241600854600954600a549192909190565b92509250925083811461128a57600061125a8286613ad9565b90506112668185613af0565b6112709088613b7b565b965061127c8184613af0565b6112869087613b7b565b9550505b505050909192565b6001600160a01b0383166000818152600360209081526040808320338085529252822054919290919082148015906112cc57506000198114155b156113425760006112dd8583613ad9565b6001600160a01b038881166000818152600360209081526040808320948916808452948252918290208590559051848152939450919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505b61134d868686613127565b6001925050505b9392505050565b6007818154811061136b57600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b600080611399611a03565b90506000806113a6611223565b5084519193509150420361140e57600780546113c490600290613ad9565b815481106113d4576113d4613b93565b9060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505092505b825160009061141d9042613ad9565b90506000818560200151856114329190613ad9565b61143c9190613b0f565b90506000828660400151856114519190613ad9565b61145b9190613b0f565b9050611469888a8484612e32565b9998505050505050505050565b606061121b8484846001611027565b600060135460011461149657600080fd5b60026013556008546009546040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611508573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061152c9190613aaa565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611596573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ba9190613aaa565b905060006115c88584613ad9565b905060006115d68584613ad9565b6002549091506000819003611618576103e86115fa6115f58486613af0565b6131e7565b6116049190613ad9565b975061161360006103e8613257565b61164d565b61164a876116268386613af0565b6116309190613b0f565b8761163b8486613af0565b6116459190613b0f565b6132ea565b97505b600088116116835760405162461bcd60e51b8152602060048201526003602482015262494c4d60e81b60448201526064016108bf565b61168d8989613257565b61169985858989612c9e565b604080518481526020810184905233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a250506001601355509395945050505050565b6000806013546001146116f857600080fd5b60026013556008546009546040516370a0823160e01b81523060048201527f0000000000000000000000000000000000000000000000000000000000000000907f0000000000000000000000000000000000000000000000000000000000000000906000906001600160a01b038416906370a0823190602401602060405180830381865afa15801561178e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b29190613aaa565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156117fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118209190613aaa565b3060009081526004602052604090205460025491925090806118428584613af0565b61184c9190613b0f565b9950806118598484613af0565b6118639190613b0f565b985060008a1180156118755750600089115b6118a75760405162461bcd60e51b815260206004820152600360248201526224a62160e91b60448201526064016108bf565b6118b13083613300565b6118bc868c8c61238f565b6118c7858c8b61238f565b6040516370a0823160e01b81523060048201526001600160a01b038716906370a0823190602401602060405180830381865afa15801561190b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061192f9190613aaa565b6040516370a0823160e01b81523060048201529094506001600160a01b038616906370a0823190602401602060405180830381865afa158015611976573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061199a9190613aaa565b92506119a884848a8a612c9e565b604080518b8152602081018b90526001600160a01b038d169133917fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496910160405180910390a350505050505050506001601381905550915091565b611a2760405180606001604052806000815260200160008152602001600081525090565b60078054611a3790600190613ad9565b81548110611a4757611a47613b93565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050905090565b60018054610f3990613b31565b600080611aa08585856001611027565b90506000805b8251811015611ae857828181518110611ac157611ac1613b93565b602002602001015182611ad49190613b7b565b915080611ae081613ba9565b915050611aa6565b50611af38482613b0f565b9695505050505050565b6000611b0a338484613127565b50600192915050565b601354600114611b2257600080fd5b60026013556008546040516370a0823160e01b81523060048201527f0000000000000000000000000000000000000000000000000000000000000000917f000000000000000000000000000000000000000000000000000000000000000091611bef9184918691906001600160a01b038416906370a08231906024015b602060405180830381865afa158015611bbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611be09190613aaa565b611bea9190613ad9565b61238f565b6009546040516370a0823160e01b8152306004820152611c279183918691906001600160a01b038416906370a0823190602401611b9f565b5050600160135550565b600080611c3d3361338b565b50503360009081526011602090815260408083205460129092529091205481151580611c695750600081115b15611d54573360008181526011602090815260408083208390556012909152808220919091555163299e7ae760e11b8152600481019190915260248101839052604481018290526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063533cf5ce90606401600060405180830381600087803b158015611cfe57600080fd5b505af1158015611d12573d6000803e3d6000fd5b505060408051858152602081018590523393508392507f865ca08d59f5cb456e85cd2f7ef63664ea4f73327414e9d8152c4158b0e94645910160405180910390a35b9091565b42841015611d985760405162461bcd60e51b815260206004820152600d60248201526c14185a5c8e8811561412549151609a1b60448201526064016108bf565b7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051611dc89190613bc2565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160408051601f19818403018152918152815160209283012060058190556001600160a01b038a166000908152600690935290822080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918b918b918b919087611e9383613ba9565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e00160405160208183030381529060405280519060200120604051602001611f0c92919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015611f77573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590611fad5750886001600160a01b0316816001600160a01b0316145b611ff95760405162461bcd60e51b815260206004820152601760248201527f506169723a20494e56414c49445f5349474e415455524500000000000000000060448201526064016108bf565b6001600160a01b038981166000818152600360209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c124a4a26040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120e49190613c5d565b60405163f8518b8960e01b81526001600160a01b0380831660048301529192507f00000000000000000000000000000000000000000000000000000000000000009091169063f8518b8990602401600060405180830381600087803b15801561214c57600080fd5b505af1158015612160573d6000803e3d6000fd5b5050505050565b600854600954604051632895a2f560e11b81527f0000000000000000000000000000000000000000000000000000000000000000151560048201526000929190612710907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063512b45ea90602401602060405180830381865afa1580156121fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122209190613aaa565b61222a9087613af0565b6122349190613b0f565b61223e9086613ad9565b945061224c85858484612e32565b95945050505050565b60135460011461226457600080fd5b60026013556040516370a0823160e01b8152306004820152612388907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156122d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122f59190613aaa565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015612359573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061237d9190613aaa565b600854600954612c9e565b6001601355565b6000836001600160a01b03163b116123a657600080fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916124029190613c7a565b6000604051808303816000865af19150503d806000811461243f576040519150601f19603f3d011682016040523d82523d6000602084013e612444565b606091505b509150915081801561246e57508051158061246e57508080602001905181019061246e9190613a3c565b61216057600080fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637be1623e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156124d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124fb9190613c5d565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f2b3c8096040518163ffffffff1660e01b8152600401602060405180830381865afa15801561255d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125819190613aaa565b905060006127106125928386613af0565b61259c9190613b0f565b90506125c97f0000000000000000000000000000000000000000000000000000000000000000848361238f565b60006127107f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663956f94a16040518163ffffffff1660e01b8152600401602060405180830381865afa15801561262c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126509190613aaa565b61265a9087613af0565b6126649190613b0f565b604051638d4dabff60e01b815260048101829052600160248201529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690638d4dabff90604401600060405180830381600087803b1580156126d057600080fd5b505af11580156126e4573d6000803e3d6000fd5b505050506127397f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000008488611bea9190613ad9565b6127438282613b7b565b61274d9086613ad9565b9450600060025486670de0b6b3a76400006127689190613af0565b6127729190613b0f565b905080156127925780600d600082825461278c9190613b7b565b90915550505b337f112c256902bf554b6ed882d2936687aaeb4225e8cd5b51303c90ca6cf43a8602846127bf858a613b7b565b6127c99190613b7b565b6040805191825260006020830152015b60405180910390a2505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637be1623e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612849573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061286d9190613c5d565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f2b3c8096040518163ffffffff1660e01b8152600401602060405180830381865afa1580156128cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128f39190613aaa565b905060006127106129048386613af0565b61290e9190613b0f565b905061293b7f0000000000000000000000000000000000000000000000000000000000000000848361238f565b60006127107f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663956f94a16040518163ffffffff1660e01b8152600401602060405180830381865afa15801561299e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129c29190613aaa565b6129cc9087613af0565b6129d69190613b0f565b604051638d4dabff60e01b815260048101829052600060248201529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690638d4dabff90604401600060405180830381600087803b158015612a4257600080fd5b505af1158015612a56573d6000803e3d6000fd5b50505050612aab7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000008488611bea9190613ad9565b612ab58282613b7b565b612abf9086613ad9565b9450600060025486670de0b6b3a7640000612ada9190613af0565b612ae49190613b0f565b90508015612b045780600e6000828254612afe9190613b7b565b90915550505b337f112c256902bf554b6ed882d2936687aaeb4225e8cd5b51303c90ca6cf43a8602600085612b33868b613b7b565b612b3d9190613b7b565b604080519283526020830191909152016127d9565b60007f000000000000000000000000000000000000000000000000000000000000000015612c8d5760007f0000000000000000000000000000000000000000000000000000000000000000612baf85670de0b6b3a7640000613af0565b612bb99190613b0f565b905060007f0000000000000000000000000000000000000000000000000000000000000000612bf085670de0b6b3a7640000613af0565b612bfa9190613b0f565b90506000670de0b6b3a7640000612c118385613af0565b612c1b9190613b0f565b90506000670de0b6b3a7640000612c328480613af0565b612c3c9190613b0f565b670de0b6b3a7640000612c4f8680613af0565b612c599190613b0f565b612c639190613b7b565b9050670de0b6b3a7640000612c788284613af0565b612c829190613b0f565b945050505050611021565b612c978284613af0565b9050611021565b600a544290600090612cb09083613ad9565b9050600081118015612cc157508315155b8015612ccc57508215155b15612d1357612cdb8185613af0565b600b6000828254612cec9190613b7b565b90915550612cfc90508184613af0565b600c6000828254612d0d9190613b7b565b90915550505b6000612d1d611a03565b8051909150612d2c9084613ad9565b9150610708821115612de15760408051606081018252848152600b5460208201908152600c549282019283526007805460018101825560009190915291517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600390930292830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68982015590517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a909101555b60088790556009869055600a83905560408051888152602081018890527fcf2aa50876cdfbb541206f89af0ee78d44a2abf8d328e37fa4917f982149848a910160405180910390a150505050505050565b60007f0000000000000000000000000000000000000000000000000000000000000000156130b5576000612e668484612b52565b90507f0000000000000000000000000000000000000000000000000000000000000000612e9b85670de0b6b3a7640000613af0565b612ea59190613b0f565b93507f0000000000000000000000000000000000000000000000000000000000000000612eda84670de0b6b3a7640000613af0565b612ee49190613b0f565b92506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316876001600160a01b031614612f29578486612f2c565b85855b915091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316876001600160a01b031614612fab577f0000000000000000000000000000000000000000000000000000000000000000612f9c89670de0b6b3a7640000613af0565b612fa69190613b0f565b612fe8565b7f0000000000000000000000000000000000000000000000000000000000000000612fde89670de0b6b3a7640000613af0565b612fe89190613b0f565b97506000613000612ff9848b613b7b565b85846134eb565b61300a9083613ad9565b9050670de0b6b3a76400007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316896001600160a01b031614613074577f0000000000000000000000000000000000000000000000000000000000000000613096565b7f00000000000000000000000000000000000000000000000000000000000000005b6130a09083613af0565b6130aa9190613b0f565b94505050505061121b565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316866001600160a01b0316146130f85783856130fb565b84845b909250905061310a8783613b7b565b6131148289613af0565b61311e9190613b0f565b9250505061121b565b6131308361338b565b6131398261338b565b6001600160a01b03831660009081526004602052604081208054839290613161908490613ad9565b90915550506001600160a01b0382166000908152600460205260408120805483929061318e908490613b7b565b92505081905550816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516131da91815260200190565b60405180910390a3505050565b600060038211156132485750806000613201600283613b0f565b61320c906001613b7b565b90505b81811015613242579050806002816132278186613b0f565b6132319190613b7b565b61323b9190613b0f565b905061320f565b50919050565b8115613252575060015b919050565b6132608261338b565b80600260008282546132729190613b7b565b90915550506001600160a01b0382166000908152600460205260408120805483929061329f908490613b7b565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35050565b60008183106132f95781611354565b5090919050565b6133098261338b565b806002600082825461331b9190613ad9565b90915550506001600160a01b03821660009081526004602052604081208054839290613348908490613ad9565b90915550506040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016132de565b6001600160a01b03811660009081526004602052604090205480156134b9576001600160a01b0382166000908152600f60209081526040808320805460108085529285208054600d54600e549481905594909552829055936133ed8584613ad9565b905060006133fb8584613ad9565b90508115613456576000670de0b6b3a7640000613418848a613af0565b6134229190613b0f565b6001600160a01b038a1660009081526011602052604081208054929350839290919061344f908490613b7b565b9091555050505b80156134af576000670de0b6b3a7640000613471838a613af0565b61347b9190613b0f565b6001600160a01b038a166000908152601260205260408120805492935083929091906134a8908490613b7b565b9091555050505b5050505050505050565b600d546001600160a01b0383166000908152600f6020908152604080832093909355600e546010909152919020555050565b6000805b60ff8110156135f15782600061350587836135fa565b90508581101561355557600061351b8887613697565b6135258389613ad9565b61353790670de0b6b3a7640000613af0565b6135419190613b0f565b905061354d8187613b7b565b955050613597565b60006135618887613697565b61356b8884613ad9565b61357d90670de0b6b3a7640000613af0565b6135879190613b0f565b90506135938187613ad9565b9550505b818511156135c05760016135ab8387613ad9565b116135bb57849350505050611354565b6135dc565b60016135cc8684613ad9565b116135dc57849350505050611354565b505080806135e990613ba9565b9150506134ef565b50909392505050565b6000670de0b6b3a7640000828185816136138280613af0565b61361d9190613b0f565b6136279190613af0565b6136319190613b0f565b61363b9190613af0565b6136459190613b0f565b670de0b6b3a764000080848161365b8280613af0565b6136659190613b0f565b61366f9190613af0565b6136799190613b0f565b6136839086613af0565b61368d9190613b0f565b6113549190613b7b565b6000670de0b6b3a764000083816136ae8280613af0565b6136b89190613b0f565b6136c29190613af0565b6136cc9190613b0f565b670de0b6b3a7640000806136e08580613af0565b6136ea9190613b0f565b6136f5866003613af0565b6136839190613af0565b6001600160a01b038116811461371457600080fd5b50565b60008060008060006080868803121561372f57600080fd5b85359450602086013593506040860135613748816136ff565b9250606086013567ffffffffffffffff8082111561376557600080fd5b818801915088601f83011261377957600080fd5b81358181111561378857600080fd5b89602082850101111561379a57600080fd5b9699959850939650602001949392505050565b60005b838110156137c85781810151838201526020016137b0565b838111156137d7576000848401525b50505050565b60208152600082518060208401526137fc8160408501602087016137ad565b601f01601f19169190910160400192915050565b6000806040838503121561382357600080fd5b823561382e816136ff565b946020939093013593505050565b6000806000806080858703121561385257600080fd5b843561385d816136ff565b966020860135965060408601359560600135945092505050565b6020808252825182820181905260009190848201906040850190845b818110156138af57835183529284019291840191600101613893565b50909695505050505050565b6000602082840312156138cd57600080fd5b8135611354816136ff565b6000806000606084860312156138ed57600080fd5b83356138f8816136ff565b92506020840135613908816136ff565b929592945050506040919091013590565b60006020828403121561392b57600080fd5b5035919050565b60008060006060848603121561394757600080fd5b8335613952816136ff565b95602085013595506040909401359392505050565b600080600080600080600060e0888a03121561398257600080fd5b873561398d816136ff565b9650602088013561399d816136ff565b95506040880135945060608801359350608088013560ff811681146139c157600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156139f157600080fd5b82356139fc816136ff565b91506020830135613a0c816136ff565b809150509250929050565b60008060408385031215613a2a57600080fd5b823591506020830135613a0c816136ff565b600060208284031215613a4e57600080fd5b8151801515811461135457600080fd5b60018060a01b038616815284602082015283604082015260806060820152816080820152818360a0830137600081830160a090810191909152601f909201601f19160101949350505050565b600060208284031215613abc57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015613aeb57613aeb613ac3565b500390565b6000816000190483118215151615613b0a57613b0a613ac3565b500290565b600082613b2c57634e487b7160e01b600052601260045260246000fd5b500490565b600181811c90821680613b4557607f821691505b60208210810361324257634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60008219821115613b8e57613b8e613ac3565b500190565b634e487b7160e01b600052603260045260246000fd5b600060018201613bbb57613bbb613ac3565b5060010190565b600080835481600182811c915080831680613bde57607f831692505b60208084108203613bfd57634e487b7160e01b86526022600452602486fd5b818015613c115760018114613c2257613c4f565b60ff19861689528489019650613c4f565b60008a81526020902060005b86811015613c475781548b820152908501908301613c2e565b505084890196505b509498975050505050505050565b600060208284031215613c6f57600080fd5b8151611354816136ff565b60008251613c8c8184602087016137ad565b919091019291505056fea2646970667358221220c75056062a4c8f43c9a06e22a6e6664823a5d5655a394872a20b39ca7889b58864736f6c634300080d003360e060405234801561001057600080fd5b506040516105c53803806105c583398101604081905261002f91610066565b336080526001600160a01b0391821660a0521660c052610099565b80516001600160a01b038116811461006157600080fd5b919050565b6000806040838503121561007957600080fd5b6100828361004a565b91506100906020840161004a565b90509250929050565b60805160a05160c0516104e36100e26000396000818161012c015261026001526000818160fb015261022601526000818160c60152818161016201526101ef01526104e36000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063533cf5ce1461005c5780635b3c924814610071578063651d83f91461008c5780638d4dabff14610095578063f8518b89146100a8575b600080fd5b61006f61006a36600461039c565b6100bb565b005b61007a60015481565b60405190815260200160405180910390f35b61007a60005481565b61006f6100a33660046103dd565b610157565b61006f6100b636600461040d565b6101e4565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146100f057600080fd5b8115610121576101217f00000000000000000000000000000000000000000000000000000000000000008484610291565b8015610152576101527f00000000000000000000000000000000000000000000000000000000000000008483610291565b505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461018c57600080fd5b6000821180156101995750805b156101b557816000808282546101af919061042f565b90915550505b6000821180156101c3575080155b156101e05781600160008282546101da919061042f565b90915550505b5050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461021957600080fd5b600054156102535761024e7f000000000000000000000000000000000000000000000000000000000000000082600054610291565b600080555b6001541561028e576102887f000000000000000000000000000000000000000000000000000000000000000082600154610291565b60006001555b50565b6000836001600160a01b03163b116102a857600080fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916103049190610455565b6000604051808303816000865af19150503d8060008114610341576040519150601f19603f3d011682016040523d82523d6000602084013e610346565b606091505b50915091508180156103705750805115806103705750808060200190518101906103709190610490565b61037957600080fd5b5050505050565b80356001600160a01b038116811461039757600080fd5b919050565b6000806000606084860312156103b157600080fd5b6103ba84610380565b95602085013595506040909401359392505050565b801515811461028e57600080fd5b600080604083850312156103f057600080fd5b823591506020830135610402816103cf565b809150509250929050565b60006020828403121561041f57600080fd5b61042882610380565b9392505050565b6000821982111561045057634e487b7160e01b600052601160045260246000fd5b500190565b6000825160005b81811015610476576020818601810151858301520161045c565b81811115610485576000828501525b509190910192915050565b6000602082840312156104a257600080fd5b8151610428816103cf56fea2646970667358221220bc7b7ba3ed402e2260b246b969b2950543e1b823ed680664b9cd4f6bee8131dd64736f6c634300080d0033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061028a5760003560e01c80637ecebe001161015c578063bda39cad116100ce578063d505accf11610087578063d505accf14610776578063dd62ed3e14610789578063ebeb31db146107b4578063f083be3b146107bc578063f140a35a146107c4578063fff6cae9146107d757600080fd5b8063bda39cad14610723578063bf944dbc1461072c578063c245febc14610735578063c5700a021461073e578063d21220a714610747578063d294f0931461076e57600080fd5b80639d63848a116101205780639d63848a1461064c5780639e8cc04b146106aa5780639f767c88146106bd578063a1ac4d13146106dd578063a9059cbb146106fd578063bc25cf771461071057600080fd5b80637ecebe00146105ab57806389afcb44146105cb5780638a7b8cf2146105f357806395d89b411461061d5780639af1d35a1461062557600080fd5b806323b872dd116102005780634d5a9f8a116101b95780634d5a9f8a14610529578063517b3f82146105495780635881c4751461055c5780635a76f25e1461056f5780636a6278421461057857806370a082311461058b57600080fd5b806323b872dd146103f1578063252c09d714610404578063313ce5671461041757806332c0defd14610431578063392f37e91461043a578063443cb4bc1461052057600080fd5b80630dfe1681116102525780630dfe16811461032c57806313345fe11461036b57806318160ddd1461038b5780631df8c717146103a2578063205aabf1146103aa57806322be3de1146103ca57600080fd5b8063022c0d9f1461028f57806306fdde03146102a45780630902f1ac146102c257806309047bdd146102e7578063095ea7b314610319575b600080fd5b6102a261029d366004613717565b6107df565b005b6102ac610f2c565b6040516102b991906137dd565b60405180910390f35b600854600954600a545b604080519384526020840192909252908201526060016102b9565b7f00000000000000000000000000000000000000000000000000000000000000005b60405190151581526020016102b9565b610309610327366004613810565b610fba565b6103537f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad3881565b6040516001600160a01b0390911681526020016102b9565b61037e61037936600461383c565b611027565b6040516102b99190613877565b61039460025481565b6040519081526020016102b9565b6102cc611223565b6103946103b83660046138bb565b60106020526000908152604090205481565b6103097f000000000000000000000000000000000000000000000000000000000000000081565b6103096103ff3660046138d8565b611292565b6102cc610412366004613919565b61135b565b61041f601281565b60405160ff90911681526020016102b9565b610394600d5481565b600854600954604080517f0000000000000000000000000000000000000000000000000de0b6b3a764000081527f000000000000000000000000000000000000000000000000000000003b9aca0060208201529081019290925260608201527f0000000000000000000000000000000000000000000000000000000000000000151560808201526001600160a01b037f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad38811660a08301527f0000000000000000000000007f883da3b0d77978075f7c9c03e1b9f461ca1b8d1660c082015260e0016102b9565b61039460085481565b6103946105373660046138bb565b60116020526000908152604090205481565b610394610557366004613810565b61138e565b61037e61056a366004613932565b611476565b61039460095481565b6103946105863660046138bb565b611485565b6103946105993660046138bb565b60046020526000908152604090205481565b6103946105b93660046138bb565b60066020526000908152604090205481565b6105de6105d93660046138bb565b6116e6565b604080519283526020830191909152016102b9565b6105fb611a03565b60408051825181526020808401519082015291810151908201526060016102b9565b6102ac611a83565b6103537f00000000000000000000000084c524202707c4e0a6a4500c84442472ec191cc281565b604080516001600160a01b037f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad38811682527f0000000000000000000000007f883da3b0d77978075f7c9c03e1b9f461ca1b8d166020820152016102b9565b6103946106b8366004613932565b611a90565b6103946106cb3660046138bb565b600f6020526000908152604090205481565b6103946106eb3660046138bb565b60126020526000908152604090205481565b61030961070b366004613810565b611afd565b6102a261071e3660046138bb565b611b13565b610394600e5481565b610394600b5481565b610394600c5481565b610394600a5481565b6103537f0000000000000000000000007f883da3b0d77978075f7c9c03e1b9f461ca1b8d81565b6105de611c31565b6102a2610784366004613967565b611d58565b6103946107973660046139de565b600360209081526000928352604080842090915290825290205481565b600754610394565b6102a2612060565b6103946107d2366004613a17565b612167565b6102a2612255565b6013546001146107ee57600080fd5b60026013819055507f00000000000000000000000005c1be79d3ac21cc4b727eed58c9b2ff757f56636001600160a01b031663b187bd266040518163ffffffff1660e01b8152600401602060405180830381865afa158015610854573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108789190613a3c565b1561088257600080fd5b60008511806108915750600084115b6108c85760405162461bcd60e51b8152602060048201526003602482015262494f4160e81b60448201526064015b60405180910390fd5b60085460095481871080156108dc57508086105b61090d5760405162461bcd60e51b8152602060048201526002602482015261125360f21b60448201526064016108bf565b6000807f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad387f0000000000000000000000007f883da3b0d77978075f7c9c03e1b9f461ca1b8d6001600160a01b03898116908316148015906109805750806001600160a01b0316896001600160a01b031614155b6109b15760405162461bcd60e51b8152602060048201526002602482015261125560f21b60448201526064016108bf565b8a156109c2576109c2828a8d61238f565b89156109d3576109d3818a8c61238f565b8615610a4057604051639a7bff7960e01b81526001600160a01b038a1690639a7bff7990610a0d9033908f908f908e908e90600401613a5e565b600060405180830381600087803b158015610a2757600080fd5b505af1158015610a3b573d6000803e3d6000fd5b505050505b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610a84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa89190613aaa565b6040516370a0823160e01b81523060048201529094506001600160a01b038216906370a0823190602401602060405180830381865afa158015610aef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b139190613aaa565b9250505060008985610b259190613ad9565b8311610b32576000610b46565b610b3c8a86613ad9565b610b469084613ad9565b90506000610b548a86613ad9565b8311610b61576000610b75565b610b6b8a86613ad9565b610b759084613ad9565b90506000821180610b865750600081115b610bb85760405162461bcd60e51b815260206004820152600360248201526249494160e81b60448201526064016108bf565b7f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad387f0000000000000000000000007f883da3b0d77978075f7c9c03e1b9f461ca1b8d8315610ccb57604051632895a2f560e11b81527f000000000000000000000000000000000000000000000000000000000000000015156004820152610ccb90612710906001600160a01b037f00000000000000000000000005c1be79d3ac21cc4b727eed58c9b2ff757f5663169063512b45ea90602401602060405180830381865afa158015610c8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb29190613aaa565b610cbc9087613af0565b610cc69190613b0f565b612477565b8215610d9c57604051632895a2f560e11b81527f000000000000000000000000000000000000000000000000000000000000000015156004820152610d9c90612710906001600160a01b037f00000000000000000000000005c1be79d3ac21cc4b727eed58c9b2ff757f5663169063512b45ea90602401602060405180830381865afa158015610d5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d839190613aaa565b610d8d9086613af0565b610d979190613b0f565b6127e9565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610de0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e049190613aaa565b6040516370a0823160e01b81523060048201529096506001600160a01b038216906370a0823190602401602060405180830381865afa158015610e4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6f9190613aaa565b9450610e7b8888612b52565b610e858787612b52565b1015610eb75760405162461bcd60e51b81526020600482015260016024820152604b60f81b60448201526064016108bf565b5050610ec584848888612c9e565b60408051838152602081018390529081018c9052606081018b90526001600160a01b038a169033907fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229060800160405180910390a350506001601355505050505050505050565b60008054610f3990613b31565b80601f0160208091040260200160405190810160405280929190818152602001828054610f6590613b31565b8015610fb25780601f10610f8757610100808354040283529160200191610fb2565b820191906000526020600020905b815481529060010190602001808311610f9557829003601f168201915b505050505081565b3360008181526003602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906110159086815260200190565b60405180910390a35060015b92915050565b606060008367ffffffffffffffff81111561104457611044613b65565b60405190808252806020026020018201604052801561106d578160200160208202803683370190505b5060075490915060009061108390600190613ad9565b905060006110918587613af0565b61109b9083613ad9565b90506000805b83831015611213576110b38784613b7b565b91506000600784815481106110ca576110ca613b93565b906000526020600020906003020160000154600784815481106110ef576110ef613b93565b90600052602060002090600302016000015461110b9190613ad9565b90506000816007868154811061112357611123613b93565b9060005260206000209060030201600101546007868154811061114857611148613b93565b9060005260206000209060030201600101546111649190613ad9565b61116e9190613b0f565b90506000826007878154811061118657611186613b93565b906000526020600020906003020160020154600787815481106111ab576111ab613b93565b9060005260206000209060030201600201546111c79190613ad9565b6111d19190613b0f565b90506111df8c8e8484612e32565b8885815181106111f1576111f1613b93565b602090810291909101015250505060010161120c8784613b7b565b92506110a1565b509293505050505b949350505050565b600b54600c544260008080611241600854600954600a549192909190565b92509250925083811461128a57600061125a8286613ad9565b90506112668185613af0565b6112709088613b7b565b965061127c8184613af0565b6112869087613b7b565b9550505b505050909192565b6001600160a01b0383166000818152600360209081526040808320338085529252822054919290919082148015906112cc57506000198114155b156113425760006112dd8583613ad9565b6001600160a01b038881166000818152600360209081526040808320948916808452948252918290208590559051848152939450919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505b61134d868686613127565b6001925050505b9392505050565b6007818154811061136b57600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b600080611399611a03565b90506000806113a6611223565b5084519193509150420361140e57600780546113c490600290613ad9565b815481106113d4576113d4613b93565b9060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505092505b825160009061141d9042613ad9565b90506000818560200151856114329190613ad9565b61143c9190613b0f565b90506000828660400151856114519190613ad9565b61145b9190613b0f565b9050611469888a8484612e32565b9998505050505050505050565b606061121b8484846001611027565b600060135460011461149657600080fd5b60026013556008546009546040516370a0823160e01b81523060048201526000907f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad386001600160a01b0316906370a0823190602401602060405180830381865afa158015611508573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061152c9190613aaa565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f0000000000000000000000007f883da3b0d77978075f7c9c03e1b9f461ca1b8d16906370a0823190602401602060405180830381865afa158015611596573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ba9190613aaa565b905060006115c88584613ad9565b905060006115d68584613ad9565b6002549091506000819003611618576103e86115fa6115f58486613af0565b6131e7565b6116049190613ad9565b975061161360006103e8613257565b61164d565b61164a876116268386613af0565b6116309190613b0f565b8761163b8486613af0565b6116459190613b0f565b6132ea565b97505b600088116116835760405162461bcd60e51b8152602060048201526003602482015262494c4d60e81b60448201526064016108bf565b61168d8989613257565b61169985858989612c9e565b604080518481526020810184905233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a250506001601355509395945050505050565b6000806013546001146116f857600080fd5b60026013556008546009546040516370a0823160e01b81523060048201527f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad38907f0000000000000000000000007f883da3b0d77978075f7c9c03e1b9f461ca1b8d906000906001600160a01b038416906370a0823190602401602060405180830381865afa15801561178e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b29190613aaa565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156117fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118209190613aaa565b3060009081526004602052604090205460025491925090806118428584613af0565b61184c9190613b0f565b9950806118598484613af0565b6118639190613b0f565b985060008a1180156118755750600089115b6118a75760405162461bcd60e51b815260206004820152600360248201526224a62160e91b60448201526064016108bf565b6118b13083613300565b6118bc868c8c61238f565b6118c7858c8b61238f565b6040516370a0823160e01b81523060048201526001600160a01b038716906370a0823190602401602060405180830381865afa15801561190b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061192f9190613aaa565b6040516370a0823160e01b81523060048201529094506001600160a01b038616906370a0823190602401602060405180830381865afa158015611976573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061199a9190613aaa565b92506119a884848a8a612c9e565b604080518b8152602081018b90526001600160a01b038d169133917fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496910160405180910390a350505050505050506001601381905550915091565b611a2760405180606001604052806000815260200160008152602001600081525090565b60078054611a3790600190613ad9565b81548110611a4757611a47613b93565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050905090565b60018054610f3990613b31565b600080611aa08585856001611027565b90506000805b8251811015611ae857828181518110611ac157611ac1613b93565b602002602001015182611ad49190613b7b565b915080611ae081613ba9565b915050611aa6565b50611af38482613b0f565b9695505050505050565b6000611b0a338484613127565b50600192915050565b601354600114611b2257600080fd5b60026013556008546040516370a0823160e01b81523060048201527f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad38917f0000000000000000000000007f883da3b0d77978075f7c9c03e1b9f461ca1b8d91611bef9184918691906001600160a01b038416906370a08231906024015b602060405180830381865afa158015611bbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611be09190613aaa565b611bea9190613ad9565b61238f565b6009546040516370a0823160e01b8152306004820152611c279183918691906001600160a01b038416906370a0823190602401611b9f565b5050600160135550565b600080611c3d3361338b565b50503360009081526011602090815260408083205460129092529091205481151580611c695750600081115b15611d54573360008181526011602090815260408083208390556012909152808220919091555163299e7ae760e11b8152600481019190915260248101839052604481018290526001600160a01b037f00000000000000000000000084c524202707c4e0a6a4500c84442472ec191cc2169063533cf5ce90606401600060405180830381600087803b158015611cfe57600080fd5b505af1158015611d12573d6000803e3d6000fd5b505060408051858152602081018590523393508392507f865ca08d59f5cb456e85cd2f7ef63664ea4f73327414e9d8152c4158b0e94645910160405180910390a35b9091565b42841015611d985760405162461bcd60e51b815260206004820152600d60248201526c14185a5c8e8811561412549151609a1b60448201526064016108bf565b7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051611dc89190613bc2565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160408051601f19818403018152918152815160209283012060058190556001600160a01b038a166000908152600690935290822080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918b918b918b919087611e9383613ba9565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e00160405160208183030381529060405280519060200120604051602001611f0c92919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015611f77573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590611fad5750886001600160a01b0316816001600160a01b0316145b611ff95760405162461bcd60e51b815260206004820152601760248201527f506169723a20494e56414c49445f5349474e415455524500000000000000000060448201526064016108bf565b6001600160a01b038981166000818152600360209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60007f00000000000000000000000005c1be79d3ac21cc4b727eed58c9b2ff757f56636001600160a01b031663c124a4a26040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120e49190613c5d565b60405163f8518b8960e01b81526001600160a01b0380831660048301529192507f00000000000000000000000084c524202707c4e0a6a4500c84442472ec191cc29091169063f8518b8990602401600060405180830381600087803b15801561214c57600080fd5b505af1158015612160573d6000803e3d6000fd5b5050505050565b600854600954604051632895a2f560e11b81527f0000000000000000000000000000000000000000000000000000000000000000151560048201526000929190612710907f00000000000000000000000005c1be79d3ac21cc4b727eed58c9b2ff757f56636001600160a01b03169063512b45ea90602401602060405180830381865afa1580156121fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122209190613aaa565b61222a9087613af0565b6122349190613b0f565b61223e9086613ad9565b945061224c85858484612e32565b95945050505050565b60135460011461226457600080fd5b60026013556040516370a0823160e01b8152306004820152612388907f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad386001600160a01b0316906370a0823190602401602060405180830381865afa1580156122d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122f59190613aaa565b6040516370a0823160e01b81523060048201527f0000000000000000000000007f883da3b0d77978075f7c9c03e1b9f461ca1b8d6001600160a01b0316906370a0823190602401602060405180830381865afa158015612359573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061237d9190613aaa565b600854600954612c9e565b6001601355565b6000836001600160a01b03163b116123a657600080fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916124029190613c7a565b6000604051808303816000865af19150503d806000811461243f576040519150601f19603f3d011682016040523d82523d6000602084013e612444565b606091505b509150915081801561246e57508051158061246e57508080602001905181019061246e9190613a3c565b61216057600080fd5b60007f00000000000000000000000005c1be79d3ac21cc4b727eed58c9b2ff757f56636001600160a01b0316637be1623e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156124d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124fb9190613c5d565b905060007f00000000000000000000000005c1be79d3ac21cc4b727eed58c9b2ff757f56636001600160a01b031663f2b3c8096040518163ffffffff1660e01b8152600401602060405180830381865afa15801561255d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125819190613aaa565b905060006127106125928386613af0565b61259c9190613b0f565b90506125c97f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad38848361238f565b60006127107f00000000000000000000000005c1be79d3ac21cc4b727eed58c9b2ff757f56636001600160a01b031663956f94a16040518163ffffffff1660e01b8152600401602060405180830381865afa15801561262c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126509190613aaa565b61265a9087613af0565b6126649190613b0f565b604051638d4dabff60e01b815260048101829052600160248201529091507f00000000000000000000000084c524202707c4e0a6a4500c84442472ec191cc26001600160a01b031690638d4dabff90604401600060405180830381600087803b1580156126d057600080fd5b505af11580156126e4573d6000803e3d6000fd5b505050506127397f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad387f00000000000000000000000084c524202707c4e0a6a4500c84442472ec191cc28488611bea9190613ad9565b6127438282613b7b565b61274d9086613ad9565b9450600060025486670de0b6b3a76400006127689190613af0565b6127729190613b0f565b905080156127925780600d600082825461278c9190613b7b565b90915550505b337f112c256902bf554b6ed882d2936687aaeb4225e8cd5b51303c90ca6cf43a8602846127bf858a613b7b565b6127c99190613b7b565b6040805191825260006020830152015b60405180910390a2505050505050565b60007f00000000000000000000000005c1be79d3ac21cc4b727eed58c9b2ff757f56636001600160a01b0316637be1623e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612849573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061286d9190613c5d565b905060007f00000000000000000000000005c1be79d3ac21cc4b727eed58c9b2ff757f56636001600160a01b031663f2b3c8096040518163ffffffff1660e01b8152600401602060405180830381865afa1580156128cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128f39190613aaa565b905060006127106129048386613af0565b61290e9190613b0f565b905061293b7f0000000000000000000000007f883da3b0d77978075f7c9c03e1b9f461ca1b8d848361238f565b60006127107f00000000000000000000000005c1be79d3ac21cc4b727eed58c9b2ff757f56636001600160a01b031663956f94a16040518163ffffffff1660e01b8152600401602060405180830381865afa15801561299e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129c29190613aaa565b6129cc9087613af0565b6129d69190613b0f565b604051638d4dabff60e01b815260048101829052600060248201529091507f00000000000000000000000084c524202707c4e0a6a4500c84442472ec191cc26001600160a01b031690638d4dabff90604401600060405180830381600087803b158015612a4257600080fd5b505af1158015612a56573d6000803e3d6000fd5b50505050612aab7f0000000000000000000000007f883da3b0d77978075f7c9c03e1b9f461ca1b8d7f00000000000000000000000084c524202707c4e0a6a4500c84442472ec191cc28488611bea9190613ad9565b612ab58282613b7b565b612abf9086613ad9565b9450600060025486670de0b6b3a7640000612ada9190613af0565b612ae49190613b0f565b90508015612b045780600e6000828254612afe9190613b7b565b90915550505b337f112c256902bf554b6ed882d2936687aaeb4225e8cd5b51303c90ca6cf43a8602600085612b33868b613b7b565b612b3d9190613b7b565b604080519283526020830191909152016127d9565b60007f000000000000000000000000000000000000000000000000000000000000000015612c8d5760007f0000000000000000000000000000000000000000000000000de0b6b3a7640000612baf85670de0b6b3a7640000613af0565b612bb99190613b0f565b905060007f000000000000000000000000000000000000000000000000000000003b9aca00612bf085670de0b6b3a7640000613af0565b612bfa9190613b0f565b90506000670de0b6b3a7640000612c118385613af0565b612c1b9190613b0f565b90506000670de0b6b3a7640000612c328480613af0565b612c3c9190613b0f565b670de0b6b3a7640000612c4f8680613af0565b612c599190613b0f565b612c639190613b7b565b9050670de0b6b3a7640000612c788284613af0565b612c829190613b0f565b945050505050611021565b612c978284613af0565b9050611021565b600a544290600090612cb09083613ad9565b9050600081118015612cc157508315155b8015612ccc57508215155b15612d1357612cdb8185613af0565b600b6000828254612cec9190613b7b565b90915550612cfc90508184613af0565b600c6000828254612d0d9190613b7b565b90915550505b6000612d1d611a03565b8051909150612d2c9084613ad9565b9150610708821115612de15760408051606081018252848152600b5460208201908152600c549282019283526007805460018101825560009190915291517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600390930292830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68982015590517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a909101555b60088790556009869055600a83905560408051888152602081018890527fcf2aa50876cdfbb541206f89af0ee78d44a2abf8d328e37fa4917f982149848a910160405180910390a150505050505050565b60007f0000000000000000000000000000000000000000000000000000000000000000156130b5576000612e668484612b52565b90507f0000000000000000000000000000000000000000000000000de0b6b3a7640000612e9b85670de0b6b3a7640000613af0565b612ea59190613b0f565b93507f000000000000000000000000000000000000000000000000000000003b9aca00612eda84670de0b6b3a7640000613af0565b612ee49190613b0f565b92506000807f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad386001600160a01b0316876001600160a01b031614612f29578486612f2c565b85855b915091507f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad386001600160a01b0316876001600160a01b031614612fab577f000000000000000000000000000000000000000000000000000000003b9aca00612f9c89670de0b6b3a7640000613af0565b612fa69190613b0f565b612fe8565b7f0000000000000000000000000000000000000000000000000de0b6b3a7640000612fde89670de0b6b3a7640000613af0565b612fe89190613b0f565b97506000613000612ff9848b613b7b565b85846134eb565b61300a9083613ad9565b9050670de0b6b3a76400007f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad386001600160a01b0316896001600160a01b031614613074577f0000000000000000000000000000000000000000000000000de0b6b3a7640000613096565b7f000000000000000000000000000000000000000000000000000000003b9aca005b6130a09083613af0565b6130aa9190613b0f565b94505050505061121b565b6000807f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad386001600160a01b0316866001600160a01b0316146130f85783856130fb565b84845b909250905061310a8783613b7b565b6131148289613af0565b61311e9190613b0f565b9250505061121b565b6131308361338b565b6131398261338b565b6001600160a01b03831660009081526004602052604081208054839290613161908490613ad9565b90915550506001600160a01b0382166000908152600460205260408120805483929061318e908490613b7b565b92505081905550816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516131da91815260200190565b60405180910390a3505050565b600060038211156132485750806000613201600283613b0f565b61320c906001613b7b565b90505b81811015613242579050806002816132278186613b0f565b6132319190613b7b565b61323b9190613b0f565b905061320f565b50919050565b8115613252575060015b919050565b6132608261338b565b80600260008282546132729190613b7b565b90915550506001600160a01b0382166000908152600460205260408120805483929061329f908490613b7b565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35050565b60008183106132f95781611354565b5090919050565b6133098261338b565b806002600082825461331b9190613ad9565b90915550506001600160a01b03821660009081526004602052604081208054839290613348908490613ad9565b90915550506040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016132de565b6001600160a01b03811660009081526004602052604090205480156134b9576001600160a01b0382166000908152600f60209081526040808320805460108085529285208054600d54600e549481905594909552829055936133ed8584613ad9565b905060006133fb8584613ad9565b90508115613456576000670de0b6b3a7640000613418848a613af0565b6134229190613b0f565b6001600160a01b038a1660009081526011602052604081208054929350839290919061344f908490613b7b565b9091555050505b80156134af576000670de0b6b3a7640000613471838a613af0565b61347b9190613b0f565b6001600160a01b038a166000908152601260205260408120805492935083929091906134a8908490613b7b565b9091555050505b5050505050505050565b600d546001600160a01b0383166000908152600f6020908152604080832093909355600e546010909152919020555050565b6000805b60ff8110156135f15782600061350587836135fa565b90508581101561355557600061351b8887613697565b6135258389613ad9565b61353790670de0b6b3a7640000613af0565b6135419190613b0f565b905061354d8187613b7b565b955050613597565b60006135618887613697565b61356b8884613ad9565b61357d90670de0b6b3a7640000613af0565b6135879190613b0f565b90506135938187613ad9565b9550505b818511156135c05760016135ab8387613ad9565b116135bb57849350505050611354565b6135dc565b60016135cc8684613ad9565b116135dc57849350505050611354565b505080806135e990613ba9565b9150506134ef565b50909392505050565b6000670de0b6b3a7640000828185816136138280613af0565b61361d9190613b0f565b6136279190613af0565b6136319190613b0f565b61363b9190613af0565b6136459190613b0f565b670de0b6b3a764000080848161365b8280613af0565b6136659190613b0f565b61366f9190613af0565b6136799190613b0f565b6136839086613af0565b61368d9190613b0f565b6113549190613b7b565b6000670de0b6b3a764000083816136ae8280613af0565b6136b89190613b0f565b6136c29190613af0565b6136cc9190613b0f565b670de0b6b3a7640000806136e08580613af0565b6136ea9190613b0f565b6136f5866003613af0565b6136839190613af0565b6001600160a01b038116811461371457600080fd5b50565b60008060008060006080868803121561372f57600080fd5b85359450602086013593506040860135613748816136ff565b9250606086013567ffffffffffffffff8082111561376557600080fd5b818801915088601f83011261377957600080fd5b81358181111561378857600080fd5b89602082850101111561379a57600080fd5b9699959850939650602001949392505050565b60005b838110156137c85781810151838201526020016137b0565b838111156137d7576000848401525b50505050565b60208152600082518060208401526137fc8160408501602087016137ad565b601f01601f19169190910160400192915050565b6000806040838503121561382357600080fd5b823561382e816136ff565b946020939093013593505050565b6000806000806080858703121561385257600080fd5b843561385d816136ff565b966020860135965060408601359560600135945092505050565b6020808252825182820181905260009190848201906040850190845b818110156138af57835183529284019291840191600101613893565b50909695505050505050565b6000602082840312156138cd57600080fd5b8135611354816136ff565b6000806000606084860312156138ed57600080fd5b83356138f8816136ff565b92506020840135613908816136ff565b929592945050506040919091013590565b60006020828403121561392b57600080fd5b5035919050565b60008060006060848603121561394757600080fd5b8335613952816136ff565b95602085013595506040909401359392505050565b600080600080600080600060e0888a03121561398257600080fd5b873561398d816136ff565b9650602088013561399d816136ff565b95506040880135945060608801359350608088013560ff811681146139c157600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156139f157600080fd5b82356139fc816136ff565b91506020830135613a0c816136ff565b809150509250929050565b60008060408385031215613a2a57600080fd5b823591506020830135613a0c816136ff565b600060208284031215613a4e57600080fd5b8151801515811461135457600080fd5b60018060a01b038616815284602082015283604082015260806060820152816080820152818360a0830137600081830160a090810191909152601f909201601f19160101949350505050565b600060208284031215613abc57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015613aeb57613aeb613ac3565b500390565b6000816000190483118215151615613b0a57613b0a613ac3565b500290565b600082613b2c57634e487b7160e01b600052601260045260246000fd5b500490565b600181811c90821680613b4557607f821691505b60208210810361324257634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60008219821115613b8e57613b8e613ac3565b500190565b634e487b7160e01b600052603260045260246000fd5b600060018201613bbb57613bbb613ac3565b5060010190565b600080835481600182811c915080831680613bde57607f831692505b60208084108203613bfd57634e487b7160e01b86526022600452602486fd5b818015613c115760018114613c2257613c4f565b60ff19861689528489019650613c4f565b60008a81526020902060005b86811015613c475781548b820152908501908301613c2e565b505084890196505b509498975050505050505050565b600060208284031215613c6f57600080fd5b8151611354816136ff565b60008251613c8c8184602087016137ad565b919091019291505056fea2646970667358221220c75056062a4c8f43c9a06e22a6e6664823a5d5655a394872a20b39ca7889b58864736f6c634300080d0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.