Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Write Contract
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- NineInchFactory
- Optimization enabled
- true
- Compiler version
- v0.8.19+commit.7dd6d404
- Optimization runs
- 999999
- EVM Version
- default
- Verified at
- 2023-10-26T23:03:12.521461Z
Constructor Arguments
0x0000000000000000000000006d5fc6ac6e753f68d4f64cc7b605d925cf642d5e
Arg [0] (address) : 0x6d5fc6ac6e753f68d4f64cc7b605d925cf642d5e
contracts/swap/NineInchFactory.sol
// SPDX-License-Identifier: GPLv3
pragma solidity 0.8.19;
import "./interfaces/INineInchFactory.sol";
import "./NineInchPair.sol";
contract NineInchFactory is INineInchFactory {
bytes32 public constant INIT_CODE_PAIR_HASH =
keccak256(abi.encodePacked(type(NineInchPair).creationCode));
address public feeTo;
address public feeToSetter;
mapping(address => mapping(address => address)) public getPair;
address[] public allPairs;
constructor(address _feeToSetter) {
require(_feeToSetter != address(0), "NineInchFactory: ZERO_ADDRESS");
feeToSetter = _feeToSetter;
}
function allPairsLength() external view returns (uint) {
return allPairs.length;
}
function createPair(
address tokenA,
address tokenB
) external returns (address pair) {
require(
tokenA != address(0) && tokenB != address(0),
"NineInchFactory: ZERO_ADDRESS"
);
require(tokenA != tokenB, "NineInchFactory: IDENTICAL_ADDRESSES");
(address token0, address token1) = tokenA < tokenB
? (tokenA, tokenB)
: (tokenB, tokenA);
require(token0 != address(0), "NineInchFactory: ZERO_ADDRESS");
require(
getPair[token0][token1] == address(0),
"NineInchFactory: PAIR_EXISTS"
); // single check is sufficient
bytes memory bytecode = type(NineInchPair).creationCode;
bytes32 salt = keccak256(abi.encodePacked(token0, token1));
assembly {
pair := create2(0, add(bytecode, 32), mload(bytecode), salt)
}
INineInchPair(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(_feeTo != address(0), "NineInchFactory: ZERO_ADDRESS");
require(msg.sender == feeToSetter, "NineInchFactory: FORBIDDEN");
feeTo = _feeTo;
}
function setFeeToSetter(address _feeToSetter) external {
require(_feeToSetter != address(0), "NineInchFactory: ZERO_ADDRESS");
require(msg.sender == feeToSetter, "NineInchFactory: FORBIDDEN");
feeToSetter = _feeToSetter;
}
}
@openzeppelin/contracts/token/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
contracts/libraries/Math.sol
// SPDX-License-Identifier: GPLv3
pragma solidity 0.8.19;
// 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;
}
}
}
contracts/libraries/SafeMath.sol
// SPDX-License-Identifier: GPLv3
pragma solidity 0.8.19;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
z = x < y ? x : y;
}
// babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
function sqrt(uint256 y) internal pure returns (uint256 z) {
if (y > 3) {
z = y;
uint256 x = y / 2 + 1;
while (x < z) {
z = x;
x = (y / x + x) / 2;
}
} else if (y != 0) {
z = 1;
}
}
}
contracts/libraries/UQ112x112.sol
// SPDX-License-Identifier: GPLv3
pragma solidity 0.8.19;
// 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);
}
}
contracts/swap/NineInchERC20.sol
// SPDX-License-Identifier: GPLv3
pragma solidity 0.8.19;
import "./interfaces/INineInchERC20.sol";
import "../libraries/SafeMath.sol";
contract NineInchERC20 is INineInchERC20 {
using SafeMath for uint;
string public constant override name = unicode"🍆 9 LP";
string public constant override symbol = unicode"🍆 9 LP";
uint8 public constant override decimals = 18;
uint public totalSupply;
mapping(address => uint) public override balanceOf;
mapping(address => mapping(address => uint)) public override allowance;
bytes32 public override DOMAIN_SEPARATOR;
// keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
bytes32 public constant override PERMIT_TYPEHASH =
0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
mapping(address => uint) public override nonces;
constructor() {
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 override returns (bool) {
if (allowance[from][msg.sender] != type(uint).max) {
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, "NineInch: 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,
"NineInch: INVALID_SIGNATURE"
);
_approve(owner, spender, value);
}
}
contracts/swap/NineInchPair.sol
// SPDX-License-Identifier: GPLv3
pragma solidity 0.8.19;
import "./interfaces/INineInchFactory.sol";
import "./interfaces/INineInchCallee.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./interfaces/INineInchERC20.sol";
import "./NineInchERC20.sol";
import "./interfaces/INineInchPair.sol";
import "../libraries/SafeMath.sol";
import "../libraries/UQ112x112.sol";
import "../libraries/Math.sol";
contract NineInchPair is NineInchERC20 {
using SafeMath for uint;
using UQ112x112 for uint224;
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);
uint public constant MINIMUM_LIQUIDITY = 10 ** 3;
bytes4 private constant SELECTOR =
bytes4(keccak256(bytes("transfer(address,uint256)")));
address public factory;
address public token0;
address public token1;
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
uint public price0CumulativeLast;
uint public price1CumulativeLast;
uint public kLast; // reserve0 * reserve1, as of immediately after the most recent liquidity event
uint private unlocked = 1;
modifier lock() {
require(unlocked == 1, "NineInch: LOCKED");
unlocked = 0;
_;
unlocked = 1;
}
function getReserves()
public
view
returns (
uint112 _reserve0,
uint112 _reserve1,
uint32 _blockTimestampLast
)
{
_reserve0 = reserve0;
_reserve1 = reserve1;
_blockTimestampLast = blockTimestampLast;
}
function _safeTransfer(address token, address to, uint value) private {
(bool success, bytes memory data) = token.call(
abi.encodeWithSelector(SELECTOR, to, value)
);
require(
success && (data.length == 0 || abi.decode(data, (bool))),
"NineInch: TRANSFER_FAILED"
);
}
constructor() {
factory = msg.sender;
}
// called once by the factory at time of deployment
function initialize(address _token0, address _token1) external {
require(
_token0 != address(0) && _token1 != address(0),
"NineInch: ZERO_ADDRESS"
);
require(_token0 != _token1, "NineInch: IDENTICAL_ADDRESSES");
require(msg.sender == factory, "NineInch: FORBIDDEN"); // sufficient check
token0 = _token0;
token1 = _token1;
}
// update reserves and, on the first call per block, price accumulators
function _update(
uint balance0,
uint balance1,
uint112 _reserve0,
uint112 _reserve1
) private {
require(
balance0 <= type(uint112).max && balance1 <= type(uint112).max,
"NineInch: 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 +=
uint(UQ112x112.encode(_reserve1).uqdiv(_reserve0)) *
timeElapsed;
price1CumulativeLast +=
uint(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 = INineInchFactory(factory).feeTo();
feeOn = feeTo != address(0);
uint _kLast = kLast; // gas savings
if (feeOn) {
if (_kLast != 0) {
uint rootK = Math.sqrt(uint(_reserve0).mul(_reserve1));
uint rootKLast = Math.sqrt(_kLast);
if (rootK > rootKLast) {
uint numerator = totalSupply.mul(rootK.sub(rootKLast));
uint denominator = rootK.mul(7).add(rootKLast);
uint 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 (uint 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) {
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, "NineInch: 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 (uint amount0, uint amount1) {
(uint112 _reserve0, uint112 _reserve1, ) = getReserves(); // gas savings
address _token0 = token0; // gas savings
address _token1 = token1; // gas savings
uint balance0 = IERC20(_token0).balanceOf(address(this));
uint balance1 = IERC20(_token1).balanceOf(address(this));
uint liquidity = balanceOf[address(this)];
bool feeOn = _mintFee(_reserve0, _reserve1);
uint _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,
"NineInch: 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 = uint(reserve0).mul(reserve1); // reserve0 and reserve1 are up-to-date
emit Burn(msg.sender, amount0, amount1, to);
}
// this low-level function should be called from a contract which performs important safety checks
function swap(
uint amount0Out,
uint amount1Out,
address to,
bytes calldata data
) external lock {
require(
amount0Out > 0 || amount1Out > 0,
"NineInch: INSUFFICIENT_OUTPUT_AMOUNT"
);
(uint112 _reserve0, uint112 _reserve1, ) = getReserves(); // gas savings
require(
amount0Out < _reserve0 && amount1Out < _reserve1,
"NineInch: INSUFFICIENT_LIQUIDITY"
);
uint balance0;
uint balance1;
{
// scope for _token{0,1}, avoids stack too deep errors
address _token0 = token0;
address _token1 = token1;
require(to != _token0 && to != _token1, "NineInch: 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)
INineInchCallee(to).nineInchCallee(
msg.sender,
amount0Out,
amount1Out,
data
);
balance0 = IERC20(_token0).balanceOf(address(this));
balance1 = IERC20(_token1).balanceOf(address(this));
}
uint amount0In = balance0 > _reserve0 - amount0Out
? balance0 - (_reserve0 - amount0Out)
: 0;
uint amount1In = balance1 > _reserve1 - amount1Out
? balance1 - (_reserve1 - amount1Out)
: 0;
require(
amount0In > 0 || amount1In > 0,
"NineInch: INSUFFICIENT_INPUT_AMOUNT"
);
{
// scope for reserve{0,1}Adjusted, avoids stack too deep errors
uint balance0Adjusted = balance0.mul(10000).sub(amount0In.mul(29));
uint balance1Adjusted = balance1.mul(10000).sub(amount1In.mul(29));
require(
balance0Adjusted.mul(balance1Adjusted) >=
uint(_reserve0).mul(_reserve1).mul(10000 ** 2),
"NineInch: K"
);
}
_update(balance0, balance1, _reserve0, _reserve1);
emit Swap(msg.sender, amount0In, amount1In, amount0Out, amount1Out, to);
}
// force balances to match reserves
function skim(address to) external lock {
address _token0 = 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
);
}
}
contracts/swap/interfaces/INineInchCallee.sol
// SPDX-License-Identifier: GPLv3
pragma solidity 0.8.19;
interface INineInchCallee {
function nineInchCallee(
address sender,
uint amount0,
uint amount1,
bytes calldata data
) external;
}
contracts/swap/interfaces/INineInchERC20.sol
// SPDX-License-Identifier: GPLv3
pragma solidity 0.8.19;
interface INineInchERC20 {
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;
}
contracts/swap/interfaces/INineInchFactory.sol
// SPDX-License-Identifier: GPLv3
pragma solidity 0.8.19;
interface INineInchFactory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint
);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(
address tokenA,
address tokenB
) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(
address tokenA,
address tokenB
) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
contracts/swap/interfaces/INineInchPair.sol
// SPDX-License-Identifier: GPLv3
pragma solidity 0.8.19;
interface INineInchPair {
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 view returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(
address owner,
address spender,
uint value,
uint deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(
address indexed sender,
uint amount0,
uint amount1,
address indexed to
);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves()
external
view
returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(
uint amount0Out,
uint amount1Out,
address to,
bytes calldata data
) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
Compiler Settings
{"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers"]}},"optimizer":{"runs":999999,"enabled":true},"libraries":{}}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_feeToSetter","internalType":"address"}]},{"type":"event","name":"PairCreated","inputs":[{"type":"address","name":"token0","internalType":"address","indexed":true},{"type":"address","name":"token1","internalType":"address","indexed":true},{"type":"address","name":"pair","internalType":"address","indexed":false},{"type":"uint256","name":"","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"INIT_CODE_PAIR_HASH","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"allPairs","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allPairsLength","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"address","name":"pair","internalType":"address"}],"name":"createPair","inputs":[{"type":"address","name":"tokenA","internalType":"address"},{"type":"address","name":"tokenB","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"feeTo","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"feeToSetter","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getPair","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setFeeTo","inputs":[{"type":"address","name":"_feeTo","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setFeeToSetter","inputs":[{"type":"address","name":"_feeToSetter","internalType":"address"}]}]
Contract Creation Code
0x608060405234801561001057600080fd5b50604051613b1a380380613b1a83398101604081905261002f916100ae565b6001600160a01b0381166100895760405162461bcd60e51b815260206004820152601d60248201527f4e696e65496e6368466163746f72793a205a45524f5f41444452455353000000604482015260640160405180910390fd5b600180546001600160a01b0319166001600160a01b03929092169190911790556100de565b6000602082840312156100c057600080fd5b81516001600160a01b03811681146100d757600080fd5b9392505050565b613a2d806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80635855a25a11610076578063c9c653961161005b578063c9c6539614610154578063e6a4390514610167578063f46901ed146101a857600080fd5b80635855a25a14610137578063a2e74af61461013f57600080fd5b8063017e7e58146100a8578063094b7415146100f25780631e3dd18b14610112578063574f2ba314610125575b600080fd5b6000546100c89073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6001546100c89073ffffffffffffffffffffffffffffffffffffffff1681565b6100c86101203660046109d8565b6101bb565b6003545b6040519081526020016100e9565b6101296101f2565b61015261014d366004610a1a565b61025a565b005b6100c8610162366004610a3c565b6103a4565b6100c8610175366004610a3c565b600260209081526000928352604080842090915290825290205473ffffffffffffffffffffffffffffffffffffffff1681565b6101526101b6366004610a1a565b610886565b600381815481106101cb57600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b604051610201602082016109cb565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f9091011660408190526102419190602001610a6f565b6040516020818303038152906040528051906020012081565b73ffffffffffffffffffffffffffffffffffffffff81166102dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e696e65496e6368466163746f72793a205a45524f5f4144445245535300000060448201526064015b60405180910390fd5b60015473ffffffffffffffffffffffffffffffffffffffff16331461035d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4e696e65496e6368466163746f72793a20464f5242494444454e00000000000060448201526064016102d3565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600073ffffffffffffffffffffffffffffffffffffffff8316158015906103e0575073ffffffffffffffffffffffffffffffffffffffff821615155b610446576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e696e65496e6368466163746f72793a205a45524f5f4144445245535300000060448201526064016102d3565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610500576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4e696e65496e6368466163746f72793a204944454e544943414c5f414444524560448201527f535345530000000000000000000000000000000000000000000000000000000060648201526084016102d3565b6000808373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161061053d578385610540565b84845b909250905073ffffffffffffffffffffffffffffffffffffffff82166105c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e696e65496e6368466163746f72793a205a45524f5f4144445245535300000060448201526064016102d3565b73ffffffffffffffffffffffffffffffffffffffff82811660009081526002602090815260408083208585168452909152902054161561065e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4e696e65496e6368466163746f72793a20504149525f4558495354530000000060448201526064016102d3565b600060405180602001610670906109cb565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f9091011660408190527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086811b8216602084015285901b166034820152909150600090604801604051602081830303815290604052805190602001209050808251602084016000f56040517f485cc95500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015285811660248301529196509086169063485cc95590604401600060405180830381600087803b15801561077957600080fd5b505af115801561078d573d6000803e3d6000fd5b5050505073ffffffffffffffffffffffffffffffffffffffff84811660008181526002602081815260408084208987168086529083528185208054978d167fffffffffffffffffffffffff000000000000000000000000000000000000000098891681179091559383528185208686528352818520805488168517905560038054600181018255958190527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9095018054909716841790965592548351928352908201527f0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9910160405180910390a35050505092915050565b73ffffffffffffffffffffffffffffffffffffffff8116610903576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e696e65496e6368466163746f72793a205a45524f5f4144445245535300000060448201526064016102d3565b60015473ffffffffffffffffffffffffffffffffffffffff163314610984576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4e696e65496e6368466163746f72793a20464f5242494444454e00000000000060448201526064016102d3565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b612f5980610a9f83390190565b6000602082840312156109ea57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610a1557600080fd5b919050565b600060208284031215610a2c57600080fd5b610a35826109f1565b9392505050565b60008060408385031215610a4f57600080fd5b610a58836109f1565b9150610a66602084016109f1565b90509250929050565b6000825160005b81811015610a905760208186018101518583015201610a76565b50600092019182525091905056fe60806040526001600c5534801561001557600080fd5b5060408051808201825260098152680f09f8d862039204c560bc1b6020918201528151808301835260018152603160f81b9082015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527f89fb6ce5eb6c9a089d1a86b78297fb7182803773ecc9a9a0e0265b000a18560f818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c09091019092528151910120600355600580546001600160a01b03191633179055612e52806101076000396000f3fe608060405234801561001057600080fd5b50600436106101b95760003560e01c80636a627842116100f9578063ba9a7a5611610097578063d21220a711610071578063d21220a71461045f578063d505accf1461047f578063dd62ed3e14610492578063fff6cae9146104bd57600080fd5b8063ba9a7a5614610423578063bc25cf771461042c578063c45a01551461043f57600080fd5b80637ecebe00116100d35780637ecebe00146103c857806389afcb44146103e857806395d89b41146101d3578063a9059cbb1461041057600080fd5b80636a6278421461038c57806370a082311461039f5780637464fc3d146103bf57600080fd5b806323b872dd116101665780633644e515116101405780633644e5151461035e578063485cc955146103675780635909c0d51461037a5780635a3d54931461038357600080fd5b806323b872dd1461030a57806330adf81f1461031d578063313ce5671461034457600080fd5b8063095ea7b311610197578063095ea7b31461028b5780630dfe1681146102ae57806318160ddd146102f357600080fd5b8063022c0d9f146101be57806306fdde03146101d35780630902f1ac14610225575b600080fd5b6101d16101cc36600461294a565b6104c5565b005b61020f6040518060400160405280600981526020017ff09f8d862039204c50000000000000000000000000000000000000000000000081525081565b60405161021c9190612a04565b60405180910390f35b600854604080516dffffffffffffffffffffffffffff80841682526e01000000000000000000000000000084041660208201527c010000000000000000000000000000000000000000000000000000000090920463ffffffff169082015260600161021c565b61029e610299366004612a55565b610bfc565b604051901515815260200161021c565b6006546102ce9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161021c565b6102fc60005481565b60405190815260200161021c565b61029e610318366004612a81565b610c13565b6102fc7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b61034c601281565b60405160ff909116815260200161021c565b6102fc60035481565b6101d1610375366004612ac2565b610cec565b6102fc60095481565b6102fc600a5481565b6102fc61039a366004612afb565b610ef5565b6102fc6103ad366004612afb565b60016020526000908152604090205481565b6102fc600b5481565b6102fc6103d6366004612afb565b60046020526000908152604090205481565b6103fb6103f6366004612afb565b6112ce565b6040805192835260208301919091520161021c565b61029e61041e366004612a55565b611786565b6102fc6103e881565b6101d161043a366004612afb565b611793565b6005546102ce9073ffffffffffffffffffffffffffffffffffffffff1681565b6007546102ce9073ffffffffffffffffffffffffffffffffffffffff1681565b6101d161048d366004612b18565b611956565b6102fc6104a0366004612ac2565b600260209081526000928352604080842090915290825290205481565b6101d1611c41565b600c54600114610536576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e696e65496e63683a204c4f434b45440000000000000000000000000000000060448201526064015b60405180910390fd5b6000600c55841515806105495750600084115b6105d4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4e696e65496e63683a20494e53554646494349454e545f4f55545055545f414d60448201527f4f554e5400000000000000000000000000000000000000000000000000000000606482015260840161052d565b6000806106306008546dffffffffffffffffffffffffffff808216926e01000000000000000000000000000083049091169163ffffffff7c01000000000000000000000000000000000000000000000000000000009091041690565b5091509150816dffffffffffffffffffffffffffff16871080156106635750806dffffffffffffffffffffffffffff1686105b6106c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4e696e65496e63683a20494e53554646494349454e545f4c4951554944495459604482015260640161052d565b600654600754600091829173ffffffffffffffffffffffffffffffffffffffff91821691908116908916821480159061072e57508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614155b610794576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e696e65496e63683a20494e56414c49445f544f000000000000000000000000604482015260640161052d565b8a156107a5576107a5828a8d611e0d565b89156107b6576107b6818a8c611e0d565b8615610849576040517fc18c82cc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a169063c18c82cc906108169033908f908f908e908e90600401612b8f565b600060405180830381600087803b15801561083057600080fd5b505af1158015610844573d6000803e3d6000fd5b505050505b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa1580156108b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d79190612c07565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290945073ffffffffffffffffffffffffffffffffffffffff8216906370a0823190602401602060405180830381865afa158015610944573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109689190612c07565b92505050600089856dffffffffffffffffffffffffffff1661098a9190612c4f565b83116109975760006109bb565b6109b18a6dffffffffffffffffffffffffffff8716612c4f565b6109bb9084612c4f565b905060006109d98a6dffffffffffffffffffffffffffff8716612c4f565b83116109e6576000610a0a565b610a008a6dffffffffffffffffffffffffffff8716612c4f565b610a0a9084612c4f565b90506000821180610a1b5750600081115b610aa7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4e696e65496e63683a20494e53554646494349454e545f494e5055545f414d4f60448201527f554e540000000000000000000000000000000000000000000000000000000000606482015260840161052d565b6000610ac9610ab784601d611fad565b610ac387612710611fad565b9061206c565b90506000610adb610ab784601d611fad565b9050610b086305f5e100610b026dffffffffffffffffffffffffffff8b8116908b16611fad565b90611fad565b610b128383611fad565b1015610b7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f4e696e65496e63683a204b000000000000000000000000000000000000000000604482015260640161052d565b5050610b88848488886120ae565b60408051838152602081018390529081018c9052606081018b905273ffffffffffffffffffffffffffffffffffffffff8a169033907fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229060800160405180910390a350506001600c55505050505050505050565b6000610c0933848461238a565b5060015b92915050565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14610cd75773ffffffffffffffffffffffffffffffffffffffff84166000908152600260209081526040808320338452909152902054610ca5908361206c565b73ffffffffffffffffffffffffffffffffffffffff851660009081526002602090815260408083203384529091529020555b610ce28484846123f9565b5060019392505050565b73ffffffffffffffffffffffffffffffffffffffff821615801590610d26575073ffffffffffffffffffffffffffffffffffffffff811615155b610d8c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4e696e65496e63683a205a45524f5f4144445245535300000000000000000000604482015260640161052d565b8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610e21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e696e65496e63683a204944454e544943414c5f414444524553534553000000604482015260640161052d565b60055473ffffffffffffffffffffffffffffffffffffffff163314610ea2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4e696e65496e63683a20464f5242494444454e00000000000000000000000000604482015260640161052d565b6006805473ffffffffffffffffffffffffffffffffffffffff9384167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560078054929093169116179055565b6000600c54600114610f63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e696e65496e63683a204c4f434b454400000000000000000000000000000000604482015260640161052d565b6000600c819055600854600654604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290516dffffffffffffffffffffffffffff808516956e01000000000000000000000000000090950416939273ffffffffffffffffffffffffffffffffffffffff16916370a082319160248083019260209291908290030181865afa158015611009573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102d9190612c07565b6007546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015291925060009173ffffffffffffffffffffffffffffffffffffffff909116906370a0823190602401602060405180830381865afa1580156110a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c59190612c07565b905060006110e3836dffffffffffffffffffffffffffff871661206c565b90506000611101836dffffffffffffffffffffffffffff871661206c565b9050600061110f87876124c6565b60008054919250819003611149576111356103e8610ac36111308787611fad565b612631565b985061114460006103e86126a1565b61119e565b61119b6dffffffffffffffffffffffffffff89166111678684611fad565b6111719190612c91565b6dffffffffffffffffffffffffffff891661118c8685611fad565b6111969190612c91565b61274a565b98505b6000891161122e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4e696e65496e63683a20494e53554646494349454e545f4c495155494449545960448201527f5f4d494e54454400000000000000000000000000000000000000000000000000606482015260840161052d565b6112388a8a6126a1565b61124486868a8a6120ae565b81156112805760085461127c906dffffffffffffffffffffffffffff808216916e010000000000000000000000000000900416611fad565b600b555b604080518581526020810185905233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a250506001600c5550949695505050505050565b600080600c5460011461133d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e696e65496e63683a204c4f434b454400000000000000000000000000000000604482015260640161052d565b6000600c819055600854600654600754604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290516dffffffffffffffffffffffffffff808616966e010000000000000000000000000000909604169473ffffffffffffffffffffffffffffffffffffffff94851694909316929184916370a08231916024808201926020929091908290030181865afa1580156113ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114139190612c07565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915060009073ffffffffffffffffffffffffffffffffffffffff8416906370a0823190602401602060405180830381865afa158015611483573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a79190612c07565b306000908152600160205260408120549192506114c488886124c6565b600054909150806114d58487611fad565b6114df9190612c91565b9a50806114ec8486611fad565b6114f69190612c91565b995060008b118015611508575060008a115b611594576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4e696e65496e63683a20494e53554646494349454e545f4c495155494449545960448201527f5f4255524e454400000000000000000000000000000000000000000000000000606482015260840161052d565b61159e3084612760565b6115a9878d8d611e0d565b6115b4868d8c611e0d565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8816906370a0823190602401602060405180830381865afa15801561161e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116429190612c07565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290955073ffffffffffffffffffffffffffffffffffffffff8716906370a0823190602401602060405180830381865afa1580156116af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d39190612c07565b93506116e185858b8b6120ae565b811561171d57600854611719906dffffffffffffffffffffffffffff808216916e010000000000000000000000000000900416611fad565b600b555b604080518c8152602081018c905273ffffffffffffffffffffffffffffffffffffffff8e169133917fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496910160405180910390a35050505050505050506001600c81905550915091565b6000610c093384846123f9565b600c546001146117ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e696e65496e63683a204c4f434b454400000000000000000000000000000000604482015260640161052d565b6000600c556006546007546008546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff93841693909216916118c791849186916118c2916dffffffffffffffffffffffffffff9091169084906370a08231906024015b602060405180830381865afa15801561189e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac39190612c07565b611e0d565b6008546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015261194c91839186916118c2916e0100000000000000000000000000009091046dffffffffffffffffffffffffffff169073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190602401611881565b50506001600c5550565b428410156119c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4e696e65496e63683a2045585049524544000000000000000000000000000000604482015260640161052d565b60035473ffffffffffffffffffffffffffffffffffffffff8816600090815260046020526040812080549192917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918b918b918b919087611a2083612ca5565b9091555060408051602081019690965273ffffffffffffffffffffffffffffffffffffffff94851690860152929091166060840152608083015260a082015260c0810187905260e00160405160208183030381529060405280519060200120604051602001611ac19291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015611b4a573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811615801590611bc557508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611c2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4e696e65496e63683a20494e56414c49445f5349474e41545552450000000000604482015260640161052d565b611c3689898961238a565b505050505050505050565b600c54600114611cad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e696e65496e63683a204c4f434b454400000000000000000000000000000000604482015260640161052d565b6000600c556006546040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152611e069173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015611d22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d469190612c07565b6007546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190602401602060405180830381865afa158015611db4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd89190612c07565b6008546dffffffffffffffffffffffffffff808216916e0100000000000000000000000000009004166120ae565b6001600c55565b604080518082018252601981527f7472616e7366657228616464726573732c75696e743235362900000000000000602091820152815173ffffffffffffffffffffffffffffffffffffffff85811660248301526044808301869052845180840390910181526064909201845291810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905291516000928392871691611ed49190612cdd565b6000604051808303816000865af19150503d8060008114611f11576040519150601f19603f3d011682016040523d82523d6000602084013e611f16565b606091505b5091509150818015611f40575080511580611f40575080806020019051810190611f409190612cf9565b611fa6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e696e65496e63683a205452414e534645525f4641494c454400000000000000604482015260640161052d565b5050505050565b600082600003611fbf57506000610c0d565b6000611fcb8385612d1b565b905082611fd88583612c91565b14612065576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60448201527f7700000000000000000000000000000000000000000000000000000000000000606482015260840161052d565b9392505050565b600061206583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612811565b6dffffffffffffffffffffffffffff84118015906120da57506dffffffffffffffffffffffffffff8311155b612140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4e696e65496e63683a204f564552464c4f570000000000000000000000000000604482015260640161052d565b600061215164010000000042612d32565b60085490915060009061218a907c0100000000000000000000000000000000000000000000000000000000900463ffffffff1683612d46565b905060008163ffffffff161180156121b157506dffffffffffffffffffffffffffff841615155b80156121cc57506dffffffffffffffffffffffffffff831615155b1561229a578063ffffffff16612209856121e586612865565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690612890565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166122319190612d1b565b600960008282546122429190612d6a565b909155505063ffffffff811661225b846121e587612865565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166122839190612d1b565b600a60008282546122949190612d6a565b90915550505b6008805463ffffffff84167c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff6dffffffffffffffffffffffffffff8981166e0100000000000000000000000000009081027fffffffff000000000000000000000000000000000000000000000000000000009095168c83161794909417918216831794859055604080519382169282169290921783529290930490911660208201527f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1910160405180910390a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260016020526040902054612429908261206c565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260016020526040808220939093559084168152205461246590826128ac565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906123ec9085815260200190565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663017e7e586040518163ffffffff1660e01b8152600401602060405180830381865afa158015612536573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061255a9190612d7d565b600b5473ffffffffffffffffffffffffffffffffffffffff821615801594509192509061261d5780156126185760006125a96111306dffffffffffffffffffffffffffff888116908816611fad565b905060006125b683612631565b9050808211156126155760006125d86125cf848461206c565b60005490611fad565b905060006125f1836125eb866007611fad565b906128ac565b905060006125ff8284612c91565b905080156126115761261187826126a1565b5050505b50505b612629565b8015612629576000600b555b505092915050565b60006003821115612692575080600061264b600283612c91565b612656906001612d6a565b90505b8181101561268c579050806002816126718186612c91565b61267b9190612d6a565b6126859190612c91565b9050612659565b50919050565b811561269c575060015b919050565b6000546126ae90826128ac565b600090815573ffffffffffffffffffffffffffffffffffffffff83168152600160205260409020546126e090826128ac565b73ffffffffffffffffffffffffffffffffffffffff83166000818152600160205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061273e9085815260200190565b60405180910390a35050565b60008183106127595781612065565b5090919050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054612790908261206c565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260016020526040812091909155546127c4908261206c565b600090815560405182815273ffffffffffffffffffffffffffffffffffffffff8416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200161273e565b6000818484111561284f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161052d9190612a04565b50600061285c8486612c4f565b95945050505050565b6000610c0d6e0100000000000000000000000000006dffffffffffffffffffffffffffff8416612d9a565b60006120656dffffffffffffffffffffffffffff831684612de1565b6000806128b98385612d6a565b905083811015612065576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161052d565b73ffffffffffffffffffffffffffffffffffffffff8116811461294757600080fd5b50565b60008060008060006080868803121561296257600080fd5b8535945060208601359350604086013561297b81612925565b9250606086013567ffffffffffffffff8082111561299857600080fd5b818801915088601f8301126129ac57600080fd5b8135818111156129bb57600080fd5b8960208285010111156129cd57600080fd5b9699959850939650602001949392505050565b60005b838110156129fb5781810151838201526020016129e3565b50506000910152565b6020815260008251806020840152612a238160408501602087016129e0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008060408385031215612a6857600080fd5b8235612a7381612925565b946020939093013593505050565b600080600060608486031215612a9657600080fd5b8335612aa181612925565b92506020840135612ab181612925565b929592945050506040919091013590565b60008060408385031215612ad557600080fd5b8235612ae081612925565b91506020830135612af081612925565b809150509250929050565b600060208284031215612b0d57600080fd5b813561206581612925565b600080600080600080600060e0888a031215612b3357600080fd5b8735612b3e81612925565b96506020880135612b4e81612925565b95506040880135945060608801359350608088013560ff81168114612b7257600080fd5b9699959850939692959460a0840135945060c09093013592915050565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015283604082015260806060820152816080820152818360a0830137600081830160a090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101949350505050565b600060208284031215612c1957600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115610c0d57610c0d612c20565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612ca057612ca0612c62565b500490565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612cd657612cd6612c20565b5060010190565b60008251612cef8184602087016129e0565b9190910192915050565b600060208284031215612d0b57600080fd5b8151801515811461206557600080fd5b8082028115828204841417610c0d57610c0d612c20565b600082612d4157612d41612c62565b500690565b63ffffffff828116828216039080821115612d6357612d63612c20565b5092915050565b80820180821115610c0d57610c0d612c20565b600060208284031215612d8f57600080fd5b815161206581612925565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff828116828216818102831692918115828504821417612dd857612dd8612c20565b50505092915050565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff80841680612e1057612e10612c62565b9216919091049291505056fea26469706673582212207ae92536e2e51f2c34fdd91db606ada0e82a34f031a0c0c3c2ee197ccb0b5c7964736f6c63430008130033a2646970667358221220ce1ce84f22167bf650caa094ff6b828b7452d56ed0bc25fb0f74032f40d5a89d64736f6c634300081300330000000000000000000000006d5fc6ac6e753f68d4f64cc7b605d925cf642d5e
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106100a35760003560e01c80635855a25a11610076578063c9c653961161005b578063c9c6539614610154578063e6a4390514610167578063f46901ed146101a857600080fd5b80635855a25a14610137578063a2e74af61461013f57600080fd5b8063017e7e58146100a8578063094b7415146100f25780631e3dd18b14610112578063574f2ba314610125575b600080fd5b6000546100c89073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6001546100c89073ffffffffffffffffffffffffffffffffffffffff1681565b6100c86101203660046109d8565b6101bb565b6003545b6040519081526020016100e9565b6101296101f2565b61015261014d366004610a1a565b61025a565b005b6100c8610162366004610a3c565b6103a4565b6100c8610175366004610a3c565b600260209081526000928352604080842090915290825290205473ffffffffffffffffffffffffffffffffffffffff1681565b6101526101b6366004610a1a565b610886565b600381815481106101cb57600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b604051610201602082016109cb565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f9091011660408190526102419190602001610a6f565b6040516020818303038152906040528051906020012081565b73ffffffffffffffffffffffffffffffffffffffff81166102dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e696e65496e6368466163746f72793a205a45524f5f4144445245535300000060448201526064015b60405180910390fd5b60015473ffffffffffffffffffffffffffffffffffffffff16331461035d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4e696e65496e6368466163746f72793a20464f5242494444454e00000000000060448201526064016102d3565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600073ffffffffffffffffffffffffffffffffffffffff8316158015906103e0575073ffffffffffffffffffffffffffffffffffffffff821615155b610446576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e696e65496e6368466163746f72793a205a45524f5f4144445245535300000060448201526064016102d3565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610500576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4e696e65496e6368466163746f72793a204944454e544943414c5f414444524560448201527f535345530000000000000000000000000000000000000000000000000000000060648201526084016102d3565b6000808373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161061053d578385610540565b84845b909250905073ffffffffffffffffffffffffffffffffffffffff82166105c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e696e65496e6368466163746f72793a205a45524f5f4144445245535300000060448201526064016102d3565b73ffffffffffffffffffffffffffffffffffffffff82811660009081526002602090815260408083208585168452909152902054161561065e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4e696e65496e6368466163746f72793a20504149525f4558495354530000000060448201526064016102d3565b600060405180602001610670906109cb565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f9091011660408190527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086811b8216602084015285901b166034820152909150600090604801604051602081830303815290604052805190602001209050808251602084016000f56040517f485cc95500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015285811660248301529196509086169063485cc95590604401600060405180830381600087803b15801561077957600080fd5b505af115801561078d573d6000803e3d6000fd5b5050505073ffffffffffffffffffffffffffffffffffffffff84811660008181526002602081815260408084208987168086529083528185208054978d167fffffffffffffffffffffffff000000000000000000000000000000000000000098891681179091559383528185208686528352818520805488168517905560038054600181018255958190527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9095018054909716841790965592548351928352908201527f0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9910160405180910390a35050505092915050565b73ffffffffffffffffffffffffffffffffffffffff8116610903576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e696e65496e6368466163746f72793a205a45524f5f4144445245535300000060448201526064016102d3565b60015473ffffffffffffffffffffffffffffffffffffffff163314610984576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4e696e65496e6368466163746f72793a20464f5242494444454e00000000000060448201526064016102d3565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b612f5980610a9f83390190565b6000602082840312156109ea57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610a1557600080fd5b919050565b600060208284031215610a2c57600080fd5b610a35826109f1565b9392505050565b60008060408385031215610a4f57600080fd5b610a58836109f1565b9150610a66602084016109f1565b90509250929050565b6000825160005b81811015610a905760208186018101518583015201610a76565b50600092019182525091905056fe60806040526001600c5534801561001557600080fd5b5060408051808201825260098152680f09f8d862039204c560bc1b6020918201528151808301835260018152603160f81b9082015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527f89fb6ce5eb6c9a089d1a86b78297fb7182803773ecc9a9a0e0265b000a18560f818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c09091019092528151910120600355600580546001600160a01b03191633179055612e52806101076000396000f3fe608060405234801561001057600080fd5b50600436106101b95760003560e01c80636a627842116100f9578063ba9a7a5611610097578063d21220a711610071578063d21220a71461045f578063d505accf1461047f578063dd62ed3e14610492578063fff6cae9146104bd57600080fd5b8063ba9a7a5614610423578063bc25cf771461042c578063c45a01551461043f57600080fd5b80637ecebe00116100d35780637ecebe00146103c857806389afcb44146103e857806395d89b41146101d3578063a9059cbb1461041057600080fd5b80636a6278421461038c57806370a082311461039f5780637464fc3d146103bf57600080fd5b806323b872dd116101665780633644e515116101405780633644e5151461035e578063485cc955146103675780635909c0d51461037a5780635a3d54931461038357600080fd5b806323b872dd1461030a57806330adf81f1461031d578063313ce5671461034457600080fd5b8063095ea7b311610197578063095ea7b31461028b5780630dfe1681146102ae57806318160ddd146102f357600080fd5b8063022c0d9f146101be57806306fdde03146101d35780630902f1ac14610225575b600080fd5b6101d16101cc36600461294a565b6104c5565b005b61020f6040518060400160405280600981526020017ff09f8d862039204c50000000000000000000000000000000000000000000000081525081565b60405161021c9190612a04565b60405180910390f35b600854604080516dffffffffffffffffffffffffffff80841682526e01000000000000000000000000000084041660208201527c010000000000000000000000000000000000000000000000000000000090920463ffffffff169082015260600161021c565b61029e610299366004612a55565b610bfc565b604051901515815260200161021c565b6006546102ce9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161021c565b6102fc60005481565b60405190815260200161021c565b61029e610318366004612a81565b610c13565b6102fc7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b61034c601281565b60405160ff909116815260200161021c565b6102fc60035481565b6101d1610375366004612ac2565b610cec565b6102fc60095481565b6102fc600a5481565b6102fc61039a366004612afb565b610ef5565b6102fc6103ad366004612afb565b60016020526000908152604090205481565b6102fc600b5481565b6102fc6103d6366004612afb565b60046020526000908152604090205481565b6103fb6103f6366004612afb565b6112ce565b6040805192835260208301919091520161021c565b61029e61041e366004612a55565b611786565b6102fc6103e881565b6101d161043a366004612afb565b611793565b6005546102ce9073ffffffffffffffffffffffffffffffffffffffff1681565b6007546102ce9073ffffffffffffffffffffffffffffffffffffffff1681565b6101d161048d366004612b18565b611956565b6102fc6104a0366004612ac2565b600260209081526000928352604080842090915290825290205481565b6101d1611c41565b600c54600114610536576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e696e65496e63683a204c4f434b45440000000000000000000000000000000060448201526064015b60405180910390fd5b6000600c55841515806105495750600084115b6105d4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4e696e65496e63683a20494e53554646494349454e545f4f55545055545f414d60448201527f4f554e5400000000000000000000000000000000000000000000000000000000606482015260840161052d565b6000806106306008546dffffffffffffffffffffffffffff808216926e01000000000000000000000000000083049091169163ffffffff7c01000000000000000000000000000000000000000000000000000000009091041690565b5091509150816dffffffffffffffffffffffffffff16871080156106635750806dffffffffffffffffffffffffffff1686105b6106c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4e696e65496e63683a20494e53554646494349454e545f4c4951554944495459604482015260640161052d565b600654600754600091829173ffffffffffffffffffffffffffffffffffffffff91821691908116908916821480159061072e57508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614155b610794576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e696e65496e63683a20494e56414c49445f544f000000000000000000000000604482015260640161052d565b8a156107a5576107a5828a8d611e0d565b89156107b6576107b6818a8c611e0d565b8615610849576040517fc18c82cc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a169063c18c82cc906108169033908f908f908e908e90600401612b8f565b600060405180830381600087803b15801561083057600080fd5b505af1158015610844573d6000803e3d6000fd5b505050505b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa1580156108b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d79190612c07565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290945073ffffffffffffffffffffffffffffffffffffffff8216906370a0823190602401602060405180830381865afa158015610944573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109689190612c07565b92505050600089856dffffffffffffffffffffffffffff1661098a9190612c4f565b83116109975760006109bb565b6109b18a6dffffffffffffffffffffffffffff8716612c4f565b6109bb9084612c4f565b905060006109d98a6dffffffffffffffffffffffffffff8716612c4f565b83116109e6576000610a0a565b610a008a6dffffffffffffffffffffffffffff8716612c4f565b610a0a9084612c4f565b90506000821180610a1b5750600081115b610aa7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4e696e65496e63683a20494e53554646494349454e545f494e5055545f414d4f60448201527f554e540000000000000000000000000000000000000000000000000000000000606482015260840161052d565b6000610ac9610ab784601d611fad565b610ac387612710611fad565b9061206c565b90506000610adb610ab784601d611fad565b9050610b086305f5e100610b026dffffffffffffffffffffffffffff8b8116908b16611fad565b90611fad565b610b128383611fad565b1015610b7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f4e696e65496e63683a204b000000000000000000000000000000000000000000604482015260640161052d565b5050610b88848488886120ae565b60408051838152602081018390529081018c9052606081018b905273ffffffffffffffffffffffffffffffffffffffff8a169033907fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229060800160405180910390a350506001600c55505050505050505050565b6000610c0933848461238a565b5060015b92915050565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14610cd75773ffffffffffffffffffffffffffffffffffffffff84166000908152600260209081526040808320338452909152902054610ca5908361206c565b73ffffffffffffffffffffffffffffffffffffffff851660009081526002602090815260408083203384529091529020555b610ce28484846123f9565b5060019392505050565b73ffffffffffffffffffffffffffffffffffffffff821615801590610d26575073ffffffffffffffffffffffffffffffffffffffff811615155b610d8c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4e696e65496e63683a205a45524f5f4144445245535300000000000000000000604482015260640161052d565b8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610e21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e696e65496e63683a204944454e544943414c5f414444524553534553000000604482015260640161052d565b60055473ffffffffffffffffffffffffffffffffffffffff163314610ea2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4e696e65496e63683a20464f5242494444454e00000000000000000000000000604482015260640161052d565b6006805473ffffffffffffffffffffffffffffffffffffffff9384167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560078054929093169116179055565b6000600c54600114610f63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e696e65496e63683a204c4f434b454400000000000000000000000000000000604482015260640161052d565b6000600c819055600854600654604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290516dffffffffffffffffffffffffffff808516956e01000000000000000000000000000090950416939273ffffffffffffffffffffffffffffffffffffffff16916370a082319160248083019260209291908290030181865afa158015611009573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102d9190612c07565b6007546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015291925060009173ffffffffffffffffffffffffffffffffffffffff909116906370a0823190602401602060405180830381865afa1580156110a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c59190612c07565b905060006110e3836dffffffffffffffffffffffffffff871661206c565b90506000611101836dffffffffffffffffffffffffffff871661206c565b9050600061110f87876124c6565b60008054919250819003611149576111356103e8610ac36111308787611fad565b612631565b985061114460006103e86126a1565b61119e565b61119b6dffffffffffffffffffffffffffff89166111678684611fad565b6111719190612c91565b6dffffffffffffffffffffffffffff891661118c8685611fad565b6111969190612c91565b61274a565b98505b6000891161122e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4e696e65496e63683a20494e53554646494349454e545f4c495155494449545960448201527f5f4d494e54454400000000000000000000000000000000000000000000000000606482015260840161052d565b6112388a8a6126a1565b61124486868a8a6120ae565b81156112805760085461127c906dffffffffffffffffffffffffffff808216916e010000000000000000000000000000900416611fad565b600b555b604080518581526020810185905233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a250506001600c5550949695505050505050565b600080600c5460011461133d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e696e65496e63683a204c4f434b454400000000000000000000000000000000604482015260640161052d565b6000600c819055600854600654600754604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290516dffffffffffffffffffffffffffff808616966e010000000000000000000000000000909604169473ffffffffffffffffffffffffffffffffffffffff94851694909316929184916370a08231916024808201926020929091908290030181865afa1580156113ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114139190612c07565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915060009073ffffffffffffffffffffffffffffffffffffffff8416906370a0823190602401602060405180830381865afa158015611483573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a79190612c07565b306000908152600160205260408120549192506114c488886124c6565b600054909150806114d58487611fad565b6114df9190612c91565b9a50806114ec8486611fad565b6114f69190612c91565b995060008b118015611508575060008a115b611594576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4e696e65496e63683a20494e53554646494349454e545f4c495155494449545960448201527f5f4255524e454400000000000000000000000000000000000000000000000000606482015260840161052d565b61159e3084612760565b6115a9878d8d611e0d565b6115b4868d8c611e0d565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8816906370a0823190602401602060405180830381865afa15801561161e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116429190612c07565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290955073ffffffffffffffffffffffffffffffffffffffff8716906370a0823190602401602060405180830381865afa1580156116af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d39190612c07565b93506116e185858b8b6120ae565b811561171d57600854611719906dffffffffffffffffffffffffffff808216916e010000000000000000000000000000900416611fad565b600b555b604080518c8152602081018c905273ffffffffffffffffffffffffffffffffffffffff8e169133917fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496910160405180910390a35050505050505050506001600c81905550915091565b6000610c093384846123f9565b600c546001146117ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e696e65496e63683a204c4f434b454400000000000000000000000000000000604482015260640161052d565b6000600c556006546007546008546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff93841693909216916118c791849186916118c2916dffffffffffffffffffffffffffff9091169084906370a08231906024015b602060405180830381865afa15801561189e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac39190612c07565b611e0d565b6008546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015261194c91839186916118c2916e0100000000000000000000000000009091046dffffffffffffffffffffffffffff169073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190602401611881565b50506001600c5550565b428410156119c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4e696e65496e63683a2045585049524544000000000000000000000000000000604482015260640161052d565b60035473ffffffffffffffffffffffffffffffffffffffff8816600090815260046020526040812080549192917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918b918b918b919087611a2083612ca5565b9091555060408051602081019690965273ffffffffffffffffffffffffffffffffffffffff94851690860152929091166060840152608083015260a082015260c0810187905260e00160405160208183030381529060405280519060200120604051602001611ac19291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015611b4a573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811615801590611bc557508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611c2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4e696e65496e63683a20494e56414c49445f5349474e41545552450000000000604482015260640161052d565b611c3689898961238a565b505050505050505050565b600c54600114611cad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e696e65496e63683a204c4f434b454400000000000000000000000000000000604482015260640161052d565b6000600c556006546040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152611e069173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015611d22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d469190612c07565b6007546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190602401602060405180830381865afa158015611db4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd89190612c07565b6008546dffffffffffffffffffffffffffff808216916e0100000000000000000000000000009004166120ae565b6001600c55565b604080518082018252601981527f7472616e7366657228616464726573732c75696e743235362900000000000000602091820152815173ffffffffffffffffffffffffffffffffffffffff85811660248301526044808301869052845180840390910181526064909201845291810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905291516000928392871691611ed49190612cdd565b6000604051808303816000865af19150503d8060008114611f11576040519150601f19603f3d011682016040523d82523d6000602084013e611f16565b606091505b5091509150818015611f40575080511580611f40575080806020019051810190611f409190612cf9565b611fa6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e696e65496e63683a205452414e534645525f4641494c454400000000000000604482015260640161052d565b5050505050565b600082600003611fbf57506000610c0d565b6000611fcb8385612d1b565b905082611fd88583612c91565b14612065576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60448201527f7700000000000000000000000000000000000000000000000000000000000000606482015260840161052d565b9392505050565b600061206583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612811565b6dffffffffffffffffffffffffffff84118015906120da57506dffffffffffffffffffffffffffff8311155b612140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4e696e65496e63683a204f564552464c4f570000000000000000000000000000604482015260640161052d565b600061215164010000000042612d32565b60085490915060009061218a907c0100000000000000000000000000000000000000000000000000000000900463ffffffff1683612d46565b905060008163ffffffff161180156121b157506dffffffffffffffffffffffffffff841615155b80156121cc57506dffffffffffffffffffffffffffff831615155b1561229a578063ffffffff16612209856121e586612865565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690612890565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166122319190612d1b565b600960008282546122429190612d6a565b909155505063ffffffff811661225b846121e587612865565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166122839190612d1b565b600a60008282546122949190612d6a565b90915550505b6008805463ffffffff84167c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff6dffffffffffffffffffffffffffff8981166e0100000000000000000000000000009081027fffffffff000000000000000000000000000000000000000000000000000000009095168c83161794909417918216831794859055604080519382169282169290921783529290930490911660208201527f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1910160405180910390a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260016020526040902054612429908261206c565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260016020526040808220939093559084168152205461246590826128ac565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906123ec9085815260200190565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663017e7e586040518163ffffffff1660e01b8152600401602060405180830381865afa158015612536573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061255a9190612d7d565b600b5473ffffffffffffffffffffffffffffffffffffffff821615801594509192509061261d5780156126185760006125a96111306dffffffffffffffffffffffffffff888116908816611fad565b905060006125b683612631565b9050808211156126155760006125d86125cf848461206c565b60005490611fad565b905060006125f1836125eb866007611fad565b906128ac565b905060006125ff8284612c91565b905080156126115761261187826126a1565b5050505b50505b612629565b8015612629576000600b555b505092915050565b60006003821115612692575080600061264b600283612c91565b612656906001612d6a565b90505b8181101561268c579050806002816126718186612c91565b61267b9190612d6a565b6126859190612c91565b9050612659565b50919050565b811561269c575060015b919050565b6000546126ae90826128ac565b600090815573ffffffffffffffffffffffffffffffffffffffff83168152600160205260409020546126e090826128ac565b73ffffffffffffffffffffffffffffffffffffffff83166000818152600160205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061273e9085815260200190565b60405180910390a35050565b60008183106127595781612065565b5090919050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054612790908261206c565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260016020526040812091909155546127c4908261206c565b600090815560405182815273ffffffffffffffffffffffffffffffffffffffff8416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200161273e565b6000818484111561284f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161052d9190612a04565b50600061285c8486612c4f565b95945050505050565b6000610c0d6e0100000000000000000000000000006dffffffffffffffffffffffffffff8416612d9a565b60006120656dffffffffffffffffffffffffffff831684612de1565b6000806128b98385612d6a565b905083811015612065576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161052d565b73ffffffffffffffffffffffffffffffffffffffff8116811461294757600080fd5b50565b60008060008060006080868803121561296257600080fd5b8535945060208601359350604086013561297b81612925565b9250606086013567ffffffffffffffff8082111561299857600080fd5b818801915088601f8301126129ac57600080fd5b8135818111156129bb57600080fd5b8960208285010111156129cd57600080fd5b9699959850939650602001949392505050565b60005b838110156129fb5781810151838201526020016129e3565b50506000910152565b6020815260008251806020840152612a238160408501602087016129e0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008060408385031215612a6857600080fd5b8235612a7381612925565b946020939093013593505050565b600080600060608486031215612a9657600080fd5b8335612aa181612925565b92506020840135612ab181612925565b929592945050506040919091013590565b60008060408385031215612ad557600080fd5b8235612ae081612925565b91506020830135612af081612925565b809150509250929050565b600060208284031215612b0d57600080fd5b813561206581612925565b600080600080600080600060e0888a031215612b3357600080fd5b8735612b3e81612925565b96506020880135612b4e81612925565b95506040880135945060608801359350608088013560ff81168114612b7257600080fd5b9699959850939692959460a0840135945060c09093013592915050565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015283604082015260806060820152816080820152818360a0830137600081830160a090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101949350505050565b600060208284031215612c1957600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115610c0d57610c0d612c20565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612ca057612ca0612c62565b500490565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612cd657612cd6612c20565b5060010190565b60008251612cef8184602087016129e0565b9190910192915050565b600060208284031215612d0b57600080fd5b8151801515811461206557600080fd5b8082028115828204841417610c0d57610c0d612c20565b600082612d4157612d41612c62565b500690565b63ffffffff828116828216039080821115612d6357612d63612c20565b5092915050565b80820180821115610c0d57610c0d612c20565b600060208284031215612d8f57600080fd5b815161206581612925565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff828116828216818102831692918115828504821417612dd857612dd8612c20565b50505092915050565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff80841680612e1057612e10612c62565b9216919091049291505056fea26469706673582212207ae92536e2e51f2c34fdd91db606ada0e82a34f031a0c0c3c2ee197ccb0b5c7964736f6c63430008130033a2646970667358221220ce1ce84f22167bf650caa094ff6b828b7452d56ed0bc25fb0f74032f40d5a89d64736f6c63430008130033