Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 17 from a total of 17 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Fee To | 13950544 | 1111 days ago | IN | 0 ETH | 0.0025738 | ||||
Set Migrator | 13763714 | 1139 days ago | IN | 0 ETH | 0.00143581 | ||||
Set Migrator | 13763700 | 1139 days ago | IN | 0 ETH | 0.00280614 | ||||
Create Pair | 12171100 | 1388 days ago | IN | 0 ETH | 0.3545123 | ||||
Create Pair | 12171091 | 1388 days ago | IN | 0 ETH | 0.3545132 | ||||
Create Pair | 12086071 | 1401 days ago | IN | 0 ETH | 0.46615429 | ||||
Create Pair | 11789279 | 1446 days ago | IN | 0 ETH | 0.68513104 | ||||
Create Pair | 11553345 | 1483 days ago | IN | 0 ETH | 0.39564457 | ||||
Create Pair | 11157687 | 1543 days ago | IN | 0 ETH | 0.19586315 | ||||
Create Pair | 11157586 | 1543 days ago | IN | 0 ETH | 0.27120198 | ||||
Create Pair | 11123504 | 1549 days ago | IN | 0 ETH | 0.10184883 | ||||
Create Pair | 11123495 | 1549 days ago | IN | 0 ETH | 0.10184909 | ||||
Create Pair | 10970790 | 1572 days ago | IN | 0 ETH | 0.37213998 | ||||
Set Migrator | 10939744 | 1577 days ago | IN | 0 ETH | 0.00133817 | ||||
Set Migrator | 10939666 | 1577 days ago | IN | 0 ETH | 0.00269914 | ||||
Set Migrator | 10932411 | 1578 days ago | IN | 0 ETH | 0.00499238 | ||||
Set Fee To | 10932405 | 1578 days ago | IN | 0 ETH | 0.00544649 |
Latest 25 internal transactions (View All)
Advanced mode:
Loading...
Loading
Contract Name:
SakeSwapFactory
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-09-25 */ // File: contracts\sakeswap\libraries\SafeMath.sol // SPDX-License-Identifier: GPL-3.0 pragma solidity =0.6.12; // a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math) library SafeMath { function add(uint x, uint y) internal pure returns (uint z) { require((z = x + y) >= x, 'ds-math-add-overflow'); } function sub(uint x, uint y) internal pure returns (uint z) { require((z = x - y) <= x, 'ds-math-sub-underflow'); } function mul(uint x, uint y) internal pure returns (uint z) { require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow'); } } // File: contracts\sakeswap\SakeSwapERC20.sol pragma solidity =0.6.12; contract SakeSwapERC20 { using SafeMath for uint; string public constant name = "SakeSwap LP Token"; string public constant symbol = "SLP"; uint8 public constant decimals = 18; uint public totalSupply; mapping(address => uint) public balanceOf; mapping(address => mapping(address => uint)) public allowance; bytes32 public DOMAIN_SEPARATOR; // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9; mapping(address => uint) public nonces; event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); constructor() public { uint chainId; assembly { chainId := chainid() } DOMAIN_SEPARATOR = keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(name)), keccak256(bytes("1")), chainId, address(this) ) ); } function _mint(address to, uint value) internal { totalSupply = totalSupply.add(value); balanceOf[to] = balanceOf[to].add(value); emit Transfer(address(0), to, value); } function _burn(address from, uint value) internal { balanceOf[from] = balanceOf[from].sub(value); totalSupply = totalSupply.sub(value); emit Transfer(from, address(0), value); } function _approve(address owner, address spender, uint value) private { allowance[owner][spender] = value; emit Approval(owner, spender, value); } function _transfer(address from, address to, uint value) private { balanceOf[from] = balanceOf[from].sub(value); balanceOf[to] = balanceOf[to].add(value); emit Transfer(from, to, value); } function approve(address spender, uint value) external returns (bool) { _approve(msg.sender, spender, value); return true; } function transfer(address to, uint value) external returns (bool) { _transfer(msg.sender, to, value); return true; } function transferFrom(address from, address to, uint value) external returns (bool) { if (allowance[from][msg.sender] != uint(-1)) { allowance[from][msg.sender] = allowance[from][msg.sender].sub(value); } _transfer(from, to, value); return true; } function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external { require(deadline >= block.timestamp, "SakeSwap: EXPIRED"); 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, "SakeSwap: INVALID_SIGNATURE"); _approve(owner, spender, value); } } // File: contracts\sakeswap\libraries\Math.sol pragma solidity =0.6.12; // a library for performing various math operations library Math { function min(uint x, uint y) internal pure returns (uint z) { z = x < y ? x : y; } // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) 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; } } } // File: contracts\sakeswap\libraries\UQ112x112.sol pragma solidity =0.6.12; // a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format)) // range: [0, 2**112 - 1] // resolution: 1 / 2**112 library UQ112x112 { uint224 constant Q112 = 2**112; // encode a uint112 as a UQ112x112 function encode(uint112 y) internal pure returns (uint224 z) { z = uint224(y) * Q112; // never overflows } // divide a UQ112x112 by a uint112, returning a UQ112x112 function uqdiv(uint224 x, uint112 y) internal pure returns (uint224 z) { z = x / uint224(y); } } // File: contracts\sakeswap\interfaces\IERC20.sol pragma solidity >=0.5.0; interface IERC20 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function mint(address to, uint value) external returns (bool); function burn(address from, uint value) external returns (bool); } // File: contracts\sakeswap\interfaces\ISakeSwapFactory.sol pragma solidity >=0.5.0; interface ISakeSwapFactory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function migrator() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; function setMigrator(address) external; } // File: contracts\sakeswap\interfaces\ISakeSwapCallee.sol pragma solidity >=0.5.0; interface ISakeSwapCallee { function SakeSwapCall(address sender, uint amount0, uint amount1, bytes calldata data) external; } // File: contracts\sakeswap\interfaces\ISakeSwapPair.sol pragma solidity >=0.5.0; interface ISakeSwapPair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function stoken() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; function dealSlippageWithIn(address[] calldata path, uint amountIn, address to, bool ifmint) external returns (uint amountOut); function dealSlippageWithOut(address[] calldata path, uint amountOut, address to, bool ifmint) external returns (uint extra); function getAmountOutMarket(address token, uint amountIn) external view returns (uint _out, uint t0Price); function getAmountInMarket(address token, uint amountOut) external view returns (uint _in, uint t0Price); function getAmountOutFinal(address token, uint256 amountIn) external view returns (uint256 amountOut, uint256 stokenAmount); function getAmountInFinal(address token, uint256 amountOut) external view returns (uint256 amountIn, uint256 stokenAmount); function getTokenMarketPrice(address token) external view returns (uint price); } // File: contracts\sakeswap\SakeSwapSlippageToken.sol pragma solidity =0.6.12; contract SakeSwapSlippageToken { using SafeMath for uint; string public constant name = "SakeSwap Slippage Token"; string public constant symbol = "SST"; uint8 public constant decimals = 18; uint public totalSupply; address private _owner; mapping(address => uint) public balanceOf; mapping(address => mapping(address => uint)) public allowance; event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); modifier onlyOwner() { require(_owner == msg.sender, "SlippageToken: Not Owner"); _; } constructor(uint initialSupply) public { _owner = msg.sender; _mint(msg.sender, initialSupply); } function _mint(address to, uint value) internal { totalSupply = totalSupply.add(value); balanceOf[to] = balanceOf[to].add(value); emit Transfer(address(0), to, value); } function _burn(address from, uint value) internal { balanceOf[from] = balanceOf[from].sub(value); totalSupply = totalSupply.sub(value); emit Transfer(from, address(0), value); } function _approve(address owner, address spender, uint value) private { allowance[owner][spender] = value; emit Approval(owner, spender, value); } function _transfer(address from, address to, uint value) private { balanceOf[from] = balanceOf[from].sub(value); balanceOf[to] = balanceOf[to].add(value); emit Transfer(from, to, value); } function approve(address spender, uint value) external returns (bool) { _approve(msg.sender, spender, value); return true; } function transfer(address to, uint value) external returns (bool) { _transfer(msg.sender, to, value); return true; } function transferFrom(address from, address to, uint value) external returns (bool) { if (allowance[from][msg.sender] != uint(-1)) { allowance[from][msg.sender] = allowance[from][msg.sender].sub(value); } _transfer(from, to, value); return true; } function mint(address to, uint value) external onlyOwner returns (bool) { _mint(to, value); return true; } function burn(address from, uint value) external onlyOwner returns (bool) { _burn(from, value); return true; } } // File: contracts\sakeswap\SakeSwapPair.sol pragma solidity =0.6.12; interface IMigrator { // Return the desired amount of liquidity token that the migrator wants. function desiredLiquidity() external view returns (uint256); } contract SakeSwapPair is SakeSwapERC20 { using SafeMath for uint256; using UQ112x112 for uint224; uint256 public constant MINIMUM_LIQUIDITY = 10**3; bytes4 private constant SELECTOR = bytes4(keccak256(bytes("transfer(address,uint256)"))); uint256 public constant DECAY_PERIOD = 5 minutes; uint256 public constant UQ112 = 2**112; address public factory; address public token0; address public token1; SakeSwapSlippageToken public stoken; uint224 private virtualPrice; // token0 virtual price, uses single storage slot uint32 private lastPriceTime; // the latest exchange time uint112 private reserve0; // uses single storage slot, accessible via getReserves uint112 private reserve1; // uses single storage slot, accessible via getReserves uint32 private blockTimestampLast; // uses single storage slot, accessible via getReserves uint256 public price0CumulativeLast; uint256 public price1CumulativeLast; uint256 public kLast; // reserve0 * reserve1, as of immediately after the most recent liquidity event uint256 private unlocked = 1; modifier lock() { require(unlocked == 1, "SakeSwap: LOCKED"); unlocked = 0; _; unlocked = 1; } function getReserves() public view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast) { _reserve0 = reserve0; _reserve1 = reserve1; _blockTimestampLast = blockTimestampLast; } function getVirtualPrice() public view returns (uint224 _virtualPrice, uint32 _lastPriceTime) { _virtualPrice = virtualPrice; _lastPriceTime = lastPriceTime; } function _safeTransfer(address token, address to, uint256 value) private { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(SELECTOR, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), "SakeSwap: TRANSFER_FAILED"); } event Mint(address indexed sender, uint256 amount0, uint256 amount1); event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to); event Swap( address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); constructor() public { factory = msg.sender; } // called once by the factory at time of deployment function initialize(address _token0, address _token1) external { require(msg.sender == factory, "SakeSwap: FORBIDDEN"); // sufficient check token0 = _token0; token1 = _token1; stoken = new SakeSwapSlippageToken(0); } // update reserves and, on the first call per block, price accumulators function _update(uint256 balance0, uint256 balance1, uint112 _reserve0, uint112 _reserve1) private { require(balance0 <= uint112(-1) && balance1 <= uint112(-1), "SakeSwap: OVERFLOW"); uint32 blockTimestamp = uint32(block.timestamp % 2**32); uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired if (timeElapsed > 0 && _reserve0 != 0 && _reserve1 != 0) { // * never overflows, and + overflow is desired price0CumulativeLast += uint256(UQ112x112.encode(_reserve1).uqdiv(_reserve0)) * timeElapsed; price1CumulativeLast += uint256(UQ112x112.encode(_reserve0).uqdiv(_reserve1)) * timeElapsed; } reserve0 = uint112(balance0); reserve1 = uint112(balance1); blockTimestampLast = blockTimestamp; emit Sync(reserve0, reserve1); } // if fee is on, mint liquidity equivalent to 1/6th of the growth in sqrt(k) function _mintFee(uint112 _reserve0, uint112 _reserve1) private returns (bool feeOn) { address feeTo = ISakeSwapFactory(factory).feeTo(); feeOn = feeTo != address(0); uint256 _kLast = kLast; // gas savings if (feeOn) { if (_kLast != 0) { uint256 rootK = Math.sqrt(uint256(_reserve0).mul(_reserve1)); uint256 rootKLast = Math.sqrt(_kLast); if (rootK > rootKLast) { uint256 numerator = totalSupply.mul(rootK.sub(rootKLast)); uint256 denominator = rootK.mul(5).add(rootKLast); uint256 liquidity = numerator / denominator; if (liquidity > 0) _mint(feeTo, liquidity); } } } else if (_kLast != 0) { kLast = 0; } } // this low-level function should be called from a contract which performs important safety checks function mint(address to) external lock returns (uint256 liquidity) { (uint112 _reserve0, uint112 _reserve1,) = getReserves(); // gas savings uint balance0 = IERC20(token0).balanceOf(address(this)); uint balance1 = IERC20(token1).balanceOf(address(this)); uint amount0 = balance0.sub(_reserve0); uint amount1 = balance1.sub(_reserve1); bool feeOn = _mintFee(_reserve0, _reserve1); uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee if (_totalSupply == 0) { address migrator = ISakeSwapFactory(factory).migrator(); if (msg.sender == migrator) { liquidity = IMigrator(migrator).desiredLiquidity(); require(liquidity > 0 && liquidity != uint256(-1), "SakeSwap: Bad desired liquidity"); } else { require(migrator == address(0), "SakeSwap: Must not have migrator"); liquidity = Math.sqrt(amount0.mul(amount1)).sub(MINIMUM_LIQUIDITY); _mint(address(0), MINIMUM_LIQUIDITY); // permanently lock the first MINIMUM_LIQUIDITY tokens } } else { liquidity = Math.min(amount0.mul(_totalSupply) / _reserve0, amount1.mul(_totalSupply) / _reserve1); } require(liquidity > 0, "SakeSwap: INSUFFICIENT_LIQUIDITY_MINTED"); _mint(to, liquidity); _update(balance0, balance1, _reserve0, _reserve1); if (feeOn) kLast = uint(reserve0).mul(reserve1); // reserve0 and reserve1 are up-to-date emit Mint(msg.sender, amount0, amount1); } // this low-level function should be called from a contract which performs important safety checks function burn(address to) external lock returns (uint256 amount0, uint256 amount1) { (uint112 _reserve0, uint112 _reserve1, ) = getReserves(); // gas savings address _token0 = token0; // gas savings address _token1 = token1; // gas savings uint256 balance0 = IERC20(_token0).balanceOf(address(this)); uint256 balance1 = IERC20(_token1).balanceOf(address(this)); bool feeOn = _mintFee(_reserve0, _reserve1); { uint256 liquidity = balanceOf[address(this)]; uint256 _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee amount0 = liquidity.mul(balance0) / _totalSupply; // using balances ensures pro-rata distribution amount1 = liquidity.mul(balance1) / _totalSupply; // using balances ensures pro-rata distribution require(amount0 > 0 && amount1 > 0, "SakeSwap: 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); if (feeOn) kLast = uint256(reserve0).mul(reserve1); // reserve0 and reserve1 are up-to-date emit Burn(msg.sender, amount0, amount1, to); } function _updateVirtualPrice(uint112 _reserve0, uint112 _reserve1) internal { (uint256 _virtualPrice, uint32 _lastPriceTime) = getVirtualPrice(); uint32 blockTimestamp = uint32(block.timestamp % 2**32); if (_lastPriceTime < blockTimestamp) { uint256 currentPrice = uint256(UQ112x112.encode(_reserve1).uqdiv(_reserve0)); uint256 timePassed = Math.min(DECAY_PERIOD, block.timestamp.sub(_lastPriceTime)); uint256 timeRemain = DECAY_PERIOD.sub(timePassed); uint256 price = _virtualPrice.mul(timeRemain).add(currentPrice.mul(timePassed)) / (DECAY_PERIOD); virtualPrice = uint224(price); lastPriceTime = blockTimestamp; } } // this low-level function should be called from a contract which performs important safety checks function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external lock { require(amount0Out > 0 || amount1Out > 0, "SakeSwap: INSUFFICIENT_OUTPUT_AMOUNT"); (uint112 _reserve0, uint112 _reserve1, ) = getReserves(); // gas savings require(amount0Out < _reserve0 && amount1Out < _reserve1, "SakeSwap: INSUFFICIENT_LIQUIDITY"); uint256 balance0; uint256 balance1; { // scope for _token{0,1}, avoids stack too deep errors address _token0 = token0; address _token1 = token1; require(to != _token0 && to != _token1, "SakeSwap: 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) ISakeSwapCallee(to).SakeSwapCall(msg.sender, amount0Out, amount1Out, data); balance0 = IERC20(_token0).balanceOf(address(this)); balance1 = IERC20(_token1).balanceOf(address(this)); } uint256 amount0In = balance0 > _reserve0 - amount0Out ? balance0 - (_reserve0 - amount0Out) : 0; uint256 amount1In = balance1 > _reserve1 - amount1Out ? balance1 - (_reserve1 - amount1Out) : 0; require(amount0In > 0 || amount1In > 0, "SakeSwap: INSUFFICIENT_INPUT_AMOUNT"); { // scope for reserve{0,1}Adjusted, avoids stack too deep errors uint256 balance0Adjusted = balance0.mul(1000).sub(amount0In.mul(3)); uint256 balance1Adjusted = balance1.mul(1000).sub(amount1In.mul(3)); require( balance0Adjusted.mul(balance1Adjusted) >= uint256(_reserve0).mul(_reserve1).mul(1000**2), "SakeSwap: K" ); } _updateVirtualPrice(_reserve0, _reserve1); _update(balance0, balance1, _reserve0, _reserve1); emit Swap(msg.sender, amount0In, amount1In, amount0Out, amount1Out, to); } function _getToken0MarketPrice() internal view returns (uint256 price) { (uint256 _virtualPrice, uint32 _lastPriceTime) = getVirtualPrice(); (uint112 _reserve0, uint112 _reserve1, ) = getReserves(); uint256 currentPrice = uint256(UQ112x112.encode(_reserve1).uqdiv(_reserve0)); uint256 timePassed = Math.min(DECAY_PERIOD, block.timestamp.sub(_lastPriceTime)); uint256 timeRemain = DECAY_PERIOD.sub(timePassed); price = _virtualPrice.mul(timeRemain).add(currentPrice.mul(timePassed)) / (DECAY_PERIOD); } function getTokenMarketPrice(address token) external view returns (uint256 price) { uint256 t0Price = _getToken0MarketPrice(); token == token0 ? price = t0Price : price = UQ112.mul(UQ112) / t0Price; } function _getAmountOut(address token, uint256 amountIn, uint256 t0Price) internal view returns (uint256 _out) { uint256 amountInWithFee = amountIn.mul(997); if (token == token0) { uint256 numerator = amountInWithFee.mul(t0Price); uint256 denominator = UQ112.mul(1000); _out = numerator / denominator; } else { uint256 numerator = amountInWithFee.mul(UQ112); uint256 denominator = t0Price.mul(1000); _out = numerator / denominator; } } function _getAmountIn(address token, uint256 amountOut, uint256 t0Price) internal view returns (uint256 _in) { if (token == token0) { uint256 numerator = amountOut.mul(1000).mul(t0Price); uint256 denominator = UQ112.mul(997); _in = numerator / denominator; } else { uint256 numerator = amountOut.mul(1000).mul(UQ112); uint256 denominator = t0Price.mul(997); _in = numerator / denominator; } } function getAmountOutMarket(address token, uint256 amountIn) public view returns (uint256 _out, uint256 t0Price) { t0Price = _getToken0MarketPrice(); _out = _getAmountOut(token, amountIn, t0Price); } function getAmountInMarket(address token, uint256 amountOut) public view returns (uint256 _in, uint256 t0Price) { t0Price = _getToken0MarketPrice(); _in = _getAmountIn(token, amountOut, t0Price); } function getAmountOutPool(address token, uint256 amountIn) public view returns (uint256 _out, uint256 t0Price) { (uint112 _reserve0, uint112 _reserve1, ) = getReserves(); t0Price = uint256(UQ112x112.encode(_reserve1).uqdiv(_reserve0)); _out = _getAmountOut(token, amountIn, t0Price); } function getAmountInPool(address token, uint256 amountOut) public view returns (uint256 _in, uint256 t0Price) { (uint112 _reserve0, uint112 _reserve1, ) = getReserves(); t0Price = uint256(UQ112x112.encode(_reserve1).uqdiv(_reserve0)); _in = _getAmountIn(token, amountOut, t0Price); } function getAmountOutReal(uint256 amountIn, uint256 _reserveIn, uint256 _reserveOut) internal pure returns (uint256 _out) { uint256 amountInWithFee = amountIn.mul(997); uint256 numerator = amountInWithFee.mul(_reserveOut); uint256 denominator = _reserveIn.mul(1000).add(amountInWithFee); _out = numerator / denominator; } function getAmountInReal(uint256 amountOut, uint256 _reserveIn, uint256 _reserveOut) internal pure returns (uint256 _in) { uint256 numerator = _reserveIn.mul(amountOut).mul(1000); uint256 denominator = _reserveOut.sub(amountOut).mul(997); _in = (numerator / denominator).add(1); } function getAmountOutFinal(address token, uint256 amountIn) external view returns (uint256 amountOut, uint256 stokenAmount) { address _token0 = token0; (uint112 _reserve0, uint112 _reserve1, ) = getReserves(); // gas savings (uint256 _reserveIn, uint256 _reserveOut) = token == _token0 ? (_reserve0, _reserve1) : (_reserve1, _reserve0); uint256 amountOutReal = getAmountOutReal(amountIn, _reserveIn, _reserveOut); (uint256 amountOutMarket, ) = getAmountOutMarket(token, amountIn); amountOut = amountOutReal; // arbitrager if (amountOutReal > amountOutMarket) { uint256 slippage = amountOutReal.sub(amountOutMarket); uint256 halfSlippage = slippage / 2; amountOut = amountOutReal.sub(halfSlippage); } (uint256 amountOutPool, uint256 t0Price) = getAmountOutPool(token, amountIn); uint256 slippage = amountOutPool.sub(amountOutReal); stokenAmount = token == _token0 ? slippage : slippage.mul(t0Price) / UQ112; } function getAmountInFinal(address token, uint256 amountOut) external view returns (uint256 amountIn, uint256 stokenAmount) { address _token0 = token0; (uint112 _reserve0, uint112 _reserve1, ) = getReserves(); // gas savings (uint256 _reserveIn, uint256 _reserveOut) = token == _token0 ? (_reserve1, _reserve0) : (_reserve0, _reserve1); uint256 amountInReal = getAmountInReal(amountOut, _reserveIn, _reserveOut); (uint256 amountInMarket, ) = getAmountInMarket(token, amountOut); amountIn = amountInReal; // arbitrager if (amountInReal < amountInMarket) { uint256 slippage = amountInMarket.sub(amountInReal); uint256 extra = slippage / 2; amountIn = amountInReal.add(extra); } (uint256 amountInPool, uint256 t0Price) = getAmountInPool(token, amountOut); uint256 slippage = amountInReal.sub(amountInPool); stokenAmount = token == _token0 ? slippage : slippage.mul(t0Price) / UQ112; } function dealSlippageWithIn(address[] calldata path, uint256 amountIn, address to, bool ifmint) external lock returns (uint256 amountOut) { require(path.length == 2, "SakeSwap: INVALID_PATH"); address _token0 = token0; uint256 amountOutReal; uint256 amountOutMarket; // avoids stack too deep errors { (uint112 _reserve0, uint112 _reserve1, ) = getReserves(); // gas savings (uint256 _reserveIn, uint256 _reserveOut) = path[0] == _token0 ? (_reserve0, _reserve1) : (_reserve1, _reserve0); amountOutReal = getAmountOutReal(amountIn, _reserveIn, _reserveOut); amountOut = amountOutReal; (amountOutMarket, ) = getAmountOutMarket(path[0], amountIn); uint256 balance = IERC20(path[0]).balanceOf(address(this)); uint256 amount = balance.sub(_reserveIn); require(amount >= amountIn, "SakeSwap: Invalid Amount"); } // arbitrager if (amountOutReal > amountOutMarket) { uint256 slippageExtra = amountOutReal.sub(amountOutMarket); uint256 halfSlippage = slippageExtra / 2; amountOut = amountOutReal.sub(halfSlippage); } if (ifmint == true) { (uint256 amountOutPool, uint256 t0Price) = getAmountOutPool(path[0], amountIn); uint256 slippage = amountOutPool.sub(amountOutReal); uint256 mintAmount = path[1] == _token0 ? slippage.mul(t0Price) / UQ112 : slippage; stoken.mint(to, mintAmount); } } function dealSlippageWithOut(address[] calldata path, uint256 amountOut, address to, bool ifmint) external lock returns (uint256 extra) { require(path.length == 2, "SakeSwap: INVALID_PATH"); address _token0 = token0; uint256 amountInReal; uint256 amountInMarket; // avoids stack too deep errors { (uint112 _reserve0, uint112 _reserve1, ) = getReserves(); // gas savings (uint256 _reserveIn, uint256 _reserveOut) = path[0] == _token0 ? (_reserve0, _reserve1) : (_reserve1, _reserve0); amountInReal = getAmountInReal(amountOut, _reserveIn, _reserveOut); (amountInMarket, ) = getAmountInMarket(path[1], amountOut); } // arbitrager if (amountInReal < amountInMarket) { uint256 slippageExtra = amountInMarket.sub(amountInReal); extra = slippageExtra / 2; } if (ifmint == true) { (uint256 amountInPool, uint256 t0Price) = getAmountInPool(path[1], amountOut); uint256 slippage = amountInReal.sub(amountInPool); uint256 mintAmount = path[0] == _token0 ? slippage.mul(t0Price) / UQ112 : slippage; stoken.mint(to, mintAmount); } } // force balances to match reserves function skim(address to) external lock { address _token0 = token0; // gas savings address _token1 = token1; // gas savings _safeTransfer(_token0, to, IERC20(_token0).balanceOf(address(this)).sub(reserve0)); _safeTransfer(_token1, to, IERC20(_token1).balanceOf(address(this)).sub(reserve1)); } // force reserves to match balances function sync() external lock { _update(IERC20(token0).balanceOf(address(this)), IERC20(token1).balanceOf(address(this)), reserve0, reserve1); } } // File: contracts\sakeswap\SakeSwapFactory.sol pragma solidity ^0.6.12; contract SakeSwapFactory { address public feeTo; address public feeToSetter; address public migrator; mapping(address => mapping(address => address)) public getPair; address[] public allPairs; event PairCreated(address indexed token0, address indexed token1, address pair, uint256); constructor(address _feeToSetter) public { feeToSetter = _feeToSetter; } function allPairsLength() external view returns (uint256) { return allPairs.length; } function createPair(address tokenA, address tokenB) external returns (address pair) { require(tokenA != tokenB, "SakeSwap: IDENTICAL_ADDRESSES"); (address token0, address token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); require(token0 != address(0), "SakeSwap: ZERO_ADDRESS"); require(getPair[token0][token1] == address(0), "SakeSwap: PAIR_EXISTS"); // single check is sufficient bytes memory bytecode = type(SakeSwapPair).creationCode; bytes32 salt = keccak256(abi.encodePacked(token0, token1)); assembly { pair := create2(0, add(bytecode, 32), mload(bytecode), salt) } ISakeSwapPair(pair).initialize(token0, token1); getPair[token0][token1] = pair; getPair[token1][token0] = pair; // populate mapping in the reverse direction allPairs.push(pair); emit PairCreated(token0, token1, pair, allPairs.length); } function setFeeTo(address _feeTo) external { require(msg.sender == feeToSetter, "SakeSwap: FORBIDDEN"); feeTo = _feeTo; } function setFeeToSetter(address _feeToSetter) external { require(msg.sender == feeToSetter, "SakeSwap: FORBIDDEN"); feeToSetter = _feeToSetter; } function setMigrator(address _migrator) external { require(msg.sender == feeToSetter, "SakeSwap: FORBIDDEN"); migrator = _migrator; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_feeToSetter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token0","type":"address"},{"indexed":true,"internalType":"address","name":"token1","type":"address"},{"indexed":false,"internalType":"address","name":"pair","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"PairCreated","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allPairs","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allPairsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"}],"name":"createPair","outputs":[{"internalType":"address","name":"pair","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeTo","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeToSetter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"getPair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_feeTo","type":"address"}],"name":"setFeeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeToSetter","type":"address"}],"name":"setFeeToSetter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_migrator","type":"address"}],"name":"setMigrator","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506040516146fb3803806146fb8339818101604052602081101561003357600080fd5b5051600180546001600160a01b0319166001600160a01b03909216919091179055614698806100636000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80637cd07e47116100665780637cd07e471461012e578063a2e74af614610136578063c9c653961461015c578063e6a439051461018a578063f46901ed146101b85761009e565b8063017e7e58146100a3578063094b7415146100c75780631e3dd18b146100cf57806323cf3118146100ec578063574f2ba314610114575b600080fd5b6100ab6101de565b604080516001600160a01b039092168252519081900360200190f35b6100ab6101ed565b6100ab600480360360208110156100e557600080fd5b50356101fc565b6101126004803603602081101561010257600080fd5b50356001600160a01b0316610223565b005b61011c61029a565b60408051918252519081900360200190f35b6100ab6102a0565b6101126004803603602081101561014c57600080fd5b50356001600160a01b03166102af565b6100ab6004803603604081101561017257600080fd5b506001600160a01b0381358116916020013516610326565b6100ab600480360360408110156101a057600080fd5b506001600160a01b0381358116916020013516610649565b610112600480360360208110156101ce57600080fd5b50356001600160a01b031661066f565b6000546001600160a01b031681565b6001546001600160a01b031681565b6004818154811061020957fe5b6000918252602090912001546001600160a01b0316905081565b6001546001600160a01b03163314610278576040805162461bcd60e51b815260206004820152601360248201527229b0b5b2a9bbb0b81d102327a92124a22222a760691b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60045490565b6002546001600160a01b031681565b6001546001600160a01b03163314610304576040805162461bcd60e51b815260206004820152601360248201527229b0b5b2a9bbb0b81d102327a92124a22222a760691b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000816001600160a01b0316836001600160a01b0316141561038f576040805162461bcd60e51b815260206004820152601d60248201527f53616b65537761703a204944454e544943414c5f414444524553534553000000604482015290519081900360640190fd5b600080836001600160a01b0316856001600160a01b0316106103b25783856103b5565b84845b90925090506001600160a01b03821661040e576040805162461bcd60e51b815260206004820152601660248201527553616b65537761703a205a45524f5f4144445245535360501b604482015290519081900360640190fd5b6001600160a01b03828116600090815260036020908152604080832085851684529091529020541615610480576040805162461bcd60e51b815260206004820152601560248201527453616b65537761703a20504149525f45584953545360581b604482015290519081900360640190fd5b606060405180602001610492906106e6565b6020820181038252601f19601f8201166040525090506000838360405160200180836001600160a01b031660601b8152601401826001600160a01b031660601b815260140192505050604051602081830303815290604052805190602001209050808251602084016000f59450846001600160a01b031663485cc95585856040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050600060405180830381600087803b15801561055f57600080fd5b505af1158015610573573d6000803e3d6000fd5b505050506001600160a01b0384811660008181526003602081815260408084208987168086529083528185208054978d166001600160a01b031998891681179091559383528185208686528352818520805488168517905560048054600181018255958190527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b90950180549097168417909655925483519283529082015281517f0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9929181900390910190a35050505092915050565b60036020908152600092835260408084209091529082529020546001600160a01b031681565b6001546001600160a01b031633146106c4576040805162461bcd60e51b815260206004820152601360248201527229b0b5b2a9bbb0b81d102327a92124a22222a760691b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b613f6f806106f48339019056fe60806040526001600e5534801561001557600080fd5b50604080518082018252601181527029b0b5b2a9bbb0b8102628102a37b5b2b760791b6020918201528151808301835260018152603160f81b9082015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527ffee1862690319b49a3e30d62d993c6ee23ce6df945360ede41fcd8fd48c4e7a2818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c09091019092528151910120600355600580546001600160a01b03191633179055613e608061010f6000396000f3fe60806040523480156200001157600080fd5b5060043610620002805760003560e01c80637464fc3d1162000159578063ba9a7a5611620000c9578063d505accf1162000087578063d505accf14620008be578063dd62ed3e1462000912578063dd653d191462000943578063e25aa5fa146200094d578063fff6cae9146200097f5762000280565b8063ba9a7a5614620007ec578063bc25cf7714620007f6578063c45a0155146200081f578063d21220a71462000829578063d4b32b5014620008335762000280565b806395d89b41116200011757806395d89b41146200074b57806397026e5f1462000755578063a6cfbca4146200075f578063a9059cbb146200078e578063ad77a9b814620007bd5762000280565b80637464fc3d146200069757806374b0866414620006a15780637ecebe0014620006d0578063855e89f514620006f957806389afcb4414620007225762000280565b80632fdc37b311620001f5578063485cc95511620001b3578063485cc95514620006005780635909c0d514620006315780635a3d5493146200063b5780636a627842146200064557806370a08231146200066e5762000280565b80632fdc37b3146200056e57806330adf81f146200059d578063313ce56714620005a757806334d6664a14620005c75780633644e51514620005f65762000280565b806318160ddd116200024357806318160ddd146200043c5780631e9d4904146200045857806323b872dd1462000462578063268d67db146200049b5780632fb62a4714620004e35762000280565b8063022c0d9f146200028557806306fdde0314620003175780630902f1ac1462000399578063095ea7b314620003d35780630dfe16811462000416575b600080fd5b62000315600480360360808110156200029d57600080fd5b8135916020810135916001600160a01b036040830135169190810190608081016060820135600160201b811115620002d457600080fd5b820183602082011115620002e757600080fd5b803590602001918460018302840111600160201b831117156200030957600080fd5b50909250905062000989565b005b6200032162000ee2565b6040805160208082528351818301528351919283929083019185019080838360005b838110156200035d57818101518382015260200162000343565b50505050905090810190601f1680156200038b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b620003a362000f0f565b604080516001600160701b03948516815292909316602083015263ffffffff168183015290519081900360600190f35b6200040260048036036040811015620003eb57600080fd5b506001600160a01b03813516906020013562000f39565b604080519115158252519081900360200190f35b6200042062000f52565b604080516001600160a01b039092168252519081900360200190f35b6200044662000f61565b60408051918252519081900360200190f35b6200044662000f67565b62000402600480360360608110156200047a57600080fd5b506001600160a01b0381358116916020810135909116906040013562000f6d565b620004ca60048036036040811015620004b357600080fd5b506001600160a01b03813516906020013562001007565b6040805192835260208301919091528051918290030190f35b6200044660048036036080811015620004fb57600080fd5b810190602081018135600160201b8111156200051657600080fd5b8201836020820111156200052957600080fd5b803590602001918460208302840111600160201b831117156200054b57600080fd5b91935091508035906001600160a01b03602082013516906040013515156200112d565b620004ca600480360360408110156200058657600080fd5b506001600160a01b038135169060200135620013ed565b6200044662001412565b620005b162001436565b6040805160ff9092168252519081900360200190f35b620004ca60048036036040811015620005df57600080fd5b506001600160a01b0381351690602001356200143b565b6200044662001493565b62000315600480360360408110156200061857600080fd5b506001600160a01b038135811691602001351662001499565b6200044662001579565b620004466200157f565b62000446600480360360208110156200065d57600080fd5b50356001600160a01b031662001585565b62000446600480360360208110156200068657600080fd5b50356001600160a01b031662001a43565b6200044662001a55565b620004ca60048036036040811015620006b957600080fd5b506001600160a01b03813516906020013562001a5b565b6200044660048036036020811015620006e857600080fd5b50356001600160a01b031662001b30565b62000446600480360360208110156200071157600080fd5b50356001600160a01b031662001b42565b620004ca600480360360208110156200073a57600080fd5b50356001600160a01b031662001b97565b6200032162001f50565b6200042062001f6f565b620004ca600480360360408110156200077757600080fd5b506001600160a01b03813516906020013562001f7e565b6200040260048036036040811015620007a657600080fd5b506001600160a01b03813516906020013562001fbb565b620004ca60048036036040811015620007d557600080fd5b506001600160a01b03813516906020013562001fca565b6200044662001fe6565b62000315600480360360208110156200080e57600080fd5b50356001600160a01b031662001fec565b6200042062002168565b6200042062002177565b62000446600480360360808110156200084b57600080fd5b810190602081018135600160201b8111156200086657600080fd5b8201836020820111156200087957600080fd5b803590602001918460208302840111600160201b831117156200089b57600080fd5b91935091508035906001600160a01b036020820135169060400135151562002186565b62000315600480360360e0811015620008d657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c001356200247b565b62000446600480360360408110156200092a57600080fd5b506001600160a01b038135811691602001351662002682565b620004466200269f565b62000957620026a7565b604080516001600160e01b03909316835263ffffffff90911660208301528051918290030190f35b62000315620026c6565b600e54600114620009d4576040805162461bcd60e51b815260206004820152601060248201526f14d85ad954ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e5584151580620009e85750600084115b62000a255760405162461bcd60e51b815260040180806020018281038252602481526020018062003d966024913960400191505060405180910390fd5b60008062000a3262000f0f565b5091509150816001600160701b03168710801562000a585750806001600160701b031686105b62000aaa576040805162461bcd60e51b815260206004820181905260248201527f53616b65537761703a20494e53554646494349454e545f4c4951554944495459604482015290519081900360640190fd5b60065460075460009182916001600160a01b0391821691908116908916821480159062000ae95750806001600160a01b0316896001600160a01b031614155b62000b32576040805162461bcd60e51b815260206004820152601460248201527353616b65537761703a20494e56414c49445f544f60601b604482015290519081900360640190fd5b8a1562000b465762000b46828a8d62002830565b891562000b5a5762000b5a818a8c62002830565b861562000c0f57886001600160a01b0316638649b473338d8d8c8c6040518663ffffffff1660e01b815260040180866001600160a01b03168152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b15801562000bf557600080fd5b505af115801562000c0a573d6000803e3d6000fd5b505050505b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b15801562000c5657600080fd5b505afa15801562000c6b573d6000803e3d6000fd5b505050506040513d602081101562000c8257600080fd5b5051604080516370a0823160e01b815230600482015290519195506001600160a01b038316916370a0823191602480820192602092909190829003018186803b15801562000ccf57600080fd5b505afa15801562000ce4573d6000803e3d6000fd5b505050506040513d602081101562000cfb57600080fd5b5051925060009150506001600160701b0385168a9003831162000d2057600062000d2f565b89856001600160701b03160383035b9050600089856001600160701b031603831162000d4e57600062000d5d565b89856001600160701b03160383035b9050600082118062000d6f5750600081115b62000dac5760405162461bcd60e51b815260040180806020018281038252602381526020018062003e086023913960400191505060405180910390fd5b600062000dd462000dbf846003620029d2565b62000dcd876103e8620029d2565b9062002a38565b9050600062000de962000dbf846003620029d2565b905062000e12620f424062000e0b6001600160701b038b8116908b16620029d2565b90620029d2565b62000e1e8383620029d2565b101562000e60576040805162461bcd60e51b815260206004820152600b60248201526a53616b65537761703a204b60a81b604482015290519081900360640190fd5b505062000e6e868662002a89565b62000e7c8484888862002b8d565b60408051838152602081018390528082018d9052606081018c905290516001600160a01b038b169133917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a350506001600e55505050505050505050565b6040518060400160405280601181526020017029b0b5b2a9bbb0b8102628102a37b5b2b760791b81525081565b600a546001600160701b0380821692600160701b830490911691600160e01b900463ffffffff1690565b600062000f4833848462002d47565b5060015b92915050565b6006546001600160a01b031681565b60005481565b61012c81565b6001600160a01b03831660009081526002602090815260408083203384529091528120546000191462000fef576001600160a01b038416600090815260026020908152604080832033845290915290205462000fca908362002a38565b6001600160a01b03851660009081526002602090815260408083203384529091529020555b62000ffc84848462002da9565b5060015b9392505050565b60065460009081906001600160a01b031681806200102462000f0f565b5091509150600080846001600160a01b0316896001600160a01b0316146200104e57838362001051565b82845b6001600160701b031691506001600160701b0316915060006200107689848462002e5b565b90506000620010868b8b620013ed565b50905081985080821015620010ba576000620010a3828462002a38565b905060028104620010b5848262002eac565b9a5050505b600080620010c98d8d6200143b565b90925090506000620010dc858462002a38565b9050896001600160a01b03168e6001600160a01b0316146200111857600160701b620011098284620029d2565b816200111157fe5b046200111a565b805b9a50505050505050505050509250929050565b6000600e546001146200117a576040805162461bcd60e51b815260206004820152601060248201526f14d85ad954ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e5560028514620011ce576040805162461bcd60e51b81526020600482015260166024820152750a6c2d6caa6eec2e07440929cac82989288bea082a8960531b604482015290519081900360640190fd5b6006546001600160a01b03166000808080620011e962000f0f565b5091509150600080866001600160a01b03168d8d60008181106200120957fe5b905060200201356001600160a01b03166001600160a01b0316146200123057828462001233565b83835b6001600160701b031691506001600160701b03169150620012568b838362002e5b565b9550620012818d8d60018181106200126a57fe5b905060200201356001600160a01b03168c620013ed565b509450505050818310159050620012a8576000620012a0828462002a38565b600290049450505b60018515151415620013dc57600080620012e08b8b6001818110620012c957fe5b905060200201356001600160a01b03168a6200143b565b90925090506000620012f3858462002a38565b90506000866001600160a01b03168d8d60008181106200130f57fe5b905060200201356001600160a01b03166001600160a01b03161462001335578162001350565b600160701b620013468385620029d2565b816200134e57fe5b045b600854604080516340c10f1960e01b81526001600160a01b038e811660048301526024820185905291519394509116916340c10f19916044808201926020929091908290030181600087803b158015620013a957600080fd5b505af1158015620013be573d6000803e3d6000fd5b505050506040513d6020811015620013d557600080fd5b5050505050505b50506001600e555095945050505050565b600080620013fa62002efc565b90506200140984848362002fad565b91509250929050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b6000806000806200144b62000f0f565b5091509150620014708262001460836200304b565b6001600160e01b0316906200305d565b6001600160e01b031692506200148886868562002fad565b935050509250929050565b60035481565b6005546001600160a01b03163314620014ef576040805162461bcd60e51b815260206004820152601360248201527229b0b5b2a9bbb0b81d102327a92124a22222a760691b604482015290519081900360640190fd5b600680546001600160a01b038085166001600160a01b031992831617909255600780549284169290911691909117905560405160009062001530906200344c565b90815260405190819003602001906000f08015801562001554573d6000803e3d6000fd5b50600880546001600160a01b0319166001600160a01b03929092169190911790555050565b600b5481565b600c5481565b6000600e54600114620015d2576040805162461bcd60e51b815260206004820152601060248201526f14d85ad954ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e81905580620015e462000f0f565b50600654604080516370a0823160e01b815230600482015290519395509193506000926001600160a01b03909116916370a08231916024808301926020929190829003018186803b1580156200163957600080fd5b505afa1580156200164e573d6000803e3d6000fd5b505050506040513d60208110156200166557600080fd5b5051600754604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015620016b957600080fd5b505afa158015620016ce573d6000803e3d6000fd5b505050506040513d6020811015620016e557600080fd5b50519050600062001700836001600160701b03871662002a38565b9050600062001719836001600160701b03871662002a38565b9050600062001729878762003083565b60005490915080620019235760055460408051637cd07e4760e01b815290516000926001600160a01b031691637cd07e47916004808301926020929190829003018186803b1580156200177b57600080fd5b505afa15801562001790573d6000803e3d6000fd5b505050506040513d6020811015620017a757600080fd5b50519050336001600160a01b03821614156200189157806001600160a01b03166340dc0e376040518163ffffffff1660e01b815260040160206040518083038186803b158015620017f757600080fd5b505afa1580156200180c573d6000803e3d6000fd5b505050506040513d60208110156200182357600080fd5b5051995089158015906200183957506000198a14155b6200188b576040805162461bcd60e51b815260206004820152601f60248201527f53616b65537761703a204261642064657369726564206c697175696469747900604482015290519081900360640190fd5b6200191c565b6001600160a01b03811615620018ee576040805162461bcd60e51b815260206004820181905260248201527f53616b65537761703a204d757374206e6f742068617665206d69677261746f72604482015290519081900360640190fd5b6200190b6103e862000dcd620019058888620029d2565b620031d5565b99506200191c60006103e86200322e565b506200196e565b6200196b6001600160701b0389166200193d8684620029d2565b816200194557fe5b046001600160701b0389166200195c8685620029d2565b816200196457fe5b04620032bc565b98505b60008911620019af5760405162461bcd60e51b815260040180806020018281038252602781526020018062003de16027913960400191505060405180910390fd5b620019bb8a8a6200322e565b620019c986868a8a62002b8d565b8115620019f657600a54620019f2906001600160701b0380821691600160701b900416620029d2565b600d555b6040805185815260208101859052815133927f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f928290030190a250506001600e5550949695505050505050565b60016020526000908152604090205481565b600d5481565b60065460009081906001600160a01b0316818062001a7862000f0f565b5091509150600080846001600160a01b0316896001600160a01b03161462001aa257828462001aa5565b83835b6001600160701b031691506001600160701b03169150600062001aca898484620032d4565b9050600062001ada8b8b62001fca565b5090508198508082111562001b0e57600062001af7838362002a38565b90506002810462001b09848262002a38565b9a5050505b60008062001b1d8d8d62001f7e565b90925090506000620010dc838662002a38565b60046020526000908152604090205481565b60008062001b4f62002efc565b6006549091506001600160a01b0384811691161462001b8b578062001b79600160701b80620029d2565b8162001b8157fe5b0491508162001b90565b809150815b5050919050565b600080600e5460011462001be5576040805162461bcd60e51b815260206004820152601060248201526f14d85ad954ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e8190558062001bf762000f0f565b50600654600754604080516370a0823160e01b815230600482015290519496509294506001600160a01b039182169391169160009184916370a08231916024808301926020929190829003018186803b15801562001c5457600080fd5b505afa15801562001c69573d6000803e3d6000fd5b505050506040513d602081101562001c8057600080fd5b5051604080516370a0823160e01b815230600482015290519192506000916001600160a01b038516916370a08231916024808301926020929190829003018186803b15801562001ccf57600080fd5b505afa15801562001ce4573d6000803e3d6000fd5b505050506040513d602081101562001cfb57600080fd5b50519050600062001d0d878762003083565b306000908152600160205260408120549054919250908062001d308387620029d2565b8162001d3857fe5b049a508062001d488386620029d2565b8162001d5057fe5b04995060008b11801562001d64575060008a115b62001da15760405162461bcd60e51b815260040180806020018281038252602781526020018062003dba6027913960400191505060405180910390fd5b62001dad308362003324565b505062001dbc858b8b62002830565b62001dc9848b8a62002830565b604080516370a0823160e01b815230600482015290516001600160a01b038716916370a08231916024808301926020929190829003018186803b15801562001e1057600080fd5b505afa15801562001e25573d6000803e3d6000fd5b505050506040513d602081101562001e3c57600080fd5b5051604080516370a0823160e01b815230600482015290519194506001600160a01b038616916370a0823191602480820192602092909190829003018186803b15801562001e8957600080fd5b505afa15801562001e9e573d6000803e3d6000fd5b505050506040513d602081101562001eb557600080fd5b5051915062001ec78383898962002b8d565b801562001ef457600a5462001ef0906001600160701b0380821691600160701b900416620029d2565b600d555b604080518a8152602081018a905281516001600160a01b038d169233927fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496929081900390910190a3505050505050506001600e81905550915091565b604051806040016040528060038152602001620534c560ec1b81525081565b6008546001600160a01b031681565b60008060008062001f8e62000f0f565b509150915062001fa38262001460836200304b565b6001600160e01b0316925062001488868685620033ba565b600062000f4833848462002da9565b60008062001fd762002efc565b905062001409848483620033ba565b6103e881565b600e5460011462002037576040805162461bcd60e51b815260206004820152601060248201526f14d85ad954ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e55600654600754600a54604080516370a0823160e01b815230600482015290516001600160a01b039485169490931692620020e79285928792620020e1926001600160701b03169185916370a0823191602480820192602092909190829003018186803b158015620020ac57600080fd5b505afa158015620020c1573d6000803e3d6000fd5b505050506040513d6020811015620020d857600080fd5b50519062002a38565b62002830565b6200215e8184620020e1600a600e9054906101000a90046001600160701b03166001600160701b0316856001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015620020ac57600080fd5b50506001600e5550565b6005546001600160a01b031681565b6007546001600160a01b031681565b6000600e54600114620021d3576040805162461bcd60e51b815260206004820152601060248201526f14d85ad954ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e556002851462002227576040805162461bcd60e51b81526020600482015260166024820152750a6c2d6caa6eec2e07440929cac82989288bea082a8960531b604482015290519081900360640190fd5b6006546001600160a01b031660008080806200224262000f0f565b5091509150600080866001600160a01b03168d8d60008181106200226257fe5b905060200201356001600160a01b03166001600160a01b031614620022895782846200228c565b83835b6001600160701b031691506001600160701b03169150620022af8b8383620032d4565b9550859750620022dd8d8d6000818110620022c657fe5b905060200201356001600160a01b03168c62001fca565b50945060008d8d8281620022ed57fe5b905060200201356001600160a01b03166001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156200234a57600080fd5b505afa1580156200235f573d6000803e3d6000fd5b505050506040513d60208110156200237657600080fd5b50519050600062002388828562002a38565b90508c811015620023e0576040805162461bcd60e51b815260206004820152601860248201527f53616b65537761703a20496e76616c696420416d6f756e740000000000000000604482015290519081900360640190fd5b5050505050508082111562002414576000620023fd838362002a38565b9050600281046200240f848262002a38565b955050505b60018515151415620013dc576000806200244c8b8b60008181106200243557fe5b905060200201356001600160a01b03168a62001f7e565b909250905060006200245f838662002a38565b90506000866001600160a01b03168d8d60018181106200130f57fe5b42841015620024c5576040805162461bcd60e51b815260206004820152601160248201527014d85ad954ddd85c0e8811561412549151607a1b604482015290519081900360640190fd5b6003546001600160a01b0380891660008181526004602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e08501825280519083012061190160f01b6101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e280820193601f1981019281900390910190855afa158015620025e1573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590620026185750886001600160a01b0316816001600160a01b0316145b6200266a576040805162461bcd60e51b815260206004820152601b60248201527f53616b65537761703a20494e56414c49445f5349474e41545552450000000000604482015290519081900360640190fd5b6200267789898962002d47565b505050505050505050565b600260209081526000928352604080842090915290825290205481565b600160701b81565b6009546001600160e01b03811691600160e01b90910463ffffffff1690565b600e5460011462002711576040805162461bcd60e51b815260206004820152601060248201526f14d85ad954ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e55600654604080516370a0823160e01b8152306004820152905162002829926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156200276457600080fd5b505afa15801562002779573d6000803e3d6000fd5b505050506040513d60208110156200279057600080fd5b5051600754604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015620027de57600080fd5b505afa158015620027f3573d6000803e3d6000fd5b505050506040513d60208110156200280a57600080fd5b5051600a546001600160701b0380821691600160701b90041662002b8d565b6001600e55565b604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0385811660248301526044808301869052845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b1781529251815160009460609489169392918291908083835b60208310620028df5780518252601f199092019160209182019101620028be565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811462002943576040519150601f19603f3d011682016040523d82523d6000602084013e62002948565b606091505b5091509150818015620029795750805115806200297957508080602001905160208110156200297657600080fd5b50515b620029cb576040805162461bcd60e51b815260206004820152601960248201527f53616b65537761703a205452414e534645525f4641494c454400000000000000604482015290519081900360640190fd5b5050505050565b6000811580620029ef57505080820282828281620029ec57fe5b04145b62000f4c576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604482015290519081900360640190fd5b8082038281111562000f4c576040805162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b604482015290519081900360640190fd5b60008062002a96620026a7565b91506001600160e01b031691506000600160201b428162002ab357fe5b0690508063ffffffff168263ffffffff161015620029cb57600062002add8662001460876200304b565b6001600160e01b03169050600062002b0c61012c62002b064263ffffffff8089169062002a3816565b620032bc565b9050600062002b1e61012c8362002a38565b9050600061012c62002b4862002b358686620029d2565b62002b418a86620029d2565b9062002eac565b8162002b5057fe5b6009805463ffffffff8916600160e01b026001600160e01b039490930484166001600160e01b031990911617909216179055505050505050505050565b6001600160701b03841180159062002bac57506001600160701b038311155b62002bf3576040805162461bcd60e51b815260206004820152601260248201527153616b65537761703a204f564552464c4f5760701b604482015290519081900360640190fd5b600a5463ffffffff42811691600160e01b9004811682039081161580159062002c2457506001600160701b03841615155b801562002c3957506001600160701b03831615155b1562002c9c578063ffffffff1662002c568562001460866200304b565b600b80546001600160e01b03929092169290920201905563ffffffff811662002c848462001460876200304b565b600c80546001600160e01b0392909216929092020190555b600a80546dffffffffffffffffffffffffffff19166001600160701b03888116919091176dffffffffffffffffffffffffffff60701b1916600160701b8883168102919091176001600160e01b0316600160e01b63ffffffff871602179283905560408051848416815291909304909116602082015281517f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1929181900390910190a1505050505050565b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b03831660009081526001602052604090205462002dce908262002a38565b6001600160a01b03808516600090815260016020526040808220939093559084168152205462002dff908262002eac565b6001600160a01b0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008062002e716103e862000e0b8688620029d2565b9050600062002e886103e562000e0b868962002a38565b905062002ea2600182848162002e9a57fe5b049062002eac565b9695505050505050565b8082018281101562000f4c576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b604482015290519081900360640190fd5b600080600062002f0b620026a7565b91506001600160e01b0316915060008062002f2562000f0f565b5091509150600062002f3c8362001460846200304b565b6001600160e01b03169050600062002f6561012c62002b064263ffffffff808a169062002a3816565b9050600062002f7761012c8362002a38565b905061012c62002f9862002f8c8585620029d2565b62002b418a85620029d2565b8162002fa057fe5b0497505050505050505090565b6006546000906001600160a01b03858116911614156200300957600062002fdc8362000e0b866103e8620029d2565b9050600062002ff2600160701b6103e5620029d2565b905080828162002ffe57fe5b049250505062001000565b600062003022600160701b62000e0b866103e8620029d2565b9050600062003034846103e5620029d2565b90508082816200304057fe5b049695505050505050565b6001600160701b0316600160701b0290565b60006001600160701b0382166001600160e01b038416816200307b57fe5b049392505050565b600080600560009054906101000a90046001600160a01b03166001600160a01b031663017e7e586040518163ffffffff1660e01b815260040160206040518083038186803b158015620030d557600080fd5b505afa158015620030ea573d6000803e3d6000fd5b505050506040513d60208110156200310157600080fd5b5051600d546001600160a01b038216158015945091925090620031c0578015620031ba57600062003143620019056001600160701b03888116908816620029d2565b905060006200315283620031d5565b905080821115620031b7576000620031796200316f848462002a38565b60005490620029d2565b905060006200318f8362002b41866005620029d2565b905060008183816200319d57fe5b0490508015620031b357620031b387826200322e565b5050505b50505b620031cd565b8015620031cd576000600d555b505092915050565b600060038211156200321e575080600160028204015b8181101562003217578091506002818285816200320457fe5b0401816200320e57fe5b049050620031eb565b5062003229565b811562003229575060015b919050565b6000546200323d908262002eac565b60009081556001600160a01b03831681526001602052604090205462003264908262002eac565b6001600160a01b03831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000818310620032cd578162001000565b5090919050565b600080620032e5856103e5620029d2565b90506000620032f58285620029d2565b905060006200330c8362002b41886103e8620029d2565b90508082816200331857fe5b04979650505050505050565b6001600160a01b03821660009081526001602052604090205462003349908262002a38565b6001600160a01b0383166000908152600160205260408120919091555462003372908262002a38565b60009081556040805183815290516001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a35050565b600080620033cb846103e5620029d2565b6006549091506001600160a01b038681169116141562003420576000620033f38285620029d2565b9050600062003409600160701b6103e8620029d2565b90508082816200341557fe5b049350505062003444565b60006200343282600160701b620029d2565b905060006200330c856103e8620029d2565b509392505050565b61093b806200345b8339019056fe608060405234801561001057600080fd5b5060405161093b38038061093b8339818101604052602081101561003357600080fd5b5051600180546001600160a01b03191633908117909155610054908261005a565b5061015a565b610073816000546100fc60201b6104d11790919060201c565b60009081556001600160a01b0383168152600260209081526040909120546100a49183906104d16100fc821b17901c565b6001600160a01b03831660008181526002602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b80820182811015610154576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b92915050565b6107d2806101696000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c806340c10f191161007157806340c10f19146101d957806370a082311461020557806395d89b411461022b5780639dc29fac14610233578063a9059cbb1461025f578063dd62ed3e1461028b576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b66102b9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b0381351690602001356102f2565b604080519115158252519081900360200190f35b610173610309565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b0381358116916020810135909116906040013561030f565b6101c36103a3565b6040805160ff9092168252519081900360200190f35b610157600480360360408110156101ef57600080fd5b506001600160a01b0381351690602001356103a8565b6101736004803603602081101561021b57600080fd5b50356001600160a01b031661040f565b6100b6610421565b6101576004803603604081101561024957600080fd5b506001600160a01b038135169060200135610440565b6101576004803603604081101561027557600080fd5b506001600160a01b0381351690602001356104a7565b610173600480360360408110156102a157600080fd5b506001600160a01b03813581169160200135166104b4565b6040518060400160405280601781526020017f53616b655377617020536c69707061676520546f6b656e00000000000000000081525081565b60006102ff338484610520565b5060015b92915050565b60005481565b6001600160a01b03831660009081526003602090815260408083203384529091528120546000191461038e576001600160a01b03841660009081526003602090815260408083203384529091529020546103699083610582565b6001600160a01b03851660009081526003602090815260408083203384529091529020555b6103998484846105d2565b5060019392505050565b601281565b6001546000906001600160a01b03163314610405576040805162461bcd60e51b815260206004820152601860248201527729b634b83830b3b2aa37b5b2b71d102737ba1027bbb732b960411b604482015290519081900360640190fd5b6102ff8383610680565b60026020526000908152604090205481565b6040518060400160405280600381526020016214d4d560ea1b81525081565b6001546000906001600160a01b0316331461049d576040805162461bcd60e51b815260206004820152601860248201527729b634b83830b3b2aa37b5b2b71d102737ba1027bbb732b960411b604482015290519081900360640190fd5b6102ff838361070a565b60006102ff3384846105d2565b600360209081526000928352604080842090915290825290205481565b80820182811015610303576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b604482015290519081900360640190fd5b6001600160a01b03808416600081815260036020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b80820382811115610303576040805162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b604482015290519081900360640190fd5b6001600160a01b0383166000908152600260205260409020546105f59082610582565b6001600160a01b03808516600090815260026020526040808220939093559084168152205461062490826104d1565b6001600160a01b0380841660008181526002602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60005461068d90826104d1565b60009081556001600160a01b0383168152600260205260409020546106b290826104d1565b6001600160a01b03831660008181526002602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b03821660009081526002602052604090205461072d9082610582565b6001600160a01b038316600090815260026020526040812091909155546107549082610582565b60009081556040805183815290516001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a3505056fea264697066735822122062dff13b75b666b2f67257cb8c74f3fb445a6b0f015e65752fa701776a18374964736f6c634300060c003353616b65537761703a20494e53554646494349454e545f4f55545055545f414d4f554e5453616b65537761703a20494e53554646494349454e545f4c49515549444954595f4255524e454453616b65537761703a20494e53554646494349454e545f4c49515549444954595f4d494e54454453616b65537761703a20494e53554646494349454e545f494e5055545f414d4f554e54a26469706673582212207f79fc3c806a25402c97daa5f421ee5f5f52dd0e0a2a6b7fbb965c27f99f115264736f6c634300060c0033a26469706673582212203f1940ea9d1c56a0775c17114e93cbbf249ac1676fc16e80cd04e1b5e09805aa64736f6c634300060c0033000000000000000000000000142151d3b15b8961f2937cf7880bcd10c050800c
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80637cd07e47116100665780637cd07e471461012e578063a2e74af614610136578063c9c653961461015c578063e6a439051461018a578063f46901ed146101b85761009e565b8063017e7e58146100a3578063094b7415146100c75780631e3dd18b146100cf57806323cf3118146100ec578063574f2ba314610114575b600080fd5b6100ab6101de565b604080516001600160a01b039092168252519081900360200190f35b6100ab6101ed565b6100ab600480360360208110156100e557600080fd5b50356101fc565b6101126004803603602081101561010257600080fd5b50356001600160a01b0316610223565b005b61011c61029a565b60408051918252519081900360200190f35b6100ab6102a0565b6101126004803603602081101561014c57600080fd5b50356001600160a01b03166102af565b6100ab6004803603604081101561017257600080fd5b506001600160a01b0381358116916020013516610326565b6100ab600480360360408110156101a057600080fd5b506001600160a01b0381358116916020013516610649565b610112600480360360208110156101ce57600080fd5b50356001600160a01b031661066f565b6000546001600160a01b031681565b6001546001600160a01b031681565b6004818154811061020957fe5b6000918252602090912001546001600160a01b0316905081565b6001546001600160a01b03163314610278576040805162461bcd60e51b815260206004820152601360248201527229b0b5b2a9bbb0b81d102327a92124a22222a760691b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60045490565b6002546001600160a01b031681565b6001546001600160a01b03163314610304576040805162461bcd60e51b815260206004820152601360248201527229b0b5b2a9bbb0b81d102327a92124a22222a760691b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000816001600160a01b0316836001600160a01b0316141561038f576040805162461bcd60e51b815260206004820152601d60248201527f53616b65537761703a204944454e544943414c5f414444524553534553000000604482015290519081900360640190fd5b600080836001600160a01b0316856001600160a01b0316106103b25783856103b5565b84845b90925090506001600160a01b03821661040e576040805162461bcd60e51b815260206004820152601660248201527553616b65537761703a205a45524f5f4144445245535360501b604482015290519081900360640190fd5b6001600160a01b03828116600090815260036020908152604080832085851684529091529020541615610480576040805162461bcd60e51b815260206004820152601560248201527453616b65537761703a20504149525f45584953545360581b604482015290519081900360640190fd5b606060405180602001610492906106e6565b6020820181038252601f19601f8201166040525090506000838360405160200180836001600160a01b031660601b8152601401826001600160a01b031660601b815260140192505050604051602081830303815290604052805190602001209050808251602084016000f59450846001600160a01b031663485cc95585856040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050600060405180830381600087803b15801561055f57600080fd5b505af1158015610573573d6000803e3d6000fd5b505050506001600160a01b0384811660008181526003602081815260408084208987168086529083528185208054978d166001600160a01b031998891681179091559383528185208686528352818520805488168517905560048054600181018255958190527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b90950180549097168417909655925483519283529082015281517f0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9929181900390910190a35050505092915050565b60036020908152600092835260408084209091529082529020546001600160a01b031681565b6001546001600160a01b031633146106c4576040805162461bcd60e51b815260206004820152601360248201527229b0b5b2a9bbb0b81d102327a92124a22222a760691b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b613f6f806106f48339019056fe60806040526001600e5534801561001557600080fd5b50604080518082018252601181527029b0b5b2a9bbb0b8102628102a37b5b2b760791b6020918201528151808301835260018152603160f81b9082015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527ffee1862690319b49a3e30d62d993c6ee23ce6df945360ede41fcd8fd48c4e7a2818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c09091019092528151910120600355600580546001600160a01b03191633179055613e608061010f6000396000f3fe60806040523480156200001157600080fd5b5060043610620002805760003560e01c80637464fc3d1162000159578063ba9a7a5611620000c9578063d505accf1162000087578063d505accf14620008be578063dd62ed3e1462000912578063dd653d191462000943578063e25aa5fa146200094d578063fff6cae9146200097f5762000280565b8063ba9a7a5614620007ec578063bc25cf7714620007f6578063c45a0155146200081f578063d21220a71462000829578063d4b32b5014620008335762000280565b806395d89b41116200011757806395d89b41146200074b57806397026e5f1462000755578063a6cfbca4146200075f578063a9059cbb146200078e578063ad77a9b814620007bd5762000280565b80637464fc3d146200069757806374b0866414620006a15780637ecebe0014620006d0578063855e89f514620006f957806389afcb4414620007225762000280565b80632fdc37b311620001f5578063485cc95511620001b3578063485cc95514620006005780635909c0d514620006315780635a3d5493146200063b5780636a627842146200064557806370a08231146200066e5762000280565b80632fdc37b3146200056e57806330adf81f146200059d578063313ce56714620005a757806334d6664a14620005c75780633644e51514620005f65762000280565b806318160ddd116200024357806318160ddd146200043c5780631e9d4904146200045857806323b872dd1462000462578063268d67db146200049b5780632fb62a4714620004e35762000280565b8063022c0d9f146200028557806306fdde0314620003175780630902f1ac1462000399578063095ea7b314620003d35780630dfe16811462000416575b600080fd5b62000315600480360360808110156200029d57600080fd5b8135916020810135916001600160a01b036040830135169190810190608081016060820135600160201b811115620002d457600080fd5b820183602082011115620002e757600080fd5b803590602001918460018302840111600160201b831117156200030957600080fd5b50909250905062000989565b005b6200032162000ee2565b6040805160208082528351818301528351919283929083019185019080838360005b838110156200035d57818101518382015260200162000343565b50505050905090810190601f1680156200038b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b620003a362000f0f565b604080516001600160701b03948516815292909316602083015263ffffffff168183015290519081900360600190f35b6200040260048036036040811015620003eb57600080fd5b506001600160a01b03813516906020013562000f39565b604080519115158252519081900360200190f35b6200042062000f52565b604080516001600160a01b039092168252519081900360200190f35b6200044662000f61565b60408051918252519081900360200190f35b6200044662000f67565b62000402600480360360608110156200047a57600080fd5b506001600160a01b0381358116916020810135909116906040013562000f6d565b620004ca60048036036040811015620004b357600080fd5b506001600160a01b03813516906020013562001007565b6040805192835260208301919091528051918290030190f35b6200044660048036036080811015620004fb57600080fd5b810190602081018135600160201b8111156200051657600080fd5b8201836020820111156200052957600080fd5b803590602001918460208302840111600160201b831117156200054b57600080fd5b91935091508035906001600160a01b03602082013516906040013515156200112d565b620004ca600480360360408110156200058657600080fd5b506001600160a01b038135169060200135620013ed565b6200044662001412565b620005b162001436565b6040805160ff9092168252519081900360200190f35b620004ca60048036036040811015620005df57600080fd5b506001600160a01b0381351690602001356200143b565b6200044662001493565b62000315600480360360408110156200061857600080fd5b506001600160a01b038135811691602001351662001499565b6200044662001579565b620004466200157f565b62000446600480360360208110156200065d57600080fd5b50356001600160a01b031662001585565b62000446600480360360208110156200068657600080fd5b50356001600160a01b031662001a43565b6200044662001a55565b620004ca60048036036040811015620006b957600080fd5b506001600160a01b03813516906020013562001a5b565b6200044660048036036020811015620006e857600080fd5b50356001600160a01b031662001b30565b62000446600480360360208110156200071157600080fd5b50356001600160a01b031662001b42565b620004ca600480360360208110156200073a57600080fd5b50356001600160a01b031662001b97565b6200032162001f50565b6200042062001f6f565b620004ca600480360360408110156200077757600080fd5b506001600160a01b03813516906020013562001f7e565b6200040260048036036040811015620007a657600080fd5b506001600160a01b03813516906020013562001fbb565b620004ca60048036036040811015620007d557600080fd5b506001600160a01b03813516906020013562001fca565b6200044662001fe6565b62000315600480360360208110156200080e57600080fd5b50356001600160a01b031662001fec565b6200042062002168565b6200042062002177565b62000446600480360360808110156200084b57600080fd5b810190602081018135600160201b8111156200086657600080fd5b8201836020820111156200087957600080fd5b803590602001918460208302840111600160201b831117156200089b57600080fd5b91935091508035906001600160a01b036020820135169060400135151562002186565b62000315600480360360e0811015620008d657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c001356200247b565b62000446600480360360408110156200092a57600080fd5b506001600160a01b038135811691602001351662002682565b620004466200269f565b62000957620026a7565b604080516001600160e01b03909316835263ffffffff90911660208301528051918290030190f35b62000315620026c6565b600e54600114620009d4576040805162461bcd60e51b815260206004820152601060248201526f14d85ad954ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e5584151580620009e85750600084115b62000a255760405162461bcd60e51b815260040180806020018281038252602481526020018062003d966024913960400191505060405180910390fd5b60008062000a3262000f0f565b5091509150816001600160701b03168710801562000a585750806001600160701b031686105b62000aaa576040805162461bcd60e51b815260206004820181905260248201527f53616b65537761703a20494e53554646494349454e545f4c4951554944495459604482015290519081900360640190fd5b60065460075460009182916001600160a01b0391821691908116908916821480159062000ae95750806001600160a01b0316896001600160a01b031614155b62000b32576040805162461bcd60e51b815260206004820152601460248201527353616b65537761703a20494e56414c49445f544f60601b604482015290519081900360640190fd5b8a1562000b465762000b46828a8d62002830565b891562000b5a5762000b5a818a8c62002830565b861562000c0f57886001600160a01b0316638649b473338d8d8c8c6040518663ffffffff1660e01b815260040180866001600160a01b03168152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b15801562000bf557600080fd5b505af115801562000c0a573d6000803e3d6000fd5b505050505b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b15801562000c5657600080fd5b505afa15801562000c6b573d6000803e3d6000fd5b505050506040513d602081101562000c8257600080fd5b5051604080516370a0823160e01b815230600482015290519195506001600160a01b038316916370a0823191602480820192602092909190829003018186803b15801562000ccf57600080fd5b505afa15801562000ce4573d6000803e3d6000fd5b505050506040513d602081101562000cfb57600080fd5b5051925060009150506001600160701b0385168a9003831162000d2057600062000d2f565b89856001600160701b03160383035b9050600089856001600160701b031603831162000d4e57600062000d5d565b89856001600160701b03160383035b9050600082118062000d6f5750600081115b62000dac5760405162461bcd60e51b815260040180806020018281038252602381526020018062003e086023913960400191505060405180910390fd5b600062000dd462000dbf846003620029d2565b62000dcd876103e8620029d2565b9062002a38565b9050600062000de962000dbf846003620029d2565b905062000e12620f424062000e0b6001600160701b038b8116908b16620029d2565b90620029d2565b62000e1e8383620029d2565b101562000e60576040805162461bcd60e51b815260206004820152600b60248201526a53616b65537761703a204b60a81b604482015290519081900360640190fd5b505062000e6e868662002a89565b62000e7c8484888862002b8d565b60408051838152602081018390528082018d9052606081018c905290516001600160a01b038b169133917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a350506001600e55505050505050505050565b6040518060400160405280601181526020017029b0b5b2a9bbb0b8102628102a37b5b2b760791b81525081565b600a546001600160701b0380821692600160701b830490911691600160e01b900463ffffffff1690565b600062000f4833848462002d47565b5060015b92915050565b6006546001600160a01b031681565b60005481565b61012c81565b6001600160a01b03831660009081526002602090815260408083203384529091528120546000191462000fef576001600160a01b038416600090815260026020908152604080832033845290915290205462000fca908362002a38565b6001600160a01b03851660009081526002602090815260408083203384529091529020555b62000ffc84848462002da9565b5060015b9392505050565b60065460009081906001600160a01b031681806200102462000f0f565b5091509150600080846001600160a01b0316896001600160a01b0316146200104e57838362001051565b82845b6001600160701b031691506001600160701b0316915060006200107689848462002e5b565b90506000620010868b8b620013ed565b50905081985080821015620010ba576000620010a3828462002a38565b905060028104620010b5848262002eac565b9a5050505b600080620010c98d8d6200143b565b90925090506000620010dc858462002a38565b9050896001600160a01b03168e6001600160a01b0316146200111857600160701b620011098284620029d2565b816200111157fe5b046200111a565b805b9a50505050505050505050509250929050565b6000600e546001146200117a576040805162461bcd60e51b815260206004820152601060248201526f14d85ad954ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e5560028514620011ce576040805162461bcd60e51b81526020600482015260166024820152750a6c2d6caa6eec2e07440929cac82989288bea082a8960531b604482015290519081900360640190fd5b6006546001600160a01b03166000808080620011e962000f0f565b5091509150600080866001600160a01b03168d8d60008181106200120957fe5b905060200201356001600160a01b03166001600160a01b0316146200123057828462001233565b83835b6001600160701b031691506001600160701b03169150620012568b838362002e5b565b9550620012818d8d60018181106200126a57fe5b905060200201356001600160a01b03168c620013ed565b509450505050818310159050620012a8576000620012a0828462002a38565b600290049450505b60018515151415620013dc57600080620012e08b8b6001818110620012c957fe5b905060200201356001600160a01b03168a6200143b565b90925090506000620012f3858462002a38565b90506000866001600160a01b03168d8d60008181106200130f57fe5b905060200201356001600160a01b03166001600160a01b03161462001335578162001350565b600160701b620013468385620029d2565b816200134e57fe5b045b600854604080516340c10f1960e01b81526001600160a01b038e811660048301526024820185905291519394509116916340c10f19916044808201926020929091908290030181600087803b158015620013a957600080fd5b505af1158015620013be573d6000803e3d6000fd5b505050506040513d6020811015620013d557600080fd5b5050505050505b50506001600e555095945050505050565b600080620013fa62002efc565b90506200140984848362002fad565b91509250929050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b6000806000806200144b62000f0f565b5091509150620014708262001460836200304b565b6001600160e01b0316906200305d565b6001600160e01b031692506200148886868562002fad565b935050509250929050565b60035481565b6005546001600160a01b03163314620014ef576040805162461bcd60e51b815260206004820152601360248201527229b0b5b2a9bbb0b81d102327a92124a22222a760691b604482015290519081900360640190fd5b600680546001600160a01b038085166001600160a01b031992831617909255600780549284169290911691909117905560405160009062001530906200344c565b90815260405190819003602001906000f08015801562001554573d6000803e3d6000fd5b50600880546001600160a01b0319166001600160a01b03929092169190911790555050565b600b5481565b600c5481565b6000600e54600114620015d2576040805162461bcd60e51b815260206004820152601060248201526f14d85ad954ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e81905580620015e462000f0f565b50600654604080516370a0823160e01b815230600482015290519395509193506000926001600160a01b03909116916370a08231916024808301926020929190829003018186803b1580156200163957600080fd5b505afa1580156200164e573d6000803e3d6000fd5b505050506040513d60208110156200166557600080fd5b5051600754604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015620016b957600080fd5b505afa158015620016ce573d6000803e3d6000fd5b505050506040513d6020811015620016e557600080fd5b50519050600062001700836001600160701b03871662002a38565b9050600062001719836001600160701b03871662002a38565b9050600062001729878762003083565b60005490915080620019235760055460408051637cd07e4760e01b815290516000926001600160a01b031691637cd07e47916004808301926020929190829003018186803b1580156200177b57600080fd5b505afa15801562001790573d6000803e3d6000fd5b505050506040513d6020811015620017a757600080fd5b50519050336001600160a01b03821614156200189157806001600160a01b03166340dc0e376040518163ffffffff1660e01b815260040160206040518083038186803b158015620017f757600080fd5b505afa1580156200180c573d6000803e3d6000fd5b505050506040513d60208110156200182357600080fd5b5051995089158015906200183957506000198a14155b6200188b576040805162461bcd60e51b815260206004820152601f60248201527f53616b65537761703a204261642064657369726564206c697175696469747900604482015290519081900360640190fd5b6200191c565b6001600160a01b03811615620018ee576040805162461bcd60e51b815260206004820181905260248201527f53616b65537761703a204d757374206e6f742068617665206d69677261746f72604482015290519081900360640190fd5b6200190b6103e862000dcd620019058888620029d2565b620031d5565b99506200191c60006103e86200322e565b506200196e565b6200196b6001600160701b0389166200193d8684620029d2565b816200194557fe5b046001600160701b0389166200195c8685620029d2565b816200196457fe5b04620032bc565b98505b60008911620019af5760405162461bcd60e51b815260040180806020018281038252602781526020018062003de16027913960400191505060405180910390fd5b620019bb8a8a6200322e565b620019c986868a8a62002b8d565b8115620019f657600a54620019f2906001600160701b0380821691600160701b900416620029d2565b600d555b6040805185815260208101859052815133927f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f928290030190a250506001600e5550949695505050505050565b60016020526000908152604090205481565b600d5481565b60065460009081906001600160a01b0316818062001a7862000f0f565b5091509150600080846001600160a01b0316896001600160a01b03161462001aa257828462001aa5565b83835b6001600160701b031691506001600160701b03169150600062001aca898484620032d4565b9050600062001ada8b8b62001fca565b5090508198508082111562001b0e57600062001af7838362002a38565b90506002810462001b09848262002a38565b9a5050505b60008062001b1d8d8d62001f7e565b90925090506000620010dc838662002a38565b60046020526000908152604090205481565b60008062001b4f62002efc565b6006549091506001600160a01b0384811691161462001b8b578062001b79600160701b80620029d2565b8162001b8157fe5b0491508162001b90565b809150815b5050919050565b600080600e5460011462001be5576040805162461bcd60e51b815260206004820152601060248201526f14d85ad954ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e8190558062001bf762000f0f565b50600654600754604080516370a0823160e01b815230600482015290519496509294506001600160a01b039182169391169160009184916370a08231916024808301926020929190829003018186803b15801562001c5457600080fd5b505afa15801562001c69573d6000803e3d6000fd5b505050506040513d602081101562001c8057600080fd5b5051604080516370a0823160e01b815230600482015290519192506000916001600160a01b038516916370a08231916024808301926020929190829003018186803b15801562001ccf57600080fd5b505afa15801562001ce4573d6000803e3d6000fd5b505050506040513d602081101562001cfb57600080fd5b50519050600062001d0d878762003083565b306000908152600160205260408120549054919250908062001d308387620029d2565b8162001d3857fe5b049a508062001d488386620029d2565b8162001d5057fe5b04995060008b11801562001d64575060008a115b62001da15760405162461bcd60e51b815260040180806020018281038252602781526020018062003dba6027913960400191505060405180910390fd5b62001dad308362003324565b505062001dbc858b8b62002830565b62001dc9848b8a62002830565b604080516370a0823160e01b815230600482015290516001600160a01b038716916370a08231916024808301926020929190829003018186803b15801562001e1057600080fd5b505afa15801562001e25573d6000803e3d6000fd5b505050506040513d602081101562001e3c57600080fd5b5051604080516370a0823160e01b815230600482015290519194506001600160a01b038616916370a0823191602480820192602092909190829003018186803b15801562001e8957600080fd5b505afa15801562001e9e573d6000803e3d6000fd5b505050506040513d602081101562001eb557600080fd5b5051915062001ec78383898962002b8d565b801562001ef457600a5462001ef0906001600160701b0380821691600160701b900416620029d2565b600d555b604080518a8152602081018a905281516001600160a01b038d169233927fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496929081900390910190a3505050505050506001600e81905550915091565b604051806040016040528060038152602001620534c560ec1b81525081565b6008546001600160a01b031681565b60008060008062001f8e62000f0f565b509150915062001fa38262001460836200304b565b6001600160e01b0316925062001488868685620033ba565b600062000f4833848462002da9565b60008062001fd762002efc565b905062001409848483620033ba565b6103e881565b600e5460011462002037576040805162461bcd60e51b815260206004820152601060248201526f14d85ad954ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e55600654600754600a54604080516370a0823160e01b815230600482015290516001600160a01b039485169490931692620020e79285928792620020e1926001600160701b03169185916370a0823191602480820192602092909190829003018186803b158015620020ac57600080fd5b505afa158015620020c1573d6000803e3d6000fd5b505050506040513d6020811015620020d857600080fd5b50519062002a38565b62002830565b6200215e8184620020e1600a600e9054906101000a90046001600160701b03166001600160701b0316856001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015620020ac57600080fd5b50506001600e5550565b6005546001600160a01b031681565b6007546001600160a01b031681565b6000600e54600114620021d3576040805162461bcd60e51b815260206004820152601060248201526f14d85ad954ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e556002851462002227576040805162461bcd60e51b81526020600482015260166024820152750a6c2d6caa6eec2e07440929cac82989288bea082a8960531b604482015290519081900360640190fd5b6006546001600160a01b031660008080806200224262000f0f565b5091509150600080866001600160a01b03168d8d60008181106200226257fe5b905060200201356001600160a01b03166001600160a01b031614620022895782846200228c565b83835b6001600160701b031691506001600160701b03169150620022af8b8383620032d4565b9550859750620022dd8d8d6000818110620022c657fe5b905060200201356001600160a01b03168c62001fca565b50945060008d8d8281620022ed57fe5b905060200201356001600160a01b03166001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156200234a57600080fd5b505afa1580156200235f573d6000803e3d6000fd5b505050506040513d60208110156200237657600080fd5b50519050600062002388828562002a38565b90508c811015620023e0576040805162461bcd60e51b815260206004820152601860248201527f53616b65537761703a20496e76616c696420416d6f756e740000000000000000604482015290519081900360640190fd5b5050505050508082111562002414576000620023fd838362002a38565b9050600281046200240f848262002a38565b955050505b60018515151415620013dc576000806200244c8b8b60008181106200243557fe5b905060200201356001600160a01b03168a62001f7e565b909250905060006200245f838662002a38565b90506000866001600160a01b03168d8d60018181106200130f57fe5b42841015620024c5576040805162461bcd60e51b815260206004820152601160248201527014d85ad954ddd85c0e8811561412549151607a1b604482015290519081900360640190fd5b6003546001600160a01b0380891660008181526004602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e08501825280519083012061190160f01b6101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e280820193601f1981019281900390910190855afa158015620025e1573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590620026185750886001600160a01b0316816001600160a01b0316145b6200266a576040805162461bcd60e51b815260206004820152601b60248201527f53616b65537761703a20494e56414c49445f5349474e41545552450000000000604482015290519081900360640190fd5b6200267789898962002d47565b505050505050505050565b600260209081526000928352604080842090915290825290205481565b600160701b81565b6009546001600160e01b03811691600160e01b90910463ffffffff1690565b600e5460011462002711576040805162461bcd60e51b815260206004820152601060248201526f14d85ad954ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e55600654604080516370a0823160e01b8152306004820152905162002829926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156200276457600080fd5b505afa15801562002779573d6000803e3d6000fd5b505050506040513d60208110156200279057600080fd5b5051600754604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015620027de57600080fd5b505afa158015620027f3573d6000803e3d6000fd5b505050506040513d60208110156200280a57600080fd5b5051600a546001600160701b0380821691600160701b90041662002b8d565b6001600e55565b604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0385811660248301526044808301869052845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b1781529251815160009460609489169392918291908083835b60208310620028df5780518252601f199092019160209182019101620028be565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811462002943576040519150601f19603f3d011682016040523d82523d6000602084013e62002948565b606091505b5091509150818015620029795750805115806200297957508080602001905160208110156200297657600080fd5b50515b620029cb576040805162461bcd60e51b815260206004820152601960248201527f53616b65537761703a205452414e534645525f4641494c454400000000000000604482015290519081900360640190fd5b5050505050565b6000811580620029ef57505080820282828281620029ec57fe5b04145b62000f4c576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604482015290519081900360640190fd5b8082038281111562000f4c576040805162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b604482015290519081900360640190fd5b60008062002a96620026a7565b91506001600160e01b031691506000600160201b428162002ab357fe5b0690508063ffffffff168263ffffffff161015620029cb57600062002add8662001460876200304b565b6001600160e01b03169050600062002b0c61012c62002b064263ffffffff8089169062002a3816565b620032bc565b9050600062002b1e61012c8362002a38565b9050600061012c62002b4862002b358686620029d2565b62002b418a86620029d2565b9062002eac565b8162002b5057fe5b6009805463ffffffff8916600160e01b026001600160e01b039490930484166001600160e01b031990911617909216179055505050505050505050565b6001600160701b03841180159062002bac57506001600160701b038311155b62002bf3576040805162461bcd60e51b815260206004820152601260248201527153616b65537761703a204f564552464c4f5760701b604482015290519081900360640190fd5b600a5463ffffffff42811691600160e01b9004811682039081161580159062002c2457506001600160701b03841615155b801562002c3957506001600160701b03831615155b1562002c9c578063ffffffff1662002c568562001460866200304b565b600b80546001600160e01b03929092169290920201905563ffffffff811662002c848462001460876200304b565b600c80546001600160e01b0392909216929092020190555b600a80546dffffffffffffffffffffffffffff19166001600160701b03888116919091176dffffffffffffffffffffffffffff60701b1916600160701b8883168102919091176001600160e01b0316600160e01b63ffffffff871602179283905560408051848416815291909304909116602082015281517f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1929181900390910190a1505050505050565b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b03831660009081526001602052604090205462002dce908262002a38565b6001600160a01b03808516600090815260016020526040808220939093559084168152205462002dff908262002eac565b6001600160a01b0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008062002e716103e862000e0b8688620029d2565b9050600062002e886103e562000e0b868962002a38565b905062002ea2600182848162002e9a57fe5b049062002eac565b9695505050505050565b8082018281101562000f4c576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b604482015290519081900360640190fd5b600080600062002f0b620026a7565b91506001600160e01b0316915060008062002f2562000f0f565b5091509150600062002f3c8362001460846200304b565b6001600160e01b03169050600062002f6561012c62002b064263ffffffff808a169062002a3816565b9050600062002f7761012c8362002a38565b905061012c62002f9862002f8c8585620029d2565b62002b418a85620029d2565b8162002fa057fe5b0497505050505050505090565b6006546000906001600160a01b03858116911614156200300957600062002fdc8362000e0b866103e8620029d2565b9050600062002ff2600160701b6103e5620029d2565b905080828162002ffe57fe5b049250505062001000565b600062003022600160701b62000e0b866103e8620029d2565b9050600062003034846103e5620029d2565b90508082816200304057fe5b049695505050505050565b6001600160701b0316600160701b0290565b60006001600160701b0382166001600160e01b038416816200307b57fe5b049392505050565b600080600560009054906101000a90046001600160a01b03166001600160a01b031663017e7e586040518163ffffffff1660e01b815260040160206040518083038186803b158015620030d557600080fd5b505afa158015620030ea573d6000803e3d6000fd5b505050506040513d60208110156200310157600080fd5b5051600d546001600160a01b038216158015945091925090620031c0578015620031ba57600062003143620019056001600160701b03888116908816620029d2565b905060006200315283620031d5565b905080821115620031b7576000620031796200316f848462002a38565b60005490620029d2565b905060006200318f8362002b41866005620029d2565b905060008183816200319d57fe5b0490508015620031b357620031b387826200322e565b5050505b50505b620031cd565b8015620031cd576000600d555b505092915050565b600060038211156200321e575080600160028204015b8181101562003217578091506002818285816200320457fe5b0401816200320e57fe5b049050620031eb565b5062003229565b811562003229575060015b919050565b6000546200323d908262002eac565b60009081556001600160a01b03831681526001602052604090205462003264908262002eac565b6001600160a01b03831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000818310620032cd578162001000565b5090919050565b600080620032e5856103e5620029d2565b90506000620032f58285620029d2565b905060006200330c8362002b41886103e8620029d2565b90508082816200331857fe5b04979650505050505050565b6001600160a01b03821660009081526001602052604090205462003349908262002a38565b6001600160a01b0383166000908152600160205260408120919091555462003372908262002a38565b60009081556040805183815290516001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a35050565b600080620033cb846103e5620029d2565b6006549091506001600160a01b038681169116141562003420576000620033f38285620029d2565b9050600062003409600160701b6103e8620029d2565b90508082816200341557fe5b049350505062003444565b60006200343282600160701b620029d2565b905060006200330c856103e8620029d2565b509392505050565b61093b806200345b8339019056fe608060405234801561001057600080fd5b5060405161093b38038061093b8339818101604052602081101561003357600080fd5b5051600180546001600160a01b03191633908117909155610054908261005a565b5061015a565b610073816000546100fc60201b6104d11790919060201c565b60009081556001600160a01b0383168152600260209081526040909120546100a49183906104d16100fc821b17901c565b6001600160a01b03831660008181526002602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b80820182811015610154576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b92915050565b6107d2806101696000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c806340c10f191161007157806340c10f19146101d957806370a082311461020557806395d89b411461022b5780639dc29fac14610233578063a9059cbb1461025f578063dd62ed3e1461028b576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b66102b9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b0381351690602001356102f2565b604080519115158252519081900360200190f35b610173610309565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b0381358116916020810135909116906040013561030f565b6101c36103a3565b6040805160ff9092168252519081900360200190f35b610157600480360360408110156101ef57600080fd5b506001600160a01b0381351690602001356103a8565b6101736004803603602081101561021b57600080fd5b50356001600160a01b031661040f565b6100b6610421565b6101576004803603604081101561024957600080fd5b506001600160a01b038135169060200135610440565b6101576004803603604081101561027557600080fd5b506001600160a01b0381351690602001356104a7565b610173600480360360408110156102a157600080fd5b506001600160a01b03813581169160200135166104b4565b6040518060400160405280601781526020017f53616b655377617020536c69707061676520546f6b656e00000000000000000081525081565b60006102ff338484610520565b5060015b92915050565b60005481565b6001600160a01b03831660009081526003602090815260408083203384529091528120546000191461038e576001600160a01b03841660009081526003602090815260408083203384529091529020546103699083610582565b6001600160a01b03851660009081526003602090815260408083203384529091529020555b6103998484846105d2565b5060019392505050565b601281565b6001546000906001600160a01b03163314610405576040805162461bcd60e51b815260206004820152601860248201527729b634b83830b3b2aa37b5b2b71d102737ba1027bbb732b960411b604482015290519081900360640190fd5b6102ff8383610680565b60026020526000908152604090205481565b6040518060400160405280600381526020016214d4d560ea1b81525081565b6001546000906001600160a01b0316331461049d576040805162461bcd60e51b815260206004820152601860248201527729b634b83830b3b2aa37b5b2b71d102737ba1027bbb732b960411b604482015290519081900360640190fd5b6102ff838361070a565b60006102ff3384846105d2565b600360209081526000928352604080842090915290825290205481565b80820182811015610303576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b604482015290519081900360640190fd5b6001600160a01b03808416600081815260036020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b80820382811115610303576040805162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b604482015290519081900360640190fd5b6001600160a01b0383166000908152600260205260409020546105f59082610582565b6001600160a01b03808516600090815260026020526040808220939093559084168152205461062490826104d1565b6001600160a01b0380841660008181526002602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60005461068d90826104d1565b60009081556001600160a01b0383168152600260205260409020546106b290826104d1565b6001600160a01b03831660008181526002602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b03821660009081526002602052604090205461072d9082610582565b6001600160a01b038316600090815260026020526040812091909155546107549082610582565b60009081556040805183815290516001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a3505056fea264697066735822122062dff13b75b666b2f67257cb8c74f3fb445a6b0f015e65752fa701776a18374964736f6c634300060c003353616b65537761703a20494e53554646494349454e545f4f55545055545f414d4f554e5453616b65537761703a20494e53554646494349454e545f4c49515549444954595f4255524e454453616b65537761703a20494e53554646494349454e545f4c49515549444954595f4d494e54454453616b65537761703a20494e53554646494349454e545f494e5055545f414d4f554e54a26469706673582212207f79fc3c806a25402c97daa5f421ee5f5f52dd0e0a2a6b7fbb965c27f99f115264736f6c634300060c0033a26469706673582212203f1940ea9d1c56a0775c17114e93cbbf249ac1676fc16e80cd04e1b5e09805aa64736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000142151D3b15b8961F2937Cf7880Bcd10c050800C
-----Decoded View---------------
Arg [0] : _feeToSetter (address): 0x142151D3b15b8961F2937Cf7880Bcd10c050800C
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000142151D3b15b8961F2937Cf7880Bcd10c050800C
Deployed Bytecode Sourcemap
34316:1980:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34348:20;;;:::i;:::-;;;;-1:-1:-1;;;;;34348:20:0;;;;;;;;;;;;;;34375:26;;;:::i;34509:25::-;;;;;;;;;;;;;;;;-1:-1:-1;34509:25:0;;:::i;36137:156::-;;;;;;;;;;;;;;;;-1:-1:-1;36137:156:0;-1:-1:-1;;;;;36137:156:0;;:::i;:::-;;34734:99;;;:::i;:::-;;;;;;;;;;;;;;;;34408:23;;;:::i;35961:168::-;;;;;;;;;;;;;;;;-1:-1:-1;35961:168:0;-1:-1:-1;;;;;35961:168:0;;:::i;34841:960::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;34841:960:0;;;;;;;;;;:::i;34440:62::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;34440:62:0;;;;;;;;;;:::i;35809:144::-;;;;;;;;;;;;;;;;-1:-1:-1;35809:144:0;-1:-1:-1;;;;;35809:144:0;;:::i;34348:20::-;;;-1:-1:-1;;;;;34348:20:0;;:::o;34375:26::-;;;-1:-1:-1;;;;;34375:26:0;;:::o;34509:25::-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;34509:25:0;;-1:-1:-1;34509:25:0;:::o;36137:156::-;36219:11;;-1:-1:-1;;;;;36219:11:0;36205:10;:25;36197:57;;;;;-1:-1:-1;;;36197:57:0;;;;;;;;;;;;-1:-1:-1;;;36197:57:0;;;;;;;;;;;;;;;36265:8;:20;;-1:-1:-1;;;;;;36265:20:0;-1:-1:-1;;;;;36265:20:0;;;;;;;;;;36137:156::o;34734:99::-;34810:8;:15;34734:99;:::o;34408:23::-;;;-1:-1:-1;;;;;34408:23:0;;:::o;35961:168::-;36049:11;;-1:-1:-1;;;;;36049:11:0;36035:10;:25;36027:57;;;;;-1:-1:-1;;;36027:57:0;;;;;;;;;;;;-1:-1:-1;;;36027:57:0;;;;;;;;;;;;;;;36095:11;:26;;-1:-1:-1;;;;;;36095:26:0;-1:-1:-1;;;;;36095:26:0;;;;;;;;;;35961:168::o;34841:960::-;34911:12;34954:6;-1:-1:-1;;;;;34944:16:0;:6;-1:-1:-1;;;;;34944:16:0;;;34936:58;;;;;-1:-1:-1;;;34936:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;35006:14;35022;35049:6;-1:-1:-1;;;;;35040:15:0;:6;-1:-1:-1;;;;;35040:15:0;;:53;;35078:6;35086;35040:53;;;35059:6;35067;35040:53;35005:88;;-1:-1:-1;35005:88:0;-1:-1:-1;;;;;;35112:20:0;;35104:55;;;;;-1:-1:-1;;;35104:55:0;;;;;;;;;;;;-1:-1:-1;;;35104:55:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;35178:15:0;;;35213:1;35178:15;;;:7;:15;;;;;;;;:23;;;;;;;;;;;;:37;35170:71;;;;;-1:-1:-1;;;35170:71:0;;;;;;;;;;;;-1:-1:-1;;;35170:71:0;;;;;;;;;;;;;;;35282:21;35306:31;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;35282:55;;35348:12;35390:6;35398;35373:32;;;;;;-1:-1:-1;;;;;35373:32:0;;;;;;;;-1:-1:-1;;;;;35373:32:0;;;;;;;;;;;;;;;;;;;;;;;35363:43;;;;;;35348:58;;35496:4;35485:8;35479:15;35474:2;35464:8;35460:17;35457:1;35449:52;35441:60;;35536:4;-1:-1:-1;;;;;35522:30:0;;35553:6;35561;35522:46;;;;;;;;;;;;;-1:-1:-1;;;;;35522:46:0;;;;;;-1:-1:-1;;;;;35522:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;35581:15:0;;;;;;;:7;:15;;;;;;;;:23;;;;;;;;;;;;:30;;;;;-1:-1:-1;;;;;;35581:30:0;;;;;;;;35622:15;;;;;;:23;;;;;;;;:30;;;;;;;;35708:8;:19;;-1:-1:-1;35708:19:0;;;;;;;;;;;;;;;;;;;;;;35777:15;;35743:50;;;;;;;;;;;;;;;;;;;;;;34841:960;;;;;;;;:::o;34440:62::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;34440:62:0;;:::o;35809:144::-;35885:11;;-1:-1:-1;;;;;35885:11:0;35871:10;:25;35863:57;;;;;-1:-1:-1;;;35863:57:0;;;;;;;;;;;;-1:-1:-1;;;35863:57:0;;;;;;;;;;;;;;;35931:5;:14;;-1:-1:-1;;;;;;35931:14:0;-1:-1:-1;;;;;35931:14:0;;;;;;;;;;35809:144::o;-1:-1:-1:-;;;;;;;;:::o
Swarm Source
ipfs://3f1940ea9d1c56a0775c17114e93cbbf249ac1676fc16e80cd04e1b5e09805aa
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.